yarn README

The project's README from github.com/yarnpkg/yarn. As one markdown file: README.md.

ℹ️ Important note

This repository holds the sources for Yarn 1.x (latest version at the time of this writing being 1.22). New releases (at this time the 3.2.3, although we're currently working on our next major) are tracked on the yarnpkg/berry repository, this one here being mostly kept for historical purposes and the occasional hotfix we publish to make the migration from 1.x to later releases easier.

If you hit bugs or issues with Yarn 1.x, we strongly suggest you migrate to the latest release - at this point they have been maintained longer than 1.x, and many classes of problems have already been addressed there. By using the nodeLinker setting you'll also have the choice of how you want to install your packages: node_modules like npm, symlinks like pnpm, or manifest files via Yarn PnP.


Fast, reliable, and secure dependency management.

Circle Status Appveyor Status Azure Pipelines status Discord Chat Commitizen friendly


Fast: Yarn caches every package it has downloaded, so it never needs to download the same package again. It also does almost everything concurrently to maximize resource utilization. This means even faster installs.

Reliable: Using a detailed but concise lockfile format and a deterministic algorithm for install operations, Yarn is able to guarantee that any installation that works on one system will work exactly the same on another system.

Secure: Yarn uses checksums to verify the integrity of every installed package before its code is executed.

Features

Our supports

Gold sponsors

All your environment variables, in one place. Stop struggling with scattered API keys, hacking together home-brewed tools, and avoiding access controls. Keep your team and servers in sync with Doppler.
Your app, enterprise-ready. Start selling to enterprise customers with just a few lines of code. Add Single Sign-On (and more) in minutes instead of months with WorkOS.

Installing Yarn

Read the Installation Guide on our website for detailed instructions on how to install Yarn.

Using Yarn

Read the Usage Guide on our website for detailed instructions on how to use Yarn.

Contributing to Yarn

The 1.x codebase is fairly old and will only accept security fixes. For new features or bugfixes, please see our new repository and its contribution guide.

Prior art

Yarn wouldn't exist if it wasn't for excellent prior art. Yarn has been inspired by the following projects:

Credits

Thanks to Sam Holmes for donating the npm package name!

yarn (yarnpkg/yarn)

Searching Database…

41.5K ·GitHub
这是什么?Yarn 1.x 是一个快速、可靠且安全的 JavaScript 项目依赖管理工具——一个命令行工具,用来安装项目所需的包,可以作为 npm 的替代品。
这是我要安装到自己电脑上的工具,还是我的代码要导入的库?它是安装在你电脑上的工具,需要在终端里、于项目目录下运行;你的代码不会导入它。
运行它需要 Node.js 吗?需要——它是基于 Node.js 构建的 JavaScript 工具;源码面向 Node 4.0.0 及以上版本。
这个版本还在维护吗?不——1.x 这条线已经冻结:这个仓库只偶尔接收紧急修复和安全修复,所有新功能和 bug 修复都在 yarnpkg/berry 仓库进行。
没有网络连接也能安装依赖吗?可以——离线模式让你在断网的情况下重新安装以前装过的任何包。
npm 已经存在了,这个团队为什么还要做 Yarn?Yarn 借鉴了 npm、Bundler 和 Cargo,专注于速度(缓存每个下载过的包、并行执行安装)、网络容错性(自动重试),以及通过 Flat Mode 生成没有重复包的依赖树。
什么是 Flat Mode?它会把同一个依赖不匹配的多个版本解析成单一版本,这样同一个包的重复副本就不会在项目里越积越多。
既然 1.x 已经冻结,现在的 Yarn 是什么样?新的版本(撰写 README 时是 3.x)位于 yarnpkg/berry 仓库,通过 nodeLinker 设置可以选择包的安装方式:像 npm 那样用 node_modules,像 pnpm 那样用符号链接,或者通过 Yarn PnP 使用清单文件。
What are similar projects?cli, liteparse, upm, bashka, npm, pip, nub, verdaccio
Creator
yarnpkg
Size
117 MB
Stars
41.5K
Age
10y
Commits · 90 Days