nx
Nx
GitHub
Nx
Workspace
GitHub
CI Pipeline Executions
Current execution
Succeeded
fix/cnw-pin-typescript-preset
Runs and Agents
Timeline
Configuration
Self-Healing CI
Project Graph
Resource Usage
Analysis
Conformance
Runs
Current run
Succeeded
Tasks
Resource Usage
Insights
Compare tasks
Analytics
Sign in
Toggle sidebar
fix(core): pin typescript in preset dependencies so npm cannot hoist typescript 7 `@phenomnomnominal/tsquery` declares `typescript: >3.0.0` as a peer dependency. npm auto-installs peers, so with no `typescript` in the new workspace's package.json it resolves that peer to the latest major — now 7.x — and hoists it to the workspace root. TypeScript 7's entry point only exports `version` and `versionMajorMinor`; the compiler API moved to `typescript/unstable/*`. The preset generator then fails with `ts.readConfigFile is not a function`. Whether this bites depends on hoisting order. `@nx/next` and `@nx/react` depend on tsquery directly, so its permissive peer wins the root slot over `@nx/eslint`'s concrete `~6.0.3`. In the node preset tsquery sits one level deeper and `@nx/eslint` wins instead, which is why only some presets break. Pinning `typescript` alongside the other preset dependencies puts a concrete range in package.json before the first install, so npm resolves the peer to it. angular, nest and web-components already did this. This adds nothing new to the final workspace — `@nx/js:init` already installs the same version — it just lands before the install rather than after. The apps and npm presets are excluded and split out of the branch they shared with ts and ts-standalone: neither runs a preset generator, so `@nx/js:init` never runs and typescript would be net-new there. ts-standalone is the only preset that prompts for JS vs TS, so it mirrors `@nx/js:init` and skips the pin when `js` is set.
nx run-many -t check-imports check-lock-files check-codeowners --parallel=1 --no-dte
⌘K
Succeeded
nx run-many -t check-imports check-lock-files check-codeowners --parallel=1 --no-dte
Click to copy
Linux
4 CPU cores
9bee1746
36497
Get faster results
Learn how to enable distribution.
Atomizer enabled
1 group of tasks optimized.