Change8

v12.0.0-rc.9

Breaking Changes
📦 pnpmView on GitHub →
2 breaking13 features🐛 1 fixes1 deprecations🔧 20 symbols

Summary

This release introduces significant enhancements to the Rust pnpm engine, including per-branch lockfiles, improved configuration options like `lockfileDir` and `shellEmulator`, and the addition of many CLI flags previously exclusive to the TypeScript version. It also enhances robustness by failing on unrecognized workspace settings and adding stricter store content checks.

⚠️ Breaking Changes

  • Unrecognized settings in `pnpm-workspace.yaml` that pnpm does not recognize will now cause a failure with `ERR_PNPM_UNRECOGNIZED_WORKSPACE_SETTINGS` if the project pins a pnpm version that satisfies the running pnpm. Previously, these were ignored silently. This change ensures that misspelled settings or settings for a different pnpm version are caught.
  • Top-level lockfile keys that pnpm does not define are no longer dropped when a lockfile is loaded and saved. This means state recorded by other tools alongside pnpm's own keys will now survive a rewrite.

Migration Steps

  1. Review `pnpm-workspace.yaml` for unrecognized settings. Correct any typos or remove settings intended for different pnpm versions to avoid `ERR_PNPM_UNRECOGNIZED_WORKSPACE_SETTINGS` errors.
  2. If you rely on top-level lockfile keys not defined by pnpm, ensure they are preserved after lockfile operations, as they are no longer dropped.
  3. Consider using the new per-branch lockfile features (`gitBranchLockfile`, `mergeGitBranchLockfiles`) for managing different resolutions across git branches.
  4. If using the Rust engine, be aware of the new `strictStorePkgContentCheck` setting. If you encounter `ERR_PNPM_UNEXPECTED_PKG_CONTENT_IN_STORE` errors, you can set this to `false` to downgrade the failure to a warning, though it's recommended to fix the underlying issue.
  5. Update any scripts that rely on the specific behavior of `sh -c` or `cmd /d /s /c` to work with the new `shellEmulator` setting, which uses a built-in POSIX shell.

✨ New Features

  • Added global build approvals.
  • Added recursive global outdated checks.
  • Added support for configuring `stateDir` in the Rust pnpm CLI.
  • Added bounded workspace concurrency for recursive run and exec commands.
  • `@pnpm/napi` now supports reporter output, reverse dependency queries, and lockfile access, including `install` and `rebuild` accepting `options.reporter` for terminal output, `getDependents` for reverse dependency trees, and `readLockfile`/`writeLockfile` for lockfile manipulation.
  • Added per-branch lockfiles in the Rust engine, allowing each git branch to have its own `pnpm-lock.<branch>.yaml`.
  • Added `gitBranchLockfile` and `mergeGitBranchLockfiles` functionality for managing per-branch lockfiles.
  • Added `PNPM_CONFIG_VIRTUAL_STORE_ONLY` and `PNPM_CONFIG_ENABLE_MODULES_DIR` support to the Rust pnpm CLI.
  • Added support for the `lockfileDir` setting and its `--lockfile-dir <dir>` flag, allowing `pnpm-lock.yaml`, the virtual store, and config dependencies to reside in a specified directory.
  • Added support for the `preferSymlinkedExecutables` setting, which creates symlinks for executables in `node_modules/.bin` on POSIX systems and exports `NODE_PATH` to spawned scripts.
  • Added six CLI flags to the Rust pnpm CLI that were previously only available in the TypeScript CLI: `--stream`, `--parallel`, `--aggregate-output`, `--reporter-hide-prefix`, `--use-stderr`, `--ignore-workspace`, and `--workspace-packages`.
  • Added support for the `shellEmulator` setting, which runs scripts in a built-in POSIX shell for consistent behavior across operating systems.
  • The Rust engine now checks that a package read from the store matches its recorded name and version, failing with `ERR_PNPM_UNEXPECTED_PKG_CONTENT_IN_STORE` if there's a mismatch.

🐛 Bug Fixes

  • A misspelled `minimumReleaseAge` setting in `pnpm-workspace.yaml` used to be ignored silently; now it is reported and suggests the closest real setting name, failing the command with `ERR_PNPM_UNRECOGNIZED_WORKSPACE_SETTINGS` when the project pins a pnpm version the running pnpm satisfies.

Affected Symbols

⚡ Deprecations

  • The deprecated internal spellings (`updateConfig`, `auditConfig`, `auditLevel`) are no longer listed by `pnpm config get` and `pnpm config list`.