Skip to content

Conversation

@dummdidumm
Copy link
Member

fixes #14294

@changeset-bot
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

@github-actions
Copy link
Contributor

Playground

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

Copy link
Member

@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
Member

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
Member

This will stop this error from happening, right?

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

@razshare
Copy link

Would you say this is a commitment from the team? That is to say: not relying on node and runtime specifics for compilation?

I've been working on a project that makes use of a custom implementation of ES in order to compile svelte strings, and this took me by surprise when I tried to upgrade from v4 to v5.

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

7 participants