feat(cli): pnpm config in pnpm-workspace.yaml (& update tests)
#717
Closing issues
onlyBuiltDependencies in pnpm-workspace.yaml is supported from [email protected]:
The
pnpm.*settings frompackage.jsoncan now be specified in thepnpm-workspace.yamlfile instead.
onlyBuiltDependencies:
- esbuild
- fuse-native
pnpm approve-builds adds onlyBuiltDependencies to pnpm-workspace.yaml as of 10.7.1.
Current implementation is fixed to the pnpm.onlyBuiltDependencies field in the pacakge.json:
Backwards compatibility is supported and is probably fixed (?) in 10.6.1
When executing the
approve-buildscommand, if package.json containsonlyBuiltDependenciesorignoredBuiltDependencies, the selected dependency package will continue to be written intopackage.json.
package.json / pnpm.onlyBuiltDependencies is added
{
"packageManager": "[email protected]+sha512.34e538c329b5553014ca8e8f4535997f96180a1d0f614339357449935350d924e22f8614682191264ec33d1462ac21561aff97f6bb18065351c162c7e8f6de67",
"pnpm": {
"onlyBuiltDependencies": [
"esbuild"
]
}
}
even when pnpm-workspace.yaml / onlyBuiltDependencies exists.
# pnpm-workspace.yaml
packages:
- packages/*
- sites/*
onlyBuiltDependencies:
- '@tailwindcss/oxide'
- esbuild
pnpm dlx sv create .
┌ Welcome to the Svelte CLI! (v0.9.5)
│
◇ Which template would you like?
│ SvelteKit minimal
│
◇ Add type checking with TypeScript?
│ Yes, using TypeScript syntax
│
◆ Project created
│
◇ What would you like to add to your project? (use arrow keys / space bar)
│ prettier, eslint, tailwindcss, sveltekit-adapter
│
◇ tailwindcss: Which plugins would you like to add?
│ none
│
◇ sveltekit-adapter: Which SvelteKit adapter would you like to use?
│ static
│
◆ Successfully setup add-ons
│
◇ Which package manager do you want to install dependencies with?
│ pnpm
│
◆ Successfully installed dependencies
│
◇ Successfully formatted modified files
│
◇ What's next? ───────────────────────────────╮
│ │
│ 📁 Project steps │
│ │
│ 1: pnpm run dev --open │
│ │
│ To close the dev server, hit Ctrl-C │
│ │
│ Stuck? Visit us at https://svelte.dev/chat │
│ │
├──────────────────────────────────────────────╯
│
└ You're all set!
corepack use pnpm@latest
╭ Warning ───────────────────────────────────────────────────────────────────────────────────╮
│ │
│ Ignored build scripts: @tailwindcss/oxide. │
│ Run "pnpm approve-builds" to pick which dependencies should be allowed to run scripts. │
│ │
╰────────────────────────────────────────────────────────────────────────────────────────────╯Pull request
pnpm-workspace.yaml
Closes: #521 Closes: #705 Closes: #714
tests
Proposal to change how tests are organized (to speedup tests again ^^)
variant+kind=flavorAddonTestCasesetupTestprepare the test mono repo with all flavors and only one install is neededremoveps-treedep
On my machine (windows & wsl), add-ons part is going 30% faster!
Info
🦋 Changeset detected
Latest commit: 74af92a
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
npx https://pkg.pr.new/sveltejs/cli/sv@717
npx https://pkg.pr.new/sveltejs/cli/svelte-migrate@717
commit: 74af92a
Some info (I thought I wrote it somewhere, but can't find it)
Before this PR tests structure looks like:
test/add-on-y
package.json
pnpm-workspace.yaml
node_modules
...
12345_0
package.json
...
12345_1
package.json
...
12345_2
package.json
...
12345_3
package.json
...
And the process is:
1/ createpnpm-workspace.yaml
2/ concurrently
pnpm iin each project folder12345_0,12345_1, ... adding stuff in the sharednode_modules.- build & tests
After this PR tests structure looks like:
test/add-on-y
package.json
pnpm-workspace.yaml
node_modules
...
default-kit-js
package.json
...
default-kit-ts
package.json
...
default-vite-js
package.json
...
default-vite-ts
package.json
...
1/ createpnpm-workspace.yaml
2/ pnpm i at add-on-y level... once.
3/ concurrently
- build & tests
Thank you for looking and adding these tweaks & last bits.
Not 100% sure about the naming ctx.cwd, maybe ctx.getCwd? But it's rather internal for now, so let's keep it like this and see how we feel about it later.
feat(cli): pnpm config will now be stored in pnpm-workspace.yaml (#718)
• Sep 24, 2025, 4:09 PM* fix(tailwindcss): add `@tailwindcss/oxide` to approve-builds in `pnpm` * addd yaml utils * using yaml-workspace when possible * windows robustness * CI debug * more logs * !silent * CI & windows & I don't know * sniff * . * more and more logs * pnpm v * cleanup! * --silent * add changeset
Merge branch 'main' of github.com:sveltejs/cli into perf/tests-v7
• Sep 24, 2025, 9:19 PMMerge branch 'main' of github.com:sveltejs/cli into perf/tests-v7
• Sep 28, 2025, 10:27 AMMerge branch 'main' of github.com:sveltejs/cli into perf/tests-v7
• Sep 29, 2025, 5:47 PMCo-authored-by: CokaKoala <[email protected]>
Co-authored-by: Manuel <[email protected]>
Pro tip: You can prefix GitHub URLs of issues, PRs or discussions with svcl.dev/ to view them on this page! Also try it on a GitHub release ;)