Skip to content

[pull] main from pnpm:main - #417

Merged
pull[bot] merged 9 commits into
dwongdev:mainfrom
pnpm:main
Jul 16, 2026
Merged

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

Conversation

@pull

@pull pull Bot commented Jul 16, 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 9 commits July 16, 2026 21:25
Check every workspace project manifest against its matching lockfile importer before taking the
frozen or prefer-frozen path. The project list and importer ID helper are shared with the existing
multi-importer resolver, so workspace members use the same lockfile keys during resolution and
freshness validation.

This makes normal installs refresh stale workspace member importers and makes frozen installs fail
instead of silently accepting a lockfile that no longer matches a member's package.json. It also
matches the TypeScript freshness edge cases for aliases, dependency metadata, missing dependency-free
importers, distribution tags, and direct resolutions outside their declared semver ranges.

Persist importer `dependenciesMeta` and `publishDirectory` during fresh resolution so those parity
checks compare against complete lockfile snapshots. Restore the empty intent list in the versioning
ledger as well. The previous YAML spelling parsed
as null and prevented release-plan validation from reading the committed ledger.

Closes #13080.
…n self-update (#13082)

A project pinned to 11.12.0 through `packageManager` or
`devEngines.packageManager` still failed on every command with `Cannot use
'in' operator to search for 'integrity' in undefined`. That is the report in
#12959, and it is the shape most people hit: the pin is committed,
so one bad pin breaks everyone who clones the repo.

#13076 refuses these releases, but only in `self-update`. The
version switch is the other way in, and it reached the installer instead,
where a release whose manifest declares dependencies crashes resolving them.

Refuse the same releases there. The check sits after the "already this
version" early return, deliberately: switching *to* a broken release is
refused, but running one that is already installed is not — a developer
whose pnpm is a broken release still needs it to work well enough to move
off it.

11.13.0 is refused too, though it runs for the JS wrapper. The pin is shared
and the wrapper is not, so pinning it works for whoever wrote the pin and
breaks every teammate on `@pnpm/exe`, whose native is missing.
* fix: share raw metadata across in-flight requests

* test: cover the metadata re-serialization fan-out

Add a regression test at the pickPackage/memo-cache boundary: 20 projects
joining one in-flight fetch must mirror the fetched body rather than each
re-serialize it. Against the pre-fix implementation it fails with 19
re-serializations, one per non-initiating caller.

Cover the rejection-path identity guard too, which no test exercised.

Correct the jsonText contract docs, which still described the pre-fix
behaviour, and restore the rationale for dropping the body once the
request settles.

---------

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

The comment justifying `--no-prefer-frozen-lockfile` in
`lockfile_only_updates_importers_when_a_project_is_added` claimed the
auto-frozen freshness gate validates only the root importer. That stopped
being true in #13081, which made `check_lockfile_freshness` loop
over every project manifest.

The flag is still required, for a reason that only became true in that
same change: project-2 declares no dependencies, and the auto-frozen gate
deliberately tolerates a missing importer entry for a dependency-free
project (`allow_missing_dependency_free_importers`, matching the
TypeScript CLI's `allProjectsAreUpToDate`). Without the flag the run
short-circuits to the frozen path and never records the new importer, so
the `packages/project-2:` assertion fails.

Restate the comment against the actual reason so the next reader doesn't
drop the flag on the assumption it is leftover scaffolding.
Strict minimumReleaseAge resolution already collects every immature pick, but pacquet could only abort. Add the interactive approval path used by the TypeScript CLI, persist approved exclusions before install writes begin, and keep noninteractive installs fail-closed with the complete violation list.

Run the blocking confirmation off the async worker and bracket it with pnpm:prompt events. The default reporter holds append-only lines or the latest live frame while the question is active, then replays that output when prompting ends. Reject update --no-save up front because approval requires a durable workspace exclusion.

Closes #13047.
Fresh isolated installs constructed an installability host only when optional dependencies carried platform or engine constraints. Required dependencies therefore skipped strict engine validation, allowing an incompatible engines.node range to install successfully under engineStrict.

Use one installability gate for any constrained package and reuse it when computing skipped snapshots. Keep host detection disabled for --force and constraint-free graphs, while preserving the existing configured nodeVersion, supported architecture, and optional-dependency behavior.

Add deterministic local-dependency regressions covering fresh strict rejection, fresh non-strict acceptance, and frozen strict rejection.
`.modules.yaml` recorded `packageManager: "[email protected]"`, which is wrong
on both halves. `pacquet` is an in-repo crate name that has no meaning
outside this repository — the CLI ships as `pnpm`. And `CARGO_PKG_VERSION`
is the crate's version (`0.0.1`), not the release version the user
installed (`12.0.0-alpha.13`).

The TypeScript CLI writes `${name}@${version}` sourced from its own
package.json, so it records `[email protected]`. It also branches on
`packageManager.name === 'pnpm'` when deriving `pnpmVersion`
(`installing/deps-installer/src/install/index.ts`), which shows the name
half is meaningful and not decorative.

Use `pacquet_config::PNPM_VERSION`, the constant `pnpm --version` already
prints. Its doc comment records that `pnpm bump` keeps it in sync with the
npm wrapper package's version and that the release workflow verifies the
two match, so it is the release version by construction.

Nothing reads the field back in either stack — it is informational
metadata — so this changes no behavior. It is still part of the on-disk
contract that external tooling can inspect, and it should not name a crate
the user has never heard of.

Tighten the test from a `starts_with("pacquet@")` prefix check to an exact
comparison against `pnpm@{PNPM_VERSION}`, so a future drift between the
recorded name/version and the release version fails.
`pacquet` is an in-repo name only; the shipped binary is `pnpm`. Error messages,
diagnostic help text, and `--help` output leaked the internal name, and several
told users to run commands that do not exist:

    help: ... then re-run `pacquet install --frozen-lockfile`.

Replace the leaked name across user-facing strings — typeable commands (`pacquet
install`, `pacquet add --config`, `pacquet why`, `pacquet create <name>`,
`pacquet outdated --recursive`, `"pacquet pack-app"`, and peers) and
product-name prose ("pacquet cannot verify the download", "this build of
pacquet", "not yet ported to pacquet").

Two were also factually wrong, not just misnamed:

- `pnpm add --help` documented the virtual store directory default as
  `node_modules/.pacquet` in both the doc comment and clap's `default_value`,
  while the effective default from `default_virtual_store_dir()` is
  `node_modules/.pnpm`. The field is unused (`TODO: make use of this`), so only
  the help output changed.
- The tarball integrity error offered `pnpm install --update-checksums` and then
  repeated it as `(or `pacquet install --update-checksums`)`. Drop the redundant
  parenthetical.

Internal uses stay as they are: tracing targets, thread names, temp-file
prefixes, the mirror cache magic, panic messages, and test fixtures are not
user-facing.

The TypeScript CLI has no counterpart to change — it never refers to pacquet.
Pacquet collected trailing add arguments but only forwarded the first package selector. Carry the full selector list through regular, global, and configuration-dependency dispatch paths.

Parse and validate all configuration-dependency selectors before initializing installation state so an invalid later selector cannot leave partial filesystem changes. Batch dependency and workspace-manifest updates and persist each result once per command.

Add integration and unit coverage for multi-selector regular adds, configuration-dependency adds, validation atomicity, and batched workspace-manifest writes.

---------

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