Skip to content

Commit 21df016

Browse files
CopilotBoshen
andauthored
Change --stats to generate statistics for last 10 versions instead of 5 (#35)
* Initial plan * Change --stats to generate last 10 versions instead of 5 Co-authored-by: Boshen <[email protected]> * fix --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: Boshen <[email protected]> Co-authored-by: Boshen <[email protected]>
1 parent 6ae788c commit 21df016

File tree

3 files changed

+178
-34
lines changed

3 files changed

+178
-34
lines changed

rolldown-version-stats.json

Lines changed: 173 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
[
22
{
3-
"version": "7.1.0",
4-
"timestamp": "2025-08-25T08:41:49.339Z",
3+
"version": "7.0.11",
4+
"timestamp": "2025-08-25T08:39:16.609Z",
55
"files": [
66
{
77
"path": "assets/index-DD-rq4eS.css",
88
"size": 2812,
99
"type": "css"
1010
},
1111
{
12-
"path": "assets/index-iHxylggr.js",
13-
"size": 567478,
12+
"path": "assets/index-DROsY7re.js",
13+
"size": 566394,
1414
"type": "js"
1515
},
1616
{
@@ -24,17 +24,17 @@
2424
"type": "other"
2525
}
2626
],
27-
"totalSize": 572302,
27+
"totalSize": 571218,
2828
"totalGzipSize": 0,
29-
"buildTime": 3135
29+
"buildTime": 1674
3030
},
3131
{
32-
"version": "7.1.1",
33-
"timestamp": "2025-08-25T08:41:53.817Z",
32+
"version": "7.0.12",
33+
"timestamp": "2025-08-25T08:39:56.975Z",
3434
"files": [
3535
{
36-
"path": "assets/index--w4Va67M.js",
37-
"size": 567479,
36+
"path": "assets/index-BIyOag8V.js",
37+
"size": 566812,
3838
"type": "js"
3939
},
4040
{
@@ -53,24 +53,169 @@
5353
"type": "other"
5454
}
5555
],
56-
"totalSize": 572303,
56+
"totalSize": 571636,
5757
"totalGzipSize": 0,
58-
"buildTime": 2957
58+
"buildTime": 1849
5959
},
6060
{
61-
"version": "7.1.2",
62-
"timestamp": "2025-08-25T08:41:57.807Z",
61+
"version": "7.1.0-beta.0",
62+
"timestamp": "2025-08-25T08:40:00.064Z",
6363
"files": [
6464
{
65-
"path": "assets/index--w4Va67M.js",
66-
"size": 567479,
65+
"path": "assets/index-DD-rq4eS.css",
66+
"size": 2812,
67+
"type": "css"
68+
},
69+
{
70+
"path": "assets/index-DHQ9JvaV.js",
71+
"size": 566790,
6772
"type": "js"
6873
},
74+
{
75+
"path": "index.html",
76+
"size": 515,
77+
"type": "html"
78+
},
79+
{
80+
"path": "vite.svg",
81+
"size": 1497,
82+
"type": "other"
83+
}
84+
],
85+
"totalSize": 571614,
86+
"totalGzipSize": 0,
87+
"buildTime": 1559
88+
},
89+
{
90+
"version": "7.1.0-beta.1",
91+
"timestamp": "2025-08-25T08:40:32.337Z",
92+
"files": [
6993
{
7094
"path": "assets/index-DD-rq4eS.css",
7195
"size": 2812,
7296
"type": "css"
7397
},
98+
{
99+
"path": "assets/index-DHQ9JvaV.js",
100+
"size": 566790,
101+
"type": "js"
102+
},
103+
{
104+
"path": "index.html",
105+
"size": 515,
106+
"type": "html"
107+
},
108+
{
109+
"path": "vite.svg",
110+
"size": 1497,
111+
"type": "other"
112+
}
113+
],
114+
"totalSize": 571614,
115+
"totalGzipSize": 0,
116+
"buildTime": 1646
117+
},
118+
{
119+
"version": "7.1.0-beta.2",
120+
"timestamp": "2025-08-25T08:40:36.493Z",
121+
"files": [
122+
{
123+
"path": "assets/index-DD-rq4eS.css",
124+
"size": 2812,
125+
"type": "css"
126+
},
127+
{
128+
"path": "assets/index-DHQ9JvaV.js",
129+
"size": 566790,
130+
"type": "js"
131+
},
132+
{
133+
"path": "index.html",
134+
"size": 515,
135+
"type": "html"
136+
},
137+
{
138+
"path": "vite.svg",
139+
"size": 1497,
140+
"type": "other"
141+
}
142+
],
143+
"totalSize": 571614,
144+
"totalGzipSize": 0,
145+
"buildTime": 1527
146+
},
147+
{
148+
"version": "7.1.0",
149+
"timestamp": "2025-08-25T08:40:39.621Z",
150+
"files": [
151+
{
152+
"path": "assets/index-DD-rq4eS.css",
153+
"size": 2812,
154+
"type": "css"
155+
},
156+
{
157+
"path": "assets/index-DHQ9JvaV.js",
158+
"size": 566790,
159+
"type": "js"
160+
},
161+
{
162+
"path": "index.html",
163+
"size": 515,
164+
"type": "html"
165+
},
166+
{
167+
"path": "vite.svg",
168+
"size": 1497,
169+
"type": "other"
170+
}
171+
],
172+
"totalSize": 571614,
173+
"totalGzipSize": 0,
174+
"buildTime": 1459
175+
},
176+
{
177+
"version": "7.1.1",
178+
"timestamp": "2025-08-25T08:41:23.363Z",
179+
"files": [
180+
{
181+
"path": "assets/index-DD-rq4eS.css",
182+
"size": 2812,
183+
"type": "css"
184+
},
185+
{
186+
"path": "assets/index-d2fkeavV.js",
187+
"size": 566778,
188+
"type": "js"
189+
},
190+
{
191+
"path": "index.html",
192+
"size": 515,
193+
"type": "html"
194+
},
195+
{
196+
"path": "vite.svg",
197+
"size": 1497,
198+
"type": "other"
199+
}
200+
],
201+
"totalSize": 571602,
202+
"totalGzipSize": 0,
203+
"buildTime": 1646
204+
},
205+
{
206+
"version": "7.1.2",
207+
"timestamp": "2025-08-25T08:41:26.526Z",
208+
"files": [
209+
{
210+
"path": "assets/index-DD-rq4eS.css",
211+
"size": 2812,
212+
"type": "css"
213+
},
214+
{
215+
"path": "assets/index-d2fkeavV.js",
216+
"size": 566778,
217+
"type": "js"
218+
},
74219
{
75220
"path": "index.html",
76221
"size": 515,
@@ -82,17 +227,17 @@
82227
"type": "other"
83228
}
84229
],
85-
"totalSize": 572303,
230+
"totalSize": 571602,
86231
"totalGzipSize": 0,
87-
"buildTime": 2963
232+
"buildTime": 1524
88233
},
89234
{
90235
"version": "7.1.3",
91-
"timestamp": "2025-08-25T08:42:01.802Z",
236+
"timestamp": "2025-08-25T08:41:30.183Z",
92237
"files": [
93238
{
94-
"path": "assets/index-BulYToX9.js",
95-
"size": 566643,
239+
"path": "assets/index-CC82Zq9Q.js",
240+
"size": 565944,
96241
"type": "js"
97242
},
98243
{
@@ -111,17 +256,17 @@
111256
"type": "other"
112257
}
113258
],
114-
"totalSize": 571467,
259+
"totalSize": 570768,
115260
"totalGzipSize": 0,
116-
"buildTime": 2929
261+
"buildTime": 1985
117262
},
118263
{
119264
"version": "7.1.4",
120-
"timestamp": "2025-08-25T08:42:05.794Z",
265+
"timestamp": "2025-08-25T08:41:33.489Z",
121266
"files": [
122267
{
123-
"path": "assets/index-BulYToX9.js",
124-
"size": 566643,
268+
"path": "assets/index-CC82Zq9Q.js",
269+
"size": 565944,
125270
"type": "js"
126271
},
127272
{
@@ -140,8 +285,8 @@
140285
"type": "other"
141286
}
142287
],
143-
"totalSize": 571467,
288+
"totalSize": 570768,
144289
"totalGzipSize": 0,
145-
"buildTime": 2963
290+
"buildTime": 1666
146291
}
147292
]

tool/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This tool allows you to easily test the vibe-dashboard with different rolldown-v
44

55
## Features
66

7-
- 🟢 **Stable Versions**: Test with the last 5 stable versions from npm
7+
- 🟢 **Stable Versions**: Test with the last 10 stable versions from npm
88
- 🚀 **Future Versions**: Test with experimental versions from pkg.pr.new (when available)
99
- 🔄 **Automatic Rebuild**: Automatically installs dependencies and rebuilds the app
1010
- 📋 **Easy Selection**: Use version numbers or indices for quick switching

tool/override-rolldown.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const DIST_PATH = join(process.cwd(), 'apps/dashboard/dist');
1818
const STATS_OUTPUT_PATH = join(process.cwd(), 'rolldown-version-stats.json');
1919

2020
/**
21-
* Fetch the last 5 stable versions from npm registry
21+
* Fetch the last 10 stable versions from npm registry
2222
*/
2323
async function fetchStableVersions() {
2424
return new Promise((resolve, reject) => {
@@ -31,14 +31,13 @@ async function fetchStableVersions() {
3131
try {
3232
const packageInfo = JSON.parse(data);
3333
let versions = Object.keys(packageInfo.versions)
34-
.filter(v => !v.includes('-')) // Filter out pre-release versions
3534
.sort((a, b) => {
3635
// Sort by publication date (most recent last)
3736
const dateA = new Date(packageInfo.time[a]);
3837
const dateB = new Date(packageInfo.time[b]);
3938
return dateA - dateB;
4039
});
41-
versions = versions.slice(versions.length - 5, versions.length);
40+
versions = versions.slice(versions.length - 10, versions.length);
4241

4342
resolve(versions);
4443
} catch (error) {
@@ -268,7 +267,7 @@ async function listVersions() {
268267
// const futureVersions = await fetchFutureVersions(latestNpmDate);
269268
const futureVersions = []; // Commented out future versions functionality
270269

271-
console.log('\n🟢 Stable versions (last 5 from npm):');
270+
console.log('\n🟢 Stable versions (last 10 from npm):');
272271
stableVersions.forEach((version, index) => {
273272
const current = getCurrentVersion() === `^${version}` || getCurrentVersion() === version;
274273
console.log(` ${index + 1}. ${version} ${current ? '(current)' : ''}`);
@@ -476,7 +475,7 @@ if (process.argv.includes('--help') || process.argv.includes('-h')) {
476475
console.log('Usage:');
477476
console.log(' node override-rolldown.js --list List available versions');
478477
console.log(' node override-rolldown.js --stats Collect stats for all versions');
479-
console.log(' node override-rolldown.js <index> Use version by index (1-5)');
478+
console.log(' node override-rolldown.js <index> Use version by index (1-10)');
480479
console.log(' node override-rolldown.js <version> Use specific version');
481480
console.log(' node override-rolldown.js <pkg.pr.new> Use pkg.pr.new URL');
482481
console.log('\nExamples:');

0 commit comments

Comments
 (0)