refactor(rolldown): derive package data from rolldown logs#365
Open
webfansplz wants to merge 5 commits into
Open
refactor(rolldown): derive package data from rolldown logs#365webfansplz wants to merge 5 commits into
webfansplz wants to merge 5 commits into
Conversation
04b4080 to
172a99a
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the Rolldown DevTools “Packages” data flow to stop reading node_modules after build and instead derive package metadata directly from Rolldown logs (via the new PackageGraphReady event), improving determinism for post-build analysis.
Changes:
- Switch package collection to use Rolldown’s package graph (
PackageGraphReady) and persist it in the log cache. - Update shared types and UI to use a stable package
id, add support messaging when package graph data is unavailable, and surface “unbundled” packages. - Remove
@pnpm/read-project-manifestusage/dependency and bump log cache version.
Reviewed changes
Copilot reviewed 13 out of 15 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-workspace.yaml | Removes the pnpm manifest reader catalog entry (no longer needed for package discovery). |
| packages/rolldown/src/shared/types/data.ts | Adds PackageInfo.id, PackageInfo.isUsed, and introduces PackageMeta return shape. |
| packages/rolldown/src/node/rpc/functions/rolldown-get-packages.ts | Derives package list from Rolldown package graph logs and returns PackageMeta. |
| packages/rolldown/src/node/rolldown/log-cache.ts | Bumps cache version and persists packageGraphReady + packages in cached manager snapshots. |
| packages/rolldown/src/node/rolldown/events-reader.ts | Includes PackageGraphReady in package summary reads. |
| packages/rolldown/src/node/rolldown/events-manager.ts | Handles PackageGraphReady to populate manager.packages and readiness flag. |
| packages/rolldown/src/node/rolldown/tests/events-reader.test.ts | Adds coverage asserting PackageGraphReady is read into the manager. |
| packages/rolldown/src/app/pages/session/[session]/packages.vue | Updates UI to consume PackageMeta, use id for selection, and adds unsupported-build messaging. |
| packages/rolldown/src/app/pages/compare/[sessions]/index.vue | Adapts compare page to the new PackageMeta RPC response. |
| packages/rolldown/src/app/components/packages/Table.vue | Uses id as stable key/query param and adds an “Unbundled” badge + empty-size display. |
| packages/rolldown/src/app/components/packages/Duplicated.vue | Enables “used/unbundled” badge display in duplicated package groups. |
| packages/rolldown/src/app/components/data/PackageDetailsLoader.vue | Switches details loading to use package id and simplifies name handling. |
| packages/rolldown/package.json | Removes @pnpm/read-project-manifest and the previous inlined dependency list. |
| packages/core/src/client/webcomponents/.generated/css.ts | Regenerated CSS output. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
commit: |
351f380 to
9ce22a3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Be related to rolldown/rolldown#9399, Close #160
Screenshot: