Skip to content

build: Bump TypeScript 5.9.3 to ^6.0.3 - #146

Closed
facioquobo[bot] wants to merge 1 commit into
mainfrom
167-bump-typescript-6
Closed

build: Bump TypeScript 5.9.3 to ^6.0.3#146
facioquobo[bot] wants to merge 1 commit into
mainfrom
167-bump-typescript-6

Conversation

@facioquobo

@facioquobo facioquobo Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Bump typescript from 5.9.3 to ^6.0.3 (latest stable).
  • Pre-implementation review: confirmed no in-flight PR or existing work touches this dependency (0 open PRs on this repo at time of writing); this is a standalone dependency-currency bump.
  • TypeScript 6.0 changes the default types compiler option from implicitly including every package under node_modules/@types to an empty array (release notes). This repo's root tsconfig.json relied on the old implicit behavior to resolve ambient Node globals (Buffer, process) for playwright.config.ts and other Node-context files reachable from the default program, which surfaced ~60 new TS2591/TS2550 errors under 6.0. Fixed by explicitly setting "types": ["node"] on the root config; tsconfig.app.json (browser build) and tsconfig.spec.json (test build) already declare their own types arrays and are unaffected.
  • @angular/build@21.2.x declares a peer dependency of typescript >=5.9 <6.0, narrower than @angular/compiler-cli's >=5.9 <6.1. npm install surfaces this as an ERESOLVE overriding peer dependency warning (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/core to ^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 the tsconfig.json fix 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 TS6 types default change)
  • npm run build — pass (ng build --configuration=development completes, 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 full npm run test:coverage and npm run e2e suites as part of this PR's checks — please treat those as the authoritative test signal.

Requesting facioquo/org-reviewers for review.

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.
@facioquobo
facioquobo Bot marked this pull request as ready for review July 7, 2026 14:10
@facioquobo
facioquobo Bot requested a review from a team July 7, 2026 14:10
@facioquobo
facioquobo Bot marked this pull request as draft July 7, 2026 14:12
@facioquobo

facioquobo Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

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).

@facioquobo

facioquobo Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

Blocked: TypeScript 6 is incompatible with the pinned Angular build toolchain here

CI's lint-and-test job fails on npm ci with an ERESOLVE error: @angular/build@21.2.13 declares peerDependencies.typescript: ">=5.9 <6.0". I checked every published 21.x release of @angular/build on npm (21.0.0 through the current 21.2.18) and all of them cap TypeScript below 6.0. The peer range only opens to >=6.0 <6.1 starting at @angular/build@22.0.0, which itself requires @angular/core@^22.0.0.

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 --legacy-peer-deps/an overrides entry (which would silence a real, unvalidated incompatibility Angular's own maintainers haven't signed off on), I'm closing this PR without merging. TypeScript 6 adoption for this repo needs to be planned and approved as part of an Angular 21 -> 22 upgrade, tracked separately with its own scope and risk assessment.

No code in this PR is unsafe; it's simply not completable as scoped. Local npm install masked this because npm's non-ci install path auto-resolves peer conflicts with a warning instead of failing, which is why it wasn't caught before pushing.

@facioquobo

facioquobo Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

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.

@facioquobo facioquobo Bot closed this Jul 7, 2026
@DaveSkender
DaveSkender deleted the 167-bump-typescript-6 branch July 7, 2026 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant