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: avoid relying on Node specifics within compiler #14314

Merged
merged 2 commits into from
Nov 15, 2024

Conversation

dummdidumm
Copy link
Member

fixes #14294

Copy link

changeset-bot bot commented Nov 15, 2024

🦋 Changeset detected

Latest commit: 69ff33b

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

This PR includes changesets to release 1 package
Name Type
svelte 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

@Rich-Harris
Copy link
Member

preview: https://svelte-dev-git-preview-svelte-14314-svelte.vercel.app/

this is an automated message

Copy link
Contributor

Playground

pnpm add https://pkg.pr.new/svelte@14314

Copy link
Contributor

@Ocean-OS Ocean-OS left a comment

Choose a reason for hiding this comment

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

Couldn't nullish coalescence be used here, like process?.cwd?.()??Deno?.cwd?.()??undefined?
I know it looks a little ugly, but it could look nicer with some line breaks or spacing (not to mention that the nested ternaries arguably look a little worse)

@dummdidumm
Copy link
Member Author

No, that would throw if process was not defined

@Ocean-OS
Copy link
Contributor

This will stop this error from happening, right?

@dummdidumm dummdidumm merged commit 94471ca into main Nov 15, 2024
11 checks passed
@dummdidumm dummdidumm deleted the remove-process-import branch November 15, 2024 22:50
@github-actions github-actions bot mentioned this pull request Nov 15, 2024
@Ocean-OS
Copy link
Contributor

This will stop this error from happening, right?

There still seems to be a bug, but it's a different one now

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.

import VERSION from svelte/compiler causes Cannot access "node:process.cwd" error
5 participants