mirror of
https://github.com/ether/etherpad-lite.git
synced 2026-07-29 13:00:27 +00:00
* Migrate server to TypeScript 7 (tsgo) Bump typescript to ^7.0.0 in ep_etherpad-lite and bin. Fix the two diagnostics the new compiler reports: an unguarded spread of splitTextLines' nullable result in TextLinesMutator (silenced with @ts-ignore, matching the sibling push calls), and per-element overload errors on the hooks.ts test-case concat that a single @ts-ignore no longer covers (replaced with an explicit any[] cast). admin and ui intentionally stay on TypeScript 6: their build depends on openapi-typescript, which uses the JS compiler API that tsgo does not expose until 7.1. pnpm-workspace.yaml gains minimum-release-age exclusions for the freshly released typescript 7 packages. * Address review: null-safe splitTextLines spread, typed hook test cases Replace the @ts-ignore-only approach with a real null guard (splitTextLines(text) ?? []) in TextLinesMutator.insert, and replace the any[] cast in hooks.ts with an explicit HookFnTestCase type so the concatenated test cases stay shape-checked. * Type _curSplice as [number, number, ...string[]], drop 21 ts-ignores The tuple was declared [number, number?] but it actually carries the lines to insert after the two splice numbers (the JSDoc already said so). Typing it correctly removes every curSplice-related ts-ignore in the file, including the one added earlier in this branch. The two remaining ignores are about StringArrayLike lines, unrelated to this migration. No behavior change: types and casts only. tsc --noEmit clean, easysync mutation tests pass. --------- Co-authored-by: SamTV12345 <40429738+samtv12345@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| deb-src | ||
| nsis | ||
| plugins | ||
| buildDebian.sh | ||
| buildForWindows.sh | ||
| checkAllPads.ts | ||
| checkPad.ts | ||
| cleanRun.sh | ||
| commonPlugins.ts | ||
| compactAllPads.ts | ||
| compactPad.ts | ||
| compactStalePads.ts | ||
| convertSettings.json.template | ||
| createUserSession.ts | ||
| debugRun.sh | ||
| deleteAllGroupSessions.ts | ||
| deletePad.ts | ||
| extractPadData.ts | ||
| fastRun.sh | ||
| functions.sh | ||
| generateReleaseNotes.ts | ||
| importSqlFile.ts | ||
| installDeps.sh | ||
| installer.ps1 | ||
| installer.sh | ||
| installLocalPlugins.sh | ||
| make_docs.ts | ||
| migrateDB.ts | ||
| migrateDirtyDBtoRealDB.ts | ||
| package.json | ||
| plugins.ts | ||
| push-after-release.sh | ||
| rebuildPad.ts | ||
| release.ts | ||
| repairPad.ts | ||
| run-frontend-tests-with-disables.sh | ||
| run.sh | ||
| safeRun.sh | ||
| setup-trusted-publishers.sh | ||
| tsconfig.json | ||
| updatePlugins.sh | ||