Change8

v12.0.0-beta.1

📦 pnpmView on GitHub →
3 features🐛 19 fixes🔧 16 symbols

Summary

This release significantly improves the performance of peer resolution in large workspaces and introduces several bug fixes for lockfile parsing, dependency resolution, and non-interactive terminal usage for `pnpm login`. It also enhances the `allowBuilds` functionality for git-hosted packages.

Migration Steps

  1. If you were relying on the specific order of entries in the `overrides` block of `pnpm-lock.yaml` when using `@pnpm/napi`, re-running installs should now preserve that order.

✨ New Features

  • The `save-prefix` setting now accepts `=` to save newly added dependencies with an explicit `=` operator (`=1.2.3`).
  • `allowBuilds` entries can now approve git-hosted packages (e.g., `github:` dependencies) by their repository URL without the resolved commit hash, matching hashless `git+` matching.
  • The `TRACE` environment variable now enables engine tracing for `@pnpm/napi` consumers.

🐛 Bug Fixes

  • Fixed a severe slowdown resolving large workspaces against registries with abbreviated metadata lacking per-version `time` fields while `minimumReleaseAge` is active by caching upgrade outcomes.
  • Stopped the resolver from deep-copying every workspace project manifest on each internal resolve-options clone.
  • Aligned deprecated package warnings with pnpm by reporting each package only on its first resolution and shortening direct dependency warnings.
  • Fixed `pnpm outdated --include-github-actions` from blocking on an interactive git credential prompt for private action repos.
  • Fixed parsing very large lockfiles that exceed the YAML parser's default 64 MiB scalar-text budget.
  • Fixed parsing large lockfiles that exceed the YAML parser's default structural budget [pnpm/pnpm#12857].
  • Fixed writing lockfiles with dependency paths longer than 1024 characters by emitting them in explicit `? <key>` form.
  • Prevented `minimumReleaseAge` from replacing `latest` with a SemVer-greater version than the registry tag target [#13034].
  • Fixed `readPackage` hook dispatching in `@pnpm/napi` for large workspaces by sending in batches instead of one event-loop roundtrip per manifest.
  • Fixed the `overrides` block of `pnpm-lock.yaml` being rewritten in a random order on every install performed through `@pnpm/napi` by preserving declaration order.
  • Fixed an invalid `TRACE` filter in `@pnpm/napi` from aborting the process, now prints a warning and leaves tracing off.
  • Fixed peer resolution creating far more peer variants than the TypeScript CLI in multi-importer workspaces by binding peers against their own context.
  • Fixed empty `bundledDependencies` and `bundleDependencies` arrays causing nondeterministic lockfile changes [pnpm/pnpm#13123].
  • Reduced the peer resolution pass's CPU cost on workspaces with many peer dependencies by sharing copy-on-write peer-context maps.
  • The install summary no longer prints `(X is available)` when the registry's `dist-tags.latest` is held back by `minimumReleaseAge` [#11698].
  • `pnpm update` now keeps the explicit `=` operator of an exact version pin when updating.
  • Preserved a workspace dependency's `link:` entry when a run does not target it, instead of spuriously rewriting it to a peer-suffixed `file:` protocol [pnpm/pnpm#10433].
  • Fixed resolution of a direct dependency declared in both `dependencies` and `devDependencies`, where the `dependencies` specifier now wins.
  • Kept the lockfile policy verdict ahead of the frozen-install message when package statistics arrive.

Affected Symbols