Skip to content

feat(sv): allow custom package manager in testing commands - #1212

Closed
GauBen wants to merge 5 commits into
sveltejs:mainfrom
GauBen:feat/pm
Closed

feat(sv): allow custom package manager in testing commands#1212
GauBen wants to merge 5 commits into
sveltejs:mainfrom
GauBen:feat/pm

Conversation

@GauBen

@GauBen GauBen commented Aug 1, 2026

Copy link
Copy Markdown

Description

As of now, pnpm is hardcoded in the testing setup. This PR enables setting a custom package manager.

Checklist

  • Update snapshots (if applicable)
  • Add a changeset (if applicable)
  • Allow maintainers to edit this PR
  • I care about what I'm doing, no matter the tool I use (Notepad, Sublime, VSCode, AI...)

@pkg-svelte-dev

pkg-svelte-dev Bot commented Aug 1, 2026

Copy link
Copy Markdown

Install the latest version of sv from 03097c7:

pnpm add https://pkg.svelte.dev/sv/c/03097c7789300e3ed1db1ba95f76e263ad8c7879

Open in pkg.svelte.dev: https://pkg.svelte.dev/repos/cli/pr/1212

Note

This PR is from a fork. A maintainer must approve approve each commit before it can be built and installed.

@changeset-bot

changeset-bot Bot commented Aug 1, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 03097c7

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

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

@AdrianGonz97

Copy link
Copy Markdown
Member

I think this change requires a bit more nuance. We chose pnpm as the default specifically because of workspaces. setupTest inserts a pnpm-workspace.yaml file into the test's root directory so that the test variants can have their dependencies installed all at once.

In order to support other package managers, we would have to add their respective workspace configurations as well to match our current pnpm-workspace.yaml (e.g. npm/yarn/bun has workspaces defined in the package.json, while deno may have it as workspace in deno.json).

@GauBen

GauBen commented Aug 3, 2026

Copy link
Copy Markdown
Author

Indeed I missed that aspect

I fixed my original issue another way:

It could probably be more elegant but it's one less thing to worry about here

@GauBen GauBen closed this Aug 3, 2026
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