All Versions
22
Latest Version
Avg Release Cycle
-
Latest Release
-

Changelog History
Page 2

  • v3.0.0-rc.2 Changes

    yarn set version 3.0.0-rc.2
    

    Few functional changes; mostly intended to fix distribution issues.

    • ๐Ÿ”Œ yarn plugin import can now install specific versions of the official plugins.
    • 0๏ธโƒฃ yarn plugin import will now download plugins compatible with the current CLI by default.
    • ๐Ÿ›  Fixed a bug in yarn version check when used with the --prerelease flag.
  • v3.0.0-rc.1 Changes

    yarn set version 3.0.0-rc.1
    

    ๐Ÿ’ฅ Breaking Changes

    • ๐Ÿ‘ Node 10 isn't supported anymore.
    • ๐Ÿ”Œ Plugins can't access yup anymore (we migrated to Typanion as part of Clipanion v3).
      • To upgrade workspace-tools, remove it from your .yarnrc.yml, upgrade, then import it back.
    • ๐Ÿ‘ท The enableImmutableInstalls will now default to true on CI (we still recommend to explicitly use --immutable on the CLI).
      • You can re-allow mutations by adding YARN_ENABLE_IMMUTABLE_INSTALLS=false in your environment variables.
    • ๐Ÿ”ง The initVersion and initLicense configuration options have been removed. initFields should be used instead.
    • Yarn will now generate .pnp.cjs files (instead of .pnp.js) when using PnP, regardless of what the type field inside the manifest is set to.
    • The virtual folder (used to disambiguate peer dependencies) got renamed from $$virtual into __virtual__.
    • ๐Ÿšš The -a alias flag of yarn workspaces foreach got removed; use -A,--all instead, which is strictly the same.
    • The old PnPify SDK folder (.vscode/pnpify) won't be cleaned up anymore.
    • ๐Ÿ— The bstatePath configuration option has been removed. The build state (.yarn/build-state.yml) has been moved into the install state (.yarn/install-state.gz)
    • The cache files need to be regenerated. We had to change their timestamps in order to account for a flaw in the zip spec that was causing problems with some third-party tools.

    API

    • ๐Ÿšš structUtils.requirableIdent got removed; use structUtils.stringifyIdent instead, which is strictly the same.
    • ๐Ÿ”ง configuration.format got removed; use formatUtils.pretty instead, which is strictly the same, but type-safe.
    • ๐Ÿšš httpUtils.Options['json'] got removed; use httpUtils.Options['jsonResponse'] instead, which is strictly the same.
    • ๐Ÿ“ฆ PackageExtension['description] got removed, use formatUtils.json(packageExtension, formatUtils.Type.PACKAGE_EXTENSION) instead, which is strictly the same.
    • ๐Ÿ— Project.generateBuildStateFile has been removed, the build state is now in Project.storedBuildState.
    • Project.tryWorkspaceByDescriptor and Project.getWorkspaceByDescriptor now match on virtual descriptors.

    Installs

    • ๐Ÿ‘ The node-modules linker now does its best to support the portal: protocol. This support comes with two important limitations:

      • Projects that make use of such dependencies will have to be run with the --preserve-symlinks Node option if they wish to access their dependencies.
      • Because Yarn installs will never modify files outside of the project due to security reasons, sub-dependencies of packages with portal: must be hoisted outside of the portal. Failing that (for example if the portal package depends on something incompatible with the version hoisted via another package), the linker will produce an error and abandon the install.
    • The node-modules linker can now utilize hardlinks. The new setting nmMode: classic | hardlinks-local | hardlinks-global specifies which node_modules strategy should be used:

      • classic - standard node_modules layout, without hardlinks
      • hardlinks-local - standard node_modules layout with hardlinks inside the project only
      • hardlinks-global - standard node_modules layout with hardlinks pointing to global content storage across all the projects using this option

    ๐Ÿ›  Bugfixes

    • Yarn now has a proper governance model.
    • The node-modules linker will now ensure that the generated install layouts are terminal, by doing several rounds when needed.
    • โš  The node-modules linker will no longer print warnings about postinstall scripts when a workspace depends on another workspace listing install scripts.
    • Peer dependencies depending on their own parent are now properly hoisted by the node-modules linker.
    • ๐Ÿ”ง Boolean values will be properly interpreted when specified inside the configuration file via the ${ENV_VAR} syntax.
    • Should any of preinstall, install, postinstall fail, the remaining scripts will be skipped.
    • 0๏ธโƒฃ The git: protocol will now default to fetching HEAD (rather than the hardcoded master).
    • ๐Ÿšฆ The SIGTERM signal will now be propagated to child processes.
    • ๐Ÿ›  And a bunch of smaller fixes.

    Settings

    • ๐Ÿ›  Various initFields edge cases have been fixed.
    • The preferAggregateCacheInfo flag will now also aggregate cleanup reports.
    • A new enableMessageNames flag can be set to false to exclude the YNxxxx from the output.

    Commands

    • โฌ†๏ธ yarn set version from sources will now upgrade the builtin plugins as well unless --skip-plugins is set.
    • ๐Ÿš€ yarn version apply now support a new --prerelease flag which replaces how prerelease were previously handled.
    • yarn run should be significantly faster to boot on large projects.
    • ๐Ÿ–จ yarn workspaces foreach --verbose will now print when processes start and end, even if they don't have an output.
    • yarn patch-commit can now be used as many times as you want on the same patch folder.
    • ๐Ÿ–จ yarn patch-commit now support a new -s,--save flag which will save the patch instead of just printing it.
    • โฌ†๏ธ yarn up now support a new -R,--recursive flag which will upgrade the specified package, regardless where it is.
    • ๐Ÿ”ง yarn config unset is a new command that will remove a setting from the local configuration (or home if -H is set).

    Compatibility

    • 0๏ธโƒฃ Running yarn install inside a Yarn v1 project will now automatically enable the node-modules linker. This should solve most of the problems people have had in their migrations. We still recommend to keep the default PnP for new projects, but the choice is yours.
    • ๐Ÿ‘ The patched filesystem now supports file URLs, bigint, and fstat.
    • ๐Ÿ”Œ An official ESBuild resolver is now provided under the name @yarnpkg/esbuild-plugin-pnp. We use it to bundle Yarn itself!
    • ๐Ÿ“ฆ PnP projects can now use the Node exports field - regardless of the Node version.
    • ๐Ÿ”ง The Prettier SDK does not use PnPify anymore since it was its only remaining use, and was fairly invasive; as a result, the Prettier plugins must be specified in Prettier's plugins configuration property.
    • โš  Builtin patches that fail to apply will no longer cause an error (they'll emit a warning and the original sources will be used instead).
      • Remember that patches are a problem for our team too, and that we only do this because we don't have any other option available to us right now - if you wish to help, consider upvoting the relevant pull request in the TypeScript repository or, if you work at Microsoft, perhaps mention to your TypeScript team next door that fixing this would benefit you.

    Miscellaneous

    • Reporting for HTTP errors has been improved, which should help you investigate registry issues.
  • v2.4.3 Changes

    yarn set version 2.4.3
    
    • โšก๏ธ Updated TypeScript patch to cover TypeScript 4.4.
  • v2.4.2 Changes

    yarn set version 2.4.2
    
    • โšก๏ธ Updated TypeScript patch to cover TypeScript 4.3.
  • v2.4.1 Changes

    yarn set version 2.4.1
    

    Compatibility

    • ๐Ÿš€ The release of TypeScript 4.2 couldn't be installed due to patch conflicts. This is now fixed. This version only includes a fix specific to 4.2, but future Yarn releases starting from 3.0 will be more tolerant of this kind of situation and won't cause such errors.
  • v2.4.0 Changes

    yarn set version 2.4.0
    

    Installs

    • ๐ŸŽ The resolution pipeline got reimplemented. We previously used a multi-pass approach where we performed SAT optimization between each pass, but after investigating it turned out the SAT optims had little impact and added performance bottlenecks. We now run the resolution using a much simpler and more efficient algorithm.

    • ๐Ÿ”— Linkers can now define custom data to cache between Yarn invocations. The builtin linkers new use those new capabilities to cache package information that can't change between runs. In practice, this translates into much faster recurrent installs (when running an install that adds few new packages, if any).

    • ๐Ÿ“ฆ Warnings are now reported when packageExtensions rules are either unused or redundant with the original package definition.

    • Potentially breaking, but it was intended this way from the start: the packageExtensions field cannot be used to replace dependencies anymore (only to add missing ones). Prefer using the resolutions field to replace existing ones.

    • ๐ŸŽ Progress bars are rendered less often, which should help performances on some terminals.

    • ๐Ÿ“ฆ Aliased packages no longer include themselves in node_modules installs

    CLI

    • โฌ†๏ธ The upgrade-interactive command will now only show upgrade suggestions for packages that have available upgrades (rather than all of them).

    • โฌ†๏ธ The upgrade-interactive command has received UI improvements that should make it easier to look at.

    • The yarn workspaces focus command will now only run the postinstall scripts for the focused workspaces.

    • A new yarn npm audit command lets you query audit information from the npm registry.

    • The yarn workspaces foreach command has a new flag, -R,--recursive, which will run a command on the current workspace and all others it depends on.

    • ๐Ÿ— A new --skip-builds option on yarn install will let you skip the build scripts without impacting the generated Yarn artifacts (contrary to enableScripts, which would also stop unplugging the packages that would otherwise be unplugged due to containing build scripts).

    Binaries

    • It's now possible to run dependency binaries when using the node-modules linker even if one of your other dependencies is reported as incompatible with your system.

    • โšก๏ธ By default Windows automatically requests for administrator rights before spawning any binary whose filename contains "install", "setup", "update", or "patch" (it thinks they are installers). We now explicitly opt-out of this behavior in the binary jumpers we use on Windows.

    • ๐Ÿ By default, arguments passed to MinGW-compiled programs are automatically expanded by a basic glob pattern engine. We now explicitly opt-out of this behavior in the binary jumpers we use on Windows.

    • ๐Ÿ The Windows binary jumpers will now report the right exit code.

    Settings

    • Using empty fallbacks in Yarnrc environment variables (${VAR:-}) will now work.

    • ๐Ÿš€ You can now use the new logFilters setting to turn warnings into either errors or info, or to hide them entirely. Note that we plan to significantly improve the peer dependency warnings in the next release, so perhaps don't silence them just now even if you have a bunch of them.

    Shell

    • ๐Ÿ›  Some shell errors (No matches found, Bad file descriptor, Unbound variable, Unbound argument) will now be recoverable errors that make the shell continue on to the next command in the chain instead of hard crashes. Fixes cases such as rm -rf ./inexistentFolder/* || true.

    VSCode ZipFS Extension

    • The extension will now activate even if the workspace doesn't contain zip files (usually because you excluded them).

    Compatibility

    • ๐Ÿ›  Some patches went missing for TypeScript <4. This is now fixed.

    • Calling fs.exists(undefined) won't crash anymore.

    • TypeScript import suggestions should now be correct even when the imported module is deep within a workspace.

    • TypeScript in watch mode (both using -w and within VSCode) will now detect new dependencies as you add them.

    • ๐Ÿ‘ Some particular multi-dependency-trees setups will be better supported on Plug'n'Play installs.

    • โšก๏ธ Using ctrl+click on imports in VSCode won't take you to virtual packages anymore (require an SDK update).

  • v2.3.1 Changes

    yarn set version 2.3.1
    

    CLI

    • 0๏ธโƒฃ Take into account peer dependency defaults when inheriting workspace peer dependencies in the node_modules linker
  • v2.3.0 Changes

    yarn set version 2.3.0
    

    CLI

    • The yarn tag set of commands has been ported over from Yarn Classic as yarn npm tag.
    • ๐Ÿ“ฆ Running 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.
    • ๐Ÿ‘€ Running yarn stage with the -r,--reset flag will now unstage all changes that seem related to Yarn.
    • ๐Ÿ‘€ All commands now document each of their options (run yarn add -h to see an example).
    • Publish registry errors will now be reported as is rather than being collapsed into a generic error message.
    • ๐Ÿ A native binary jumper will now be used on Windows to avoid the Terminate batch job (Y/N)? prompts when invoking dependency binaries.

    Installs

    PnP API

    0๏ธโƒฃ The following changes only apply to the pnp linker (which is the default install strategy):

    • The 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.
    • ๐Ÿ“ฆ When using a portal to a package that had peer dependencies, Yarn would loose the information required to resolve those peer dependencies. It will now properly resolve them the same way as all other packages in the dependency tree.

    The following changes only apply to the node-modules linker:

    • ๐Ÿšš The bin symlinks will now be properly removed from the node_modules/.bin folder as their corresponding dependencies are removed.
    • A new setting called nmHoistingLimits has appeared. It replaces what was previously known as nohoist in Yarn 1.
    • ๐Ÿ“ฆ We are now more forgiving for packages that make incorrect assumptions about the hoisting layout by first trying to maximize package exposure at the top-level. Only after the top-level has been populated will we deduplicate the remaining packages.
    • ๐Ÿ›  Fixed some pathological cases around peer dependencies. In particular, workspaces' peer dependencies will now be resolved against their closest workspace ancestor (according to the directory hierarchy) rather than be ignored. Note that peer dependencies are inherently problematic with workspaces when using the node-modules linker, and that the strictly correct behavior can only be obtained by using the default Plug'n'Play linker.
    • โš™ Running install after an interrupted install is supported now and will result in a consistent install state

    Shell

    • โž• Added support for $$ and $PPID
    • ๐Ÿ›  Fixes some pathological globbing problems.

    ๐Ÿ›  Bugfixes

    • The yarn constraints --fix command will now properly persist the changes on disk.
    • ๐Ÿ“ฆ The yarn unplug command will now work when used on packages with peer dependencies.
    • The yarn stage command will now allow to stage files when called without the -c,--commit flag.
    • ๐Ÿ›  Fixes a performance regression when using FSEvents.

    Miscellaneous

    • โœ‚ Removes extraneous subprocesses when using the yarnPath setting.

    Third-party integrations

    • โšก๏ธ Updated the VSCode SDK to take into account changes in the TypeScript server protocol.
    • โž• Added a few builtin extensions to improve compatibility with packages that weren't correctly listing their dependencies.
    • โšก๏ธ Updatedd the TypeScript patch to cover TypeScript 4.1.
  • v2.2.0 Changes

    yarn set version 2.2.0
    

    Ecosystem

    • ๐Ÿ Packages can now use the 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.

    ๐Ÿ›  Bugfixes

    • โฑ Requests won't timeout anymore as long as the server is still sending data.
    • yarn pack will properly include main/module/bin files, even when not explicitly referenced through the files field.
    • 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 workspace field 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 add and yarn up
    • ๐Ÿ‘ The portable shell will now support calling cd and exit without arguments
    • Yarn will now show the exit code when a lifecycle script fails
    • Yarn's portable shell will now also pipe the stderr when using the |& pipeline
    • Yarn'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 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.

    ๐Ÿ”ง 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 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.

    Miscellaneous

    • Scripts can now use the $RANDOM variable as well as simple calculations using +, -, *, / and () inside $(())
    • Scripts can now use grouping curly braces ({echo foo}) to execute a command in the context of the current shell (without creating a subshell like in the case of (echo foo)).
    • Scripts can now end with a semicolon.
    • ๐Ÿšš PnP linker will not remove lingering node_modules inside folders matching pnpIgnorePatterns

    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 fs module from within a Webpack browser bundle).
  • v2.1.1 Changes

    yarn set version 2.1.1
    
    • ๐Ÿ›  Fixed hyperlink rendering on iTerm