Active development trunk for Yarn ⚒
Fast, reliable, and secure dependency management.
Yarn is a modern package manager split into various packages. Its novel architecture allows to do things currently impossible with existing solutions:
Consult the Installation Guide.
Consult the Migration Guide.
The documentation can be found at yarnpkg.com.
The API documentation can be found at yarnpkg.com/api.
On top of our classic integration tests, we also run Yarn every day against the latest versions of the toolchains used by our community - just in case. Everything should be green!
Consult the Contributing Guide.
Clone this repository, then run the following commands:
yarn build:cliHow it works
After building the CLI your global yarn will immediately start to reflect your local changes. This is because Yarn will pick up the yarnPath settings in this repository's .yarnrc.yml, which is configured to use the newly built CLI if available.
Works out of the box!
Note that no other command is needed! Given that our dependencies are checked-in within the repository (within the .yarn/cache directory), you don't even need to run yarn install. Everything just works right after cloning the project and is guaranteed to continue to work ten years from now
Those plugins typically come bundled with Yarn. You don't need to do anything special to use them.
yarn dlx command.exec: protocol within your dependencies.file: protocol within your dependencies.yarn init command.yarn upgrade-interactive).link: and portal: references as dependencies.node_modules folder.yarn npm login, yarn npm publish, ...).yarn pack command.patch: protocol.yarn stage command.yarn workspaces foreach command.Plugins can be developed by third-party entities. To use them within your applications, just specify the full plugin URL when calling yarn plugin import. Note that plugins aren't fetched from the npm registry at this time - they must be distributed as a single JavaScript file.
To create your own plugin, please refer to the documentation.
The following packages are generic and can be used for a variety of purposes (including to implement other package managers, but not only):
[Feature] Support trustPolicy to reject packages with provenance downgrade at install time
[Bug?]: installs fail on latest version due to relative path in `got` dependency
[Bug]: Windows - missing files at install on large packages
[Bug?]: `yarn upgrade-interactive` silently ignores errors when checking package versions
[Bug?]: Duplicate sidebar link for the yarn init command
[Feature] Allow opt-in`yarn workspaces focus` without pruning unneeded dependencies
# [Bug?]: `yarn version apply --prerelease=<id>` drops the prerelease identifier in 4.18.0
[Bug?]: Example to set a complex config does not work on Windows (Powershell / cmd)
[Bug?]: Disabling global `npmMinimalAgeGate` does not disable scoped `npmMinimalAgeGate`
[Bug?]: Changes to files with special characters in the name cause false positives in `yarn workspaces list --since`