pnpm vs Yarn: source lines of code compared

This page compares the source lines of code (SLOC) of pnpm/pnpm and yarnpkg/berry using cached OctoCounts reports. Code size is not code quality: a larger count only means more source material, not a better or worse project.

As of 2026-09-07, pnpm/pnpm contains 649,110 total lines (547,771 code) across 3,501 files, while yarnpkg/berry contains 137,547 total lines (104,439 code) across 1,243 files as of 2026-07-30. pnpm/pnpm is about 5.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.

Metricpnpm/pnpmyarnpkg/berry
Files3,5011,243
Total lines649,110137,547
Code lines547,771104,439
Comment lines42,39811,728
Blank lines58,94121,380
Languages counted1212

Top languages in pnpm/pnpm: Rust (70.5% of code), TypeScript (17.5% of code), YAML (6.3% of code). Top languages in yarnpkg/berry: TypeScript (68.3% of code), JavaScript (22.1% of code), JSON (5.6% 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 8760cfa9f32a) on 2026-09-07; yarnpkg/berry was counted at ref master (commit 57081c05a398) on 2026-07-30. 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.

Compare FAQ

Which has more lines of code, pnpm/pnpm or yarnpkg/berry?

pnpm/pnpm has more code: 547,771 code lines versus 104,439 for yarnpkg/berry, about 5.2x as much, based on cached OctoCounts reports as of 2026-09-07.

Does more source lines of code mean more complexity?

Not necessarily. SLOC measures size, not complexity, quality, or maintainability. A larger codebase can mean more features, more generated or vendored code, more verbose language idioms, or more tests — none of which imply the code is harder to work with. Use SLOC to gauge the scale of what you'd be reading or maintaining, not as a quality signal for pnpm/pnpm, yarnpkg/berry, or any repository.

How is this comparison calculated?

Methodology: both counts come from cached OctoCounts reports generated with tokei. pnpm/pnpm was counted at ref main (commit 8760cfa9f32a) on 2026-09-07; yarnpkg/berry was counted at ref master (commit 57081c05a398) on 2026-07-30. See the counting methodology for ignored directories and analysis options.

Can I compare a different branch, tag, or commit?

Yes. This page shows the default branch for each repository. Use the interactive comparison tool to pick any public GitHub repository, branch, tag, or commit SHA for both sides and get a fresh side-by-side report.