Skip to content

refactor: update build config for @primer/styled-react to rolldown#8043

Draft
joshblack wants to merge 3 commits into
copilot/rolldown/mcpfrom
copilot/rolldown/styled-react
Draft

refactor: update build config for @primer/styled-react to rolldown#8043
joshblack wants to merge 3 commits into
copilot/rolldown/mcpfrom
copilot/rolldown/styled-react

Conversation

@joshblack

@joshblack joshblack commented Jun 23, 2026

Copy link
Copy Markdown
Member

Closes #

N/A

Changelog

New

N/A

Changed

  • Updated @primer/styled-react to build JavaScript with Rolldown and emit declarations with TypeScript.

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

@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 added the skip changeset This change does not need a changelog label Jun 23, 2026
@joshblack joshblack changed the title copilot/rolldown/styled react refactor: update build config for @primer/styled-react to rolldown Jun 23, 2026
@joshblack joshblack force-pushed the copilot/rolldown/mcp branch from 2598b0d to a5e067c Compare June 23, 2026 21:03
@joshblack joshblack force-pushed the copilot/rolldown/styled-react branch from 6469729 to 1017094 Compare June 23, 2026 21:03
@changeset-bot

changeset-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 7a8cdbb

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

@joshblack joshblack force-pushed the copilot/rolldown/mcp branch from a5e067c to fa4e757 Compare June 23, 2026 21:05
@joshblack joshblack force-pushed the copilot/rolldown/styled-react branch from 1017094 to d5ac815 Compare June 23, 2026 21:05
@github-actions github-actions Bot requested a deployment to storybook-preview-8043 June 23, 2026 21:07 Abandoned
@joshblack joshblack force-pushed the copilot/rolldown/mcp branch from fa4e757 to 2b55b7e Compare June 23, 2026 21:09
@joshblack joshblack force-pushed the copilot/rolldown/styled-react branch from d5ac815 to df43076 Compare June 23, 2026 21:09
@github-actions github-actions Bot requested a deployment to storybook-preview-8043 June 23, 2026 21:09 Abandoned
@github-actions github-actions Bot requested a deployment to storybook-preview-8043 June 23, 2026 21:12 Abandoned
@joshblack joshblack force-pushed the copilot/rolldown/mcp branch from 2b55b7e to d34560d Compare June 23, 2026 21:15
@joshblack joshblack force-pushed the copilot/rolldown/styled-react branch from df43076 to f45042c Compare June 23, 2026 21:15
@github-actions github-actions Bot requested a deployment to storybook-preview-8043 June 23, 2026 21:18 Abandoned
@joshblack joshblack force-pushed the copilot/rolldown/styled-react branch from f45042c to eda4557 Compare June 23, 2026 21:19
@joshblack joshblack force-pushed the copilot/rolldown/mcp branch from d34560d to 3c87865 Compare June 23, 2026 21:19
@github-actions github-actions Bot requested a deployment to storybook-preview-8043 June 23, 2026 21:20 Abandoned
@github-actions github-actions Bot requested a deployment to storybook-preview-8043 June 23, 2026 21:23 Abandoned
@joshblack joshblack force-pushed the copilot/rolldown/mcp branch from 3c87865 to 263a167 Compare June 23, 2026 21:42
@joshblack joshblack force-pushed the copilot/rolldown/styled-react branch from eda4557 to 8c7d5ad Compare June 23, 2026 21:42
@primer

primer Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

🤖 Lint issues have been automatically fixed and committed to this PR.

@github-actions github-actions Bot requested a deployment to storybook-preview-8043 June 23, 2026 21:48 Abandoned
@joshblack joshblack force-pushed the copilot/rolldown/mcp branch from 263a167 to 52051d7 Compare June 23, 2026 21:56
@joshblack joshblack force-pushed the copilot/rolldown/styled-react branch from 8c7d5ad to 3f5ee13 Compare June 23, 2026 21:56
@primer

primer Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

🤖 Lint issues have been automatically fixed and committed to this PR.

@github-actions github-actions Bot requested a deployment to storybook-preview-8043 June 23, 2026 22:02 Abandoned
@joshblack joshblack force-pushed the copilot/rolldown/styled-react branch from 3f5ee13 to 794df1b Compare June 23, 2026 23:25
@github-actions github-actions Bot temporarily deployed to storybook-preview-8043 June 23, 2026 23:37 Inactive
@joshblack joshblack marked this pull request as ready for review June 23, 2026 23:44
@joshblack joshblack requested a review from a team as a code owner June 23, 2026 23:44
@joshblack joshblack requested review from Copilot and siddharthkp June 23, 2026 23:44
@joshblack joshblack force-pushed the copilot/rolldown/mcp branch from a6f870a to d0d3e65 Compare June 23, 2026 23:44
@joshblack joshblack force-pushed the copilot/rolldown/styled-react branch from 794df1b to 7a8cdbb Compare June 23, 2026 23:44
@joshblack joshblack marked this pull request as draft June 23, 2026 23:45

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/styled-react package build pipeline to use Rolldown for JavaScript bundling while continuing to emit TypeScript declaration files via tsc, removing the older Rollup-based setup.

Changes:

  • Switch packages/styled-react build script from Rollup to rolldown.
  • Update the build config to use Rolldown-compatible plugins/config shape.
  • Remove Rollup build dependencies and add the rolldown dependency (with corresponding lockfile updates).
Show a summary per file
File Description
packages/styled-react/script/build Updates the package build script to run rolldown before tsc and the components manifest generator.
packages/styled-react/rolldown.config.js Migrates the bundler config to Rolldown and updates plugin wiring for Babel + directive preservation.
packages/styled-react/package.json Removes Rollup-related devDependencies and adds rolldown.
package-lock.json Reflects dependency graph changes from the Rollup → Rolldown migration.

Copilot's findings

Comments suppressed due to low confidence (2)

packages/styled-react/rolldown.config.js:2

  • RolldownMagicString is typically provided by @rolldown/pluginutils rather than the main rolldown entrypoint. Importing it from rolldown risks a runtime config-load failure if that re-export isn’t present in the installed version.
    packages/styled-react/rolldown.config.js:102
  • This hook mutates code (prepends the directive) but now always returns map: null. That drops sourcemap information compared to the previous implementation and can break debugging/stack traces when sourcemaps are enabled.
  • Files reviewed: 3/4 changed files
  • Comments generated: 0

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