Alan052918 / Package-Dependency-Scaling-Analysis

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Package-Dependency-Scaling-Analysis

SUSTech CSE Junda AI

Experiment Design

Overview

The goal of the experiment is to examine the soundness of our dependency-pruning alogrithm: that projects won't crash or lose functionality after pruning. The workload of the experiment can be distributed into two tasks:

  1. Sample typical JavaScript projects
  2. Make tests to ensure that if the program pass the tests after pruning, then it is not broken

Sampling JavaScript projects

Universe: GitHub public repositories in language JavaScript.

A total of 920 GitHub repositories was crawled and assigned weight based on their watch, star, and fork counts. Based on their power of relating people to the project, from passive relating to proactive participating, a weight coefficient is assigned to each. And repository influence ranking is sorted according to weights.

Metric Role Description Weight
watch Subscribers, passive relating keep up with news and modifications 2
star Collectors, proactive relating add to one's own collections for quick search 3
fork Colaborators, proactive participating participate in the development of the project 4

weight = watch*2 + star*3 + fork*4

Project excerpt

No. Repository Watch Star Fork Weight
1 freeCodeCamp/freeCodeCamp 8395 309944 (1st overall) 23919 (4th overall) 1042298
2 twbs/bootstrap 7145 140024 (4th overall) 68615 (1st overall) 708822
3 vuejs/vue 6121 161779 (2nd overall) 24481 (3rd overall) 595503
4 facebook/react 6646 147007 (3rd overall) 28419 (2nd overall) 567989
5 airbnb/javascript 3556 94520 (5th overall) 18412 (7th overall) 364320
6 nodejs/node 2926 69168 (7th overall) 16676 (8th overall) 280060
7 mrdoob/three.js 2468 59767 (9th overall) 23099 (5th overall) 276633
8 trekhleb/javascript-algorithms 2690 67804 (8th overall) 11211 253636
9 axios/axios 1175 71959 (6th overall) 6450 244027
10 jquery/jquery 3414 53169 19231(6th overall) 243259
11 mui-org/material-ui 1331 56410 (10th overall) 15491 (9th overall) 233856
12 atom/atom 2493 51674 14351 (10th overall) 217412
13 30-seconds/30-seconds-of-code 1728 55837 6203 195779
14 webpack/webpack 1626 53794 6944 192410
15 chartjs/Chart.js 1455 48155 10287 188523 (>98.37%)

Nodejs does not have dependencies and package-lock.json file, thus is not applicable to the pruning algorithm.

Scraped average (920 repositories)

  • watch: 171.46847826086957
  • star: 4700.648913043478
  • fork: 951.133695652174

Making tests

Dependency Types

Type Summary
dependencies Required for the application to run
devDependencies Required in the development flow but not for running the application
peerDependencies Compatible hosts for plugin packages
optionalDependencies Negligible to yarn/npm install process
bundledDependencies Supplements to normal dependencies

References

Collection of Packge Dependency Files of Influential ReactJS Projects

yarn.lock

package-lock.json

About


Languages

Language:Python 96.4%Language:C 2.4%Language:XSLT 0.6%Language:C++ 0.2%Language:Objective-C 0.1%Language:Roff 0.1%Language:GAP 0.1%Language:HTML 0.0%Language:Shell 0.0%Language:JavaScript 0.0%Language:PowerShell 0.0%