Skip to content

Comments

feat: use same option object reference#5114

Merged
shulaoda merged 3 commits intomainfrom
06-30-feat_use_same_option_object_reference
Jun 30, 2025
Merged

feat: use same option object reference#5114
shulaoda merged 3 commits intomainfrom
06-30-feat_use_same_option_object_reference

Conversation

@sapphi-red
Copy link
Member

@sapphi-red sapphi-red commented Jun 30, 2025

Use the same option object reference so that plugins can store information for each output.

const data = new WeakMap<NormalizedOutputOptions, Something>()
const foo = {
  name: 'foo',
  renderChunk(code, chunk, opts) { data.set(opts, something) },
  generateBundle(opts) { console.log(data.get(opts)) }
}

Copy link
Member Author

sapphi-red commented Jun 30, 2025

@sapphi-red sapphi-red marked this pull request as ready for review June 30, 2025 10:48
Base automatically changed from 06-30-test_support_array_output_options to main June 30, 2025 11:05
@shulaoda shulaoda added this pull request to the merge queue Jun 30, 2025
Merged via the queue into main with commit 0b791db Jun 30, 2025
19 checks passed
@shulaoda shulaoda deleted the 06-30-feat_use_same_option_object_reference branch June 30, 2025 11:23
This was referenced Jul 1, 2025
hyf0 pushed a commit that referenced this pull request Jul 1, 2025
## [1.0.0-beta.23] - 2025-07-01

### 💥 BREAKING CHANGES

- debug: rename debug logs fields to be consitent (#5125) by @antfu

### 🚀 Features

- debug: append `content` for asset data and unify `source` field to
`content`. (#5130) by @hyf0
- debug: emit asset-related data (#5124) by @hyf0
- commonjs tree shaking. (#5095) by @IWANABETHATGUY
- rolldown_plugin_wasm_helper: align behaviors for expected
functionality (#5120) by @shulaoda
- remove `experimental.enableComposingJsPlugins` (#5122) by @shulaoda
- use same option object reference (#5114) by @sapphi-red
- add util function to inspect why the facade symbol is created (#5115)
by @IWANABETHATGUY
- types: expose `ChunkingContext` type (#5112) by @sapphi-red
- scan commonjs exports (#5111) by @IWANABETHATGUY
- debug: remove unneeded source info of render chunk events (#5109) by
@hyf0
- debug: only emit debug information for trace level (#5108) by @hyf0
- debug: emit chunk related informations (#5106) by @hyf0

### 🐛 Bug Fixes

- debug: add hook render chunk start and end events to Meta enum (#5117)
by @hyf0

### 🚜 Refactor

- rust: unify outdated namings (#5127) by @hyf0

### 📚 Documentation

- advanced-chunks: clarify module capturing behavior (#5129) by @hyf0

### 🧪 Testing

- support array output options (#5113) by @sapphi-red

### ⚙️ Miscellaneous Tasks

- remove unused code (#5128) by @IWANABETHATGUY
- remove unnecessary `skipComposingJsPlugin` (#5123) by @shulaoda
- deps: update crate-ci/typos action to v1.34.0 (#5119) by
@renovate[bot]
- deps: update NAPI-RS to 3.0.0-beta.11 (#5110) by @shulaoda

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants