PNpM CLI
Notes
no notes yet
Breaking Changes
- Node.js 10 or newer is required (it will probably work with Node.js 8 as well but we don't test it anymore)
- new
node_modulesstructure.- all the hard linked dependencies are inside
node_modules/.pnpm(#1636, @zkochan) - all the hoisted dependencies are symlinked into
node_modules/.pnpm/node_modules. So application code has no access to the hoisted packages but dependencies have. (#1998, @zkochan) - the current lockfile is moved from
node_modules/.pnpm-lock.yamltonode_modules/.pnpm/lock.yaml(#2018, @zkochan)
- all the hard linked dependencies are inside
shamefully-flattenrenamed toshamefully-hoist. (@zkochan)hoist-patternis*by default. All packages are hoisted but application code has access only to listed dependencies. So the buggy ecosystem packages will work but pnpm will prevent users from requiring packages that are not declared inpackage.json. (@zkochan)- all globally installed packages are always hoisted. (@zkochan)
pnpm addfails if no packages are specified (5f73a7c95184652bbeb8c8aad39cb88d9fafd81e, @zkochan)pnpm installinstalls all dependencies of all workspace packages when executed inside a workspace (5f73a7c95184652bbeb8c8aad39cb88d9fafd81e, @zkochan)independent-leavesis only allowed with hoisting turned off (f3d5037fa9104a9d53d7faa8ffdae145b52403e1, @zkochan)pnpm outdateddoes not print details by default. To should details, use the--longflag (#2017, @aparajita)- the root
package.jsonis always included in the workspace (#2021, @ExE-Boss) - the CLI fails with unknown/incompatible options (#1645, @zkochan)
- fails because of unknown option:
pnpm install --foo - fails because of incompatible option:
pnpm remove foo --save-exact - removed legacy
--*-shrinkwrapoption aliases from the CLI.
- fails because of unknown option:
- the default resolution-strategy is
fewer-dependenciesinstead offast(#2042, @zkochan) - changes in the way packages are imported from the store (#2043, @zkochan):
- package-import-method does not support
reflinkanymore. Usecloneinstead, which is a cross-platform alternative. - by default, pnpm will clone packages on systems that support it. If cloning is not supported, pnpm will link packages from the store. If hard links are also not supported, pnpm will copy the packages.
- package-import-method does not support
- new pattern matcher (#2048, @zkochan)
The new pattern matcher only supports
*(so you can doeslint-*or*-plugin-*). The*now also matches scopes, so*pluginmatches both@eslint/pluginandeslint-plugin.
Features
- new config settings:
- hoist:
trueby default. Whenfalse, pnpm will not hoist any dependencies in node_modules, preventing dependencies inside node_modules from accessing unlisted dependencies. (#2004, @zkochan) - hoist-pattern:
*by default. All packages matching this pattern will be hoisted. For example, you can choose to hoist only eslint packages:hoist-pattern=eslint-*. By default, all packages are hoisted. (#1997, #1998, @zkochan) - shamefully-hoist: same as
shamefully-flattenin previous versions of pnpm. The project's code has access to hoisted dependencies. (#2006, @zkochan)
- hoist:
- pnpm outdated:
- restyle the
pnpm outdatedoutput for readability (#2007, @aparajita) <img width="894" alt="after" src="https://user-images.githubusercontent.com/22218/64739985-ad623700-d4a8-11e9-8222-823d6be7a664.png"> pnpm outdated --no-tableprints a list of outdated packages instead of a table (#2026, @aparajita)
- restyle the
- nicer output of the
--helpcommands (#2013, @zkochan)
- new command:
pnpm why <package>(#2015, @ExE-Boss)