fix: strip re-pinned devEngines.packageManager in lockfile/node_modules prepares; count pnpm 12 packages as pacquet - #136
Merged
lukekarrys merged 2 commits intoJul 30, 2026
Conversation
…on prepares The per-run --prepare of the lockfile, node_modules, and lockfile+node_modules variations runs clean_all_cache, whose corepack yarn cache cleans re-pin devEngines.packageManager (yarn) into package.json. Nothing strips the field again before the timed install, so npm and pnpm refuse to run (EBADDEVENGINES / ERR_PNPM_OTHER_PM_EXPECTED: 'This project is configured to use yarn') and every fixture of these three variations records a DNF for them. This is the same failure vltpkg#118 fixed for clean_all and vltpkg#119 fixed for the registry-lockfile prepare; these three variation prepares were missed. npm, pnpm, and pnpm 12 (pacquet) have been DNF in these cells since ~Jun 18, charted at the slowest successful competitor's time. Run clean_package_manager_field at the end of each prepare base, after clean_all_cache, mirroring the ordering rationale documented in clean_all.
infer_package_manager mapped any pnpm-lock.yaml to 'pnpm', so the pacquet benchmark's package counts were appended to pnpm-count.txt: pacquet never got a count (breaking its per-package normalization) and pnpm's count mixed in pacquet's runs. Both installers record their own version in node_modules/.modules.yaml (packageManager: pnpm@<version>); treat major >= 12 as pacquet and keep 'pnpm' as the fallback when the file is absent.
lukekarrys
approved these changes
Jul 30, 2026
Member
|
thanks @zkochan! |
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.
What happened
Since ~Jun 18, npm, pnpm, and pnpm 12 (pacquet) have been DNF in every fixture of the
lockfile,node_modules, andlockfile+node_modulesvariations (pnpm/pacquet in all fixtures except babylon; npm in the two fixtures that commit a.yarnrc.yml— next and babylon, since npm runs before berry/zpm write one). DNFs are charted at the slowest successful competitor's time, so these 15 cells and the averages page show pnpm 11/12 far slower than they actually are.The install logs from the 2026-07-29 run show the failure:
Root cause
Same one #118/#119 fixed for
clean_alland the registry-lockfile prepare: the corepack yarn cache cleans insideclean_all_cachere-pindevEngines.packageManager(yarn) into the fixture's package.json. The per-run--prepareof these three variations runsclean_all_cachebut never strips the field afterwards, so:devEngines.packageManager: yarnsurvives into the timed run;npm pkg delete packageManagerin the pnpm/pacquet setup silently fails too (npm refuses to run at all under a mismatched devEngines —EBADDEVENGINES);The three variations that clean caches per-run without re-stripping are exactly the three failing ones; every variation that either keeps its cache (
cache*) or strips the field per-run (clean,cache+lockfile+node_modules,registry-lockfile) is green.Fix (commit 1): run
clean_package_manager_fieldat the end of the threeBENCH_PREPARE_BASEs, afterclean_all_cache— the same orderingclean_alldocuments.Also: pnpm 12 package counts were attributed to pnpm
infer_package_managerinpackage-count.shmaps anypnpm-lock.yamltopnpm, and both pnpm 11 and pnpm 12 leave one. So pacquet's counts were appended topnpm-count.txt: pacquet had no package count at all (e.g.2026-07-29/next-clean-package-count.jsonhas nopacquetentry), breaking its per-package normalization, and pnpm's count mixed in pacquet's runs.Fix (commit 2): both installers record their version in
node_modules/.modules.yaml(packageManager: pnpm@<version>); treat major ≥ 12 aspacquet, keeppnpmas the fallback.Tested locally:
bash -non all touched scripts;package-count.shproducespacquet-count.txtfor a.modules.yamlwithpnpm@12.0.0-beta.0,pnpm-count.txtforpnpm@11.17.0, and falls back topnpmwhen the file is absent.Written by an agent (Claude Code, claude-fable-5) on behalf of @zkochan.