Skip to content

Document that @typescript/typescript6 ships the API under @typescript/old (path-based tooling) #63866

Description

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:

  1. The TS6 API implementation is provided via @typescript/old.
  2. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Won't FixThe severity and priority of this issue do not warrant the time or complexity needed to fix it

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions