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 --jsonwould still print all types of values as JSON like before. -
Replace workspace project specific
.npmrcwithpackageConfigsinpnpm-workspace.yaml.A workspace manifest with
packageConfigswould 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
-
strictDepBuildsistrueby default. -
pnpm config listandpnpm config get(without argument) now hide auth-related settings. -
blockExoticSubdepsistrueby 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
typefield in thepackage.jsonfile of the project initialized bypnpm initcommand has been changed tomodule. -
pnpm config listandpnpm 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 listnow prints a JSON object instead of INI formatted text. -
pnpm config getandpnpm config listno 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
useNodeVersionandexecutionEnv.nodeVersionfields.devEngines.runtimeandengines.runtimeshould be used instead #10373. -
Support lowercase options in
pnpm add:-d,-p,-o,-e#9197.When using
pnpm addcommand only:-pis now an alias for--save-prodinstead of--parseable-dis now an alias for--save-devinstead of--loglevel=info
-
Remove deprecated build dependency settings:
onlyBuiltDependencies,onlyBuiltDependenciesFile,neverBuiltDependencies, andignoredBuiltDependencies.Use the
allowBuildssetting instead. It is a map where keys are package name patterns and values are booleans:truemeans the package is allowed to run build scriptsfalsemeans 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 frompnpm-workspace.yamlbut 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
rcand local.npmrc. - pnpm-specific settings which can only be loaded from YAML files such as global
config.yamland localpnpm-workspace.yaml.
- Registry and auth settings which can be stored in INI files such as global
-
Added support for pnpmfiles written in ESM. They should have the
.mjsextension:.pnpmfile.mjs#9730. -
When pnpm updates the
pnpm-workspace.yaml, comments, string formatting, and whitespace will be preserved.
Platinum Sponsors
|
|
Gold Sponsors
|
|
|
|
|
|
|