Commit 21c6b45
fix(npm-stats): stop summary cards overcounting co-installed packages
The NPM Stats summary cards (all-time, monthly, weekly, daily) summed
every @tanstack/*start* package mapped to the library. ~9 of those are
transitive deps of a single `@tanstack/react-start` install, so each
install was counted ~9x (weekly showed 148.1M instead of ~16.5M).
Make the cards honor the library's declared `npmPackageNames`, matching
the chart below them:
- NPMSummary uses the shared `recentDownloadsQuery` (which passes
npmPackageNames) instead of a local copy that dropped it, fixing the
daily/weekly/monthly cards.
- `rebuildOssStatsCache` now restricts each library's aggregate to its
declared `npmPackageNames` when present, fixing the all-time card.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 599fad7 commit 21c6b45
2 files changed
Lines changed: 24 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
6 | | - | |
| 5 | + | |
7 | 6 | | |
8 | | - | |
9 | 7 | | |
10 | 8 | | |
11 | 9 | | |
| |||
24 | 22 | | |
25 | 23 | | |
26 | 24 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | 25 | | |
48 | 26 | | |
49 | 27 | | |
| |||
110 | 88 | | |
111 | 89 | | |
112 | 90 | | |
113 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
114 | 94 | | |
115 | 95 | | |
116 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
251 | 266 | | |
252 | 267 | | |
253 | 268 | | |
| |||
266 | 281 | | |
267 | 282 | | |
268 | 283 | | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
269 | 289 | | |
270 | 290 | | |
271 | 291 | | |
| |||
0 commit comments