Repository navigation
[pull] main from pnpm:main - #493
Merged
Merged
Conversation
pnpm remove edits the manifest and then re-resolved the whole graph, although its only lockfile drift is the importer edges it deleted — exactly what the removal fast path absorbs. pacquet: give remove its own ProjectMutation::UninstallSome instead of the NoInstall it shared with link, import, fetch, and rebuild, and stop forcing prefer_frozen_lockfile off; the gate admits the new variant via may_fast_update_lockfile. TypeScript: apply the uninstallSome manifest edit to the context projects before the fast-path dispatch, and admit install+uninstallSome mutation sets to the fast update and the frozen-like install. Explicitly frozen runs keep their stricter behavior; the resolution path is unchanged. When the removal handler declines, the freshness check fails and the install re-resolves as before. Related to #13696.
A dependency moved between dependencies, devDependencies, and optionalDependencies keeps its resolved version; only the importer group it is recorded under changes, plus the reachability-derived optional flags on its subtree when optionalDependencies is involved. Both stacks now absorb such moves in the importers fast-update handler instead of paying a full resolution: the importer entry moves to the group the manifest declares (optional over prod over dev, the precedence the freshness check expects), and the optional flags are recomputed from what still reaches each snapshot. pacquet gains a recompute_optional_flags walk for this, and the removal path now runs it too: severing the last non-optional path to a shared child previously left the child's optional flag stale, where the TypeScript handler already recomputed it via the pruner. Related to #13696.
…InjectedDeps (#13755) The #10433 guard keeps a workspace dependency's previously recorded `link:` when the run doesn't target it, compensating for `dedupeInjectedDeps` not running on every re-resolution path. It fired regardless of whether that pass was enabled, so with it disabled a freshly resolved `file:` was rewritten back to a stale `link:`. `pnpm deploy` is exactly that configuration: it injects every workspace dependency and disables `dedupeInjectedDeps` so the deployed tree is self-contained. Since 11.19.0 the deploy directory instead symlinked its workspace dependencies back into the source workspace, so copying it elsewhere left dangling links. Enabling `injectWorkspacePackages` with `dedupeInjectedDeps` off had the same problem: already-linked workspace dependencies never switched to injected copies. Gate the guard on `dedupeInjectedDeps`; with the pass off nothing may turn an injected workspace dependency back into a `link:`, so the fresh `file:` has to win. The pacquet side withholds the previous importers from its lockfile builder for the same reason — its `deploy` was already unaffected (it resolves the deploy dir as a new importer with no previous entry), but the `injectWorkspacePackages` toggle reproduced there too. Closes #13754 Closes #13618
…w to fix it (#13759) [ERR_PNPM_GIT_FETCH_FAILED] Failed to fetch "@logux/core" from the git repository "[email protected]:logux/core.git": fatal: Could not read from remote repository. ... The lockfile records an SSH remote for this dependency, so fetching it needs an SSH key for github.com. If its specifier does not ask for SSH (for example "github:owner/repo"), the lockfile entry was written before pnpm v11.21 and can be re-recorded over HTTPS: pnpm update @logux/core "pnpm install --force" and "pnpm install --resolution-only" do not re-resolve git dependencies, so neither clears it.
…hecksum (#13748) Nothing verifies a git checkout against a hash: the commit pins the content, and the store key is git-hosted rather than integrity-addressed. Yet lockfiles in the wild carry `resolution: {type: git, repo, commit, integrity: sha512-...}`, and both stacks were wrong about it in opposite directions. The Rust engine declared `GitResolution` `deny_unknown_fields` with no `integrity`, so such an entry matched no `ResolutionSerde` variant and aborted the whole install with ERR_PNPM_BROKEN_LOCKFILE — a lockfile the TypeScript CLI reads without complaint. The TypeScript CLI went the other way and passed the hash on as if it meant something: it echoed it back on every write, and `pnpm sbom` read `.integrity` off any resolution shape, publishing it as a CycloneDX/SPDX checksum. An SBOM checksum reads as an assurance that the artifact was verified against it, which for a git checkout never happened. Accept the key so the lockfile loads, then drop it: the Rust side clears it as the entry is read, so it cannot reach the writer, a comparison, or an SBOM; `toLockfileResolution` strips it on the way out; and the SBOM collector only publishes the tarball/registry hash it actually checks the bytes against. The value leaves with the next lockfile write rather than provoking one of its own. Closes #13042
The zizmor-family crates (yamlpatch, yamlpath, subfeature, tree-sitter-iter) require rustc 1.97 starting with their 1.28.0 releases, which blocks dependabot bump #13704. Clippy (pedantic + nursery, -D warnings), rustfmt, and the rustdoc gate were verified clean under 1.97.0 before the bump. Co-authored-by: Claude Fable 5 <[email protected]>
The fast-update coordinator already stages every rewrite on a clone and discards it unless the candidate passes the freshness gates, so the importers handler staging its own inner clone and copying back was a second, redundant layer; it now mutates the coordinator's candidate directly. The coordinator also commits by replacing the lockfile's keys wholesale instead of Object.assign, which silently kept top-level keys the update had deleted: removing the last referent of a catalog entry through the fast path left the stale catalogs section in the written lockfile. pacquet's importers handler now scans for manifest drift before cloning the lockfile, so installs whose drift lies elsewhere no longer pay a full lockfile clone in the handler; the other pacquet handlers already detected before cloning. Related to #13696.
* chore(cargo): bump yamlpatch from 1.26.1 to 1.29.0 Bumps [yamlpatch](https://github.com/zizmorcore/zizmor) from 1.26.1 to 1.29.0. - [Release notes](https://github.com/zizmorcore/zizmor/releases) - [Changelog](https://github.com/zizmorcore/zizmor/blob/main/docs/release-notes.md) - [Commits](zizmorcore/zizmor@v1.26.1...v1.29.0) --- updated-dependencies: - dependency-name: yamlpatch dependency-version: 1.28.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * fix(pacquet): adapt to yamlpath 1.29 QueryError::InvalidInput signature yamlpath 1.29.0 turned QueryError::InvalidInput into a tuple variant carrying the (line, column) of the YAML parse error, so the mapping from yaml_serde now forwards the error's own location, falling back to (0, 0) when none is attached. Co-Authored-By: Claude Fable 5 <[email protected]> --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Zoltan Kochan <[email protected]> Co-authored-by: Claude Fable 5 <[email protected]>
The sync fast-update handlers (importers, ignoredOptionalDependencies, patchedDependencies, settings) used to stage separate candidates, so an install carrying more than one kind of absorbable drift always fell back to a full resolution (the exactly-one-fires rule). Each handler is now split into a cheap detector and an application that replays onto one shared candidate, composed in a fixed order: manifest drift first, then newly ignored optional dependencies, then a shared graph epilogue (prune, peer-suffix safety check over the union of dropped aliases, catalog entry prune, optional-flag recompute), then patch rekeying - which thereby sees the pruned graph a full resolution would see - and the settings block last. Any handler that cannot express its change aborts the candidate and the resolver takes over, and the freshness gates still validate the result before it commits. The async rewrites (catalogs, overrides) consult the resolver and stay outside the pipeline; they keep requiring being the only change. The shared epilogue also hardens two spots the per-handler maintenance handled unevenly: ignored-optional removals now recompute the survivors' optional flags and are covered by the peer-suffix check in both stacks. Closes #13763. Part of #13696.
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 : )