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

Update Svelte Language Server PnP Configuration #5953

Merged
merged 1 commit into from
Nov 13, 2023
Merged

Update Svelte Language Server PnP Configuration #5953

merged 1 commit into from
Nov 13, 2023

Conversation

DavidArchibald
Copy link
Contributor

@DavidArchibald DavidArchibald commented Nov 8, 2023

What's the problem this PR addresses?
My PR sveltejs/language-tools#2196 introduces a small change alongside a new setting that allows sveltejs-language-tools to resolve PnP in ESM files, most importantly in a svelte.config.js. Please note that this PR shouldn't go in until that PR is ready as otherwise the Svelte language server itself will not have the setting available.

Also I'm no expert in Yarn PnP so if this is the wrong implementation avenue I would welcome advice!

How did you fix it?
The main portion of the solution is in the linked PR. The addition here is to set svelte.language-server.runtime-args to ["--loader", "./.pnp.loader.mjs"].

Checklist

  • I have read the Contributing Guide.
  • I have set the packages that need to be released for my changes to be effective.
  • I will check that all automated PR checks pass before the PR gets reviewed.

@@ -0,0 +1,2 @@
releases:
"@yarnpkg/sdks": minor
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I chose this as a minor release because yarn dlx @yarnpkg/sdks vscode theoretically has to be rerun for packages that use svelte-language-tools. This makes it feel like more than a bugfix, however it's still "backwards compatible" because this should only be needed to fix broken projects so it's not a major breaking change either.

Let me know if the versioning isn't supposed to work that way!

@arcanis
Copy link
Member

arcanis commented Nov 13, 2023

That seems good to me; as far as I can tell this shouldn't break setups for people who are currently on an old version of the Svelte extension (the setting will just be ignored, right?), so we can merge it now.

@arcanis arcanis merged commit 872df6d into yarnpkg:master Nov 13, 2023
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants