@yarnpkg/shell
4.1.4 · 21 Nov 2026BSD-2-Clause1.2M / weekRepositorynpmAtom feed
3.3.0 is the newest release of 3.x.
In short
2 new11 fixed14 changed
Release note
Commands
The
yarn workspaces listandyarn workspaces foreachcommands now both support a new--sinceoption that lets you filter the workspace list by changes (only workspaces that changed since the specified commit will be iterated on). This feature is still a little experimental, especially when used with-R,--recursive.The
yarn workspaces foreachcommand now handles the fact that a script containing:only becomes global if it exists in exactly one workspace.The
yarn workspaces foreachcommand now supports--jobs 1and--jobs unlimited.The
yarn init -2command will now add thepackageManagerfield to your project manifest.
Settings
The
patternmatcher fromlogFilterswill now match any part of the log entry.
Installs
A new
nodeLinker: pnpmmode will let you install packages using the pnpm install strategy, where packages are stored flat and referenced by each others through symlinks. This mode is still a little experimental, so please send our way bugs you might find.Yarn won't install anymore packages that don't match the current OS. Should you need to (for example if you check-in your cache), use the
supportedArchitecturesfield to manually enforce the presence of specific architectures.The
nmMode: hardlinks-globalsetting will now be automatically downgraded tonmMode: hardlinks-localwhen global caches and install folders are kept on different devices, thus letting the install continue normally. A warning will still be produced explaining this behaviour.The
node_moduleslinker maximizes chances to end-up with only one top-level node_modules in the case of using workspacesThe
nmSelfReferencessetting has been added to the nm linker to control whether workspaces are allowed to require themselves - results in creation of self-referencing symlinks.yarn workspaces focuswill not create self-referencing symlinks for excluded workspaces anymore.Yarn can now install workspaces from remote git repositories that use npm if npm@>=7.x is installed on the system.
The hoisting algorithm should be faster, improving the install time for recurrent
node_modulesinstalls.
Miscellaneous Features
Workspaces can now be referred to using
workspace:^andworkspace:~. When published, those markers will turn into the actual version (just like what used to happen withworkspace:*), except that they'll be prefixed with the relevant semver prefix (respectively^and~).A new
npmAuditRegistrysetting will let you define which registry to use when running audits. If unset, we'll fallback to the currently configured publish registry (we'll likely change this behavior in Yarn 4 to rather use the fetch registry).
Bugfixes
Direct portal dependencies for
node_modulesinstalls will now be given priority during hoisting, preventing cases when indirect regular dependencies would block the way for direct portal dependencies.The
pnpifybinary can now be used from inside directories containing spaces.The CLI bundles built from sources will now output the commit hash instead of the tree hash, as part of their
--versionstring.Nested workspaces are properly hoisted by
node-moduleslinker.Self-referencing symlinks won't be created for anonymous workspaces when using the
node-moduleslinker, since they cannot be used from the code anyway.The cache is now fully atomic when moving files across devices, and is more efficient in general.
The PnP patch will now properly pick up changes to the
fsmodule, allowing users to patch it.When using PnP,
require.resolve('pnpapi')will be handled correctly even when usingexports.The install state will no longer be invalidated after running commands that modify the lockfile; this should bring a significant performance improvement when running commands such as
yarn runimmediately after adding or removing dependencies inside large monorepos.Optional peer dependencies now imply an optional peer dependency on the corresponding
@typesversion. This matches the behaviour for peer dependencies.
Compatibility
Yarn will now generate an experimental ESM loader when it detects you may need it. This can be disabled (or enabled) using
pnpEnableEsmLoader.The PnP compatibility patch for
resolvewill no longer resolve missing modules to a file with the same name that would happen to be located next to the issuer.Fixes the SDK to account for a breaking change in VSCode >=1.61.
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.