Facebook released Yarn 11,798 in October 2016, with engineers from Exponent, Google and Tilde, because npm 3 2,036 was slow and non-deterministic. Yarn introduced a lockfile, a global offline cache and parallel, checksum-verified downloads, ideas every package manager has since copied. npm answered with package-lock.json in npm 5 (May 2017), and Yarn 1.0 (September 2017) added workspaces. Yarn Classic 11,798 has been in maintenance mode since January 2020; its last release, 1.22.22, dates from March 2024. Corepack 3,816 (Corepack) still runs it on demand.
mkdir ~/v5-ch1/yarn-classic && cd ~/v5-ch1/yarn-classic && cp ../booknest/package.json .
corepack yarn@1.22.22 installyarn install v1.22.22 info No lockfile found. ... (node:358887) [DEP0169] DeprecationWarning: `url.parse()` behavior is not standardized and ... ... success Saved lockfile. Done in 4.18s.
The warning comes from Node.js 24 2,131 : Yarn Classic calls an API that current Node.js discourages, which is what "frozen" means in practice. 4 maps everyday commands across npm and both Yarn editions.
| Task | npm 11 | Yarn Classic 1.x | Yarn Berry 4 |
|---|---|---|---|
| Add a dependency | npm install pg | yarn add pg | yarn add pg |
| Upgrade within ranges | npm update | yarn upgrade | yarn up |
| Frozen install for CI | npm ci | yarn --frozen-lockfile | yarn --immutable |
| Install a global tool | npm install -g x | yarn global add x | (removed) |