@yarnpkg/plugin-npm-cli
Advanced tools
Changelog
2.3.0
yarn set version 2.3.0
yarn tag
set of commands has been ported over from Yarn Classic as yarn npm tag
.yarn info
will now print many information about your dependencies. Various options are available to tweak the output, including --json
. Plugin authors can provide their own information sections via the fetchPackageInfo
hook.yarn stage
with the -r,--reset
flag will now unstage all changes that seem related to Yarn.yarn add -h
to see an example).Terminate batch job (Y/N)?
prompts when invoking dependency binaries.The following changes only apply to the pnp
linker (which is the default install strategy):
pnpapi
module now exposes a new function called getAllLocators
allow you to access the list of all locators in the map without having to traverse the dependency tree. This method is considered a Yarn extension, so you should check for its existence if you plan to use it in your code.The following changes only apply to the node-modules
linker:
node_modules/.bin
folder as their corresponding dependencies are removed.nmHoistingLimits
has appeared. It replaces what was previously known as nohoist
in Yarn 1.node-modules
linker, and that the strictly correct behavior can only be obtained by using the default Plug'n'Play linker.$$
and $PPID
yarn constraints --fix
command will now properly persist the changes on disk.yarn unplug
command will now work when used on packages with peer dependencies.yarn stage
command will now allow to stage files when called without the -c,--commit
flag.yarnPath
setting.Changelog
2.2.0
yarn set version 2.2.0
publishConfig.executableFiles
field in their manifests to indicate which files should keep the executable flag once packed in the archive. This is important as for portability reasons Yarn strips the executable flag from all files during packing (otherwise yarn pack
would yield different outputs when run on Posix vs Windows). Files listed in the bin
field are assumed executable by default, so you don't need to explicitly list them in executableFiles
.yarn pack
will properly include main/module/bin files, even when not explicitly referenced through the files
field.git+file:
protocol.workspace
field will now be processed correctly.workspace:
protocol to start with ./
yarn add
and yarn up
cd
and exit
without arguments|&
pipelineyarn add
and yarn up
will now respect the preferInteractive
configuration option.yarn config set
now supports the -H,--home
flag, which causes it to update the home configuration instead of the project configuration.immutablePaths
setting allow you to specify paths that must not change when running Yarn with the --immutable
flag set. You can use it to detect unforeseen changes to your install artifacts, be it .pnp.js
or node_modules
files.$RANDOM
variable as well as simple calculations using +
, -
, *
, /
and ()
inside $(())
{echo foo}
) to execute a command in the context of the current shell (without creating a subshell like in the case of (echo foo)
).pnpIgnorePatterns
fs
module from within a Webpack browser bundle).