Skip to content

deps: move to TypeScript 6 and declare the node types explicitly - #76

Merged
leonacostaok merged 1 commit into
mainfrom
deps/typescript-6
Aug 17, 2026
Merged

leonacostaok merged 1 commit into
mainfrom
deps/typescript-6

Conversation

@leonacostaok

Copy link
Copy Markdown
Member

Replaces #45, which failed every job with 325 copies of:

TS2591: Cannot find name 'node:child_process'. Do you need to install type
definitions for node? Try `npm i --save-dev @types/node` ...

on ordinary import { execFile } from "node:child_process" lines, with @types/node installed the whole time. The suggestion in the error was right, just not for the reason it implies.

Cause

TypeScript 6 no longer sweeps every @types package in node_modules into the global scope automatically. This repo depended on that: tsconfig.base.json had no types field at all.

Naming node restores it. One line, 325 errors to zero:

-    "skipLibCheck": true
+    "skipLibCheck": true,
+    "types": ["node"]

The restriction is the point

Automatic inclusion was also dragging in @types/esrecurse, @types/estree and @types/json-schema — all transitive through eslint, none of them meant to be global. @types/node is the only @types package this repo actually declares.

Verified locally on 6.0.3

npm run build clean
npm run lint clean
npm run format:check clean
npm test 1,354 passing across all eight suites

Replaces #45, which failed every job with 325 copies of

  TS2591: Cannot find name 'node:child_process'. Do you need to install type
  definitions for node?

on ordinary `import { execFile } from "node:child_process"` lines, with
@types/node installed the whole time.

TypeScript 6 no longer pulls every @types package in node_modules into the
global scope automatically, and this repo relied on that: tsconfig.base.json
had no `types` field at all. Naming `node` restores it. That single line takes
the build from 325 errors to zero.

Restricting the list is the point, not a side effect. Automatic inclusion was
also dragging in @types/esrecurse, @types/estree and @types/json-schema, which
arrive transitively through eslint and were never meant to be global. Only
@types/node is a declared dependency here.

Verified on 6.0.3: build clean, lint clean, format:check clean, 1,354 tests
passing across all eight suites.
@leonacostaok
leonacostaok merged commit 6a81b55 into main Aug 17, 2026
15 checks passed
@leonacostaok
leonacostaok deleted the deps/typescript-6 branch August 17, 2026 20:08
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