etherpad-lite/bin/package.json
정건우(ignite) 66dd455124
Migrate server to TypeScript 7 (tsgo) (#8039)
* 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>
2026-07-27 21:00:32 +02:00

44 lines
1.5 KiB
JSON

{
"name": "bin",
"version": "3.3.2",
"description": "",
"main": "checkAllPads.js",
"directories": {
"doc": "doc"
},
"dependencies": {
"ep_etherpad-lite": "workspace:../src",
"log4js": "^6.9.1",
"semver": "^7.8.5",
"tsx": "^4.23.1",
"ueberdb2": "6.1.16"
},
"devDependencies": {
"@types/node": "^26.1.1",
"@types/semver": "^7.7.1",
"typescript": "^7.0.0"
},
"scripts": {
"makeDocs": "node --import tsx make_docs.ts",
"checkPad": "node --import tsx checkPad.ts",
"checkAllPads": "node --import tsx checkAllPads.ts",
"compactPad": "node --import tsx compactPad.ts",
"compactAllPads": "node --import tsx compactAllPads.ts",
"compactStalePads": "node --import tsx compactStalePads.ts",
"createUserSession": "node --import tsx createUserSession.ts",
"deletePad": "node --import tsx deletePad.ts",
"repairPad": "node --import tsx repairPad.ts",
"release": "node --import tsx release.ts",
"deleteAllGroupSessions": "node --import tsx deleteAllGroupSessions.ts",
"importSqlFile": "node --import tsx importSqlFile.ts",
"migrateDirtyDBtoRealDB": "node --import tsx migrateDirtyDBtoRealDB.ts",
"rebuildPad": "node --import tsx rebuildPad.ts",
"stalePlugins": "node --import tsx ./plugins/stalePlugins.ts",
"checkPlugin": "node --import tsx ./plugins/checkPlugin.ts",
"plugins": "node --import tsx ./plugins.ts",
"generateChangelog": "node --import tsx generateReleaseNotes.ts",
"migrateDB": "node --import tsx migrateDB.ts"
},
"author": "",
"license": "ISC"
}