v11.0.0-alpha.5
Breaking Changes📦 pnpmView on GitHub →
⚠ 13 breaking✨ 12 features🐛 2 fixes🔧 20 symbols
Summary
This major release introduces significant performance improvements by switching internal store formats to MessagePack and optimizing index storage. It also brings substantial changes to configuration handling, replacing INI formats with JSON for config commands and standardizing workspace configuration via `pnpm-workspace.yaml`.
⚠️ Breaking Changes
- The `pnpm config get` command (without `--json`) no longer outputs INI formatted text. It now outputs JSON for objects/arrays and raw strings for primitives. If you relied on INI output, you must now use `pnpm config get --json` or adjust parsing logic.
- The `pnpm config list` command now outputs a JSON object instead of INI formatted text. Adjust parsing logic if relying on INI output.
- pnpm no longer loads non-auth and non-registry settings from rc files. These settings must now be defined in `pnpm-workspace.yaml`.
- Workspace project specific `.npmrc` files are replaced by the `packageConfigs` field in `pnpm-workspace.yaml`. Migrate configuration from project-level `.npmrc` files to `packageConfigs` in the workspace manifest.
- Deprecated build dependency settings (`onlyBuiltDependencies`, `onlyBuiltDependenciesFile`, `neverBuiltDependencies`, and `ignoredBuiltDependencies`) have been removed. Use the `allowBuilds` setting instead.
- The deprecated `allowNonAppliedPatches` option is completely removed in favor of `allowUnusedPatches`.
- The `ignorePatchFailures` option is removed; all patch application failures will now throw an error.
- The `pnpm server` command has been removed.
- Support for `useNodeVersion` and `executionEnv.nodeVersion` fields is removed. Use `devEngines.runtime` and `engines.runtime` instead.
- Support for `hooks.fetchers` is removed. Use the new API via the `fetchers` field of `pnpmfile`.
- The default value for the `type` field in `package.json` created by `pnpm init` is now `module` (ESM).
- The meaning of short flags for `pnpm add` has changed: `-p` is now an alias for `--save-prod` (was `--parseable`), and `-d` is now an alias for `--save-dev` (was `--loglevel=info`).
- The One-time Password feature for `pnpm publish` now reads from `PNPM_CONFIG_OTP` instead of `NPM_CONFIG_OTP`.
Migration Steps
- If you relied on INI output from `pnpm config get` (without arguments), switch to using `pnpm config get --json` or update parsing logic.
- Migrate configuration settings previously defined in project-level `.npmrc` files to the `packageConfigs` field within `pnpm-workspace.yaml`.
- Replace usages of deprecated build dependency settings (`onlyBuiltDependencies`, etc.) with the `allowBuilds` map in configuration files.
- Replace usages of `allowNonAppliedPatches` with `allowUnusedPatches`.
- If you used `pnpm server`, remove it from scripts.
- Replace usage of `useNodeVersion` or `executionEnv.nodeVersion` with `devEngines.runtime` or `engines.runtime` in configuration.
- If you used `hooks.fetchers` in `pnpmfile`, migrate to using the `fetchers` field.
- If using `pnpm publish` and relying on OTP, export the OTP value using the `PNPM_CONFIG_OTP` environment variable.
- If you used short flags `-p` or `-d` with `pnpm add`, be aware they now correspond to `--save-prod` and `--save-dev` respectively.
✨ New Features
- Runtime dependencies are always linked from the global virtual store.
- Optimized index file format in the store: integrity strings are replaced by hex digests, improving performance by eliminating base64-to-hex conversion.
- Internal store and cache files switched from JSON to MessagePack format for faster serialization/deserialization and smaller sizes.
- Package manifest (name, version, bin, engines, scripts, etc.) is now stored directly in the package index file, reducing I/O during resolution/installation.
- `pnpm config get <array>` now prints a JSON array.
- `pnpm config list` now shows top-level keys as camelCase (except keys starting with @ or //).
- Support for a global YAML config file named `config.yaml` for pnpm-specific settings.
- Environment variables starting with `pnpm_config_` are loaded into config, overriding workspace settings but not CLI arguments.
- Support for pnpmfiles written in ESM (using the .mjs extension, e.g., .pnpmfile.mjs).
- `pnpm why` now shows a reverse dependency tree, making it easier to trace dependents back to the root.
- A new `--yes` flag allows automatic confirmation of prompts for non-interactive scripts.
- When updating `pnpm-workspace.yaml`, comments, string formatting, and whitespace preservation is improved.
🐛 Bug Fixes
- Fix YAML formatting preservation in `pnpm-workspace.yaml` when running commands like `pnpm update`, preventing loss of quotes and formatting when catalog values are unchanged.
- The parameter set by the `--allow-build` flag is now correctly written to `allowBuilds`.
Affected Symbols
`pnpm config get``pnpm config list``onlyBuiltDependencies``onlyBuiltDependenciesFile``neverBuiltDependencies``ignoredBuiltDependencies``allowBuilds``allowNonAppliedPatches``ignorePatchFailures``pnpm server``useNodeVersion``executionEnv.nodeVersion``hooks.fetchers``fetchers` (in pnpmfile)`pnpm-workspace.yaml` (configuration structure)`pnpm add` flags (-p, -d)`pnpm publish` OTP readingStore index file formatStore internal cache format`pnpm why` output format