@yarnpkg/cli
4.18.1 · 24 Sep 2026BSD-2-Clause121.1k / weekRepositorynpmAtom feed
2.4.3 is the newest release of 2.x.
In short
13 fixed7 changed4 internal
Release note
yarn set version 2.2.0
Ecosystem
Packages can now use the
publishConfig.executableFilesfield 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 (otherwiseyarn packwould yield different outputs when run on Posix vs Windows). Files listed in thebinfield are assumed executable by default, so you don't need to explicitly list them inexecutableFiles.
Bugfixes
Requests won't timeout anymore as long as the server is still sending data.
yarn packwill properly include main/module/bin files, even when not explicitly referenced through thefilesfield.Local git repositories can now be fetched via the
git+file:protocol.The progress bars will be properly styled when using the new Windows terminal on certain days.
Yarn will now avoid using deprecated versions of the dependencies, unless only deprecated versions are available for the requested ranges.
Build keys are now properly computed, which fixes issues where build scripts weren't always triggered when they should have been.
Negated glob patterns in the
workspacefield will now be processed correctly.Yarn will now allow relative paths inside the
workspace:protocol to start with./Yarn will now show the actual error when it fails to resolve a request during
yarn addandyarn upThe portable shell will now support calling
cdandexitwithout argumentsYarn will now show the exit code when a lifecycle script fails
Yarn's portable shell will now also pipe the stderr when using the
|&pipelineYarn's portable shell will now respect the left associativity of list operators
CLI
Yarn will now report an error when run through an incompatible Node version.
yarn addandyarn upwill now respect thepreferInteractiveconfiguration option.yarn config setnow supports the-H,--homeflag, which causes it to update the home configuration instead of the project configuration.
Configuration
The settings found in the home configuration file won't cause exceptions when consumed by older Yarn versions. Unsupported options will simply be silently ignored. This should improve the user experience when working with multiple projects configured with different Yarn versions.
A new
immutablePathssetting allow you to specify paths that must not change when running Yarn with the--immutableflag set. You can use it to detect unforeseen changes to your install artifacts, be it.pnp.jsornode_modulesfiles.
Third-party integrations
The PnP hook will now display clearer error message when requiring Node builtins from contexts that can't access them out of the box (for example when accessing the
fsmodule from within a Webpack browser bundle).
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.