refactor(experimental/devtools)!: rename InputOptions#debug to InputOptions#devtools#7686
Conversation
✅ Deploy Preview for rolldown-rs canceled.
|
There was a problem hiding this comment.
Pull request overview
This PR renames the InputOptions#debug option to InputOptions#devtools across both TypeScript and Rust layers to better align with the devtools team's naming conventions and avoid confusion with debugging rolldown itself.
Key Changes:
- Renamed option from
debugtodevtoolsin TypeScript interfaces and validators - Renamed
DebugOptionstoDevtoolsOptionsandBindingDebugOptionstoBindingDevtoolsOptionsin Rust - Updated all usages throughout the codebase including tests and examples
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/rolldown/tests/behaviors/emit-debug-data/devtools.test.js | Updated test to use devtools option instead of debug |
| packages/rolldown/src/utils/validator.ts | Updated validation schema to accept devtools field instead of debug |
| packages/rolldown/src/utils/bindingify-input-options.ts | Updated binding conversion to pass devtools option |
| packages/rolldown/src/options/input-options.ts | Renamed interface field from debug to devtools |
| packages/rolldown/src/binding.d.cts | Updated TypeScript bindings to use BindingDevtoolsOptions instead of BindingDebugOptions |
| examples/basic-typescript/rolldown.config.js | Updated example config to use devtools option |
| crates/rolldown_testing/_config.schema.json | Updated JSON schema to reference DevtoolsOptions instead of DebugOptions |
| crates/rolldown_common/src/lib.rs | Updated public exports to use DevtoolsOptions instead of DebugOptions |
| crates/rolldown_common/src/inner_bundler_options/types/normalized_bundler_options.rs | Renamed field from debug to devtools in normalized options |
| crates/rolldown_common/src/inner_bundler_options/types/mod.rs | Updated module declarations to use devtools_options instead of debug_options |
| crates/rolldown_common/src/inner_bundler_options/types/devtools_options.rs | Renamed struct from DebugOptions to DevtoolsOptions |
| crates/rolldown_common/src/inner_bundler_options/mod.rs | Updated BundlerOptions to use DevtoolsOptions type |
| crates/rolldown_binding/src/utils/normalize_binding_options.rs | Updated normalization to use devtools field and DevtoolsOptions type |
| crates/rolldown_binding/src/options/binding_input_options/mod.rs | Updated to import and use BindingDevtoolsOptions |
| crates/rolldown_binding/src/options/binding_input_options/binding_devtools_options.rs | Renamed struct from BindingDebugOptions to BindingDevtoolsOptions |
| crates/rolldown_binding/src/classic_bundler.rs | Updated condition to check options.devtools instead of options.debug |
| crates/rolldown/src/utils/prepare_build_context.rs | Updated to use devtools field instead of debug |
| crates/rolldown/src/stages/generate_stage/chunk_ext.rs | Updated condition to check options.devtools instead of options.debug |
Review Summary: The renaming has been executed comprehensively and consistently across all layers of the codebase. All TypeScript types, Rust structs, field names, module paths, and usages have been properly updated. The changes follow proper naming conventions (UpperCamelCase for types, snake_case for fields) and maintain backward compatibility in terms of functionality. No issues were found in the changed code regions.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@copilot Update node test snapshot via |
Benchmarks Rust |
Merge activity
|
…ptions#devtools (#7686) - [x] Rename option from `debug` to `devtools` in TypeScript layer - [x] Update `packages/rolldown/src/options/input-options.ts` - [x] Update `packages/rolldown/src/utils/bindingify-input-options.ts` - [x] Update `packages/rolldown/src/utils/validator.ts` - [x] Rename option from `debug` to `devtools` in Rust layer - [x] Rename `DebugOptions` to `DevtoolsOptions` in `crates/rolldown_common/src/inner_bundler_options/types/debug_options.rs` and rename the file to `devtools_options.rs` - [x] Update `crates/rolldown_common/src/inner_bundler_options/types/mod.rs` - [x] Update `crates/rolldown_common/src/lib.rs` - [x] Update `crates/rolldown_common/src/inner_bundler_options/mod.rs` (BundlerOptions struct) - [x] Rename `BindingDebugOptions` to `BindingDevtoolsOptions` in `crates/rolldown_binding/src/options/binding_input_options/binding_debug_options.rs` and rename the file to `binding_devtools_options.rs` - [x] Update `crates/rolldown_binding/src/options/binding_input_options/mod.rs` - [x] Update `crates/rolldown_binding/src/utils/normalize_binding_options.rs` - [x] Update `crates/rolldown_common/src/inner_bundler_options/types/normalized_bundler_options.rs` - [x] Update `crates/rolldown/src/utils/prepare_build_context.rs` - [x] Update `crates/rolldown/src/stages/generate_stage/chunk_ext.rs` - [x] Update `crates/rolldown_binding/src/classic_bundler.rs` - [x] Update test files - [x] Update `packages/rolldown/tests/behaviors/emit-debug-data/devtools.test.js` - [x] Update `examples/basic-typescript/rolldown.config.js` - [x] Update JSON schema - [x] Update `crates/rolldown_testing/_config.schema.json` - [x] Build and lint verification passed - [x] Update node test snapshot (`packages/rolldown/tests/cli/__snapshots__/cli-e2e.test.ts.snap`) <!-- START COPILOT ORIGINAL PROMPT --> <details> <summary>Original prompt</summary> > > ---- > > *This section details on the original issue you should resolve* > > <issue_title>Rename `InputOptions#debug` to `InputOptions#devtools`</issue_title> > <issue_description>Had discussed with devtools team. The `debug` keyword would be used for other purpose, like debugging rolldown itself. We want to switched to `devtools` to carry related code for clarity. > > Not an urget task, so I want make an issue for collecting feedbacks</issue_description> > > <agent_instructions>Change the option both in Rust and TS layer</agent_instructions> > > ## Comments on the Issue (you are @copilot in this section) > > <comments> > <comment_new><author>@sapphi-red</author><body> > Sounds good from me & @IWANABETHATGUY & @shulaoda </body></comment_new> > </comments> > </details> <!-- START COPILOT CODING AGENT SUFFIX --> - Fixes #6930 <!-- START COPILOT CODING AGENT TIPS --> --- ✨ Let Copilot coding agent [set things up for you](https://github.com/rolldown/rolldown/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot) — coding agent works faster and does higher quality work when set up for your repo.
16d85ac to
4c86cb7
Compare
…ptions#devtools (#7686) - [x] Rename option from `debug` to `devtools` in TypeScript layer - [x] Update `packages/rolldown/src/options/input-options.ts` - [x] Update `packages/rolldown/src/utils/bindingify-input-options.ts` - [x] Update `packages/rolldown/src/utils/validator.ts` - [x] Rename option from `debug` to `devtools` in Rust layer - [x] Rename `DebugOptions` to `DevtoolsOptions` in `crates/rolldown_common/src/inner_bundler_options/types/debug_options.rs` and rename the file to `devtools_options.rs` - [x] Update `crates/rolldown_common/src/inner_bundler_options/types/mod.rs` - [x] Update `crates/rolldown_common/src/lib.rs` - [x] Update `crates/rolldown_common/src/inner_bundler_options/mod.rs` (BundlerOptions struct) - [x] Rename `BindingDebugOptions` to `BindingDevtoolsOptions` in `crates/rolldown_binding/src/options/binding_input_options/binding_debug_options.rs` and rename the file to `binding_devtools_options.rs` - [x] Update `crates/rolldown_binding/src/options/binding_input_options/mod.rs` - [x] Update `crates/rolldown_binding/src/utils/normalize_binding_options.rs` - [x] Update `crates/rolldown_common/src/inner_bundler_options/types/normalized_bundler_options.rs` - [x] Update `crates/rolldown/src/utils/prepare_build_context.rs` - [x] Update `crates/rolldown/src/stages/generate_stage/chunk_ext.rs` - [x] Update `crates/rolldown_binding/src/classic_bundler.rs` - [x] Update test files - [x] Update `packages/rolldown/tests/behaviors/emit-debug-data/devtools.test.js` - [x] Update `examples/basic-typescript/rolldown.config.js` - [x] Update JSON schema - [x] Update `crates/rolldown_testing/_config.schema.json` - [x] Build and lint verification passed - [x] Update node test snapshot (`packages/rolldown/tests/cli/__snapshots__/cli-e2e.test.ts.snap`) <!-- START COPILOT ORIGINAL PROMPT --> <details> <summary>Original prompt</summary> > > ---- > > *This section details on the original issue you should resolve* > > <issue_title>Rename `InputOptions#debug` to `InputOptions#devtools`</issue_title> > <issue_description>Had discussed with devtools team. The `debug` keyword would be used for other purpose, like debugging rolldown itself. We want to switched to `devtools` to carry related code for clarity. > > Not an urget task, so I want make an issue for collecting feedbacks</issue_description> > > <agent_instructions>Change the option both in Rust and TS layer</agent_instructions> > > ## Comments on the Issue (you are @copilot in this section) > > <comments> > <comment_new><author>@sapphi-red</author><body> > Sounds good from me & @IWANABETHATGUY & @shulaoda </body></comment_new> > </comments> > </details> <!-- START COPILOT CODING AGENT SUFFIX --> - Fixes #6930 <!-- START COPILOT CODING AGENT TIPS --> --- ✨ Let Copilot coding agent [set things up for you](https://github.com/rolldown/rolldown/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot) — coding agent works faster and does higher quality work when set up for your repo.
## [1.0.0-beta.58] - 2025-12-31 ### 💥 BREAKING CHANGES - experimental/devtools: rename InputOptions#debug to InputOptions#devtools (#7686) by @Copilot ### 🚀 Features - implement target feature check in `should_transform_js` for raw options (#7697) by @shulaoda - support `output.dynamicImportInCjs` option (#7677) by @shulaoda - types: expose `ChecksOptions` type (#7653) by @sapphi-red ### 🐛 Bug Fixes - export runtime helpers for cross-chunk access (#7658) by @shulaoda - cjs namespace merging regression (#7665) by @IWANABETHATGUY - replace panic with proper error handling for hash placeholder generation (#7661) by @shulaoda - remove the blank line between shebang and postBanner (#7643) by @btea - rolldown_plugin_vite_reporter: apply padding before ANSI coloring for proper size column alignment (#7649) by @shulaoda ### 🚜 Refactor - rust: use `StableModuleId` as the map key if possible (#7718) by @hyf0 - rust: return `StableModuleId` instead of `&str` from `Module#stable_id()` (#7717) by @hyf0 - rust: return correct stable id of external module from `Module#stable_id()` (#7716) by @hyf0 - rust: introduce `StableModuleId` type (#7715) by @hyf0 - rust: reduce unnecessary `id.as_arc_str().clone().into()` (#7714) by @hyf0 - rust: remove `ModuleId#resource_id` and use `as_arc_str` directly (#7710) by @hyf0 - rust: remove unused `Module#id_clone` (#7709) by @hyf0 - rust: remove `Module#id_as_str` and use `Module#id` directly (#7708) by @hyf0 - consolidate namespace call analysis into import analyzer (#7657) by @IWANABETHATGUY - rust: make `ExternalModule#id` have the type `ModuleId` (#7707) by @hyf0 - rust: rename `Module#id` to `Module#id_as_str` (#7706) by @hyf0 - rust: use `ModuleId` instead of raw `ArcStr` for `ScanStageCache` (#7701) by @hyf0 - simplify error propagation in cache merge (#7702) by @shulaoda - use `ModuleId` as the type of `ResolvedId#id` (#7694) by @hyf0 - types: rename `resolved_request_info.rs` to `resolved_id.rs` and move its contents (#7687) by @hyf0 - devtools: emit data to `<CWD>/node_modules/.rolldown` (#7692) by @hyf0 - use `InvalidOption` for hash placeholder generation errors (#7674) by @shulaoda - rolldown_error: remove dependency on rolldown_utils (#7672) by @shulaoda - use nodejs-built-in-modules v1.0.0 directly in callsites (#7667) by @Boshen ### 📚 Documentation - migrate input options content from options to auto gen docs (#7663) by @mdong1909 - create reference index page (#7659) by @mdong1909 - tweak auto-generated reference output (#7654) by @sapphi-red - initialize auto-gen docs (#7252) by @mdong1909 ### ⚙️ Miscellaneous Tasks - deps: update napi (#7705) by @renovate[bot] - pin Node.js version to 24.12.0 LTS in .node-version file (#7713) by @Copilot - update esbuild test reasons (#7703) by @sapphi-red - deps: update crate-ci/typos action to v1.40.1 (#7696) by @renovate[bot] - deps: update oxc to v0.106.0 (#7512) by @renovate[bot] - js: replace dprint with oxfmt (#7214) by @Boshen - deps: update dependency oxlint to v1.36.0 (#7691) by @renovate[bot] - deps: update github-actions (#7679) by @renovate[bot] - deps: update npm packages (#7680) by @renovate[bot] - deps: update rust crates (#7678) by @renovate[bot] - deps: update oxc resolver to v11.16.2 (#7668) by @renovate[bot] - add API reference files to knip entry points (#7669) by @Copilot - deps: update notify (#7651) by @sapphi-red - add `homepage` field to package.json (#7648) by @trivikr - deps: update oxc resolver to v11.16.1 (#7647) by @renovate[bot] - deps: update rolldown-plugin-dts to 0.20.0 (#7645) by @shulaoda Co-authored-by: shulaoda <165626830+shulaoda@users.noreply.github.com>
debugtodevtoolsin TypeScript layerpackages/rolldown/src/options/input-options.tspackages/rolldown/src/utils/bindingify-input-options.tspackages/rolldown/src/utils/validator.tsdebugtodevtoolsin Rust layerDebugOptionstoDevtoolsOptionsincrates/rolldown_common/src/inner_bundler_options/types/debug_options.rsand rename the file todevtools_options.rscrates/rolldown_common/src/inner_bundler_options/types/mod.rscrates/rolldown_common/src/lib.rscrates/rolldown_common/src/inner_bundler_options/mod.rs(BundlerOptions struct)BindingDebugOptionstoBindingDevtoolsOptionsincrates/rolldown_binding/src/options/binding_input_options/binding_debug_options.rsand rename the file tobinding_devtools_options.rscrates/rolldown_binding/src/options/binding_input_options/mod.rscrates/rolldown_binding/src/utils/normalize_binding_options.rscrates/rolldown_common/src/inner_bundler_options/types/normalized_bundler_options.rscrates/rolldown/src/utils/prepare_build_context.rscrates/rolldown/src/stages/generate_stage/chunk_ext.rscrates/rolldown_binding/src/classic_bundler.rspackages/rolldown/tests/behaviors/emit-debug-data/devtools.test.jsexamples/basic-typescript/rolldown.config.jscrates/rolldown_testing/_config.schema.jsonpackages/rolldown/tests/cli/__snapshots__/cli-e2e.test.ts.snap)Original prompt
InputOptions#debugtoInputOptions#devtools#6930✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.