Skip to content

[pull] main from pnpm:main - #499

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

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

Conversation

@pull

@pull pull Bot commented Aug 12, 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 7 commits August 12, 2026 00:28
The "Rust CI / Doc" job runs `cargo doc` with `--document-private-items`
and the pre-push check did not. Nearly every item in these crates is
private or `pub(super)`, and rustdoc only resolves the doc links of the
items it documents, so a link to a renamed or deleted private item
passed the local check and failed CI.

Reproduced by pointing one doc comment at a name that does not exist:
the old command reports nothing, the CI command reports `unresolved
link`. Caught after two red `Rust CI / Doc` runs on #13835.

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Occurrences of a package race to claim its children: whichever one
reaches it while the claim stands vacant records what its own level's
preferred-versions overlay resolved, and a better-placed occurrence
arriving later keeps that recording rather than walking again — walking
on every claim win is what expanded exponentially in #13574. Which
occurrence gets there first is thread timing, so identical inputs
produced different lockfiles run to run.

Settling the recording alone does not fix it: traced on the repro, the
better-ranked occurrence of a package sometimes does not exist at all,
because an ancestor on its path matched its own recording and never
walked that subtree. The walked set is arrival-ordered too.

The walk now advances a depth level at a time. A level is seeded in full
before any of it is settled, so every occurrence of a package at that
depth is in hand when its children ownership is decided; the rank's
first three keys are shared within a level, so the occurrence whose
parent path sorts first wins, and it is the only one that claims.
Ownership never passes to an occurrence seeded later and no occurrence
re-walks children another one recorded.

Removing those handovers is why this costs nothing: the repro resolves
in 4.29s against 4.29s on main and is byte-identical across 46 runs,
where main produces 3 distinct lockfiles in 4, and the peer-heavy
resolve benchmark drops from 844ms to 467ms.

Closes #13685.
A patch whose last dependent is dropped has nothing left to apply to.
`verifyPatches` runs from the resolver, so the composed pipeline was the
only path that could reach that state and not report it: it wrote a
lockfile whose `patchedDependencies` named a package it had just pruned,
where a resolution raises `ERR_PNPM_UNUSED_PATCH`.

The check existed, but only inside the patched-dependencies handler,
which runs only when the patch configuration itself drifted. A removal
is exactly a run where it did not — whether the edge goes away with a
manifest dependency, a widened `ignoredOptionalDependencies`, or a
removal override.

It now runs over the settled graph at the end of the pipeline, where
every handler's removals are already pruned. `allowUnusedPatches` keeps
its existing meaning: it downgrades the error to a warning the
resolution emits, and as elsewhere in these handlers a warning alone is
not worth a full resolution.

Closes #13827.
…pts (#13834)

An injected dependency is materialized as a tree of hardlinks into the
virtual store, so a build script that rewrites its source package leaves
every copy pointing at the old inodes. The TypeScript CLI has taken
syncInjectedDepsAfterScripts since it grew the setting; pacquet
recognized the config key and did nothing with it.

Add the crate that does the work. It walks the source and each target
with the same directory fetcher the installer uses, diffs the two into
inode maps, and patches each target: removals first, then directories
shallowest-first, then the hardlinks. An inode that cannot be
hardlinked — a FIFO, a socket, a device — is left out of the map, and a
target holding one is cleared and retried rather than failing the sync.
Bins are re-linked afterwards, since a build script can add or drop one.

pnpm run calls it after a script whose name the setting lists, and only
when the script succeeded, matching the TypeScript call site.

Removals run before the changes, which the sequential implementation
forced into the open: when the source turns a directory into a file of
the same name, that path is a change while its old children are
removals, and patching the change first leaves the removals hitting
ENOTDIR. The TypeScript applyPatch runs the two concurrently and has the
same hazard as a latent race; fixing it there is a separate PR.
…13724)

When pnpm prune is run at the workspace root, it delegates to the
install handler. Previously, the prune command did not export
recursiveByDefault = true, causing it to run in non-recursive
(single-project) mode.

In non-recursive mode, only the root project is selected. When
validateModules runs across all workspace projects and detects an
INCLUDED_DEPS_CONFLICT (e.g. switching from devDependencies: true to
false via --prod), it purges node_modules for the conflicting project.
Because that project was not selected, it was never re-linked,
leaving its node_modules empty and its workspace-package symlinks gone.

Fix: export recursiveByDefault = true from the prune command so that
running pnpm prune at a workspace root selects all projects, preventing
partial purge without re-linking.

Fixes #13718

---------

Co-authored-by: Zoltan Kochan <[email protected]>
## Summary

SSH Git dependencies without user information could crash during parsing because the TypeScript resolver expected every authority to contain `user@host`. Bracketed IPv6 addresses exposed a second issue: colons inside the address were mistaken for an SCP-style separator.

This change keeps the TypeScript and Rust implementations aligned:

- the host lookup falls back to the full authority when no user information is present;
- only the part after a bracketed host is inspected for an SCP separator or port;
- the Rust rewrite finds the final separator directly with `rfind(':')`, which expresses the intended operation without allocating a temporary vector;
- regression coverage includes no-user-info URLs, bracketed IPv6 hosts, ports, SCP-style paths, and path extraction.

---------

Co-authored-by: Zoltan Kochan <[email protected]>
…13716)

- **Bug Fixes**
  - Strict catalog mode now accepts package versions that satisfy configured semver ranges during additions and updates.
  - Compatible catalog references are preserved in manifests and lockfiles.
  - Versions outside configured ranges continue to be rejected.
  - Non-semver catalog specifications retain their existing behavior.

---------

Co-authored-by: Zoltan Kochan <[email protected]>
@pull pull Bot locked and limited conversation to collaborators Aug 12, 2026
@pull pull Bot added the ⤵️ pull label Aug 12, 2026
@pull
pull Bot merged commit 676324f into dwongdev:main Aug 12, 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.

4 participants