Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Aug 24, 2025

This PR implements a comprehensive tool for testing the vibe-dashboard across stable rolldown-vite versions, with automatic statistics collection and performance analysis capabilities.

Key Features

Dynamic Version Discovery

  • Automatically fetches the last 5 stable versions from npm registry, sorted chronologically (oldest to newest)
  • Real-time API integration ensures up-to-date version lists
  • Focuses on stable releases for reliable testing

Comprehensive Statistics Collection
The tool includes a powerful --stats mode that automatically:

  • Tests every available stable rolldown version (5 versions)
  • Updates package.json, installs dependencies, and builds the app for each version
  • Collects detailed file statistics from the dist directory
  • Records build times, file sizes, and asset types
  • Handles build failures gracefully and continues with remaining versions
  • Saves comprehensive data to rolldown-version-stats.json for analysis

Streamlined Testing Workflow

# List all available versions
pnpm rolldown:list

# Test specific versions
pnpm rolldown:use 2          # Use second stable version
pnpm rolldown:use 7.1.2      # Use specific version

# Collect comprehensive statistics for all versions
pnpm rolldown:stats

Statistics Output
The generated rolldown-version-stats.json contains comprehensive data for performance analysis:

[
  {
    "version": "7.1.4",
    "timestamp": "2025-08-24T15:47:35.547Z",
    "files": [
      {
        "path": "assets/index-C_guGHi2.js",
        "size": 563794,
        "type": "js"
      },
      {
        "path": "assets/index-DD-rq4eS.css",
        "size": 2812,
        "type": "css"
      }
    ],
    "totalSize": 568609,
    "buildTime": 3420
  }
]

Analysis Results

Successfully analyzed 5 out of 5 available rolldown versions:

  • Successful builds: 5 stable versions (showing chronological progression from oldest to newest)
  • Failed builds: 0 (100% success rate with stable versions)
  • Average build time: 3531ms
  • Average bundle size: 555.77 KB

This enables comprehensive performance analysis across stable rolldown versions, making it easy to track bundle size changes and build time improvements as rolldown evolves.

Fixes #15.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Create a tool Add rolldown version override tool for testing different versions Aug 24, 2025
Copilot AI requested a review from Boshen August 24, 2025 12:07
Copilot AI changed the title Add rolldown version override tool for testing different versions Add dynamic rolldown version override tool with npm and pkg.pr.new integration Aug 24, 2025
Copilot AI requested a review from Boshen August 24, 2025 14:50
Copilot AI requested a review from Boshen August 24, 2025 15:10
@Boshen
Copy link
Member

Boshen commented Aug 24, 2025

@copilot for all past and future Rolldown versions fetched from the script, change the script and do the following, for every version

  • update the rolldown version in apps/dashboard/package.json
  • build the app
  • collect file statistics from dist
  • save the stats

Then for all the stats generated, save data into a json, the json is an array of all data collected of all versions of rolldown.

Copy link
Contributor Author

Copilot AI commented Aug 24, 2025

@copilot for all past and future Rolldown versions fetched from the script, change the script and do the following, for every version

  • update the rolldown version in apps/dashboard/package.json
    ...

I've implemented comprehensive version statistics collection functionality as requested. The enhanced script now:

For every rolldown version (stable + experimental):

  • Updates rolldown version in apps/dashboard/package.json
  • Builds the app
  • Collects detailed file statistics from dist directory
  • Saves build metrics (file sizes, types, build time)

Key features:

  • --stats command tests all 15+ available versions automatically
  • Collects comprehensive data: file paths, sizes, types, build times
  • Handles build failures gracefully and continues with other versions
  • Saves all data to rolldown-version-stats.json as requested
  • Automatically restores original package.json after analysis

Usage:

pnpm rolldown:stats
# or
node tool/override-rolldown.js --stats

The JSON output contains an array of statistics for each successfully built version, with detailed file information and build metrics. Commit: dd728e1

Copilot AI changed the title Add dynamic rolldown version override tool with npm and pkg.pr.new integration Add comprehensive rolldown version testing tool with statistics collection Aug 24, 2025
@Boshen
Copy link
Member

Boshen commented Aug 24, 2025

@copilot merge main and fix conflict

Copy link
Contributor Author

Copilot AI commented Aug 24, 2025

@copilot merge main and fix conflict

Successfully merged main branch and resolved all conflicts. The package.json conflicts were resolved by keeping both typescript-eslint and the updated rolldown-vite version, and the pnpm-lock.yaml was regenerated to ensure compatibility. All tests pass and linting is clean. Commit: a83f4c4

Copilot AI requested a review from Boshen August 24, 2025 15:44
@Boshen
Copy link
Member

Boshen commented Aug 24, 2025

@copilot run rolldown:stats and commit the changes.

Copy link
Contributor Author

Copilot AI commented Aug 24, 2025

@copilot run rolldown:stats and commit the changes.

Successfully ran rolldown:stats command and committed the comprehensive statistics data. The analysis tested 15 available rolldown versions, with 5 successful builds generating detailed file statistics, build times, and bundle analysis. Results saved to rolldown-version-stats.json. Commit: fa1aca3

Copy link
Member

@Boshen Boshen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot update lockfile

Copy link
Contributor Author

Copilot AI commented Aug 24, 2025

@copilot update lockfile

Updated lockfile to match current package.json dependencies. Commit: ab5c07e

console.log('🔍 Fetching all available versions...');
const stableVersions = await fetchStableVersions();
const latestNpmDate = await getLatestNpmVersionDate();
const futureVersions = await fetchFutureVersions(latestNpmDate);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot future versions is broken, comment this line out and fix accordingly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commented out the future versions functionality as requested. The fetchFutureVersions function call at line 311 and related code has been disabled. The tool now only analyzes stable versions from npm (5 versions), resulting in 100% successful builds. All unused functions and variables have been cleaned up to pass linting. Commit: 2a230d1

Copilot AI changed the title Add comprehensive rolldown version testing tool with statistics collection Add rolldown version testing tool with statistics collection (stable versions only) Aug 25, 2025
Copilot AI requested a review from Boshen August 25, 2025 03:52
@Boshen Boshen marked this pull request as ready for review August 25, 2025 05:50
@Boshen Boshen merged commit e90d8a6 into main Aug 25, 2025
1 check passed
@Boshen Boshen deleted the copilot/fix-15 branch August 25, 2025 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create a tool

2 participants