Skip to content

Conversation

@IWANABETHATGUY
Copy link
Member

@IWANABETHATGUY IWANABETHATGUY commented Sep 25, 2025

implemented https://rollupjs.org/configuration-options/#output-generatedcode-symbols

TL;DR

Added support for the generatedCode.symbols option to control Symbol.toStringTag usage in namespace objects.

What changed?

  • Added a new GeneratedCodeOptions type with symbols and preset properties
  • Updated the render_namespace_markers function to use the symbols option when determining whether to include Symbol.toStringTag
  • Modified CJS, IIFE, and UMD format renderers to pass the generated code options
  • Added tests for the new functionality
  • Updated CLI help text to include the new options

How to test?

You can test this feature by setting the generatedCode.symbols option in your Rolldown config:

export default {
  output: {
    generatedCode: {
      symbols: true
    }
  }
}

When enabled, namespace objects will include Symbol.toStringTag with a value of 'Module'.

Why make this change?

This change adds support for controlling whether Symbol.toStringTag is used in namespace objects, which is a feature available in other bundlers. Using Symbol.toStringTag can help with debugging by providing better object representation when inspecting modules, but it might not be desired in all environments, especially those targeting older browsers.lghttps://rollupjs.org/configuration-options/#output-generatedcode-symbolslg

Copy link
Member Author


How to use the Graphite Merge Queue

Add the label graphite: merge 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.

@netlify
Copy link

netlify bot commented Sep 25, 2025

Deploy Preview for rolldown-rs failed.

Name Link
🔨 Latest commit aa60028
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/68d540b35692d4000834222d

@netlify
Copy link

netlify bot commented Sep 25, 2025

Deploy Preview for rolldown-rs ready!

Name Link
🔨 Latest commit 621b527
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/68d9f48996e3580008759364
😎 Deploy Preview https://deploy-preview-6335--rolldown-rs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 25, 2025

Benchmarks Rust

  • target: main(5fc213f)
  • pr: 09-25-feat_support_output.generatedcode.symbols_(621b527)
group                                                        pr                                     target
-----                                                        --                                     ------
bundle/bundle@multi-duplicated-top-level-symbol              1.00     70.7±1.73ms        ? ?/sec    1.02     71.9±1.97ms        ? ?/sec
bundle/bundle@multi-duplicated-top-level-symbol-sourcemap    1.00     77.5±1.64ms        ? ?/sec    1.04     80.4±3.77ms        ? ?/sec
bundle/bundle@rome_ts                                        1.00    114.2±3.44ms        ? ?/sec    1.00    113.8±3.33ms        ? ?/sec
bundle/bundle@rome_ts-sourcemap                              1.00    129.3±2.68ms        ? ?/sec    1.00    129.5±2.00ms        ? ?/sec
bundle/bundle@threejs                                        1.00     45.0±0.92ms        ? ?/sec    1.04     46.6±2.59ms        ? ?/sec
bundle/bundle@threejs-sourcemap                              1.00     52.3±0.87ms        ? ?/sec    1.02     53.4±1.13ms        ? ?/sec
bundle/bundle@threejs10x                                     1.00    437.1±4.68ms        ? ?/sec    1.00    438.0±8.95ms        ? ?/sec
bundle/bundle@threejs10x-sourcemap                           1.00    502.4±4.66ms        ? ?/sec    1.00    503.5±5.14ms        ? ?/sec
scan/scan@rome_ts                                            1.00     88.3±1.42ms        ? ?/sec    1.02     90.0±1.79ms        ? ?/sec
scan/scan@threejs                                            1.00     32.7±0.42ms        ? ?/sec    1.02     33.2±1.24ms        ? ?/sec
scan/scan@threejs10x                                         1.00    334.5±5.22ms        ? ?/sec    1.02    339.7±4.82ms        ? ?/sec

@IWANABETHATGUY IWANABETHATGUY force-pushed the 09-25-feat_support_output.generatedcode.symbols_ branch 4 times, most recently from 97096a3 to 5cc43d8 Compare September 28, 2025 09:01
@pkg-pr-new
Copy link

pkg-pr-new bot commented Sep 28, 2025

Open in StackBlitz

@rolldown/browser

npm i https://pkg.pr.new/@rolldown/browser@6335

@rolldown/debug

npm i https://pkg.pr.new/@rolldown/debug@6335

@rolldown/pluginutils

npm i https://pkg.pr.new/@rolldown/pluginutils@6335

rolldown

npm i https://pkg.pr.new/rolldown@6335

@rolldown/binding-android-arm64

npm i https://pkg.pr.new/@rolldown/binding-android-arm64@6335

@rolldown/binding-darwin-arm64

npm i https://pkg.pr.new/@rolldown/binding-darwin-arm64@6335

@rolldown/binding-darwin-x64

npm i https://pkg.pr.new/@rolldown/binding-darwin-x64@6335

@rolldown/binding-freebsd-x64

npm i https://pkg.pr.new/@rolldown/binding-freebsd-x64@6335

@rolldown/binding-linux-arm-gnueabihf

npm i https://pkg.pr.new/@rolldown/binding-linux-arm-gnueabihf@6335

@rolldown/binding-linux-arm64-gnu

npm i https://pkg.pr.new/@rolldown/binding-linux-arm64-gnu@6335

@rolldown/binding-linux-arm64-musl

npm i https://pkg.pr.new/@rolldown/binding-linux-arm64-musl@6335

@rolldown/binding-linux-x64-gnu

npm i https://pkg.pr.new/@rolldown/binding-linux-x64-gnu@6335

@rolldown/binding-linux-x64-musl

npm i https://pkg.pr.new/@rolldown/binding-linux-x64-musl@6335

@rolldown/binding-openharmony-arm64

npm i https://pkg.pr.new/@rolldown/binding-openharmony-arm64@6335

@rolldown/binding-wasm32-wasi

npm i https://pkg.pr.new/@rolldown/binding-wasm32-wasi@6335

@rolldown/binding-win32-arm64-msvc

npm i https://pkg.pr.new/@rolldown/binding-win32-arm64-msvc@6335

@rolldown/binding-win32-ia32-msvc

npm i https://pkg.pr.new/@rolldown/binding-win32-ia32-msvc@6335

@rolldown/binding-win32-x64-msvc

npm i https://pkg.pr.new/@rolldown/binding-win32-x64-msvc@6335

commit: 5cc43d8

@IWANABETHATGUY IWANABETHATGUY marked this pull request as ready for review September 29, 2025 02:25
@IWANABETHATGUY IWANABETHATGUY force-pushed the 09-25-feat_support_output.generatedcode.symbols_ branch from 5cc43d8 to 09c979f Compare September 29, 2025 02:25
Copy link
Member

@shulaoda shulaoda left a comment

Choose a reason for hiding this comment

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

Perhaps we should add some related descriptions? This isn’t a blocker.

@IWANABETHATGUY
Copy link
Member Author

Perhaps we should add some related descriptions? This isn’t a blocker.

Done

@graphite-app
Copy link
Contributor

graphite-app bot commented Sep 29, 2025

Merge activity

implemented https://rollupjs.org/configuration-options/#output-generatedcode-symbols
### TL;DR

Added support for the `generatedCode.symbols` option to control Symbol.toStringTag usage in namespace objects.

### What changed?

- Added a new `GeneratedCodeOptions` type with `symbols` and `preset` properties
- Updated the `render_namespace_markers` function to use the `symbols` option when determining whether to include Symbol.toStringTag
- Modified CJS, IIFE, and UMD format renderers to pass the generated code options
- Added tests for the new functionality
- Updated CLI help text to include the new options

### How to test?

You can test this feature by setting the `generatedCode.symbols` option in your Rolldown config:

```
export default {
  output: {
    generatedCode: {
      symbols: true
    }
  }
}
```

When enabled, namespace objects will include `Symbol.toStringTag` with a value of 'Module'.

### Why make this change?

This change adds support for controlling whether Symbol.toStringTag is used in namespace objects, which is a feature available in other bundlers. Using Symbol.toStringTag can help with debugging by providing better object representation when inspecting modules, but it might not be desired in all environments, especially those targeting older browsers.lghttps://rollupjs.org/configuration-options/#output-generatedcode-symbolslg
@graphite-app graphite-app bot force-pushed the 09-25-feat_support_output.generatedcode.symbols_ branch from 09c979f to 621b527 Compare September 29, 2025 02:52
@graphite-app graphite-app bot merged commit 621b527 into main Sep 29, 2025
28 checks passed
@graphite-app graphite-app bot deleted the 09-25-feat_support_output.generatedcode.symbols_ branch September 29, 2025 03:09
shulaoda added a commit that referenced this pull request Sep 30, 2025
## [1.0.0-beta.41] - 2025-09-29

### 🚀 Features

- support `output.generatedCode.symbols` (#6335) by @IWANABETHATGUY
- rolldown: oxc v0.93.0 (#6364) by @Boshen
- rolldown_plugin_vite_html: finish script tag logic (#6355) by @shulaoda
- rolldown_plugin_vite_html: support inline html proxy (#6353) by @shulaoda
- rolldown_plugin_vite_html: transform script tag into js import (#6351) by @shulaoda
- rolldown_plugin_vite_html: overwrite script src url (#6349) by @shulaoda
- rolldown_plugin_vite_html: remove `vite-ignore` attribute (#6348) by @shulaoda
- rolldown_plugin_vite_html: use `html5ever` and `markup5ever_rcdom` (#6327) by @shulaoda
- rust/dev: support `on_output` callback (#6330) by @hyf0
- rust/dev: support `disable_watcher` (#6329) by @hyf0
- dev: introduce client/session concept into dev engine (#6297) by @hyf0

### 🐛 Bug Fixes

- 'asset' module type and CJS format produces warnings and wrong output (#6369) by @IWANABETHATGUY
- inlining constants in CJS by optimization.inlineConst incorrectly inlines non-constant values if the value is assigned more than once (#6328) by @IWANABETHATGUY
- dev: add `hasLatestBuildOutput` instead of `scheduleBuildIfStale` and add edit-reload test (#6321) by @sapphi-red

### 🚜 Refactor

- rust/dev: rename `HmrManager` to `HmrState` and tweak namings (#6358) by @hyf0
- rust/dev: use `Bundler` to expose hmr related methods (#6356) by @hyf0
- rolldown_plugin_vite_html: use `html5gum` instead (#6343) by @shulaoda
- dev: remove deprecated `new` field from HMR options and related configurations (#6337) by @hyf0
- dev: remove unused hmr API (#6336) by @hyf0
- make `cjs_ast_analyzer` immutable for better reuse (#6326) by @IWANABETHATGUY
- simplify logic for determining entry is_lived (#6325) by @IWANABETHATGUY

### ⚡ Performance

- dev: compute depended data incrementally (#6357) by @hyf0

### 🧪 Testing

- rust/hmr: use dev engine to test hmr (#6334) by @hyf0

### ⚙️ Miscellaneous Tasks

- deps: update notify (#6368) by @sapphi-red
- deps: lock file maintenance npm packages (#6366) by @renovate[bot]
- deps: update github-actions (#6365) by @renovate[bot]
- deps: update dependency rolldown-plugin-dts to v0.16.9 (#6354) by @renovate[bot]
- deps: update dependency tsdown to v0.15.5 (#6350) by @renovate[bot]
- node: use `catalog:` to unify version of all dependencies (#6339) by @hyf0
- ci: unify node installation via oxc-project/setup-node (#6338) by @Boshen
- deps: update crate-ci/typos action to v1.36.3 (#6341) by @renovate[bot]
- remove unused snapshots (#6331) by @IWANABETHATGUY

Co-authored-by: shulaoda <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants