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?Да — это JavaScript-инструмент, построенный на Node.js; исходный код рассчитан на Node 4.0.0 и выше.
Эта версия ещё поддерживается?Нет — ветка 1.x заморожена: в этот репозиторий попадают только отдельные хотфиксы и исправления уязвимостей, а все новые возможности и исправления ошибок делаются в репозитории yarnpkg/berry.
Могу ли я установить зависимости без интернета?Да — офлайн-режим позволяет повторно установить любой пакет, который вы уже устанавливали раньше, без подключения к интернету.
Зачем команда делала Yarn, если npm уже существовал?Yarn позаимствовал идеи у npm, Bundler и Cargo и сделал упор на скорость (кэширование каждого скачанного пакета, параллельная установка), устойчивость к проблемам сети (автоматические повторы) и деревья зависимостей без дубликатов благодаря Flat Mode.
Что такое Flat Mode?Он сводит несовпадающие версии одной зависимости к единственной версии, чтобы дубликаты одного и того же пакета не скапливались в вашем проекте.
Как выглядит современный Yarn, раз ветка 1.x заморожена?Новые релизы (3.x на момент чтения README) живут в репозитории yarnpkg/berry, а настройка nodeLinker позволяет выбрать способ установки пакетов: node_modules как в npm, симлинки как в 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