fix(server): resolve tsdk correctly when settings specify a relative … #1765
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…location
Previously, we only supported absolute paths for
tsdk
specified in the settings.json. However, with Yarn PnP, this might instead be a path relative to the project/workspace. For example, in a a project using Yarn PnP, the tsdk setting might beThe user would then run
yarn dlx @yarnpkg/sdks vscode
and the typescript modules would then exist in the project folder.yarn/sdks/typescript/...
. We should then resolve tsdk as a relative path from the given probe locations, just like we do when looking for other packages in a regular project (in thenode_modules
, relative to the given probe locations).Fixes #1748