Skip to content

[pull] main from pnpm:main - #476

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

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

Conversation

@pull

@pull pull Bot commented Aug 4, 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 2 commits August 4, 2026 11:55
…hase modules (#13624)

`InstallWithFreshLockfile::run` had grown to 2103 lines — 68% of its
file — and read as one flat sequence with no boundary between the
install phases it drives. Give the fresh-install path one module per
phase, leaving `run` as the orchestrator that threads state between
them:

- `resolver_setup` — registries, store-index handles, and the resolver
  chain with its prefetching and observing wrappers.
- `manifest_transforms` — pnpm's built-in read-package chain
  (`packageExtensions` + `pnpm.overrides`).
- `resolve` — the seeds, options, hooks and reuse decisions the walk
  consumes, the walk itself, and the diagnostics that read its result.
- `materialization_plan` — installability host, engine name, skip set.
- `linking` — prune, the hoisted and isolated linker arms, and the
  module-resolution sidecars.

Two phases stay in the orchestrator on purpose. The build phase is
already `install_frozen_lockfile::run_build_phase`, shared with the
frozen path, so a local wrapper would add a layer and no meaning; the
`CreateVirtualStore` and build invocations are single calls whose option
literals gain nothing from being relocated behind another input type.

The resolver-chain split needs two functions rather than one:
`PrefetchContext` borrows the store handles, so the caller has to own
them before the chain that borrows them is built.

Four duplications fell out along the way:

- The store-index writer drain appeared verbatim on both the
  lockfile-only and materializing paths.
- The build-then-splice pair of `build_fresh_lockfile` and
  `merge_filtered_wanted_lockfile` appeared twice; both call sites are
  now one `build_lockfile` call.
- The fast-override pre-pass and the per-importer resolve closure built
  near-identical `ResolveOptions` literals differing only in
  `project_dir` and the preferred-versions seed, now
  `SharedResolveOptions::build`.
- `HoistedArmInputs` and `IsolatedArmInputs` were strict subsets of
  `LinkPhaseInputs`.

Two behavior-preserving simplifications: `needs_installability_check`
was redundant with `installability_host.is_some()` and collapsed into
it, and the `if x.is_empty() { None } else { Some(..) }` shapes around
the overrides hooks became `.filter(..).map(..)`.

Prose the extraction made redundant is gone: call sites no longer repeat
their callee's documentation. That also surfaced a stale comment
claiming the lockfile maps are built "only when GVS is on", which the
unconditional `build_lockfile` contradicts.

No user-visible change, so nothing to mirror in the TypeScript CLI and
no changeset.
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@pull pull Bot locked and limited conversation to collaborators Aug 4, 2026
@pull pull Bot added the ⤵️ pull label Aug 4, 2026
@pull
pull Bot merged commit e3638c1 into dwongdev:main Aug 4, 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