Analyze npm, hunt for es module packages
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
data
legacy
lib
online
sample
utils
.gitignore
01_get_graph.sh
02_analyze_files.js
02_analyze_new.js
02_create_graph.js
03_analyze_historical.js
03_analyze_watch.js
04_collect_historical.js
04_collect_historical_npm.js
LICENSE
README.md
collect.js
dump.js
make_snapshot.sh
modules-by-publish-month.1.json
package-lock.json
package.json
saveStats.js

README.md

@pikapkg/analyze-npm

This repository searches the npm graph for the most popular "module" packages.
Based on @anvaka/npmrank.

Setup

1. Clone & Install

git clone https://github.com/pikapkg/npm-esm-analyze.git
cd npm-esm-analyze
npm install

2. Download the npm graph data:

./01_get_graph.sh

This will download graph from skimdb and save it to data folder. As of September 2016 this data is about 500MB.

3. FInd all ES modules in the local graph data:

node --max-old-space-size=4096 02_analyze_new.js

3. Create the graph for additional analysis:

Convert it to ngraph.graph format for further analysis.

node --max-old-space-size=4096 02_create_graph.js

You are now ready to analyze the graph.

Running additional analysis:

node --max-old-space-size=4096 03_analyze_historical.js
node --max-old-space-size=4096 04_collect_historical.js
node --max-old-space-size=4096 04_collect_historical_npm.js

This will write out a dictionary of "module" packages on npm, to the file called found-modules.json.