Skip to content

handle pnpm@11#1074

Merged
jycouet merged 13 commits intomainfrom
prepare-for-pnpm-11-release
Apr 29, 2026
Merged

handle pnpm@11#1074
jycouet merged 13 commits intomainfrom
prepare-for-pnpm-11-release

Conversation

@jycouet
Copy link
Copy Markdown
Contributor

@jycouet jycouet commented Apr 28, 2026

Closes #1068

Description

  • Bump monorepo to pnpm@11 (engines, packageManager, root pnpm-workspace.yaml).
  • Add pnpm.allowBuilds in @sveltejs/sv-utils: detects pnpm version and writes allowBuilds (pnpm 11+) or legacy onlyBuiltDependencies (pnpm 10).
  • Deprecate pnpm.onlyBuiltDependencies (alias of allowBuilds).

Checklist

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

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 28, 2026

🦋 Changeset detected

Latest commit: 5b74f7e

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

This PR includes changesets to release 2 packages
Name Type
@sveltejs/sv-utils Patch
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

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 28, 2026

Open in StackBlitz

npx https://pkg.pr.new/svelte-migrate@1074
npx https://pkg.pr.new/sv@1074
npx https://pkg.pr.new/@sveltejs/sv-utils@1074

commit: 5b74f7e

@svelte-docs-bot
Copy link
Copy Markdown

jycouet added 4 commits April 28, 2026 23:14
The allowBuilds helper detects pnpm at runtime, so on pnpm 10 it writes
the legacy onlyBuiltDependencies list. The actual pnpm 11 bump can come
later once test fixtures are pnpm-11-ready.
@hyunbinseo
Copy link
Copy Markdown
Contributor

Sorry for the noise but @jycouet what a quick PR!

For context, pnpm 11 is released 14 hours ago, this PR is 4 hours old

@jycouet
Copy link
Copy Markdown
Contributor Author

jycouet commented Apr 29, 2026

I was curious to see how "out of the box" it's working and if we have some ci Perf improvements 😅

Not all perfect 😊
Let's see when we can finish this.

@jycouet jycouet changed the title prepare for pnpm 11 handle pnpm@11 Apr 29, 2026
jycouet added 2 commits April 29, 2026 10:06
Switching addon test cmds back to npm (with corepack strict mode off)
sidesteps pnpm walking up to the monorepo workspace, so the .npmrc
ignore-workspace pin is no longer needed. Reverted peerDependencies['sv']
to file: since pnpm 10 accepts it. Also reword changeset to "handle"
pnpm@11 since the repo itself is staying on pnpm 10.
execFileSync('pnpm', ...) doesn't resolve `pnpm.cmd` on Windows without
shell:true, so detectPnpmMajor() always threw and fell back to 11. On a
pnpm 10 host this caused allowBuilds to write the unrecognized
allowBuilds map, the build script for better-sqlite3 was never approved,
and the drizzle addon test failed to load native bindings on Windows.
Switch to execSync to match the rest of the codebase.
@jycouet jycouet force-pushed the prepare-for-pnpm-11-release branch from f7abaa5 to 71069cf Compare April 29, 2026 09:06
jycouet added 5 commits April 29, 2026 11:14
…tests

- detectPnpmMajor now uses coerceVersion instead of a hand-rolled split
- tests import detectPnpmMajor from pnpm.ts instead of duplicating the
  exec + parse logic
- index.ts exports the pnpm namespace as a named object so internal
  helpers like detectPnpmMajor stay out of the public API surface
Drops the `pnpm.*` namespace in favor of named exports at the package
root. Consumers (drizzle, tailwindcss, package-manager) now import
`allowBuilds` directly. detectPnpmMajor returns `undefined` instead of
defaulting to 11 when pnpm is not on PATH so callers can decide.
…-internals

Move detectPnpmMajor into a separate pnpm-internals.ts file that isn't
re-exported from index.ts. Restores the `export * as pnpm` namespace and
the `pnpm.allowBuilds` consumer call sites while keeping the version
detection helper out of the public API surface.
@jycouet jycouet merged commit e94734e into main Apr 29, 2026
8 checks passed
@jycouet jycouet deleted the prepare-for-pnpm-11-release branch April 29, 2026 10:42
@github-actions github-actions Bot mentioned this pull request Apr 29, 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.

Prepare for pnpm@11 release

2 participants