@yarnpkg/cli
4.18.1 · 24 Sep 2026BSD-2-Clause121.1k / weekRepositorynpmAtom feed
4.18.1 is the newest release of 4.x.
In short
31 breaking3 deprecated61 new26 faster146 fixed60 changed170 internal
- Breaking
patch: Improves patches
- Breaking
core: Rename caFilePath to httpsCaFilePath
- Breaking
Move getCustomDataKey to Linker
- Breaking
Set default
nmModetohardlinks-local - Breaking
libui: Require
renderFormstreams to be specified - Breaking
foreach: Automatically enable
--verbosein tty environments - Breaking
audit: Remove fallback to publish registries
- Breaking
Remove deprecated versionUtils
Release note
Blog post: yarnpkg.com/blog/release/4.0
What's Changed
core: Skip unnecessary stat call in
tgzUtils.convertToZipAdd extension for '@cypress/snapshot' dependency on 'debug'
Don't run the tests anymore on Node 12
esbuild: Make
foo/barexternal if packagefoois externalesbuild: Resolve to ESM when requested
nm: Support portals to external interdependent workspaces
pnpm: Pnpm linker no longer removes node_modules when nm linker is active
nm: Apply hoisting algorithm on aliased dependencies
- Breaking
patch: Improves patches
libzip: Migrate to zlib-ng
nm: Reinstall removed module directories
Make the local cache opt-in (rather than opt-out)
nm: Takes into account scoped packages during syncing tree with disk
Removes the compatibility layer for Clipanion 2
Improves boot time
nm: Improves external soft links hoisting
plugin-pnp: Wait for unplugging to finish before finalizing
parsers: Correctly stringify keys longer than 1024 chars
Support auth in proxy url
Enables all official plugins by default
Prefer using exclusively Corepack when possible
Soften CI coverage
pnp: Esm - handle symlinked extensionless entrypoints
Fixes {} parsing inside shell scripts
pack: Support
publishConfig.typeparsers: Correctly indent keys longer than 1024 chars
Resolves tags before storing them in the manifest
Normalizes dependencies
Implements
--check-resolutionsImplements
--refresh-lockfileImplements enableHardenedMode
pnp: Hoist data string
libzip: Add function types
essentials: Correct typo in prompt
pack: Handle excluding from included parent directory
sdks: Update for VSCode 1.66
Reduce bundle size
Repairs
yarn set version from sourcesfrom 3 to 4Fixes
yarn version applyessentials: Add
preferReusesettingpnp: Suppress experimental ESM loader warning
compat: Update patch for
typescript@4.7.0-betaplugin-nm: Handle
supportedArchitecturescore: Skip unnecessary
accesscall infetchPackageFromCacheYarn npm audit json exitcode
Updates benchmark dependencies
essentials: Support forwarding
--requireinyarn runcompat: Update
vue-loaderentrygit: Respect
GIT_SSH_COMMANDandGIT_SSHFixes the "yarn up" command when the dependency doesnt need upgrades
dlx: Preserve tags
compat:
react-scriptsessentials: Different error when importing built-in plugins
core: Skip cache cleanup when enableGlobalCache is true
fslib: Fix return shape of promisified
fs.writeUse cygpath for MINGW (Git Bash)
core: Ensure proper install for git dependency using Yarn classic and npm
Move compat database to separate package
cli: Correct the cli's dev version to match semver spec
extensions: Allow
consolidate@<0.16.0to usemustache@^3.0.0fslib: Add
ftruncatesupportAdd
yarn-plugin-version-toolsto Contrib pluginsplugin-npm-cli: Add ability to exclude packages, or ignore specific advisories in
yarn npm auditcore: Prevent hangs due to degenerate lockfile diff
- Breaking
core: Rename caFilePath to httpsCaFilePath
- Breaking
Move getCustomDataKey to Linker
- Breaking
Set default
nmModetohardlinks-local plugin-constraints: Use proportional prolog limit
sdks: Update for VSCode 1.68
plugin-patch: Avoid creating rename diffs
compat: Update patch for
typescript@4.8.0-betaplugin-essentials: Support specifying multiple paths in
yarn linkesbuild-plugin-pnp: Respect resolveDir
fslib: Make recursive mkdir return the first created directory
fslib: Add
fchmodsupportcli: Fix dev version
- Breaking
libui: Require
renderFormstreams to be specified core: Don't normalize package extension peer dependency ranges
Adds tests accidentally removed
- Breaking
foreach: Automatically enable
--verbosein tty environments esbuild-plugin-pnp: Return
resolveDirfromonLoaddlx: Don't report
UNUSED_PACKAGE_EXTENSIONwarningsfslib: Add
throwIfNoEntrysupportcore: Set
npm_package_jsonenvironment variable when running scriptsbig-endian support
pnp: Return
shortCircuitfrom the ESM loader hooksdlx: Handle scoped
createcommandspnp: Automatically unplug
openandopnpnp: Resolve virtual paths in
process.dlopenImplements content addressing inside copyPromise
fix(plugin-pnpm) Pnpm linker avoids symlink loops on the file system
- Breaking
audit: Remove fallback to publish registries
- Breaking
Remove deprecated versionUtils
- Breaking
manifest: Remove deprecated compatibility check methods
- Breaking
core: Remove
MapConfigurationValue - Breaking
init: Remove
--assume-fresh-project - Breaking
Remove FetchOptions.skipIntegrityCheck
fslib: Correct the
FileHandleimplementationshell: Wait for stdio streams of process to close
- Breaking
sdks: Drop fallback on createRequireFromPath
- Deprecated
Deprecate old
INCOMPATIBLE_*message names core: Support migrating resolutions from JFrog Artifactory registries regardless of the domain
core: Use the current CLI to prepare external Yarn classic projects
Writes a PnP spec
formatUtils: Apply colors to
Type.NUMBERFixes errors in the PnP spec
- Deprecated
Deprecate
FormatType Faster copy through index
fs: Fixes the Zip magic fd bits
pnp: Esm - correct named commonjs imports regression
Use
MessageName.NETWORK_DISABLEDingitUtilstoopnpm-linker: Warn only once about virtuals
- Breaking
Stop removing old
.pnp.jsfiles when migrating Remove unplugged folder when switching to a different linker
core: Remove dead code in
setupWorkspacescompat: Update patch for
typescript@4.8.1-rc- Breaking
Remove pnpDataPath
Adds a note about workspaces in the
enableScriptsdocumentationpnp: Esm - support unflagged JSON modules
pnp: Enable strict mode in
.pnp.cjsessentials: Yarn add
--peerand--devdo not work when used togetherNodeModulesLinker: Remove
extractHintfrom custom data- Breaking
init: Disable zero-installs by default
fslib: Add
fchownsupportMoves the bulk of ZipOpenFS into a new MountFS
Always set INIT_CWD to the actual CLI cwd
Fixes MountFS export
Fixes the version used for set version classic
essentials: Add
--no-privateflag to list commandAdd
exportfields to manifests to prevent deep imports- Deprecated
MessageName: Deprecate
CROSS_DRIVE_VIRTUAL_LOCAL - Breaking
plugin-link: Rename resolvers and fetchers
shell: Support whitespace-only commands
- Breaking
Move
ZipFSandZipOpenFSinto@yarnpkg/libzip Removes dependency cycle
Update pnp file to fix chore testing error
- Breaking
Cleanup lutimes
compat: Update patch for
typescript@4.8.4andtypescript@4.9.1-betapnp: Handle private import mappings
pnp: Report loaded modules in watch mode
Update some dependency to reduce peer dependency warning
essentials: Set
yarnPathin project.yarnrc.ymlregardless if it's set in a parent directoryAvoid unnecessary
structUtils.convertToIdentfslib: Support utf8 buffers
suggestUtils: Use
workspace.anchoredLocator- Breaking
core: Replace
workspace.dependencieswithworskpace.anchoredPackage Handle unintentional floating promises
nm: Export the hoist function
nm: Declare
@yarnpkg/pnpas a dependencyshell: Fix alternative value not working as expected
When initializing the
Configuration, auto fetch the missing pluginsplugin-nm: Avoid duplicate copies inside aliased dependencies.
nm: Speedup
hardlinks-globallink step by 1.5-1.7xplugin-nm: Support configuring link mode
core: Implement
checksumBehavior: resetpatch: Compute hash from the effects of the patch
pack: Remove duplicated assignment of
browserinpublishConfigSupport configuring link mode across plugins
core: Add
WarpTerminalandvscodeto list of terminals that support emojiAdds a docusaurus workspace
Adds notice support to the login command
compat: Update patch for
typescript@4.9.2-rcImplements JavaScript constraints
Adds support for Windows when opening urls
plugin-nm: Fixes binaries finding when the same version is duplicated in a root and non-root workspace
Fixes
resolutionsw/ reference- Breaking
exec: Adds support for enableInlineBuilds to the exec: fetcher
Fixes Corepack incorrectly calling v1 when preparing a git repo without lockfile
Reimplements the Git merge conflict resolution
- Breaking
Make all settings mergeable
Improves init
libzip: Enable more compiler optimizations
core: Fixed
SettingsType.ANYfield not parsing correctlyMakes
parseIdentless tolerantFixes rebase and cherry-pick conflict resolution
git: Normalize repo url without legacy
url.parseplugin-nm: Changes the default nmMode back to classic
Upgrades pem to solve openssl 3 errors
compat: Update patch for
typescript@4.9.4fslib: Add
FileHandle.readLinespnp: Report missing files in watch mode
workspace-tools: Remove message prefix from
workspaces foreachbuilder: Restore resolution of
.mjsfilescore: Wait for package dependencies to build
ZipFS: Support empty archives resulting from an unlink after write in
getBufferAndClosepnp: Watch mode on Node.js v18.13.0
Remove obsolete forced unplug entries
Implements automated constraints checks
Detects when file:./foo.tgz files have changed
core: Don't mark package as built if any of its scripts fails
- Breaking
zip: Don't access the filesystem from wasm
core: Handle self-referencing build dependencies
Docs (migration):
yarn list-->yarn info --recursiveplugin-init: Generate .gitattributes file
Fixes importing the PnP API from ES modules
sdks: Add
@astrojs/language-serverto vscode sdkscompat: Update patch for
typescript@5.0.0-betapnp: Support the
--conditionsflagTolerate string literals w/
ppath.join/ppath.resolveKeep docs up-to-date with changes around
plugin-compatpack: Adds support for "imports" in publishConfig
Update pnp docs for webstorm
Exposes the error function through the workspace
compat: Update patch for
typescript@5.0.1-rcnpm-cli: Count all instances of ignored advisories
core: Ignore YARN_REGISTRY when resolving configuration
Fixes grammatical errors in version.ts
Improves JS constraints
pnp: Use exports implementation from Node.js
workspace-tools: Add path support to --include, --exclude, and --from flags in foreach
Makes the workspace: protocol tolerate aliasing workspaces
Fixes
@yarnpkg/typescompat: Typescript - improve PnP support
core: Setup workspaces in parallel
pnp: Disable patching
binding.fstatwhen possibletypes: Avoid using
import type * ascompat: Update patch for
typescript@5.1.0-betafslib: Export
CustomDircore: Use a reverse lookup in
forgetTransientResolutionscore: Persist workspaces in parallel
pnp: Esm - use correct error code when module not found
Prints the constraints errors on CI
Re-reports errors after the current group ends
Autocorrects git:// into https:// for GitHub
Update plugins.md with yarn-plugin-env-vars
builder: Streamline generated template
plugin-interactive-tools: don’t list folder aliases as outdated dependencies
Add --always-auth flag to npm login
plugin-essentials: Upgrade all packages with wildcard
Add readme to publishBody
Update plugins.md - add yarn-plugin-fetch
core: Correct
.yarnrc.ymlvalidation errorFixes typecheck
pnp: Esm - handle
parentURLwithout afile:protocolcompat: Update patch for
typescript@5.1.1-rcAdds legacy plugin removal behavior
Release workflow for stable releases
Followups on the release branch workflow
Updates the audit implementation to the bulk endpoint
sdks: Add
relay-compilerto vscode sdkspnp: Use default
Module._loadFixes merge conflict resolution always querying the network
Adds support for running native binaries without JS intermediaries
libzip: Update to
zlib-ng@2.1.2Modernizes installs' output
Use
buffer.isUtf8inNodePathFSImplements the readdir recursive flag
Bumps Node requirements from 14 to 18
core: Optimize changed package detection
Cache npm metadata
sdks: Support Prettier v3
Sets the default compression to 0
Implements .env file support
Implements MOTD mechanism
Fixes registry used to check for deprecation settings
Implements a benchmarking script
Fixes readdir w/ recursive: true
Fixes settings interpolation with dotenv variables
compat: Update patch for
typescript@5.2.0-betaTweaks the .env implementation
Migrates the constraints on the Yarn repository from Prolog to JS
Implements aggregate peer deps
Fixes hardcoded Yarn version
Exposes packages to constraints
- Breaking
Update ECMAScript version target
Use
httpUtils.getinstead offetchCache tolerance for old archives
plugin-npm: Normalize registry
- Breaking
libzip: Remove unused code
Pass mode to
yarn up --recursiveFix npm tag resolver when dedupe
Refactors the CLI spawn
- Breaking
Remove
ignoreCwd builder: Make bundle executable
Use
fast-globinstead ofglobbyplugin-pnp: Remove redundant node check
- Breaking
pnp: Remove unnecessary node bug workaround
Improves string escaping during serialization
Extracts the repository plugin hooks into their own file
Refactors context passing
- Breaking
Remove
lockfileFilename Moves back the changelog to the root
- Breaking
core: Remove
workspace.locator plugin-pnp: Unset
NODE_OPTIONSwhen preparing the environment after switching linkersRemove unnecessary
realpathon--cwdcli: Avoid resolving
ppath.cwd()Refactors
yarn workspaces foreachSupport fragment in tar regex
Improvements on the Docusaurus website
Fixes the sponsor link on the new website
Adds a warning on the website about the document being intended for Yarn 4
Social preview on the website
compat: Update patch for
typescript@5.2.1-rcWebsite fixes
pnp: Fix infinite recursion when .pnp.cjs is a symlink and pnp inlining is disabled
cli: Propagate proper exit status code when running yarnPath binary
pnp: Esm - return undefined source for commonjs
simplifyRanges now handles wildcards
Couple of website improvements
Small fixes for the website
pnpapi: Dedupe pnpapi instances where .pnp.cjs is a symlink
Improves the website
Fixes custom errors in constraints
Fixes a bug in
yarn unplug --allImproves the message when a package isn't found due to an incomplete
supportedArchitecturessetting"Yarn may [+not] solve all your problems" and "will always be to[+at]"
Renames yarn.config.js -> yarn.config.cjs
Fixes types for @types/node 18.17
Fixes couple of release blockers
Implements enableOfflineMode
Fixes global cache
Perf work
- Breaking
Simplify
Configuration.findProjectCwd core: Ignore empty bin value in Manifest#load
Removes Gatsby from the repository
Add arm64 to example supported cpu values
Improves the output of "yarn config"
Disables emoji in our Windows tests until Node is fixed
Reworks the worker pool to be more configurable
compat: Update patch for
typescript@5.3.0-betaUpdate alpine version for sherlock workflow
Fixes the iarna test
Documentation fixes
Fix sherlock workflow again
Infer which files should SDKs include using manifest data
core: Remove type dependency on lodash
- Breaking
Lazy load
packageExtensions
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.