Yarn is a command-line package manager for JavaScript projects that automates the installation, versioning, and configuration of external code dependencies. It functions as a deterministic build tool, utilizing a lockfile to calculate a fixed dependency graph that ensures identical package versions across development, testing, and production environments.
The project distinguishes itself through a content-addressable storage system that indexes packages by hash to eliminate redundant downloads and enable instant linking. It incorporates a virtual file system mapping that presents a unified view of dependencies without requiring physical copies in local folders, alongside a plugin-based architecture that allows for the injection of custom logic into the package management lifecycle. Furthermore, it provides native support for monorepo workspace management, dynamically mapping internal dependencies to their respective source directories to simplify code sharing.
Beyond its core resolution engine, the tool supports parallelized network fetching to maximize bandwidth during installations and maintains local dependency caches to facilitate offline builds. It also includes utilities for publishing software packages to registries and provides migration paths for transitioning projects from other dependency management tools.