Skip to content

refactor: update build config for @primer/doc-gen to rolldown#8041

Draft
joshblack wants to merge 3 commits into
mainfrom
copilot/rolldown/doc-gen
Draft

refactor: update build config for @primer/doc-gen to rolldown#8041
joshblack wants to merge 3 commits into
mainfrom
copilot/rolldown/doc-gen

Conversation

@joshblack

@joshblack joshblack commented Jun 23, 2026

Copy link
Copy Markdown
Member

Closes #

N/A

Changelog

New

N/A

Changed

  • Updated @primer/doc-gen to build JavaScript and declarations with Rolldown.

Removed

  • Removed the package Rollup build config and Rollup build dependencies.

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; build tooling-only change with no public runtime API change

Testing & Reviewing

Validated as part of the stack with npm run build, npm run type-check, npm run lint, npm run lint:css, npm run format:diff, and npm test -- --run.

Merge checklist

@changeset-bot

changeset-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 82272b3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions Bot added staff Author is a staff member integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Jun 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Action required

👋 Hi, this pull request contains changes to the source code that github/github-ui depends on. If you are GitHub staff, test these changes with github/github-ui using the integration workflow. If this doesn't work, you can also use the original workflow here. Check the integration testing docs for step-by-step instructions. Or, apply the integration-tests: skipped manually label to skip these checks.

To publish a canary release for integration testing, apply the Canary Release label to this PR.

@joshblack joshblack changed the title Migrate doc-gen build to Rolldown refactor: update build config for @primer/doc-gen to rolldown Jun 23, 2026
@joshblack joshblack added the skip changeset This change does not need a changelog label Jun 23, 2026
@joshblack joshblack changed the base branch from copilot/rolldown/import-css to main June 23, 2026 21:03
@joshblack joshblack force-pushed the copilot/rolldown/doc-gen branch 2 times, most recently from 7553cf9 to f41afb4 Compare June 23, 2026 21:05
@github-actions github-actions Bot requested a deployment to storybook-preview-8041 June 23, 2026 21:06 Abandoned
@github-actions github-actions Bot requested a deployment to storybook-preview-8041 June 23, 2026 21:08 Abandoned
@joshblack joshblack force-pushed the copilot/rolldown/doc-gen branch from f41afb4 to aede53d Compare June 23, 2026 21:09
@github-actions github-actions Bot requested a deployment to storybook-preview-8041 June 23, 2026 21:11 Abandoned
@joshblack joshblack force-pushed the copilot/rolldown/doc-gen branch from aede53d to f4cf5de Compare June 23, 2026 21:15
@github-actions github-actions Bot requested a deployment to storybook-preview-8041 June 23, 2026 21:17 Abandoned
@joshblack joshblack force-pushed the copilot/rolldown/doc-gen branch from f4cf5de to 82804ca Compare June 23, 2026 21:19
@github-actions github-actions Bot requested a deployment to storybook-preview-8041 June 23, 2026 21:21 Abandoned
@joshblack joshblack force-pushed the copilot/rolldown/doc-gen branch from 82804ca to 52d7193 Compare June 23, 2026 21:42
@github-actions github-actions Bot temporarily deployed to storybook-preview-8041 June 23, 2026 21:52 Inactive
@joshblack joshblack marked this pull request as ready for review June 23, 2026 21:58
@joshblack joshblack requested a review from a team as a code owner June 23, 2026 21:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the @primer/doc-gen build pipeline by replacing the Rollup-based configuration with a Rolldown-based configuration, keeping the package’s build output (dist JS + declarations) aligned with the repo’s newer bundling tooling.

Changes:

  • Removed the Rollup build config file from @primer/doc-gen.
  • Added a rolldown.config.js that builds ESM JavaScript and emits .d.ts via rolldown-plugin-dts.
  • Updated @primer/doc-gen package scripts and devDependencies to use Rolldown instead of Rollup+Babel.
Show a summary per file
File Description
packages/doc-gen/rollup.config.js Removes the legacy Rollup build configuration.
packages/doc-gen/rolldown.config.js Adds Rolldown build config for ESM output + DTS generation.
packages/doc-gen/package.json Switches build/watch scripts to Rolldown and updates build-related devDependencies.

Copilot's findings

  • Files reviewed: 3/4 changed files
  • Comments generated: 1

Comment thread packages/doc-gen/package.json Outdated
Comment on lines 38 to 42
"devDependencies": {
"@babel/core": "^7.29.0",
"@babel/plugin-transform-runtime": "^7.29.0",
"@babel/preset-env": "^7.29.0",
"@babel/preset-typescript": "^7.28.5",
"@rollup/plugin-babel": "^6.1.0",
"@rollup/plugin-commonjs": "^29.0.0",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^16.0.3",
"rimraf": "^6.0.1",
"rollup": "^4.59.0",
"rollup-plugin-typescript2": "^0.36.0",
"rolldown": "^1.1.2",
"rolldown-plugin-dts": "^0.26.0",
"typescript": "^6.0.3"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Applied: moved typescript to runtime dependencies because doc-gen imports it at runtime, and removed unused @babel/runtime now that Babel is no longer in the build pipeline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm skip changeset This change does not need a changelog staff Author is a staff member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants