Repository navigation
Conversation
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.
Fixes #901
bin: ./bin/pnpm.cjs, a file pnpm 12 doesn't ship. Later releases reuse that record as is and fail withCannot find module.installVersionnow checks the recorded bins before reusing a cache entry. If none of them exist, it removes the folder and installs again, which writes a fresh.corepack.pnpx.js), so "any missing" would download again on every run.Testing:
tests/main.test.tspoints a cached record at missing files and expects a reinstall. It fails without the change.tests/nocks.dbis unchanged.yarn test,yarn typecheckandyarn lintpass.Cannot find module .../bin/pnpm.cjsafter upgrading from Corepack <=0.34.4 with pnpm 12 cached #901 passes with this build. I also ran Corepack 0.29.4 to 0.36.0 against pnpm 10, 11 and 12: every stale pnpm 12 entry fails on released versions and works with this change.AI disclosure: I used a coding agent to help write the change and the test. I reproduced the bug, reviewed the diff and ran the tests myself.