Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(server): resolve tsdk correctly when settings specify a relative … #1765

Merged
merged 1 commit into from
Sep 27, 2022

Conversation

atscott
Copy link
Collaborator

@atscott atscott commented Sep 27, 2022

…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 be

"typescript.tsdk": ".yarn/sdks/typescript/lib",

The 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 the node_modules, relative to the given probe locations).

Fixes #1748

@atscott atscott added the target: patch This PR is targeted for the next patch release label Sep 27, 2022
…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 be

```
"typescript.tsdk": ".yarn/sdks/typescript/lib",
```

The 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 the `node_modules`, relative to
the given probe locations).

Fixes angular#1748
@atscott atscott added the action: merge Ready to merge label Sep 27, 2022
@atscott atscott merged commit 05ef44e into angular:main Sep 27, 2022
atscott added a commit that referenced this pull request Sep 27, 2022
…location (#1765)

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 be

```
"typescript.tsdk": ".yarn/sdks/typescript/lib",
```

The 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 the `node_modules`, relative to
the given probe locations).

Fixes #1748

(cherry picked from commit 05ef44e)
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Oct 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge Ready to merge target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Yarn PnP - "No config file" error on a project using Yarn PnP mode
2 participants