Repository navigation
[pull] main from pnpm:main - #502
Merged
Merged
Conversation
`pnpm update` re-resolved the lockfile but left `package.json` declaring the range it started from, so a dependency the output reported as updated still read as its old version in the manifest — unlike the TypeScript CLI, which rewrites the declared range around the version it resolved. A compatible bump cannot name that version before resolving: the pick depends on the ranges the workspace's other importers declare, on the overrides, and on the peer graph. Guessing it up front (the way `--latest` reads a dist-tag) would disagree with the install often enough to leave the manifest and the lockfile out of sync. So the update names the direct dependencies it targets, and the fresh-resolve path moves their ranges onto what it settled on, in the lockfile it is about to write, and reports each one back for the manifest write. The two carry the same text, and the version recorded against it satisfies it by construction. A dependency declared through a dist-tag now keeps tracking the tag under `--latest` too, which had been pinning it to the version behind the tag. The importer ids the rewrite is keyed by come from the same `lockfile_root_dir` rule the install derives its own from, so `sharedWorkspaceLockfile: false` — which anchors them at the project rather than the workspace root — does not leave the range unwritten. The group a range is declared under travels with it from the lockfile entry, so an alias declared in more than one group cannot have the manifest and the lockfile move different entries, and the range is written in place rather than through `add_dependency`, which would relocate the dependency. Closes #13879
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )