talira

Safe, stable, reproducible projects

open sourceBSD-2-Clauseself-hostablefree

Yarn is a JavaScript package manager that doubles as a project manager, built around workspaces for monorepos and guaranteeing that installs that work today keep working the same way. Its default Plug'n'Play install writes a single loader file instead of a node_modules folder, shares packages from one cache across projects and refuses imports of undeclared dependencies; node_modules and pnpm-style linkers are available too. Constraints, catalogs, patching and plugins come built in. Yarn is a fully independent open source project tied to no company; Yarn 1.x (Classic) is frozen and development happens in Yarn 4.

Ways to install

Problems it solves

  • manage a JavaScript monorepo with many packages that depend on each other
  • installs that worked last month break today because a JavaScript dependency changed underneath me
  • my node_modules folder is huge and every npm install spends ages copying files
  • catch JavaScript code that imports a package it never declared as a dependency
  • patch a bug in an npm dependency without forking it while I wait for the upstream fix
  • keep dependency versions and package.json rules consistent across every package in my monorepo
  • pin each JavaScript project to its own package manager version so the whole team uses the same one
  • work out which packages in my monorepo need a version bump for the next release
  • extend my JavaScript package manager with plugins for workflows it doesn't support

Features

  • workspaces
  • Plug'n'Play installs with a single .pnp.cjs loader
  • node_modules and pnpm-style symlink linkers
  • one cache shared by all projects on the machine
  • ghost dependency protection with explanatory errors
  • JavaScript-based constraints across workspaces
  • catalogs for central dependency versions
  • patch: protocol for local changes to dependencies
  • plugin API
  • release workflow for monorepos (experimental)
View 3 more
  • yarn npm audit
  • per-project Yarn versions with yarn set version and Corepack
  • editor SDKs

Capabilities

Has a command line toolplan not known
Takes pluginsplan not known

Alternatives

The same job

These do what Yarn does.

  1. pnpm Fast, disk space efficient package manager
  2. npm The package manager for JavaScript
  3. Bun Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
  4. uv An extremely fast Python package and project manager, written in Rust.

Compare Yarn with the top 3