Context
The TypeScript 7.0 blog documents the recommended side-by-side install:
https://devblogs.microsoft.com/typescript/announcing-typescript-7-0/#running-side-by-side-with-typescript-6.0
{
"devDependencies": {
"@typescript/native": "npm:typescript@^7.0.2",
"typescript": "npm:@typescript/typescript6@^6.0.2"
}
}
Gap
With that layout, node_modules/typescript is effectively a thin compatibility package. The real TypeScript 6 API bundle lives under:
node_modules/@typescript/old/lib/typescript.js
(node_modules/typescript/lib/typescript.js is only a small re-export.)
That packaging detail isn’t called out in the side-by-side section. It matters for any tooling that matches paths under node_modules/typescript/ rather than resolving the package entrypoint.
Example we hit
We already had Jest configured to skip Babel-transforming TypeScript’s large CJS bundle:
transformIgnorePatterns: ['/node_modules/typescript/']
That was enough with a normal typescript@6 install. After switching to @typescript/typescript6, Jest still transformed @typescript/old/lib/typescript.js (~8MB), which hung CI suites that load @typescript-eslint/parser / RuleTester.
Fix on our side was:
transformIgnorePatterns: [
'/node_modules/typescript/',
'/node_modules/@typescript/',
]
Ask
Please add a short note to the side-by-side / @typescript/typescript6 blog guidance that:
- The TS6 API implementation is provided via
@typescript/old.
- Path-based ignores/excludes aimed at
node_modules/typescript/ may also need to cover node_modules/@typescript/ (Jest transformIgnorePatterns, bundler excludes, etc.).
Happy to send a docs PR if that’s preferred.
Context
The TypeScript 7.0 blog documents the recommended side-by-side install:
https://devblogs.microsoft.com/typescript/announcing-typescript-7-0/#running-side-by-side-with-typescript-6.0
{ "devDependencies": { "@typescript/native": "npm:typescript@^7.0.2", "typescript": "npm:@typescript/typescript6@^6.0.2" } }Gap
With that layout,
node_modules/typescriptis effectively a thin compatibility package. The real TypeScript 6 API bundle lives under:(
node_modules/typescript/lib/typescript.jsis only a small re-export.)That packaging detail isn’t called out in the side-by-side section. It matters for any tooling that matches paths under
node_modules/typescript/rather than resolving the package entrypoint.Example we hit
We already had Jest configured to skip Babel-transforming TypeScript’s large CJS bundle:
That was enough with a normal
typescript@6install. After switching to@typescript/typescript6, Jest still transformed@typescript/old/lib/typescript.js(~8MB), which hung CI suites that load@typescript-eslint/parser/ RuleTester.Fix on our side was:
Ask
Please add a short note to the side-by-side /
@typescript/typescript6blog guidance that:@typescript/old.node_modules/typescript/may also need to covernode_modules/@typescript/(JesttransformIgnorePatterns, bundler excludes, etc.).Happy to send a docs PR if that’s preferred.