pnpm vs Yarn: source lines of code compared
As of 2026-07-27, pnpm/pnpm contains 484,461 total lines (404,735 code) across 3,001 files, while yarnpkg/berry contains 121,877 total lines (95,422 code) across 1,118 files as of 2026-07-27. pnpm/pnpm is about 4.2x the size of yarnpkg/berry by code lines. Code size is not code quality: a larger count only means more source material, not a better or worse project.
| Metric | pnpm/pnpm | yarnpkg/berry |
|---|
| Files | 3,001 | 1,118 |
| Total lines | 484,461 | 121,877 |
| Code lines | 404,735 | 95,422 |
| Comment lines | 33,792 | 8,267 |
| Blank lines | 45,934 | 18,188 |
| Languages counted | 12 | 12 |
Top languages in pnpm/pnpm: Rust (63.9% of code), TypeScript (20.7% of code), YAML (8.4% of code). Top languages in yarnpkg/berry: TypeScript (65.6% of code), JavaScript (24.2% of code), JSON (5.8% of code). TypeScript, JSON appear in both top language lists; Rust, YAML, TOML appear only in pnpm/pnpm's top languages; JavaScript, TSX, CSS appear only in yarnpkg/berry's top languages.
Methodology: both counts come from cached OctoCounts reports generated with tokei. pnpm/pnpm was counted at ref main (commit 5ed47dcf4b01) on 2026-07-27; yarnpkg/berry was counted at ref master (commit 2f45268e40ca) on 2026-07-27. See the counting methodology for ignored directories and analysis options.
Evidence and next steps:
Note: code size is not code quality. OctoCounts only reports reproducible line counts and makes no claim that either project is better.