Skip to content

Commit 4b180e8

Browse files
CopilotBoshen
andcommitted
Change --stats to generate last 10 versions instead of 5
Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
1 parent d253b02 commit 4b180e8

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

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 & 4 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) => {
@@ -38,7 +38,7 @@ async function fetchStableVersions() {
3838
const dateB = new Date(packageInfo.time[b]);
3939
return dateA - dateB;
4040
});
41-
versions = versions.slice(versions.length - 5, versions.length);
41+
versions = versions.slice(versions.length - 10, versions.length);
4242

4343
resolve(versions);
4444
} catch (error) {
@@ -268,7 +268,7 @@ async function listVersions() {
268268
// const futureVersions = await fetchFutureVersions(latestNpmDate);
269269
const futureVersions = []; // Commented out future versions functionality
270270

271-
console.log('\n🟢 Stable versions (last 5 from npm):');
271+
console.log('\n🟢 Stable versions (last 10 from npm):');
272272
stableVersions.forEach((version, index) => {
273273
const current = getCurrentVersion() === `^${version}` || getCurrentVersion() === version;
274274
console.log(` ${index + 1}. ${version} ${current ? '(current)' : ''}`);
@@ -476,7 +476,7 @@ if (process.argv.includes('--help') || process.argv.includes('-h')) {
476476
console.log('Usage:');
477477
console.log(' node override-rolldown.js --list List available versions');
478478
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)');
479+
console.log(' node override-rolldown.js <index> Use version by index (1-10)');
480480
console.log(' node override-rolldown.js <version> Use specific version');
481481
console.log(' node override-rolldown.js <pkg.pr.new> Use pkg.pr.new URL');
482482
console.log('\nExamples:');

0 commit comments

Comments
 (0)