Skip to content

test: migrate post-banner sourcemap-with-shebang to Rust#8477

Merged
graphite-app[bot] merged 1 commit intomainfrom
copilot/remove-node-test-add-rust-test
Feb 27, 2026
Merged

test: migrate post-banner sourcemap-with-shebang to Rust#8477
graphite-app[bot] merged 1 commit intomainfrom
copilot/remove-node-test-add-rust-test

Conversation

Copy link
Contributor

Copilot AI commented Feb 26, 2026

Migrates the post-banner/sourcemap-with-shebang test from the Node.js fixture suite to a Rust integration test, with visualizeSourcemap enabled for clearer snapshot-based validation.

Changes

  • Removed Node.js test files in packages/rolldown/tests/fixtures/function/post-banner/sourcemap-with-shebang/
  • Added Rust test in crates/rolldown/tests/rolldown/function/post_banner_sourcemap_with_shebang/ with _config.json, main.js, and artifacts.snap
  • Updated filename_with_hash snapshot to include the new test's output files

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

@netlify
Copy link

netlify bot commented Feb 26, 2026

Deploy Preview for rolldown-rs canceled.

Name Link
🔨 Latest commit 689c928
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/69a111a0c285db00087c3ea3

Copilot AI changed the title [WIP] Remove node test and add rust test with visualize sourcemap Replace Node.js post-banner sourcemap+shebang test with Rust integration test Feb 26, 2026
@hyf0 hyf0 marked this pull request as ready for review February 26, 2026 15:56
Copilot AI review requested due to automatic review settings February 26, 2026 15:56
@hyf0
Copy link
Member

hyf0 commented Feb 26, 2026

@copilot concise PR title and use follow repo's style

Copy link
Contributor Author

Copilot AI commented Feb 26, 2026

@copilot concise PR title and use follow repo's style

Updated PR title to test: migrate post-banner sourcemap-with-shebang test to Rust.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR migrates the post-banner/sourcemap-with-shebang test from the Node.js fixture suite to a Rust integration test. The migration follows rolldown's coding guidelines that recommend preferring Rust integration tests for better debugging support and faster development cycles. The test validates that when combining a shebang, postBanner with multiple lines, and sourcemap generation, the output is correctly structured and sourcemaps are properly offset.

Changes:

  • Removed Node.js test files for post-banner sourcemap with shebang scenario
  • Added Rust integration test with equivalent functionality using snapshot-based validation
  • Enabled sourcemap visualization for clearer validation of sourcemap offsets

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

File Description
packages/rolldown/tests/fixtures/function/post-banner/sourcemap-with-shebang/_config.ts Deleted Node.js test configuration that validated shebang+postBanner+sourcemap interaction with manual assertions
crates/rolldown/tests/rolldown/function/post_banner_sourcemap_with_shebang/_config.json Added Rust test configuration enabling sourcemap visualization and defining postBanner with two comment lines
crates/rolldown/tests/rolldown/function/post_banner_sourcemap_with_shebang/main.js Added test input file with shebang and console.log statement
crates/rolldown/tests/rolldown/function/post_banner_sourcemap_with_shebang/artifacts.snap Added snapshot capturing output structure and sourcemap visualization

@hyf0
Copy link
Member

hyf0 commented Feb 26, 2026

@copilot test failed and PR title should use follow conventional commmit

Copy link
Contributor Author

Copilot AI commented Feb 26, 2026

@copilot test failed and PR title should use follow conventional commmit

Fixed both issues in 75cd9f3: updated the filename_with_hash snapshot to include the new test's output files, and the PR title now uses conventional commit format (test: migrate post-banner sourcemap-with-shebang to Rust).

Copilot AI changed the title Replace Node.js post-banner sourcemap+shebang test with Rust integration test test: migrate post-banner sourcemap-with-shebang to Rust Feb 26, 2026
Copy link
Member

hyf0 commented Feb 27, 2026

Merge activity

Migrates the `post-banner/sourcemap-with-shebang` test from the Node.js fixture suite to a Rust integration test, with `visualizeSourcemap` enabled for clearer snapshot-based validation.

## Changes

- Removed Node.js test files in `packages/rolldown/tests/fixtures/function/post-banner/sourcemap-with-shebang/`
- Added Rust test in `crates/rolldown/tests/rolldown/function/post_banner_sourcemap_with_shebang/` with `_config.json`, `main.js`, and `artifacts.snap`
- Updated `filename_with_hash` snapshot to include the new test's output files

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

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. [Learn more about Advanced Security.](https://gh.io/cca-advanced-security)
@graphite-app graphite-app bot force-pushed the copilot/remove-node-test-add-rust-test branch from 75cd9f3 to 689c928 Compare February 27, 2026 03:38
@graphite-app graphite-app bot merged commit 689c928 into main Feb 27, 2026
32 checks passed
@graphite-app graphite-app bot deleted the copilot/remove-node-test-add-rust-test branch February 27, 2026 03:48
@github-actions github-actions bot mentioned this pull request Mar 4, 2026
@github-actions github-actions bot mentioned this pull request Mar 5, 2026
shulaoda added a commit that referenced this pull request Mar 5, 2026
## [1.0.0-rc.7] - 2026-03-05

⚡ Smarter Code Generation Defaults
- DCE-only minification and smart constant inlining are now enabled by default
- Produces cleaner, smaller output bundles without requiring explicit configuration

💡 LLM-Friendly Bundle Analyzer Reports
- New markdown output format for the bundle analyzer plugin with bundle summaries, module graphs, dependency chains, and optimization suggestions
- Optimization suggestions now also recommend using the entriesAware option when common chunks contain modules only reachable from specific entries


### 💥 BREAKING CHANGES

- enable minify: 'dce-only' by default (#8465) by @IWANABETHATGUY
- settings `inlineConst: { mode: 'smart', pass: 1}`  by default (#8444) by @IWANABETHATGUY

### 🚀 Features

- binding: add original getter to BindingMagicString (#8533) by @IWANABETHATGUY
- native-magic-string: add `offset` property support (#8531) by @IWANABETHATGUY
- add `output.strict` option to control `"use strict"` directive emission (#8489) by @Copilot
- watch: expose `watcher.compareContentsForPolling` (#8526) by @hyf0
- watch: use new watcher to support watch mode (#8475) by @hyf0
- rust/watch: handle bulk-change (#8466) by @hyf0
- add LLM-friendly markdown output format to bundle analyzer plugin (#8242) by @IWANABETHATGUY

### 🐛 Bug Fixes

- expose `plugins` on `NormalizedInputOptions` for `buildStart` hook (#8521) by @Copilot
- only uppercase facade symbols in JSX preserve mode (#8519) by @IWANABETHATGUY
- binding: export BindingResult in generated dts header (#8537) by @minsoo-web
- pre-resolve paths option to avoid `invoke_sync` deadlock (#8518) by @IWANABETHATGUY
- remove debug-only jsx_preset and UntranspiledSyntaxError (#8511) by @IWANABETHATGUY
- apply `topLevelVar` to exported `const`/`let` declarations (#8507) by @IWANABETHATGUY
- rolldown_plugin_vite_web_worker_post: avoid replacing `new.target` (#8488) by @sapphi-red
- update copyright year to 2026 (#8486) by @maciekzygmunt

### 🚜 Refactor

- rust: use Oxc's SymbolFlags::ConstVariable instead of custom IsConst flag (#8543) by @Dunqing
- rust: remove FacadeScoping, use Scoping::create_symbol for facade symbols (#8540) by @Dunqing
- rust/watch: remove hacky `reset_closed_for_watch_mode` (#8530) by @hyf0
- binding: return &str instead of String in filename() getter (#8534) by @IWANABETHATGUY
- rust: remove old watch mode implementation (#8525) by @hyf0
- rust/watch: simply watch logic in the binding layer (#8516) by @hyf0
- rust/watch: tweak struct/function names (#8464) by @hyf0

### 📚 Documentation

- explain how external modules work in rolldown (#8457) by @sapphi-red
- add some diagrams using graphviz (#8499) by @sapphi-red
- use `vitepress-plugin-graphviz` (#8498) by @sapphi-red
- list s390x/ppc64le prebuilt binaries (#8495) by @crusty-voidzero
- fix error type for `RolldownBuild.generate` and others (#8490) by @sapphi-red

### ⚡ Performance

- string_wizard: reduce allocations and add ASCII fast paths (#8541) by @IWANABETHATGUY
- use IndexBitSet to replace IndexVec<XXXIdx, bool> for module/stmt inclusion tracking (#8503) by @IWANABETHATGUY
- plugin: use IndexBitSet to optimize skipped plugins checking (#8497) by @ShroXd
- rust/tla: skip compute_tla if there is no module use TLA (#8487) by @ShroXd

### 🧪 Testing

- node/watch: make watch tests run in concurrent and retry-able (#8512) by @hyf0
- add test case for static flag tree-shaking (#8476) by @IWANABETHATGUY
- migrate post-banner sourcemap-with-shebang to Rust (#8477) by @Copilot

### ⚙️ Miscellaneous Tasks

- vscode: `formatOnSave` for markdown files using oxc formatter (#8536) by @minsoo-web
- deps: update test262 submodule for tests (#8528) by @sapphi-red
- remove `retry` workaround from output paths test fixtures (#8520) by @Copilot
- docs: add Shuyuan Wang (h-a-n-a) and remove from acknowledgements (#8509) by @Copilot
- consolidate top_level_var test cases using configVariants (#8508) by @IWANABETHATGUY
- add s390x and ppc64le linux gnu targets (#8493) by @Brooooooklyn

### ◀️ Revert

- fix(rolldown): increase tokio blocking threads size for watch mode (#8517) by @hyf0

### ❤️ New Contributors

* @minsoo-web made their first contribution in [#8536](#8536)
* @crusty-voidzero made their first contribution in [#8495](#8495)
* @maciekzygmunt made their first contribution in [#8486](#8486)

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