You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: GitHub GraphQL batching — 1 API call for 50 packages — v1.5.0
Replace N individual REST calls with a single GraphQL query for GitHub
repo metadata. 8 packages now scan in 3s (was ~12s). Rate limit usage
drops ~97% when GITHUB_TOKEN is set.
New 3-phase architecture in api.js: npm metadata → GraphQL batch → score/enrich.
New lib/github-graphql.js with batchFetchRepos(). 71 tests passing.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+19Lines changed: 19 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,25 @@
2
2
3
3
All notable changes to this project will be documented here.
4
4
5
+
## [1.5.0] — 2026-03-20
6
+
7
+
### Added
8
+
-**GitHub GraphQL batching**: All GitHub API calls now use a single GraphQL query instead of N individual REST calls. Scanning 30 packages makes 1 GitHub request instead of 30. Massive rate-limit savings.
9
+
-**`lib/github-graphql.js`**: New module — builds aliased GraphQL queries, fetches stargazers, forks, issues, push date, archive status, and license in one round-trip. Batches up to 50 repos per query.
10
+
-**Smart concurrency**: With `GITHUB_TOKEN`, default concurrency increases from 2 to 5 (npm fetches are the bottleneck now, not GitHub).
11
+
- Tests: 71 passing (up from 68) — new suite for GraphQL module with unit + integration tests
12
+
13
+
### Changed
14
+
-`api.js`: Refactored into 3-phase architecture — Phase 1 (npm metadata, parallel batches) → Phase 2 (GitHub GraphQL batch) → Phase 3 (score + enrich). Falls back to REST if no token.
15
+
-`getNpmInfo()` extracted from `getPackageInfo()` for npm-only fetches when GraphQL handles GitHub data
16
+
-`mergeGithubData()` extracted as shared merge function for both REST and GraphQL paths
17
+
- User-Agent bumped to `oss-health-scan/1.4` in GraphQL client
18
+
19
+
### Performance
20
+
- 8 packages: 3 seconds with GraphQL (was ~12s with REST)
Copy file name to clipboardExpand all lines: README.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ npx oss-health-scan express lodash moment react
41
41
express ████████████████░░░░ 78.8/100 71.7M/wk
42
42
```
43
43
44
-
**Zero dependencies. v1.4.0.** Scans any npm package, scores 0–100, detects outdated versions (libyear), checks known CVEs via OSV.dev, auto-retries on failures, exits with code 1 on critical findings. SARIF output for GitHub Code Scanning. Programmatic API for custom integrations. CI-ready.
44
+
**Zero dependencies. v1.5.0.** Scans any npm package, scores 0–100, detects outdated versions (libyear), checks known CVEs via OSV.dev, auto-retries on failures, exits with code 1 on critical findings. GitHub GraphQL batching (1 API call for 50 packages). SARIF output for GitHub Code Scanning. Programmatic API for custom integrations. CI-ready.
45
45
46
46
`npm audit` finds CVEs. **This finds abandoned packages, outdated deps, AND vulnerabilities — in one command.**
Copy file name to clipboardExpand all lines: cli/package.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"name": "oss-health-scan",
3
-
"version": "1.4.0",
3
+
"version": "1.5.0",
4
4
"description": "Scan npm dependencies for abandoned packages, outdated versions (libyear), and known CVEs (OSV.dev). Health scores 0-100, SARIF for GitHub Code Scanning, zero dependencies.",
0 commit comments