Skip to content

chore: replace cross-env with pnpm shell emulator#2987

Draft
teemingc wants to merge 5 commits intomasterfrom
chore-remove-cross-env
Draft

chore: replace cross-env with pnpm shell emulator#2987
teemingc wants to merge 5 commits intomasterfrom
chore-remove-cross-env

Conversation

@teemingc
Copy link
Copy Markdown
Member

@teemingc teemingc commented Mar 24, 2026

This PR removes cross-env in favour of pnpm's shellEmulator which "just works". We're currently using this in the svelte, kit, and svelte.dev repositories too.

https://pnpm.io/settings#shellemulator

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 24, 2026

⚠️ No Changeset found

Latest commit: e3f63cd

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@teemingc teemingc marked this pull request as draft March 26, 2026 11:54
@teemingc teemingc marked this pull request as ready for review March 31, 2026 04:39
Comment thread package.json
"bootstrap": "cd ./packages/svelte2tsx && pnpm build && cd ../svelte-vscode && pnpm build:grammar",
"build": "tsc -b",
"test": "cross-env CI=true pnpm test -r",
"test": "CI=true pnpm run -r test",
Copy link
Copy Markdown
Member Author

@teemingc teemingc Mar 31, 2026

Choose a reason for hiding this comment

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

Specifying the pnpm run command fixes an endless recursion because it didn't exclude the root workspace test command.
See https://pnpm.io/cli/recursive

@jasonlyu123
Copy link
Copy Markdown
Member

The test failure should be due to the magic-string update in svelte2tsx.

@teemingc
Copy link
Copy Markdown
Member Author

The test failure should be due to the magic-string update in svelte2tsx.

Thanks for sharing. I've been wondering why removing cross-env would cause those tests to fail 😅

@teemingc teemingc marked this pull request as draft March 31, 2026 10:15
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