Conversation
Use the selected system executable and version when scaffolding so the generated package-manager pin agrees with installation. Preserve managed downloads and local-only creation, and cover system selection, fallback, and npm installation.
Use the resolved Yarn version to select the existing npx fallback for Classic, which has no dlx command. Preserve Yarn 2+ template execution and cover runner selection, external scaffolding, and the built-in template version pin.
SaKaNa-Y
marked this pull request as ready for review
September 15, 2026 13:47
The external-template regressions reached an npm shell launcher that crashes under fspy on macOS CI with an arm64/arm64e loader mismatch. Provision a fixed real npm and expose its npx JavaScript entry through a test-owned Node launcher. Keep both CLI flavors, real template execution, existing assertions, and snapshot expectations.
Avoid the system env interpreter as well as npm shell launchers under macOS file tracing. Use a temporary short symlink to the selected Node executable so the shebang stays within the tracer parser limit, assert that bound, and remove the symlink directory on exit.
Verify that external scaffolding actually enters the fixture-provided npx executable with the expected arguments. Include launcher-entry information when scaffolding fails so runner selection failures can be distinguished from downstream process failures.
The snapshot runner exposes sh through a symlink, but fspy recognizes system shells by their /bin or /usr/bin parent. npm resolves its default sh through PATH, bypassing the macOS injectable-shell substitution. Set npm_config_script_shell to /bin/sh for the Unix external-template fixture. Remove the unnecessary custom npx launcher and its temporary interpreter; keep real template execution and generated-file assertions.
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.
vp createalways downloaded a managed package-manager release before scaffolding, even when that family was configured to use the system installation. The generateddevEngines.packageManager.versioncould therefore disagree with the executable used for installation. With npm, this can fail withEBADDEVENGINES; the same incorrect pinning also affects pnpm, Yarn, and Bun.Resolve the selected family through
vp env currentbefore scaffolding. When it selects a system executable, use that version and binary directory. Keep managed downloads and the missing-system fallback, locate the global resolver through the shared directory API, and preserve local-only creation when it is absent. Narrow scaffold metadata to the fields consumers actually need.System Yarn Classic also needs a compatible template runner: Yarn 1 has no
dlxcommand. Selectnpx --yesfrom the resolved Yarn version, matching the existingvp dlxfallback; Yarn 2+ continues to useyarn dlx. This runner choice does not change the selected package-manager family or version.The Unix external-template fixture sets npm's script shell to
/bin/sh. The snapshot runner exposesshthrough a symlink, while fspy identifies system shells by their canonical parent directory for macOS compatibility. Real npx execution and generated-file assertions remain covered.Verification
647 create, workspace, and migration unit tests pass, including Yarn 1/2/4 runner selection and differing ambient/system versions.
All 15 system package-manager snapshots pass with
--test-threads=2and cover all four families, managed selection, missing-system fallback, and a real npm dependency installation.The default-concurrency run hit seven 50-second timeouts; the lower-concurrency run passed without changing timeouts or expectations.
New local/global snapshots verify Yarn Classic external-template execution and, separately, its version pin in a built-in template.
Format, lint, type checks, and whitespace checks pass.
npm version-pin mismatch reproduced before the fix and corrected afterward.
After setting the canonical script shell, all 15 system package-manager snapshots pass again; JavaScript syntax and whitespace checks pass. All three macOS snapshot shards pass in CI, including both previously failing external-template cases. The final CI run passes across macOS, Linux, and Windows.
Limitations
Executable fixtures are Unix-only. The external-template cases verify real execution and generated files; they do not assert every subsequent migration step.