Packages

@yarnpkg/cli

4.18.1 · 24 Sep 2026BSD-2-Clause121.1k / weekRepositorynpmAtom feed

Your version

4.0.0

major22 Oct 2023Where it was published

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 nmMode to hardlinks-local

  • Breaking

    libui: Require renderForm streams to be specified

  • Breaking

    foreach: Automatically enable --verbose in 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.convertToZip

  • Add extension for '@cypress/snapshot' dependency on 'debug'

  • Don't run the tests anymore on Node 12

  • esbuild: Make foo/bar external if package foo is external

  • esbuild: 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.type

  • parsers: Correctly indent keys longer than 1024 chars

  • Resolves tags before storing them in the manifest

  • Normalizes dependencies

  • Implements --check-resolutions

  • Implements --refresh-lockfile

  • Implements 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 sources from 3 to 4

  • Fixes yarn version apply

  • essentials: Add preferReuse setting

  • pnp: Suppress experimental ESM loader warning

  • compat: Update patch for typescript@4.7.0-beta

  • plugin-nm: Handle supportedArchitectures

  • core: Skip unnecessary access call in fetchPackageFromCache

  • Yarn npm audit json exitcode

  • Updates benchmark dependencies

  • essentials: Support forwarding --require in yarn run

  • compat: Update vue-loader entry

  • git: Respect GIT_SSH_COMMAND and GIT_SSH

  • Fixes the "yarn up" command when the dependency doesnt need upgrades

  • dlx: Preserve tags

  • compat: react-scripts

  • essentials: Different error when importing built-in plugins

  • core: Skip cache cleanup when enableGlobalCache is true

  • fslib: Fix return shape of promisified fs.write

  • Use 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.0 to use mustache@^3.0.0

  • fslib: Add ftruncate support

  • Add yarn-plugin-version-tools to Contrib plugins

  • plugin-npm-cli: Add ability to exclude packages, or ignore specific advisories in yarn npm audit

  • core: Prevent hangs due to degenerate lockfile diff

  • Breaking

    core: Rename caFilePath to httpsCaFilePath

  • Breaking

    Move getCustomDataKey to Linker

  • Breaking

    Set default nmMode to hardlinks-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-beta

  • plugin-essentials: Support specifying multiple paths in yarn link

  • esbuild-plugin-pnp: Respect resolveDir

  • fslib: Make recursive mkdir return the first created directory

  • fslib: Add fchmod support

  • cli: Fix dev version

  • Breaking

    libui: Require renderForm streams to be specified

  • core: Don't normalize package extension peer dependency ranges

  • Adds tests accidentally removed

  • Breaking

    foreach: Automatically enable --verbose in tty environments

  • esbuild-plugin-pnp: Return resolveDir from onLoad

  • dlx: Don't report UNUSED_PACKAGE_EXTENSION warnings

  • fslib: Add throwIfNoEntry support

  • core: Set npm_package_json environment variable when running scripts

  • big-endian support

  • pnp: Return shortCircuit from the ESM loader hooks

  • dlx: Handle scoped create commands

  • pnp: Automatically unplug open and opn

  • pnp: Resolve virtual paths in process.dlopen

  • Implements 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 FileHandle implementation

  • shell: 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.NUMBER

  • Fixes 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_DISABLED in gitUtils too

  • pnpm-linker: Warn only once about virtuals

  • Breaking

    Stop removing old .pnp.js files when migrating

  • Remove unplugged folder when switching to a different linker

  • core: Remove dead code in setupWorkspaces

  • compat: Update patch for typescript@4.8.1-rc

  • Breaking

    Remove pnpDataPath

  • Adds a note about workspaces in the enableScripts documentation

  • pnp: Esm - support unflagged JSON modules

  • pnp: Enable strict mode in .pnp.cjs

  • essentials: Yarn add --peer and --dev do not work when used together

  • NodeModulesLinker: Remove extractHint from custom data

  • Breaking

    init: Disable zero-installs by default

  • fslib: Add fchown support

  • Moves 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-private flag to list command

  • Add export fields 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 ZipFS and ZipOpenFS into @yarnpkg/libzip

  • Removes dependency cycle

  • Update pnp file to fix chore testing error

  • Breaking

    Cleanup lutimes

  • compat: Update patch for typescript@4.8.4 and typescript@4.9.1-beta

  • pnp: Handle private import mappings

  • pnp: Report loaded modules in watch mode

  • Update some dependency to reduce peer dependency warning

  • essentials: Set yarnPath in project .yarnrc.yml regardless if it's set in a parent directory

  • Avoid unnecessary structUtils.convertToIdent

  • fslib: Support utf8 buffers

  • suggestUtils: Use workspace.anchoredLocator

  • Breaking

    core: Replace workspace.dependencies with worskpace.anchoredPackage

  • Handle unintentional floating promises

  • nm: Export the hoist function

  • nm: Declare @yarnpkg/pnp as a dependency

  • shell: Fix alternative value not working as expected

  • When initializing the Configuration, auto fetch the missing plugins

  • plugin-nm: Avoid duplicate copies inside aliased dependencies.

  • nm: Speedup hardlinks-global link step by 1.5-1.7x

  • plugin-nm: Support configuring link mode

  • core: Implement checksumBehavior: reset

  • patch: Compute hash from the effects of the patch

  • pack: Remove duplicated assignment of browser in publishConfig

  • Support configuring link mode across plugins

  • core: Add WarpTerminal and vscode to list of terminals that support emoji

  • Adds a docusaurus workspace

  • Adds notice support to the login command

  • compat: Update patch for typescript@4.9.2-rc

  • Implements 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 resolutions w/ 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.ANY field not parsing correctly

  • Makes parseIdent less tolerant

  • Fixes rebase and cherry-pick conflict resolution

  • git: Normalize repo url without legacy url.parse

  • plugin-nm: Changes the default nmMode back to classic

  • Upgrades pem to solve openssl 3 errors

  • compat: Update patch for typescript@4.9.4

  • fslib: Add FileHandle.readLines

  • pnp: Report missing files in watch mode

  • workspace-tools: Remove message prefix from workspaces foreach

  • builder: Restore resolution of .mjs files

  • core: Wait for package dependencies to build

  • ZipFS: Support empty archives resulting from an unlink after write in getBufferAndClose

  • pnp: 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 --recursive

  • plugin-init: Generate .gitattributes file

  • Fixes importing the PnP API from ES modules

  • sdks: Add @astrojs/language-server to vscode sdks

  • compat: Update patch for typescript@5.0.0-beta

  • pnp: Support the --conditions flag

  • Tolerate string literals w/ ppath.join / ppath.resolve

  • Keep docs up-to-date with changes around plugin-compat

  • pack: 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-rc

  • npm-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/types

  • compat: Typescript - improve PnP support

  • core: Setup workspaces in parallel

  • pnp: Disable patching binding.fstat when possible

  • types: Avoid using import type * as

  • compat: Update patch for typescript@5.1.0-beta

  • fslib: Export CustomDir

  • core: Use a reverse lookup in forgetTransientResolutions

  • core: 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.yml validation error

  • Fixes typecheck

  • pnp: Esm - handle parentURL without a file: protocol

  • compat: Update patch for typescript@5.1.1-rc

  • Adds 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-compiler to vscode sdks

  • pnp: Use default Module._load

  • Fixes merge conflict resolution always querying the network

  • Adds support for running native binaries without JS intermediaries

  • libzip: Update to zlib-ng@2.1.2

  • Modernizes installs' output

  • Use buffer.isUtf8 in NodePathFS

  • Implements 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-beta

  • Tweaks 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.get instead of fetch

  • Cache tolerance for old archives

  • plugin-npm: Normalize registry

  • Breaking

    libzip: Remove unused code

  • Pass mode to yarn up --recursive

  • Fix npm tag resolver when dedupe

  • Refactors the CLI spawn

  • Breaking

    Remove ignoreCwd

  • builder: Make bundle executable

  • Use fast-glob instead of globby

  • plugin-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_OPTIONS when preparing the environment after switching linkers

  • Remove unnecessary realpath on --cwd

  • cli: Avoid resolving ppath.cwd()

  • Refactors yarn workspaces foreach

  • Support 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-rc

  • Website 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 --all

  • Improves the message when a package isn't found due to an incomplete supportedArchitectures setting

  • "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-beta

  • Update 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.