Major Changes
-
Node.js 12 is not supported.
-
The root package is excluded by default, when running
pnpm -r exec|run|add
#2769. -
Filtering by path is done by globs.
In pnpm v6, in order to pick packages under a certain directory, the following filter was used:
--filter=./apps
In pnpm v7, a glob should be used:
--filter=./apps/**
-
The
NODE_PATH
env variable is not set in the command shims (the files innode_modules/.bin
). This env variable was really long and frequently caused errors on Windows.Also, the
extend-node-path
setting is removed.Related PR: #4253
-
The
embed-readme
setting isfalse
by default. -
When using
pnpm run <script>
, all command line arguments after the script name are now passed to the script's argv, even--
. For example,pnpm run echo --hello -- world
will now pass--hello -- world
to theecho
script's argv. Previously flagged arguments (e.g.--silent
) were intepreted as pnpm arguments unless--
came before it. -
Side effects cache is turned on by default. To turn it off, use
side-effects-cache=false
. -
The
npm_config_argv
env variable is not set for scripts #4153. -
pnpx
is now just an alias ofpnpm dlx
.If you want to just execute the command of a dependency, run
pnpm <cmd>
. For instance,pnpm eslint
.If you want to install and execute, use
pnpm dlx <pkg name>
. -
pnpm install -g pkg
will add the global command only to a predefined location. pnpm will not try to add a bin to the global Node.js or npm folder. To set the global bin directory, either set thePNPM_HOME
env variable or theglobal-bin-dir
setting. -
pnpm pack
should only pack a file as an executable if it's a bin or listed in thepublishConfig.executableFiles
array. -
-W
is not an alias of--ignore-workspace-root-check
anymore. Just use-w
or--workspace-root
instead, which will also allow to install dependencies in the root of the workspace. -
Allow to execute a lifecycle script in a directory that doesn't match the package's name. Previously this was only allowed with the
--unsafe-perm
CLI option #3709. -
Local dependencies referenced through the
file:
protocol are hard linked (not symlinked) #4408. If you need to symlink a dependency, use thelink:
protocol instead. -
strict-peer-dependencies
istrue
by default #4427. -
A prerelease version is always added as an exact version to
package.json
. If thenext
version offoo
is1.0.0-beta.1
then runningpnpm add foo@next
will add this topackage.json
:{ "dependencies": { "foo": "1.0.0-beta.1" } }
PR: #4435
-
Dependencies of the root workspace project are not used to resolve peer dependencies of other workspace projects #4469.
-
Don't hoist types by default to the root of
node_modules
#4459.
Patch Changes
- Show a friendly error message when it is impossible to get the current Git branch name during publish #4488.
- When checking if the lockfile is up-to-date, an empty
dependenciesMeta
field in the manifest should be satisfied by a not set field in the lockfile #4463. - It should be possible to reference a workspace project that has no version specified in its
package.json
#4487.
What's Changed
- fix: use
@pnpm/graph-sequencer
instead ofgraph-sequencer
by @zkochan in #4458 - fix: fetch should allow the same options as install by @zkochan in #4460
- fix: typo by @HomyeeKing in #4462
- fix(lockfile-utils): checking dependenciesMeta by @zkochan in #4463
- fix: types should not be hoisted to the root of node_modules by @zkochan in #4459
- chore: replace deprecated String.prototype.substr() by @CommanderRoot in #4479
- Chore/friendly git error by @lawvs in #4488
- fix: handle undefined version spec by @tmkx in #4487
- lint: remove duplicate code by @milahu in #4496
- fix: typo by @HomyeeKing in #4499
- feat: don't resolve peer dependencies from workspace root by @zkochan in #4469
New Contributors
- @HomyeeKing made their first contribution in #4462
- @CommanderRoot made their first contribution in #4479
- @lawvs made their first contribution in #4488
- @tmkx made their first contribution in #4487
Full Changelog: v7.0.0-beta.2...v7.0.0-rc.0