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 houdini-svelte crashing the Svelte LSP #1293

Merged
merged 3 commits into from
Apr 13, 2024
Merged

Conversation

SeppahBaws
Copy link
Collaborator

@SeppahBaws SeppahBaws commented Apr 10, 2024

Fixes #1292

So it turns out that fs.statSync takes in a string | Buffer | URL as path - the last of which does not have a .includes() function. (https://nodejs.org/docs/v20.11.1/api/fs.html#fsstatsyncpath-options)

Occasionally it is passed an URL, which then causes an error which bubbles up and causes the svelte LSP to crash. This PR fixes the fsPatch statSync function to properly handle this.

To help everyone out, please make sure your PR does the following:

  • Update the first line to point to the ticket that this PR fixes
  • Add a message that clearly describes the fix
  • If applicable, add a test that would fail without this fix
  • Make sure the unit and integration tests pass locally with pnpm run tests and cd integration && pnpm run tests
  • Includes a changeset if your fix affects the user with pnpm changeset

@SeppahBaws SeppahBaws linked an issue Apr 10, 2024 that may be closed by this pull request
Copy link

changeset-bot bot commented Apr 10, 2024

🦋 Changeset detected

Latest commit: ee0ae9d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 8 packages
Name Type
houdini-svelte Patch
houdini-plugin-svelte-global-stores Patch
houdini-adapter-auto Patch
houdini-adapter-cloudflare Patch
houdini-adapter-node Patch
houdini-react Patch
houdini Patch
create-houdini Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

netlify bot commented Apr 10, 2024

Deploy Preview for houdinigraphql canceled.

Name Link
🔨 Latest commit ee0ae9d
🔍 Latest deploy log https://app.netlify.com/sites/houdinigraphql/deploys/661657b667e6f800088c4959

Copy link

netlify bot commented Apr 10, 2024

Deploy Preview for houdini-docs-next canceled.

Name Link
🔨 Latest commit ee0ae9d
🔍 Latest deploy log https://app.netlify.com/sites/houdini-docs-next/deploys/661657b67b76a30008fca5eb

@SeppahBaws SeppahBaws enabled auto-merge (squash) April 10, 2024 09:12
@SeppahBaws SeppahBaws changed the title Fix houdini-svelte crashing the vscode svelte LSP Fix houdini-svelte crashing the Svelte LSP Apr 10, 2024
@SeppahBaws SeppahBaws merged commit 8409c70 into main Apr 13, 2024
14 checks passed
@SeppahBaws SeppahBaws deleted the fix/1292-svelte-lsp-crash branch April 13, 2024 14:08
@github-actions github-actions bot mentioned this pull request Apr 13, 2024
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.

Houdini-svelte crashes the svelte LSP in vscode
2 participants