TypeStrong / atom-typescript

The only TypeScript package you will ever need
https://atom.io/packages/atom-typescript
MIT License
1.13k stars 205 forks source link

[Feature request] Support yarn berry pnp #1595

Closed danieltroger closed 2 years ago

danieltroger commented 2 years ago

There's a new version of yarn: https://github.com/yarnpkg/berry And it completely gets rid of node_modules, the dependencies are instead in zip files in.yarn/cache.

Right now that makes typescript not find any dependencies and say things like Cannot find module 'solid-js' or its corresponding type declarations..

It would be great if you could add support somehow.

This is the page describing how to use it with vscode: https://next.yarnpkg.com/getting-started/editor-sdks

It appears to wrap pnpify around tsserver which then emulates a node_modules folder or something. Through my attempts to get vscode to use it, atom has also started using it:

USER               PID  %CPU %MEM      VSZ    RSS   TT  STAT STARTED      TIME COMMAND
daniel           37279   0.0  0.9 20959556 300720   ??  S     7:52PM   0:08.84 /Applications/Atom.app/Contents/Frameworks/Atom Helper (Renderer).app/Contents/MacOS/Atom Helper (Renderer) --no-deprecation [project_dir]/.yarn/sdks/typescript/lib/tsserver.js --locale en

But it doesn't work in vscode nor in atom :( Since I don't want to start using vscode because it sucks it would be great if you could make it work with atom :)

danieltroger commented 2 years ago

So it turns out the editor integrations are all broken because of a typescript upgrade, see: https://github.com/yarnpkg/berry/issues/3722

I downgraded typescript and now the imports and type declarations magically work with pnp in atom!

BUT, I can't "go to definition" because that opens zip:, so atom would need some kind of zip fs and I guess nobody wants to make that :(

github-actions[bot] commented 2 years ago

This issue has been marked as stale because it did not have any activity for the last 90 days or more. Remove the stale label or comment or this will be closed in 14 days