Self-service
Describe the bug
The typescript docs recommend installing typescript v6 and v7 side by side for compatibility using aliases. See docs: https://devblogs.microsoft.com/typescript/announcing-typescript-7-0/#running-side-by-side-with-typescript-6.0
{
"name": "yarn-ts7",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"packageManager": "yarn@4.17.1",
"devDependencies": {
"@typescript/native": "npm:typescript@~7.0.2",
"typescript": "npm:@typescript/typescript6@~6.0.2"
}
}
When installing as directed using the above package.json and nodeLinker: node-modules, node_modules/.bin/tsc is linked to the @typescript/old package. This should not happen since @typescript/old is a transitive dependency. Instead it should link to the @typescript/native that is declared in the package.json.
To reproduce
Minimal reproduction in this repo: https://github.com/robrichard/yarn-ts7/tree/main
Environment
System:
OS: macOS 26.5.1
CPU: (15) arm64 Apple M5 Pro
Binaries:
Node: 24.18.0 - /private/var/folders/6z/sjjqqggd2qs3wxymlbry_twc0000gn/T/xfs-673a7ecc/node
Yarn: 4.17.1 - /private/var/folders/6z/sjjqqggd2qs3wxymlbry_twc0000gn/T/xfs-673a7ecc/yarn
npm: 11.16.0 - /usr/local/bin/npm
Additional context
No response
Self-service
Describe the bug
The typescript docs recommend installing typescript v6 and v7 side by side for compatibility using aliases. See docs: https://devblogs.microsoft.com/typescript/announcing-typescript-7-0/#running-side-by-side-with-typescript-6.0
When installing as directed using the above package.json and
nodeLinker: node-modules,node_modules/.bin/tscis linked to the@typescript/oldpackage. This should not happen since@typescript/oldis a transitive dependency. Instead it should link to the@typescript/nativethat is declared in the package.json.To reproduce
Minimal reproduction in this repo: https://github.com/robrichard/yarn-ts7/tree/main
Environment
System: OS: macOS 26.5.1 CPU: (15) arm64 Apple M5 Pro Binaries: Node: 24.18.0 - /private/var/folders/6z/sjjqqggd2qs3wxymlbry_twc0000gn/T/xfs-673a7ecc/node Yarn: 4.17.1 - /private/var/folders/6z/sjjqqggd2qs3wxymlbry_twc0000gn/T/xfs-673a7ecc/yarn npm: 11.16.0 - /usr/local/bin/npmAdditional context
No response