refactor!: rename exported BindingMagicString to RolldownMagicString#8626
Conversation
How to use the Graphite Merge QueueAdd the label graphite: merge-when-ready to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
✅ Deploy Preview for rolldown-rs canceled.
|
BindingMagicString into RolldownMagicStringThere was a problem hiding this comment.
Pull request overview
This PR renames the public export BindingMagicString to RolldownMagicString in the rolldown package's public API, aligning the exported class name with the isRolldownMagicString detection flag introduced in #8614. Internal TypeScript code continues to use BindingMagicString for consistency with the binding layer—only the re-export alias changes.
Changes:
- Rename the
BindingMagicStringre-export toRolldownMagicStringin the publicindex.ts - Update all four test files to import
RolldownMagicStringinstead ofBindingMagicString
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
packages/rolldown/src/index.ts |
Re-exports BindingMagicString under the new public name RolldownMagicString |
packages/rolldown/tests/magic-string/MagicString.test.ts |
Updates import alias to use the new RolldownMagicString export |
packages/rolldown/tests/magic-string/magic-string-to-string-tag.test.ts |
Updates import alias to use the new RolldownMagicString export |
packages/rolldown/tests/magic-string/magic-string-original.test.ts |
Updates import alias to use the new RolldownMagicString export |
packages/rolldown/tests/magic-string/binding-magic-string-offset.test.ts |
Updates import alias to use the new RolldownMagicString export |
Note: In
packages/rolldown/tests/magic-string/binding-magic-string-offset.test.ts, the JSDoc comment (line 6) and the top-leveldescribeblock name (line 9) still referenceBindingMagicString— these are outside the diff region but are now inconsistent with the renamed public API. They are minor nits worth cleaning up.
hyf0
left a comment
There was a problem hiding this comment.
(Doesn't block this merge) Do we wanna move it under rolldown/experimental or we want people to think it as a stable feature? @sapphi-red cc
Merge activity
|
…8626) from #8614 (comment) ## Summary Rename the exported `BindingMagicString` class to `RolldownMagicString` in the public API. Only the exported name is changed — internal TypeScript code continues to use `BindingMagicString` to keep naming consistent with the binding layer. The public rename aligns the class name with its detection flag `isRolldownMagicString` (introduced in #8614). ## Changes - Update the re-export in `packages/rolldown/src/index.ts` - Update test imports to use the new name
d8f5437 to
f84f2ce
Compare
I think we should add |
ok |
## [1.0.0-rc.9] - 2026-03-11 ### 💥 BREAKING CHANGES - rename exported BindingMagicString to RolldownMagicString (#8626) by @IWANABETHATGUY ### 🚀 Features - rolldown: add isRolldownMagicString property for reliable native detection (#8614) by @IWANABETHATGUY - cli: align object type with rollup (#8598) by @h-a-n-a ### 🐛 Bug Fixes - rust: circular inter-chunk imports when external dynamic imports exist (#8596) by @Dunqing - update minify default docs from `false` to `'dce-only'` (#8620) by @shulaoda ### 💼 Other - fix early exit in script build-node (#8617) by @h-a-n-a ### 🚜 Refactor - binding: remove outdated TODO comment in MagicString to_string() (#8613) by @IWANABETHATGUY ### 📚 Documentation - add viteplus alpha announcement banner (#8615) by @mdong1909 - update VitePress theme to 4.8.2 for narrow-screen layout regression (#8612) by @Copilot ### ⚡ Performance - merge 4 integration test binaries into 1 (#8610) by @Boshen ### 🧪 Testing - replace heavy filename_with_hash test with targeted hash fixtures (#8597) by @Boshen ### ⚙️ Miscellaneous Tasks - ci: remove redundant `--no-run` build step from cargo-test (#8623) by @Boshen - rust: use `cargo-shear` to toggle Cargo.toml [lib] test = bool (#8622) by @Boshen - deps: update test262 submodule for tests (#8611) by @sapphi-red - skip macOS CI jobs on pull requests (#8608) by @Copilot - add rust cache to repo validation job (#8607) by @Boshen - skip running empty bin test targets (#8605) by @Boshen - skip building examples in cargo-test to reduce build time (#8603) by @Boshen - switch plain workflow checkouts to taiki-e action (#8601) by @Boshen - skip Windows CI jobs on PRs (#8600) by @Boshen - remove unused asset module (#8594) by @shulaoda ###◀️ Revert - "docs: add viteplus alpha announcement banner (#8615)" (#8616) by @shulaoda Co-authored-by: shulaoda <165626830+shulaoda@users.noreply.github.com>

from #8614 (comment)
Summary
Rename the exported
BindingMagicStringclass toRolldownMagicStringin the public API.Only the exported name is changed — internal TypeScript code continues to use
BindingMagicStringto keep naming consistent with the binding layer. The public rename aligns the class name with its detection flagisRolldownMagicString(introduced in #8614).Changes
packages/rolldown/src/index.ts