Change8

v11.18.0

Breaking Changes
📦 pnpmView on GitHub →
1 breaking3 features🐛 11 fixes🔧 24 symbols

Summary

This release introduces support for publishing packages under different names and enhances `pnpm setup` for GitHub Actions. It also includes numerous bug fixes and performance improvements, particularly around dependency resolution, overrides, and interactive updates.

⚠️ Breaking Changes

  • The `pnpm self-update` command no longer respects project-specific configurations like `.npmrc`, `pnpm-workspace.yaml`, or project `.pnpmfile.(c|m)js` for fetching pnpm versions. This means projects cannot redirect downloads, attach credentials, or load project-specific pnpmfiles during self-updates. Pnpmfiles from trusted sources (global config, command-line flags, etc.) still apply. To fix this, ensure your trusted registry and authentication are configured globally or via environment variables if you need to override defaults during self-updates.

Migration Steps

  1. If you were relying on project-specific `.npmrc`, `pnpm-workspace.yaml`, or project `.pnpmfile.(c|m)js` to control `pnpm self-update` behavior (e.g., redirecting downloads, attaching credentials, or loading project pnpmfiles), you will need to configure these settings globally or via environment variables.
  2. To include GitHub Actions dependencies in `pnpm outdated` or `pnpm update` checks, you must now explicitly pass the `--include-github-actions` flag or set `update.githubActions` to `true` in `pnpm-workspace.yaml`.

✨ New Features

  • Added support for `publishConfig.name` to publish packages under a different name than their manifest name within a workspace.
  • `pnpm setup` now appends `PNPM_HOME` and the global bin directory to GitHub Actions environment files (`GITHUB_ENV` and `GITHUB_PATH`) for easier global command execution in subsequent steps.
  • The `pnpm update --interactive` command now measures its table in terminal columns instead of characters, improving display with wide characters (CJK, emoji) and preventing display errors.

🐛 Bug Fixes

  • Fixed an issue where an installed optional dependency might be left without one of its required dependencies, leading to `MODULE_NOT_FOUND` errors. The dependency is now installed, and an install-check warning is issued for incompatibility.
  • Fixed `pnpm licenses list` to report every version when the same package is installed under multiple aliases.
  • Sorted `pnpm dedupe --check` snapshot changes for stable output across different pnpm implementations.
  • Stripped Unicode formatting characters from registry- and manifest-derived terminal output.
  • Speeds up installs after compatible catalog or direct dependency range changes by retaining the locked version without re-resolving the dependency graph.
  • Speeds up installs after safe override changes by reusing unambiguous compatible dependency resolutions, pruning obsolete dependencies, applying independent replacements and removals together, and handling parent-scoped `"-"` overrides without full lockfile resolution.
  • Fixed an issue where installing a local `file:` directory dependency with the global virtual store enabled would fail with `TypeError: Cannot read properties of undefined (reading 'split')`. Local directory dependencies now get a global-virtual-store slot per project.
  • The `Workspace` column of `pnpm update --interactive` now falls back to the project's path when its `name` is only whitespace, a missing, or an empty string.
  • Fixed an issue where an auto-installed optional peer was hoisted at a version that the workspace root's own dependency on that package excluded, potentially leading to multiple instances of the same package.
  • Fixed an issue where `overrides` did not govern auto-installed peers, potentially leading to the installation of incorrect package versions. Overrides now correctly apply to auto-installed peers.
  • Under `resolvePeersFromWorkspaceRoot`, workspace root dependencies declared with `link:` or `file:` (or the path form of `workspace:`) now satisfy missing peer dependencies at the linked package's own version, instead of being hoisted as a path, preventing broken symlinks.

Affected Symbols