Run the tests on Node 22.16, and fix what a fresh setup tripped over
Node 22.16 runs TypeScript only behind --experimental-strip-types (on by default from 22.18), so `npm test` failed on every file with ERR_UNKNOWN_FILE_EXTENSION. The flag is harmless on newer versions. probe and session-diagnose still imported dist/schulcloud/client.js, which the move to core/ renamed, so both scripts died at import. A relative MIRROR_DIR broke file serving: res.sendFile refuses a relative path, and resolveWithin returns an absolute path only when its root is one. The config resolves it once, at load. package-lock.json is what `npm install` records today: the `schulcloud` bin, and no stale peer flags. 101 tests. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
"start": "node dist/bin/http.js",
|
||||
"stdio": "node dist/bin/stdio.js",
|
||||
"typecheck": "tsc -p tsconfig.json --noEmit",
|
||||
"test": "node --test test/*.test.ts",
|
||||
"test": "node --test --experimental-strip-types test/*.test.ts",
|
||||
"probe": "node --env-file=.env scripts/probe.mjs",
|
||||
"smoke": "node --env-file=.env scripts/smoke.mjs",
|
||||
"session-diagnose": "node --env-file=.env scripts/session-diagnose.mjs",
|
||||
|
||||
Reference in New Issue
Block a user