yarnpkg / berry

📦🐈 Active development trunk for Yarn ⚒
https://yarnpkg.com
BSD 2-Clause "Simplified" License
7.41k stars 1.11k forks source link

[Bug?]: unable to use different typescript versions for sdk in monorepo with yarn PnP #6557

Open WoodenPC opened 6 days ago

WoodenPC commented 6 days ago

Self-service

Describe the bug

Hi, i have monorepo, and trying to switch from node_modules linker to pnp. I read migration guide and use yarn dlx @yarnpkg/sdks vscode. However, packages in my monorepo have different typescript versions and i cannot specify that typescript versions in vs code IDE. It sees only root package.json typescript version. How can I achieve what I wrote about ?

To reproduce

-

Environment

System: OS windows 10, node 18.18.2

Additional context

No response

clemyan commented 5 days ago

VSCode can only use one TS version per window. See https://github.com/microsoft/vscode/issues/81205

So even if we can generate multiple SDKs for different versions of TypeScript, you can only pick one for VSCode to use

Not sure about if other IDEs can use multiple TS versions

WoodenPC commented 2 days ago

@clemyan is there an example of how to generate how to generate multiple sdk for workspaces ? Or this feature does not exist yet ?

clemyan commented 1 day ago

Not supported directly at the moment.

If you really need you can do that manually -- save the SDK, change the root dependency, and re-generate.