Skip to content

[pull] main from pnpm:main - #503

Merged
pull[bot] merged 4 commits into
dwongdev:mainfrom
pnpm:main
Aug 13, 2026
Merged

pull[bot] merged 4 commits into
dwongdev:mainfrom
pnpm:main

Conversation

@pull

@pull pull Bot commented Aug 13, 2026 •

Copy link
Copy Markdown

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 : )

zkochan and others added 4 commits August 13, 2026 16:38
Break dependency cycles canonically during peer resolution: each
strongly connected component's members sort by package id and every
intra-SCC edge whose target is not canonically later is cut, the same
cut at every occurrence. The SCC becomes a DAG: no walk path revisits a
package, every peer verdict is a plain (package, context) function, and
the lockfile is identical however the walk is ordered (Closes
#13846, Closes #13865).

A cut back-edge is still a real dependency edge: it is realized against
a shared record-only occurrence of its target, walked once at importer
context by the drivers, with peer-issue emission suppressed (every real
position reports its own state). Back-edge targets nothing reaches
forward are queued from the realized-children skip so they stay in the
graph. The shared occurrences persist across peer-hoist discovery
rounds.

The #13859 cycle-truncation verdict keys had nothing left to
scope and are deleted, as is the interim hoisted-region rule this
branch previously carried. Single-importer bit fixture: 0.66 s /
0.60 GB / 9.6k walks vs main's 1.61 s / 0.82 GB / ~27k; 5-importer:
0.73 s / 0.61 GB vs 2.57 s / 0.92 GB; lockfiles 23-37% smaller and
byte-identical across runs and orderings.
`updateWorkspaceManifest` compared the field's current value against the
new one with `equals(undefined, null)`, which is `false`, so clearing a
field the manifest never had still counted as a change. The manifest was
then empty, which takes the remove-the-file path, and `rm` ran against a
file that never existed:

    pnpm config delete virtualStoreDir
    ENOENT: no such file or directory, lstat '<dir>/pnpm-workspace.yaml'

Skip the field instead when there is nothing to clear. That also stops
`pnpm config set` from writing a file when the value it would set is
already there.

pacquet is unaffected: `remove_top_level_field` reports no change for an
absent key, and its removal path already tolerates a missing file. A
regression test pins that.

Closes #13651
Process workspace importers in project-id order in resolve_workspace
and resolve_peers_workspace. Children-owner claims rank by importer
position, hoist rounds run sequentially in list order, and shared
canonical back-edge occurrences bind whichever importer's walk
realizes them first — so the caller's listing order leaked into
ownership, the first-walk missing scope, auto-install decisions,
deprecation attribution, and cycle back-edge bindings (Closes
#13846). Per-importer options are still built in the
caller's order first, so positional options callbacks line up.

A reversed packages listing of the 5-importer bit fixture now
produces a byte-identical lockfile, and both bit fixtures are
byte-identical to the unsorted resolver's output at unchanged
speed and memory. Regression tests pin both levels; two tests that
pinned a non-root importer walking before the root are re-pinned
with their scenarios preserved.
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@pull pull Bot locked and limited conversation to collaborators Aug 13, 2026
@pull pull Bot added the ⤵️ pull label Aug 13, 2026
@pull
pull Bot merged commit b8ffbdc into dwongdev:main Aug 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant