Skip to content

fix(cli): auto-pass --ignore-scripts when pnpm >=11 in migrate/create#1533

Merged
fengmk2 merged 2 commits intomainfrom
support-pnpm-v11
May 8, 2026
Merged

fix(cli): auto-pass --ignore-scripts when pnpm >=11 in migrate/create#1533
fengmk2 merged 2 commits intomainfrom
support-pnpm-v11

Conversation

@fengmk2
Copy link
Copy Markdown
Member

@fengmk2 fengmk2 commented May 8, 2026

pnpm v11 promoted ERR_PNPM_IGNORED_BUILDS from a warning to a hard exit-1
on unapproved build scripts. The auto-install run by vp migrate /
vp create happens before the user has a chance to add packages to
pnpm.onlyBuiltDependencies, so transitive deps like esbuild and
@parcel/watcher fail the install — breaking the tanstack-start-helloworld
and viteplus-ws-repro ecosystem-ci jobs.

When the resolved package manager is pnpm and the version is >=11.0.0,
inject --ignore-scripts into the auto-triggered install. User-invoked
vp install is unchanged. The migrate early-return (eslint/prettier-only)
path resolves a latest version through downloadPackageManager so the
check applies there too.


Note

Medium Risk
Changes dependency installation behavior in vp create/vp migrate by conditionally adding --ignore-scripts for pnpm v11+, which could mask legitimate install-script failures during the automated install step (though user-invoked installs remain unchanged).

Overview
Fixes pnpm v11 auto-install failures during scaffolding/migration. runViteInstall now detects pnpm >=11 and automatically appends --ignore-scripts for the auto-triggered install to avoid ERR_PNPM_IGNORED_BUILDS.

vp create and vp migrate now pass the resolved package manager + version into runViteInstall, including the migrate “already Vite+” early-return path which resolves non-semver versions (e.g. latest) before deciding. Adds unit tests for the new shouldIgnoreScriptsForAutoInstall helper.

Reviewed by Cursor Bugbot for commit 20784c5. Configure here.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 8, 2026

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit 9e09048
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/69fd72723e775b0008feea28

Copy link
Copy Markdown
Member Author

fengmk2 commented May 8, 2026


How to use the Graphite Merge Queue

Add the label auto-merge to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@fengmk2 fengmk2 self-assigned this May 8, 2026
@fengmk2 fengmk2 added test: install-e2e run vite install e2e test test: create-e2e Run `vp create` e2e tests test: e2e Auto run e2e tests labels May 8, 2026 — with Graphite App
@fengmk2 fengmk2 force-pushed the support-pnpm-v11 branch from ed68a63 to 12139b7 Compare May 8, 2026 03:40
@fengmk2
Copy link
Copy Markdown
Member Author

fengmk2 commented May 8, 2026

@cursor review

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 20784c5. Configure here.

fengmk2 added 2 commits May 8, 2026 13:18
pnpm v11 promoted ERR_PNPM_IGNORED_BUILDS from a warning to a hard exit-1
on unapproved build scripts. The auto-install run by `vp migrate` /
`vp create` happens before the user has a chance to add packages to
`pnpm.onlyBuiltDependencies`, so transitive deps like esbuild and
@parcel/watcher fail the install — breaking the tanstack-start-helloworld
and viteplus-ws-repro ecosystem-ci jobs.

When the resolved package manager is pnpm and the version is >=11.0.0,
inject `--ignore-scripts` into the auto-triggered install. User-invoked
`vp install` is unchanged. The migrate early-return (eslint/prettier-only)
path resolves a `latest` version through downloadPackageManager so the
check applies there too.
@fengmk2 fengmk2 force-pushed the support-pnpm-v11 branch from 20784c5 to 9e09048 Compare May 8, 2026 05:19
@fengmk2 fengmk2 merged commit b92a1af into main May 8, 2026
111 of 113 checks passed
@fengmk2 fengmk2 deleted the support-pnpm-v11 branch May 8, 2026 05:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test: create-e2e Run `vp create` e2e tests test: e2e Auto run e2e tests test: install-e2e run vite install e2e test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants