fix: install typescript for the language server#76
Conversation
|
We require contributors to sign our Contributor License Agreement, and we don't have @jasonlyu123 on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
|
I just noticed that npm actually automatically installs |
|
The current Zed extension API checks the There are a few workarounds I can think of, but do you think it's worth it? @jasonlyu123 |
|
Not sure I follow what the difference is from your intended effect. Are you saying the "check for update" part won't work? Isn't the function you linked checking the target module's package.json? |
The |
|
I did intend to install it at the top level. Originally, I just didn't realise newer versions of npm actually auto-install peer. But keep the PR since it can also "update" the typescript version. Now that TypeScript 7 stable is on the horizon, auto-installing the latest TypeScript version will instead break the language server since we still need TypeScript 6. Therefore closing. |
Svelte language server plans to move TypeScript to peerDependency as part of TypeScript 6 support. The reason is to allow people to continue using TypeScript 5 if needed.
This means npm won't automatically install TypeScript anymore, so the extension needs to install it manually.But it's still beneficial to have this to ensure TypeScript is updated.