Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 15, 2025

  • Understand issue [Feature Request]: Remove unnecessary assign for default export #4013 and the comment describing default export assignment semantics
  • Create test case directory at crates/rolldown/tests/rolldown/issues/4013
  • Create test files: main.js, file.js, _config.json
  • Generate snapshot showing the file_default variable assignment
  • Verify test passes successfully
  • Fix code style issues (add missing semicolon)
  • Run code review and address feedback
  • Move test to topics/live_bindings/default_export_snapshot_not_live
  • Rename test to be descriptive rather than issue number
  • Remove expectExecuted: false and add assertions using node:assert
  • Update test to use inc() function instead of setInterval
  • Restructure test to use import * so __export runtime helper is used
  • Update snapshots using just test-rust
Original prompt

Add a test case for the comment in @rolldown/rolldown/issues/4013 at crates/rolldown/tests/rolldown.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@graphite-app
Copy link
Contributor

graphite-app bot commented Oct 15, 2025

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.

@netlify
Copy link

netlify bot commented Oct 15, 2025

Deploy Preview for rolldown-rs canceled.

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

Copilot AI changed the title [WIP] Add test case for comment in issue 4013 Add test case for issue #4013 - default export assignment semantics Oct 15, 2025
Copilot AI requested a review from sapphi-red October 15, 2025 05:23
@sapphi-red
Copy link
Member

@copilot apply the following changes:

  • name the test case descriptive rather than issue4013
  • move the test to under crates/rolldown/tests/rolldown/topics/live_bindings
  • remove "expectExecuted": false and add assertion using node:assert
  • update the PR title to fix the CI

Copy link
Contributor Author

Copilot AI commented Oct 15, 2025

@copilot apply the following changes:

  • name the test case descriptive rather than issue4013
    ...

Done in commit 9a3cd80:

  • Renamed test to default_export_snapshot_not_live (descriptive name)
  • Moved to crates/rolldown/tests/rolldown/topics/live_bindings/
  • Removed expectExecuted: false and added assertions using node:assert
  • Simplified test to use inc() function instead of setInterval

The PR title will need to be updated manually to follow conventional commit format (e.g., test: add live bindings test for default export snapshot semantics).

Copilot AI changed the title Add test case for issue #4013 - default export assignment semantics test: add live bindings test for default export snapshot semantics Oct 15, 2025
@sapphi-red
Copy link
Member

@copilot use import * in the test case so that __export is used

Copy link
Contributor Author

Copilot AI commented Oct 15, 2025

@copilot use import * in the test case so that __export is used

Done in commit (will be shown after push). Restructured test to use two files with import * as file from './file.js' so that __export is used in the bundled output. The snapshot now shows:

var file_exports = /* @__PURE__ */ __export({
	default: () => file_default,
	inc: () => inc
});

@sapphi-red
Copy link
Member

@copilot update the snapshot by just test-rust

Copy link
Contributor Author

Copilot AI commented Oct 15, 2025

@copilot update the snapshot by just test-rust

Done in commit (will be shown after push). Ran just test-rust which updated the filename_with_hash snapshot to include the new test case.

@sapphi-red sapphi-red marked this pull request as ready for review October 15, 2025 13:54
Copy link
Member

shulaoda commented Oct 21, 2025

Merge activity

…6538)

- [x] Understand issue #4013 and the comment describing default export assignment semantics
- [x] Create test case directory at `crates/rolldown/tests/rolldown/issues/4013`
- [x] Create test files: `main.js`, `file.js`, `_config.json`
- [x] Generate snapshot showing the `file_default` variable assignment
- [x] Verify test passes successfully
- [x] Fix code style issues (add missing semicolon)
- [x] Run code review and address feedback
- [x] Move test to `topics/live_bindings/default_export_snapshot_not_live`
- [x] Rename test to be descriptive rather than issue number
- [x] Remove `expectExecuted: false` and add assertions using `node:assert`
- [x] Update test to use `inc()` function instead of `setInterval`
- [x] Restructure test to use `import *` so `__export` runtime helper is used
- [x] Update snapshots using `just test-rust`

<!-- START COPILOT CODING AGENT SUFFIX -->

<details>

<summary>Original prompt</summary>

> Add a test case for the comment in @rolldown/rolldown/issues/4013 at `crates/rolldown/tests/rolldown`.

</details>

<!-- START COPILOT CODING AGENT TIPS -->
---

💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click [here](https://survey3.medallia.com/?EAHeSx-AP01bZqG0Ld9QLQ) to start the survey.
@graphite-app graphite-app bot force-pushed the copilot/add-test-case-for-issue-4013 branch from dd951cc to 77e9e9e Compare October 21, 2025 00:53
@graphite-app graphite-app bot merged commit 77e9e9e into main Oct 21, 2025
25 checks passed
@graphite-app graphite-app bot deleted the copilot/add-test-case-for-issue-4013 branch October 21, 2025 01:07
shulaoda added a commit that referenced this pull request Oct 27, 2025
## [1.0.0-beta.45] - 2025-10-27

### 🚀 Features

- plugin/vite-resolve: add `legacyInconsistentCjsInterop` option (#6687) by @sapphi-red
- rolldown_plugin_vite_css_post: initialize `CSSStyles` (#6691) by @shulaoda
- rolldown_plugin_manifest: align with `vitejs/vite#20585` (#6684) by @shulaoda
- enabling mangle private class members (#6679) by @IWANABETHATGUY
- rolldown_resolver: auto tsconfig discovery (#6602) by @Boshen
- support named imports + CJS by optimization.inlineConst (#6644) by @IWANABETHATGUY

### 🐛 Bug Fixes

- rolldown_binding: use Record instead of Map (#6715) by @shulaoda
- validate valibot schema against existing type (#6703) by @ocavue
- rolldown_plugin_vite_css_post: align some logic (#6697) by @shulaoda
- node/options: should validate `transform.jsx` correctly (#6698) by @ocavue
- inherit runtime helpers from eliminated dependencies (#6689) by @IWANABETHATGUY
- clean-dir: advance clean outdir to allow `generateBundle` outputs (#6647) by @aprosail
- rename variable to better reflect its purpose and fix CJS imports (#6663) by @IWANABETHATGUY
- bailout tree shake commonjs export when it is defined multiple time (#6659) by @IWANABETHATGUY
- rolldown_plugin_reporter: color dimmed text correctly (#6649) by @sapphi-red
- don't inline json module when used as a namespace reference (#6652) by @IWANABETHATGUY
- avoid `define` deprecation warning when loading a config file (#6641) by @sapphi-red

### 💼 Other

- pluginutils: switch to tsc to solve the issue of loading conflicting binary (#6708) by @hyf0

### 🚜 Refactor

- node: only call `transformToRollupOutput` when needed (#6695) by @hyf0
- node: split `transformToRollupOutput` into mutable and immutable versions (#6693) by @hyf0
- remove unnecessaey lazy data passing for `BindingOutputs` (#6692) by @hyf0
- rolldown_plugin_utils: tweak `CSSEntriesCache` (#6685) by @shulaoda
- rolldown_binding: use unified `BindingRenderBuiltUrl` (#6653) by @shulaoda

### 📚 Documentation

- in-depth about `experimental.nativeMagicString` (#6713) by @IWANABETHATGUY
- polish `optimization` (#6719) by @IWANABETHATGUY
- clarify `output.cleanDir` timing behavior for plugin compatibility (#6682) by @Copilot
- add Kevin Deng, 翠 (sapphi-red), and Alexander Lichter to team page with Bluesky links (#6664) by @Copilot
- polish `preserveEntrySignature` doc (#6661) by @IWANABETHATGUY
- set up redirects via netlify (#6654) by @TheAlexLichter
- polish doc about `treeshake` (#6650) by @IWANABETHATGUY
- rework options documentation first round (#6542) by @hyf0

### ⚡ Performance

- rolldown: upgrade sugar_path (#6646) by @Brooooooklyn

### 🧪 Testing

- add live bindings test for default export snapshot semantics (#6538) by @Copilot

### ⚙️ Miscellaneous Tasks

- deps: lock file maintenance npm packages (#6714) by @renovate[bot]
- deps: update github-actions (#6710) by @renovate[bot]
- deps: update dependency @vueuse/core to v14 (#6711) by @renovate[bot]
- deps: update github-actions (major) (#6712) by @renovate[bot]
- deps: update dependency tsdown to v0.15.10 (#6706) by @renovate[bot]
- remove `typedoc` dependency and cleanup unused documentation generation (#6686) by @Copilot
- deps: update dependency rolldown-plugin-dts to v0.17.1 (#6690) by @renovate[bot]
- lint: `oxlint --type-aware` (#5660) by @Boshen
- rolldown: update napi and js binding (#6676) by @Brooooooklyn
- deps: update vitest to v4 (#6673) by @sapphi-red
- test: support `DevTestMeta#dev` (#6672) by @hyf0
- deps: update dependency rolldown-plugin-dts to ^0.17.0 (#6671) by @renovate[bot]
- test: move dev related options to rolldown_dev_common (#6667) by @hyf0
- test: add `DevTestMeta` under `TestMeta#dev` to control dev related behaviors (#6666) by @hyf0
- deps: update dependency vite to v7.1.11 [security] (#6645) by @renovate[bot]
- pluginutils: use rolldown to build plugutils (#6642) by @Brooooooklyn
- deps: update dependency tsdown to v0.15.9 (#6643) by @renovate[bot]

### ❤️ New Contributors

* @ocavue made their first contribution in [#6703](#6703)

Co-authored-by: shulaoda <165626830+shulaoda@users.noreply.github.com>
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.

4 participants