Repository navigation
build(deps): bump @types/node from 22 to 26 - #60
Merged
Merged
Conversation
This was referenced Sep 6, 2026
stuffbucket
force-pushed
the
chore/npm-major-language
branch
from
September 7, 2026 04:08
2dcfaf1 to
1197e1f
Compare
stuffbucket
added a commit
that referenced
this pull request
Sep 7, 2026
The other half of the language group from #37. Depends on nothing else; #60 carries `@types/node` separately. ## Why a bare bump does not work **TypeScript 7.0 ships no programmatic API.** The package root exports `lib/version.cjs` and nothing else — `typeof ts.createProgram` is `undefined`. The API is planned for 7.1. That breaks three things at once here: - seven files use the compiler API (`find-casts.ts`, `provider-host-boundary.ts`, maximal-electron's test helpers and scripts); - typescript-eslint reads `ts.versionMajorMinor` and **refuses** major ≥ 7; - knip 5 crashes calling into the stub. The typescript-eslint failure is the dangerous one: install succeeds, `tsc` gets faster, and **lint silently stops running rules**. ## The fix is the configuration TypeScript documents for this gap ```json "@typescript/native": "npm:typescript@^7.0.2", "typescript": "npm:@typescript/typescript6@^6.0.2" ``` `typescript` resolves to the TS 6 compatibility package, which carries the full compiler API; TS 7 arrives under an alias owning the `tsc` bin (TS 6 names its own bin `tsc6`, so no collision). Typechecking runs on 7, everything needing the API runs on 6 — the JS implementation of the same language version. **Nothing that consumes the compiler API changes.** All seven files are untouched, knip stays on 5, and typescript-eslint lands *inside* its peer range instead of being refused. ## Two real migrations | Change | Why | |---|---| | `types: ["bun"]` in `maximal`, `maximal-core` | TS 6/7 no longer auto-include it. Without it every `node:*` import and `process`/`console` fails in `maximal`, and `maximal-core`'s declaration build fails on `RequestInit`, `Response`, `AbortController`, `setTimeout`. `maximal-core`'s downstream tsconfigs keep `types: []` and are unaffected — they do not extend it. | | `ignoreDeprecations: "6.0"` in the six tsup-dts packages | tsup injects `baseUrl`, which TS 7 drops. None of these configs sets it themselves. Removable once tsup stops emitting it. | ## A wrong turn worth recording My first attempt aliased **TypeScript 5** for the API instead. It reached zero typecheck errors and every lint passed — and it was wrong. pnpm gave typescript-eslint the 5.9.3 copy, so `tsc` checked with 7 while the type-aware lint rules checked with 5: two type systems judging the same code. `verify-workspace.mjs`'s "one typescript major" guard did **not** catch it, because the alias installed under a different package name. That guard's own comment records this exact class of failure from the last time this workspace ran two majors — *"made eslint-plugin-perfectionist call a TS 5 API on the TS 7 module"*. Under the official pair the guard is honest again: `typescript` resolves to one major everywhere. ## Verification - All nine packages typecheck **and** lint (type-aware rules confirmed running, not silently skipped). - `maximal-core` `check:deep:host` passes end to end — including knip 5, casts, deps, dupes, build, and the downstream contract typecheck. - Every tsup declaration build passes. *(The container caught five packages I had missed by running only `tsc --noEmit` locally instead of the builds.)* - Container suite **15/15 tasks**; `verify:workspace` clean; lockfile re-resolved and stripped of rotating shard hosts.
stuffbucket
force-pushed
the
chore/npm-major-language
branch
from
September 7, 2026 04:48
bd5cef8 to
9d00748
Compare
Half of the npm-major language group. typescript 5.9 -> 7 is the other half and is not here: TypeScript 7 no longer exports the compiler API from the package root, so it is a migration rather than a bump and gets its own change. All six declarations move together, so the workspace stays on one major. Recorded, because it is a real tradeoff rather than a clean win: @types/node's major tracks the Node major, and this repo pins Node 24 (.nvmrc, asserted by verify-workspace.mjs). At 26 the definitions describe a runtime one major ahead of the one that runs, so code can typecheck against APIs that are not there. The previous state had the types one major BEHIND the runtime, which only ever meant they described a subset. Brian chose latest over matching the runtime; noting the direction of the risk so the next person reading this does not have to rediscover it. Verified: all six consumers typecheck, the container suite is 15/15, and verify:workspace passes with the lockfile re-resolved and stripped of rotating shard hosts.
Two type-aware lint rules start firing under @types/node 26, both from
the same change: ExecException now extends Omit<NodeJS.ErrnoException,
"code"> rather than Error, so the Error brand is gone from the type.
opencode.ts prefer-promise-reject-errors rejected a hand-rolled
promisify whose reject() argument no longer types as an
Error. Replaced with promisify(exec) from node:util,
which is what the hand-rolled wrapper was reimplementing.
Same rejection value, twelve fewer lines, and no cast.
gh-cli.ts no-deprecated flagged ExecFileException, now a deprecated
empty alias for ExecException. Renamed at the import and
the callback parameter.
Caught by CI rather than locally: the container suite does not run lint
(the image builds and tests; CI lints natively), and for this PR I had
checked types without linting. Both were real.
stuffbucket
force-pushed
the
chore/npm-major-language
branch
from
September 7, 2026 04:54
9d00748 to
b21c4b3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Group 4 of 4 replacing #37 — or rather, half of it.
All six declarations move together (
anthropic-provider,maximal-dsh-host,maximal-electron,maximal-provider-contract,maximal/client,omlx), sothe workspace stays on one major.
typescript 5.9 → 7 is not in this PR
It was grouped with
@types/nodeand does not belong there. TypeScript 7'spackage exports
"."→./lib/version.cjs— the package root is now just theversion string. The compiler API moved to
typescript/unstable/*(upstream'snaming).
import * as ts from "typescript"no longer gets you a compiler.That produces 307 errors across three packages from two unrelated causes, and
it is a migration rather than a bump. It gets its own PR.
A tradeoff worth recording
@types/node's major tracks the Node major, and this repo pins Node 24(
.nvmrc, asserted byverify-workspace.mjs: "node 24.x is what is running").At 26, the definitions describe a runtime one major ahead of the one that
actually runs — so code can typecheck against APIs that are not there at run
time. The previous state had types one major behind the runtime, which only
ever meant they described a subset: the safe direction.
I raised
^24.xas the alternative (matching the runtime, still a major bumpoff 22, and consistent with
@types/bunbeing held at^1.2.23to match the.bun-versionpin). Brian chose latest. Noting the direction of the risk hereso it does not have to be rediscovered, not to reopen the decision.
Verification
tsc --noEmit, TypeScript 5.9).verify:workspacepasses; lockfile re-resolved and stripped of rotating shardhosts per SOURCES.md.
Replaces part of #37.