build: Bump TypeScript 5.9.3 to ^6.0.3 - #146
Conversation
TypeScript 6.0 changed the default `types` compiler option from implicitly including every package under node_modules/@types to an empty array, so the root tsconfig now explicitly opts into "node" to keep ambient Node globals (Buffer, process) resolving for playwright.config.ts and other node-context files reachable from the default program. @angular/build 21.2.x peer-depends on typescript <6.0, but @angular/compiler-cli allows >=5.9 <6.1 and lint/typecheck/build all pass clean under 6.0.3.
|
Converting back to draft: CI's `npm ci` step fails with a hard `ERESOLVE` error that my local `npm install` masked with an override warning. Root cause: `@angular/build@21.2.13` declares `peerDependencies.typescript: ">=5.9 <6.0"`. This is Angular's own compatibility ceiling, not incidental — checked every 21.2.x patch (13 through 18) and all cap at `<6.0`. Full TypeScript 6.0 support only ships in `@angular/build@22.x`, which requires `@angular/core@^22.0.0` (a major Angular upgrade, out of scope for a dependency-only bump). `npm install` resolves this leniently with a warning and overrides the conflict, so lint/typecheck/build all pass locally against 6.0.3 — but `npm ci` (used in CI, and the correct tool for reproducible installs) refuses to install at all under this conflict. Holding this in draft pending a decision on how to proceed (e.g. wait for an Angular 21.x patch that raises the ceiling, or explicitly accept the unsupported-by-Angular combination via a package.json `overrides` entry). |
Blocked: TypeScript 6 is incompatible with the pinned Angular build toolchain hereCI's So this repo cannot adopt TypeScript 6 as a standalone dependency bump — it requires bumping Angular's core/build packages from 21.x to 22.x, a major framework version upgrade with its own migration surface, breaking changes, and risk profile. That's materially different from "single-dependency devDependency bump, no runtime/production code path affected," which is what this PR (and its Board pre-approval) was scoped and assessed as. Rather than forcing the install with No code in this PR is unsafe; it's simply not completable as scoped. Local |
|
Closing per the finding above: not completable as scoped without a major Angular 21->22 bump. Will reopen tracked as part of that larger migration once planned/approved. |
Summary
typescriptfrom5.9.3to^6.0.3(latest stable).typescompiler option from implicitly including every package undernode_modules/@typesto an empty array (release notes). This repo's roottsconfig.jsonrelied on the old implicit behavior to resolve ambient Node globals (Buffer,process) forplaywright.config.tsand other Node-context files reachable from the default program, which surfaced ~60 newTS2591/TS2550errors under 6.0. Fixed by explicitly setting"types": ["node"]on the root config;tsconfig.app.json(browser build) andtsconfig.spec.json(test build) already declare their owntypesarrays and are unaffected.@angular/build@21.2.xdeclares a peer dependency oftypescript >=5.9 <6.0, narrower than@angular/compiler-cli's>=5.9 <6.1.npm installsurfaces this as anERESOLVE overriding peer dependencywarning (not a hard failure). Angular's own build tooling does not officially support TypeScript 6.0 until@angular/build@22.x, which requires bumping@angular/coreto^22.0.0— out of scope for this dependency-only bump. Flagging this for awareness; lint/typecheck/build all pass clean against 6.0.3 in the meantime.Test plan
Ran locally against TypeScript 6.0.3:
npm run lint— pass (markdownlint, eslint, prettier all clean)npm run typecheck— pass (zero errors after thetsconfig.jsonfix above; confirmed the errors were absent under the previous 5.9.3 pin and only appear under 6.0.3, isolating the regression to the TS6typesdefault change)npm run build— pass (ng build --configuration=developmentcompletes, bundle output unchanged in shape)npm test(Vitest) — could not complete a full run in this environment due to sandbox memory limits (Angular + jsdom + Vite transform is memory-heavy); a reduced-scope run confirmed the Angular TestBed and spec files execute correctly under TS 6.0.3. CI (ubuntu-latest, ample memory) will run the fullnpm run test:coverageandnpm run e2esuites as part of this PR's checks — please treat those as the authoritative test signal.Requesting
facioquo/org-reviewersfor review.