Skip to content

wallet77/qualityofjspackages-data-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quality of JS packages - report generator

Purpose

This project is a simple script that will generate a readable report for the website Quality of JS packages. The input must be a report file generated by the Quality of JS packages crawler.
One of the purpose is to reduce the size of the report so that the website loads faster.

The algorithm can be sum up like this:

  1. load the report generated by the crawler

  2. for each package

      1. Get qualscan results and for each metrics calculate min/max/mean
      1. Save general metrics (npms, consumtion, etc)
  3. For each metrics calculate percentiles

  4. Save the report in a file

Project setup

npm install

Generate JSON file from a full report

INPUT=./report/report.json OUTPUT=./report/ node index.js

INPUT The path to the file generated by the crawler

OUTPUT The path of the directory where to store the report. The name of the file is automatically generated with the date contains in the report.

Debug with pino-pretty

INPUT=./report/report.json OUTPUT=./report/ node index.js | pino-pretty -c -t

Lints and fixes files

npm run linter

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published