Repository navigation
deps: move to TypeScript 6 and declare the node types explicitly - #76
Merged
Merged
Conversation
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.
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.
Replaces #45, which failed every job with 325 copies of:
on ordinary
import { execFile } from "node:child_process"lines, with@types/nodeinstalled the whole time. The suggestion in the error was right, just not for the reason it implies.Cause
TypeScript 6 no longer sweeps every
@typespackage innode_modulesinto the global scope automatically. This repo depended on that:tsconfig.base.jsonhad notypesfield at all.Naming
noderestores it. One line, 325 errors to zero:The restriction is the point
Automatic inclusion was also dragging in
@types/esrecurse,@types/estreeand@types/json-schema— all transitive through eslint, none of them meant to be global.@types/nodeis the only@typespackage this repo actually declares.Verified locally on 6.0.3
npm run buildnpm run lintnpm run format:checknpm test