v7.0.0 #4646
zkochan
started this conversation in
Show and tell
v7.0.0
#4646
Replies: 1 comment 2 replies
-
One breaking change that cause me quite some headache so to avoid others the same:
I'm not sure to understand the use case for this behaviour or dlx, but my solution was to install those dev deps to my workspace root and use |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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/**
For easier upgrade, we have also added a setting to turn back filtering as it was in v6. Just set
legacy-dir-filtering=true
in.npmrc
.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 interpreted 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
: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.Any package with "prettier" in its name is hoisted.
Changed the location of the global store from
~/.pnpm-store
to<pnpm home directory>/store
On Linux, by default it will be
~/.local/share/pnpm/store
On Windows:
%LOCALAPPDATA%/pnpm/store
On macOS:
~/Library/pnpm/store
Related issue: #2574
4bed585: The next deprecated settings were removed:
Use a base32 hash instead of a hex to encode too long dependency paths inside
node_modules/.pnpm
#4552.New setting added:
git-shallow-hosts
. When cloning repositories from "shallow-hosts", pnpm will use shallow cloning to fetch only the needed commit, not all the history #4548.Lockfile version bumped to v5.4.
Exit with an error when running
pnpm install
in a directory that has nopackage.json
file in it (and in parent directories) #4609.Our Sponsors
What's Changed
@pnpm/graph-sequencer
instead ofgraph-sequencer
by @zkochan in fix: use@pnpm/graph-sequencer
instead ofgraph-sequencer
#4458JSON.parse
execute correctly by @dev-itsheng in fix(exe): use the strict equality operator, and makeJSON.parse
execute correctly #4571add
bug with overlapping workspace packages by @jondlm in Fixadd
bug with overlapping workspace packages #4575loglevel=error
doesn't supress warnings, such asWARN deprecated
andWARN Issues with peer dependencies found
. #4343) by @milahu in fix(default-reporter): use loglevel to filter deprecation warnings (#4343) #4507pnpm install
should fail on peer dep issues by @zkochan in fix: onlypnpm install
should fail on peer dep issues #4596New Contributors
Full Changelog: v6.31.0...v7.0.0
This discussion was created from the release v7.0.0.
Beta Was this translation helpful? Give feedback.
All reactions