npm pnpm 11.0.0-alpha.3
pnpm 11 Alpha 3

5 hours ago

Major Changes

  • pnpm config get (without --json) no longer print INI formatted text.
    Instead, it would print JSON for both objects and arrays and raw string for
    strings, numbers, booleans, and nulls.
    pnpm config get --json would still print all types of values as JSON like before.

  • Replace workspace project specific .npmrc with packageConfigs in pnpm-workspace.yaml.

    A workspace manifest with packageConfigs would look something like this:

    # File: pnpm-workspace.yaml
    packages:
      - "packages/project-1"
      - "packages/project-2"
    packageConfigs:
      "project-1":
        saveExact: true
      "project-2":
        savePrefix: "~"

    Or this:

    # File: pnpm-workspace.yaml
    packages:
      - "packages/project-1"
      - "packages/project-2"
    packageConfigs:
      - match: ["project-1", "project-2"]
        modulesDir: "node_modules"
        saveExact: true
  • strictDepBuilds is true by default.

  • pnpm config list and pnpm config get (without argument) now hide auth-related settings.

  • blockExoticSubdeps is true by default.

  • This package is now pure ESM.

  • pnpm no longer loads non-auth and non-registry settings from rc files. Other settings must be defined in pnpm-workspace.yaml.

  • The pnpm CLI now gets installed with a specific version of Node.js, which it uses for its runtime. This makes pnpm more stable and it doesn't rely on your globally install Node.js anymore.

  • Node.js v18 and 19 support discontinued.

  • pnpm config get <array> now prints a JSON array.

  • The default value of the type field in the package.json file of the project initialized by pnpm init command has been changed to module.

  • pnpm config list and pnpm config get (without argument) now show top-level keys as camelCase.
    Exception: Keys that start with @ or // would be preserved (their cases don't change).

  • pnpm config list now prints a JSON object instead of INI formatted text.

  • pnpm config get and pnpm config list no longer load non camelCase options from the workspace manifest (pnpm-workspace.yaml).

  • Runtime dependencies are always linked from the global virtual store #10233.

  • Removed support for the useNodeVersion and executionEnv.nodeVersion fields. devEngines.runtime and engines.runtime should be used instead #10373.

  • Support lowercase options in pnpm add: -d, -p, -o, -e #9197.

    When using pnpm add command only:

    • -p is now an alias for --save-prod instead of --parseable
    • -d is now an alias for --save-dev instead of --loglevel=info
  • Remove deprecated build dependency settings: onlyBuiltDependencies, onlyBuiltDependenciesFile, neverBuiltDependencies, and ignoredBuiltDependencies.

    Use the allowBuilds setting instead. It is a map where keys are package name patterns and values are booleans:

    • true means the package is allowed to run build scripts
    • false means the package is explicitly denied from running build scripts

    Same as before, by default, none of the packages in the dependencies are allowed to run scripts. If a package has postinstall scripts and it isn't declared in allowBuilds, an error is printed.

    Before:

    onlyBuiltDependencies:
      - electron
    onlyBuiltDependenciesFile: "allowed-builds.json"
    neverBuiltDependencies:
      - core-js
    ignoredBuiltDependencies:
      - esbuild

    After:

    allowBuilds:
      electron: true
      core-js: false
      esbuild: false

Minor Changes

  • Load environment variables whose names start with pnpm_config_ into config. These environment variables override settings from pnpm-workspace.yaml but not the CLI arguments.

  • Add support for a global YAML config file named config.yaml.

    Now configurations are divided into 2 categories:

    • Registry and auth settings which can be stored in INI files such as global rc and local .npmrc.
    • pnpm-specific settings which can only be loaded from YAML files such as global config.yaml and local pnpm-workspace.yaml.
  • Added support for pnpmfiles written in ESM. They should have the .mjs extension: .pnpmfile.mjs #9730.

  • When pnpm updates the pnpm-workspace.yaml, comments, string formatting, and whitespace will be preserved.

Platinum Sponsors

Bit

Gold Sponsors

Discord CodeRabbit Workleap
Stackblitz Vite

Don't miss a new pnpm release

NewReleases is sending notifications on new releases.