package-manager-stats#
Script to get stats about package managers used in most popular projects on GitHub.
Prerequisites#
Usage#
Add .env file with GitHub token:
GITHUB_TOKEN=…
Install:
yarn
Run:
yarn start
Optionally, you can run script in debug mode to see more logs. Bear in mind that it will take much more time to run.
DEBUG=true yarn start
Generating charts#
Create fresh SVGs from the saved results:
yarn charts
Outputs land in charts directory. Version charts are produced only when a package manager has more than one major version.
Charts#
Methodology#
The dataset comes from GitHub repository search results for JavaScript and TypeScript projects, fetched separately, sorted by stars, and limited to up to 1000 results per language. That makes the charts a snapshot of the most-starred repositories matching the query.
Calculation is simple: for each repo, the script prefers the packageManager field in package.json, then falls back to lockfile-based signals. Version charts use the best available version signal, sometimes only inferring a major version from lockfile format.
Package manager trend points before March 13, 2026 estimate npm and pnpm values by applying the fixed Corepack packageManager parsing error ratio from the March 13, 2026 snapshot. Raw result files remain unadjusted historical snapshots.
Other methodologies are possible. If you inspect the source, you will find alternative selection rules you can try yourself.