Conversation
🦋 Changeset detectedLatest commit: 5b74f7e The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
commit: |
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.
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 |
Contributor
Author
|
I was curious to see how "out of the box" it's working and if we have some ci Perf improvements 😅 Not all perfect 😊 |
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.
f7abaa5 to
71069cf
Compare
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1068
Description
pnpm@11(engines,packageManager, rootpnpm-workspace.yaml).pnpm.allowBuildsin@sveltejs/sv-utils: detects pnpm version and writesallowBuilds(pnpm 11+) or legacyonlyBuiltDependencies(pnpm 10).pnpm.onlyBuiltDependencies(alias ofallowBuilds).Checklist