Skip to content

fix: postBanner content should be placed after shebang#7583

Merged
hyf0 merged 6 commits intorolldown:mainfrom
btea:fix/postBanner-should-be-after-shebang
Dec 21, 2025
Merged

fix: postBanner content should be placed after shebang#7583
hyf0 merged 6 commits intorolldown:mainfrom
btea:fix/postBanner-should-be-after-shebang

Conversation

@btea
Copy link
Contributor

@btea btea commented Dec 19, 2025

The content generated by postBanner should be after the shebang; otherwise, it will cause file errors.

Copilot AI review requested due to automatic review settings December 19, 2025 03:17
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 fixes a critical issue where postBanner content was being inserted before the shebang line in generated output files, which would cause execution errors since shebangs must be the first line in a file.

Key Changes:

  • Modified the banner/footer insertion logic to detect and preserve shebang positioning
  • Added shebang extraction logic that identifies #! prefixed lines and ensures they remain first
  • Added test coverage for the shebang + postBanner scenario

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
crates/rolldown/src/stages/generate_stage/post_banner_footer.rs Implements shebang detection and ensures output order is: shebang → postBanner → content → postFooter
packages/rolldown/tests/fixtures/function/post-banner/shebang/_config.ts Adds test case to verify postBanner is placed after shebang
packages/rolldown/tests/fixtures/function/post-banner/shebang/main.js Test fixture file containing a shebang line

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@hyf0
Copy link
Member

hyf0 commented Dec 19, 2025

@sapphi-red Do you think this's reasonaoble? If it does, then we start to talk about the implementation.

@hyf0 hyf0 added on hold: to be discussed Waiting for team to discuss this issue on hold: waiting for conclusion Waiting for the team to arrive at the conclusion and removed on hold: to be discussed Waiting for team to discuss this issue labels Dec 19, 2025
@sapphi-red
Copy link
Member

I think it's reasonable. Since it's not allowed to have any code/comments above the shebang, I think we should inject after the shebang. It also aligns with banner's behavior. If the code already has a shebang and postBanner has a shebang, maybe we should emit a warning.

@hyf0 hyf0 removed the on hold: waiting for conclusion Waiting for the team to arrive at the conclusion label Dec 19, 2025
@hyf0
Copy link
Member

hyf0 commented Dec 19, 2025

I was thinking if it breaks users' intuition here? So this feature is for cases like the orignal code contains shebang and you want to apply a postBanner without breaking it.

@btea What's the real world situation will this feature apply to?

@btea
Copy link
Contributor Author

btea commented Dec 19, 2025

@btea What's the real world situation will this feature apply to?

For example, when building a project using the lib mode of the latest beta version of vite, there is a shebang message at the top of the entry file. If I add a version number comment at the top of the file using postBanner, it will cause errors in the packaged file. example

@hyf0
Copy link
Member

hyf0 commented Dec 19, 2025

Let me try to clarify the expected behaviors:

  • If the situation doesn't involve shebang, everything works without question.

  • If the code already contains shebang, content of postBanner is expected to be placed under shebang

  • If the code doesn't contain shebang, content of postBanner is expected to be placed as it is

  • If the code and postBanner both contain shebang, what's the expected behavior?

I'm personally in favor of content of postBanner is expected to be placed as it is not under code's shebang. @sapphi-red cc

@sapphi-red
Copy link
Member

  • If the code and postBanner both contain shebang, what's the expected behavior?

I would expect the content of postBanner without the shebang to be injected below the existing shebang. I also expect a warning to be output. The rationale of this behavior is because having multiple shebang is a syntax error.

@hyf0
Copy link
Member

hyf0 commented Dec 19, 2025

  • If the code and postBanner both contain shebang, what's the expected behavior?

I would expect the content of postBanner without the shebang to be injected below the existing shebang. I also expect a warning to be output. The rationale of this behavior is because having multiple shebang is a syntax error.

https://esbuild.github.io/try/#YgAwLjI0LjEALS1iYW5uZXI6anM9IiMhL3Vzci9iaW4vZW52IG5vZGUxIiAtLWJhbm5lcjpjc3M9Lypjb21tZW50Ki8AZQBlbnRyeS5qcwAjIS91c3IvYmluL2VudiBub2RlCgpjb25zb2xlLmxvZygnbWFpbicp

With looking into esbuild's behavior,

If the code and postBanner both contain shebang, we just place postBanner's contnet under shebang without any modification.

It's users' responsibility to remove postBanner's invalid shebang.

@btea
Copy link
Contributor Author

btea commented Dec 19, 2025

If the code and postBanner both contain shebang, we just place postBanner's contnet under shebang without any modification.

It's users' responsibility to remove postBanner's invalid shebang.

I agree. I don't think it's necessary to make any further judgments.

@hyf0
Copy link
Member

hyf0 commented Dec 19, 2025

@btea Could you modify the PR following the above clarifictions?

@sapphi-red
Copy link
Member

It's fine to keep the duplicate shebang, but I think we should have a warning. Since postBanner runs after the minification, I guess there won't be any errors, and the syntax error wouldn't be found until you actually ship the code.

@btea
Copy link
Contributor Author

btea commented Dec 19, 2025

@btea Could you modify the PR following the above clarifictions?

If I understand correctly, the current modifications should conform to the logic described above. 🤔

@hyf0
Copy link
Member

hyf0 commented Dec 19, 2025

Also leave the warning implemenntation in another PR if you want to do it. If not, I'm gonna just create an issue and leave it there.

Copilot AI review requested due to automatic review settings December 19, 2025 13:10
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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@btea
Copy link
Contributor Author

btea commented Dec 19, 2025

Also leave the warning implemenntation in another PR if you want to do it. If not, I'm gonna just create an issue and leave it there.

I don't want to deal with it in this PR; it seems more complicated than I expected. we could create an issue first.

@hyf0 hyf0 self-assigned this Dec 19, 2025
Copy link
Member

@hyf0 hyf0 left a comment

Choose a reason for hiding this comment

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

Thank you!

@hyf0 hyf0 changed the title fix: postBanner content should be after shebang fix: postBanner content should be placed after shebang Dec 20, 2025
Copilot AI review requested due to automatic review settings December 20, 2025 14:58
@hyf0 hyf0 force-pushed the fix/postBanner-should-be-after-shebang branch from 967615a to 2e9fc21 Compare December 20, 2025 14:58
@netlify
Copy link

netlify bot commented Dec 20, 2025

Deploy Preview for rolldown-rs ready!

Name Link
🔨 Latest commit 2abdd8c
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/6947877bdb201c000897e685
😎 Deploy Preview https://deploy-preview-7583--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.

@hyf0 hyf0 enabled auto-merge (squash) December 20, 2025 14:58
@hyf0
Copy link
Member

hyf0 commented Dec 21, 2025

Even I found #7608, I'm gonna merge the PR still, Because the issue will only happen when shebang exist andpostBanner got used.

@hyf0 hyf0 force-pushed the fix/postBanner-should-be-after-shebang branch from e172cdf to 2abdd8c Compare December 21, 2025 05:36
@hyf0 hyf0 merged commit 4946bc6 into rolldown:main Dec 21, 2025
30 checks passed
IWANABETHATGUY pushed a commit that referenced this pull request Dec 21, 2025
This PR contains the following updates:

| Package | Change |
[Age](https://docs.renovatebot.com/merge-confidence/) |
[Adoption](https://docs.renovatebot.com/merge-confidence/) |
[Passing](https://docs.renovatebot.com/merge-confidence/) |
[Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|---|---|
|
[rolldown-plugin-dts](https://redirect.github.com/sxzz/rolldown-plugin-dts)
| [`^0.18.0` ->
`^0.19.0`](https://renovatebot.com/diffs/npm/rolldown-plugin-dts/0.18.4/0.19.1)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/rolldown-plugin-dts/0.19.1?slim=true)
|
![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/rolldown-plugin-dts/0.19.1?slim=true)
|
![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/rolldown-plugin-dts/0.18.4/0.19.1?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/rolldown-plugin-dts/0.18.4/0.19.1?slim=true)
|

---

<details>
<summary>sxzz/rolldown-plugin-dts (rolldown-plugin-dts)</summary>

[`v0.19.1`](https://redirect.github.com/sxzz/rolldown-plugin-dts/releases/tag/v0.19.1)

[Compare
Source](https://redirect.github.com/sxzz/rolldown-plugin-dts/compare/v0.19.0...v0.19.1)

- Remove unused dep  -  by
[@&#8203;sxzz](https://redirect.github.com/sxzz)
[<samp>(430a0)</samp>](https://redirect.github.com/sxzz/rolldown-plugin-dts/commit/430a0b6)

GitHub](https://redirect.github.com/sxzz/rolldown-plugin-dts/compare/v0.19.0...v0.19.1)

[`v0.19.0`](https://redirect.github.com/sxzz/rolldown-plugin-dts/releases/tag/v0.19.0)

[Compare
Source](https://redirect.github.com/sxzz/rolldown-plugin-dts/compare/v0.18.4...v0.19.0)

- Drop `banner` / `footer`  -  by
[@&#8203;sxzz](https://redirect.github.com/sxzz)
[<samp>(56403)</samp>](https://redirect.github.com/sxzz/rolldown-plugin-dts/commit/5640374)

GitHub](https://redirect.github.com/sxzz/rolldown-plugin-dts/compare/v0.18.4...v0.19.0)

</details>

---

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/rolldown/rolldown).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi41OS4wIiwidXBkYXRlZEluVmVyIjoiNDIuNTkuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

fix: `postBanner` content should be placed after shebang (#7583)

The content generated by `postBanner` should be after the shebang;
otherwise, it will cause file errors.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Yunfei He <i.heyunfei@gmail.com>

fix(types): better "go to definition" experience for interface `OutputPlugin` (#7610)

Signed-off-by: Yunfei He <i.heyunfei@gmail.com>
Co-authored-by: Yunfei He <i.heyunfei@gmail.com>

fix(types): better "go to definition" experience for interface `OutputPlugin` (#7610)

Signed-off-by: Yunfei He <i.heyunfei@gmail.com>
Co-authored-by: Yunfei He <i.heyunfei@gmail.com>
IWANABETHATGUY pushed a commit that referenced this pull request Dec 21, 2025
This PR contains the following updates:

| Package | Change |
[Age](https://docs.renovatebot.com/merge-confidence/) |
[Adoption](https://docs.renovatebot.com/merge-confidence/) |
[Passing](https://docs.renovatebot.com/merge-confidence/) |
[Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|---|---|
|
[rolldown-plugin-dts](https://redirect.github.com/sxzz/rolldown-plugin-dts)
| [`^0.18.0` ->
`^0.19.0`](https://renovatebot.com/diffs/npm/rolldown-plugin-dts/0.18.4/0.19.1)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/rolldown-plugin-dts/0.19.1?slim=true)
|
![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/rolldown-plugin-dts/0.19.1?slim=true)
|
![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/rolldown-plugin-dts/0.18.4/0.19.1?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/rolldown-plugin-dts/0.18.4/0.19.1?slim=true)
|

---

<details>
<summary>sxzz/rolldown-plugin-dts (rolldown-plugin-dts)</summary>

[`v0.19.1`](https://redirect.github.com/sxzz/rolldown-plugin-dts/releases/tag/v0.19.1)

[Compare
Source](https://redirect.github.com/sxzz/rolldown-plugin-dts/compare/v0.19.0...v0.19.1)

- Remove unused dep  -  by
[@&#8203;sxzz](https://redirect.github.com/sxzz)
[<samp>(430a0)</samp>](https://redirect.github.com/sxzz/rolldown-plugin-dts/commit/430a0b6)

GitHub](https://redirect.github.com/sxzz/rolldown-plugin-dts/compare/v0.19.0...v0.19.1)

[`v0.19.0`](https://redirect.github.com/sxzz/rolldown-plugin-dts/releases/tag/v0.19.0)

[Compare
Source](https://redirect.github.com/sxzz/rolldown-plugin-dts/compare/v0.18.4...v0.19.0)

- Drop `banner` / `footer`  -  by
[@&#8203;sxzz](https://redirect.github.com/sxzz)
[<samp>(56403)</samp>](https://redirect.github.com/sxzz/rolldown-plugin-dts/commit/5640374)

GitHub](https://redirect.github.com/sxzz/rolldown-plugin-dts/compare/v0.18.4...v0.19.0)

</details>

---

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/rolldown/rolldown).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi41OS4wIiwidXBkYXRlZEluVmVyIjoiNDIuNTkuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

fix: `postBanner` content should be placed after shebang (#7583)

The content generated by `postBanner` should be after the shebang;
otherwise, it will cause file errors.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Yunfei He <i.heyunfei@gmail.com>

fix(types): better "go to definition" experience for interface `OutputPlugin` (#7610)

Signed-off-by: Yunfei He <i.heyunfei@gmail.com>
Co-authored-by: Yunfei He <i.heyunfei@gmail.com>

fix(types): better "go to definition" experience for interface `OutputPlugin` (#7610)

Signed-off-by: Yunfei He <i.heyunfei@gmail.com>
Co-authored-by: Yunfei He <i.heyunfei@gmail.com>
IWANABETHATGUY pushed a commit that referenced this pull request Dec 21, 2025
This PR contains the following updates:

| Package | Change |
[Age](https://docs.renovatebot.com/merge-confidence/) |
[Adoption](https://docs.renovatebot.com/merge-confidence/) |
[Passing](https://docs.renovatebot.com/merge-confidence/) |
[Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|---|---|
|
[rolldown-plugin-dts](https://redirect.github.com/sxzz/rolldown-plugin-dts)
| [`^0.18.0` ->
`^0.19.0`](https://renovatebot.com/diffs/npm/rolldown-plugin-dts/0.18.4/0.19.1)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/rolldown-plugin-dts/0.19.1?slim=true)
|
![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/rolldown-plugin-dts/0.19.1?slim=true)
|
![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/rolldown-plugin-dts/0.18.4/0.19.1?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/rolldown-plugin-dts/0.18.4/0.19.1?slim=true)
|

---

<details>
<summary>sxzz/rolldown-plugin-dts (rolldown-plugin-dts)</summary>

[`v0.19.1`](https://redirect.github.com/sxzz/rolldown-plugin-dts/releases/tag/v0.19.1)

[Compare
Source](https://redirect.github.com/sxzz/rolldown-plugin-dts/compare/v0.19.0...v0.19.1)

- Remove unused dep  -  by
[@&#8203;sxzz](https://redirect.github.com/sxzz)
[<samp>(430a0)</samp>](https://redirect.github.com/sxzz/rolldown-plugin-dts/commit/430a0b6)

GitHub](https://redirect.github.com/sxzz/rolldown-plugin-dts/compare/v0.19.0...v0.19.1)

[`v0.19.0`](https://redirect.github.com/sxzz/rolldown-plugin-dts/releases/tag/v0.19.0)

[Compare
Source](https://redirect.github.com/sxzz/rolldown-plugin-dts/compare/v0.18.4...v0.19.0)

- Drop `banner` / `footer`  -  by
[@&#8203;sxzz](https://redirect.github.com/sxzz)
[<samp>(56403)</samp>](https://redirect.github.com/sxzz/rolldown-plugin-dts/commit/5640374)

GitHub](https://redirect.github.com/sxzz/rolldown-plugin-dts/compare/v0.18.4...v0.19.0)

</details>

---

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/rolldown/rolldown).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi41OS4wIiwidXBkYXRlZEluVmVyIjoiNDIuNTkuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

fix: `postBanner` content should be placed after shebang (#7583)

The content generated by `postBanner` should be after the shebang;
otherwise, it will cause file errors.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Yunfei He <i.heyunfei@gmail.com>

fix(types): better "go to definition" experience for interface `OutputPlugin` (#7610)

Signed-off-by: Yunfei He <i.heyunfei@gmail.com>
Co-authored-by: Yunfei He <i.heyunfei@gmail.com>

fix(types): better "go to definition" experience for interface `OutputPlugin` (#7610)

Signed-off-by: Yunfei He <i.heyunfei@gmail.com>
Co-authored-by: Yunfei He <i.heyunfei@gmail.com>
IWANABETHATGUY pushed a commit that referenced this pull request Dec 21, 2025
This PR contains the following updates:

| Package | Change |
[Age](https://docs.renovatebot.com/merge-confidence/) |
[Adoption](https://docs.renovatebot.com/merge-confidence/) |
[Passing](https://docs.renovatebot.com/merge-confidence/) |
[Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|---|---|
|
[rolldown-plugin-dts](https://redirect.github.com/sxzz/rolldown-plugin-dts)
| [`^0.18.0` ->
`^0.19.0`](https://renovatebot.com/diffs/npm/rolldown-plugin-dts/0.18.4/0.19.1)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/rolldown-plugin-dts/0.19.1?slim=true)
|
![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/rolldown-plugin-dts/0.19.1?slim=true)
|
![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/rolldown-plugin-dts/0.18.4/0.19.1?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/rolldown-plugin-dts/0.18.4/0.19.1?slim=true)
|

---

<details>
<summary>sxzz/rolldown-plugin-dts (rolldown-plugin-dts)</summary>

[`v0.19.1`](https://redirect.github.com/sxzz/rolldown-plugin-dts/releases/tag/v0.19.1)

[Compare
Source](https://redirect.github.com/sxzz/rolldown-plugin-dts/compare/v0.19.0...v0.19.1)

- Remove unused dep  -  by
[@&#8203;sxzz](https://redirect.github.com/sxzz)
[<samp>(430a0)</samp>](https://redirect.github.com/sxzz/rolldown-plugin-dts/commit/430a0b6)

GitHub](https://redirect.github.com/sxzz/rolldown-plugin-dts/compare/v0.19.0...v0.19.1)

[`v0.19.0`](https://redirect.github.com/sxzz/rolldown-plugin-dts/releases/tag/v0.19.0)

[Compare
Source](https://redirect.github.com/sxzz/rolldown-plugin-dts/compare/v0.18.4...v0.19.0)

- Drop `banner` / `footer`  -  by
[@&#8203;sxzz](https://redirect.github.com/sxzz)
[<samp>(56403)</samp>](https://redirect.github.com/sxzz/rolldown-plugin-dts/commit/5640374)

GitHub](https://redirect.github.com/sxzz/rolldown-plugin-dts/compare/v0.18.4...v0.19.0)

</details>

---

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/rolldown/rolldown).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi41OS4wIiwidXBkYXRlZEluVmVyIjoiNDIuNTkuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

fix: `postBanner` content should be placed after shebang (#7583)

The content generated by `postBanner` should be after the shebang;
otherwise, it will cause file errors.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Yunfei He <i.heyunfei@gmail.com>

fix(types): better "go to definition" experience for interface `OutputPlugin` (#7610)

Signed-off-by: Yunfei He <i.heyunfei@gmail.com>
Co-authored-by: Yunfei He <i.heyunfei@gmail.com>

fix(types): better "go to definition" experience for interface `OutputPlugin` (#7610)

Signed-off-by: Yunfei He <i.heyunfei@gmail.com>
Co-authored-by: Yunfei He <i.heyunfei@gmail.com>
IWANABETHATGUY pushed a commit that referenced this pull request Dec 21, 2025
This PR contains the following updates:

| Package | Change |
[Age](https://docs.renovatebot.com/merge-confidence/) |
[Adoption](https://docs.renovatebot.com/merge-confidence/) |
[Passing](https://docs.renovatebot.com/merge-confidence/) |
[Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|---|---|
|
[rolldown-plugin-dts](https://redirect.github.com/sxzz/rolldown-plugin-dts)
| [`^0.18.0` ->
`^0.19.0`](https://renovatebot.com/diffs/npm/rolldown-plugin-dts/0.18.4/0.19.1)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/rolldown-plugin-dts/0.19.1?slim=true)
|
![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/rolldown-plugin-dts/0.19.1?slim=true)
|
![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/rolldown-plugin-dts/0.18.4/0.19.1?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/rolldown-plugin-dts/0.18.4/0.19.1?slim=true)
|

---

<details>
<summary>sxzz/rolldown-plugin-dts (rolldown-plugin-dts)</summary>

[`v0.19.1`](https://redirect.github.com/sxzz/rolldown-plugin-dts/releases/tag/v0.19.1)

[Compare
Source](https://redirect.github.com/sxzz/rolldown-plugin-dts/compare/v0.19.0...v0.19.1)

- Remove unused dep  -  by
[@&#8203;sxzz](https://redirect.github.com/sxzz)
[<samp>(430a0)</samp>](https://redirect.github.com/sxzz/rolldown-plugin-dts/commit/430a0b6)

GitHub](https://redirect.github.com/sxzz/rolldown-plugin-dts/compare/v0.19.0...v0.19.1)

[`v0.19.0`](https://redirect.github.com/sxzz/rolldown-plugin-dts/releases/tag/v0.19.0)

[Compare
Source](https://redirect.github.com/sxzz/rolldown-plugin-dts/compare/v0.18.4...v0.19.0)

- Drop `banner` / `footer`  -  by
[@&#8203;sxzz](https://redirect.github.com/sxzz)
[<samp>(56403)</samp>](https://redirect.github.com/sxzz/rolldown-plugin-dts/commit/5640374)

GitHub](https://redirect.github.com/sxzz/rolldown-plugin-dts/compare/v0.18.4...v0.19.0)

</details>

---

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/rolldown/rolldown).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi41OS4wIiwidXBkYXRlZEluVmVyIjoiNDIuNTkuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

fix: `postBanner` content should be placed after shebang (#7583)

The content generated by `postBanner` should be after the shebang;
otherwise, it will cause file errors.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Yunfei He <i.heyunfei@gmail.com>

fix(types): better "go to definition" experience for interface `OutputPlugin` (#7610)

Signed-off-by: Yunfei He <i.heyunfei@gmail.com>
Co-authored-by: Yunfei He <i.heyunfei@gmail.com>

fix(types): better "go to definition" experience for interface `OutputPlugin` (#7610)

Signed-off-by: Yunfei He <i.heyunfei@gmail.com>
Co-authored-by: Yunfei He <i.heyunfei@gmail.com>
IWANABETHATGUY pushed a commit that referenced this pull request Dec 21, 2025
This PR contains the following updates:

| Package | Change |
[Age](https://docs.renovatebot.com/merge-confidence/) |
[Adoption](https://docs.renovatebot.com/merge-confidence/) |
[Passing](https://docs.renovatebot.com/merge-confidence/) |
[Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|---|---|
|
[rolldown-plugin-dts](https://redirect.github.com/sxzz/rolldown-plugin-dts)
| [`^0.18.0` ->
`^0.19.0`](https://renovatebot.com/diffs/npm/rolldown-plugin-dts/0.18.4/0.19.1)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/rolldown-plugin-dts/0.19.1?slim=true)
|
![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/rolldown-plugin-dts/0.19.1?slim=true)
|
![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/rolldown-plugin-dts/0.18.4/0.19.1?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/rolldown-plugin-dts/0.18.4/0.19.1?slim=true)
|

---

<details>
<summary>sxzz/rolldown-plugin-dts (rolldown-plugin-dts)</summary>

[`v0.19.1`](https://redirect.github.com/sxzz/rolldown-plugin-dts/releases/tag/v0.19.1)

[Compare
Source](https://redirect.github.com/sxzz/rolldown-plugin-dts/compare/v0.19.0...v0.19.1)

- Remove unused dep  -  by
[@&#8203;sxzz](https://redirect.github.com/sxzz)
[<samp>(430a0)</samp>](https://redirect.github.com/sxzz/rolldown-plugin-dts/commit/430a0b6)

GitHub](https://redirect.github.com/sxzz/rolldown-plugin-dts/compare/v0.19.0...v0.19.1)

[`v0.19.0`](https://redirect.github.com/sxzz/rolldown-plugin-dts/releases/tag/v0.19.0)

[Compare
Source](https://redirect.github.com/sxzz/rolldown-plugin-dts/compare/v0.18.4...v0.19.0)

- Drop `banner` / `footer`  -  by
[@&#8203;sxzz](https://redirect.github.com/sxzz)
[<samp>(56403)</samp>](https://redirect.github.com/sxzz/rolldown-plugin-dts/commit/5640374)

GitHub](https://redirect.github.com/sxzz/rolldown-plugin-dts/compare/v0.18.4...v0.19.0)

</details>

---

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/rolldown/rolldown).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi41OS4wIiwidXBkYXRlZEluVmVyIjoiNDIuNTkuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

fix: `postBanner` content should be placed after shebang (#7583)

The content generated by `postBanner` should be after the shebang;
otherwise, it will cause file errors.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Yunfei He <i.heyunfei@gmail.com>

fix(types): better "go to definition" experience for interface `OutputPlugin` (#7610)

Signed-off-by: Yunfei He <i.heyunfei@gmail.com>
Co-authored-by: Yunfei He <i.heyunfei@gmail.com>

fix(types): better "go to definition" experience for interface `OutputPlugin` (#7610)

Signed-off-by: Yunfei He <i.heyunfei@gmail.com>
Co-authored-by: Yunfei He <i.heyunfei@gmail.com>
IWANABETHATGUY pushed a commit that referenced this pull request Dec 21, 2025
This PR contains the following updates:

| Package | Change |
[Age](https://docs.renovatebot.com/merge-confidence/) |
[Adoption](https://docs.renovatebot.com/merge-confidence/) |
[Passing](https://docs.renovatebot.com/merge-confidence/) |
[Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|---|---|
|
[rolldown-plugin-dts](https://redirect.github.com/sxzz/rolldown-plugin-dts)
| [`^0.18.0` ->
`^0.19.0`](https://renovatebot.com/diffs/npm/rolldown-plugin-dts/0.18.4/0.19.1)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/rolldown-plugin-dts/0.19.1?slim=true)
|
![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/rolldown-plugin-dts/0.19.1?slim=true)
|
![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/rolldown-plugin-dts/0.18.4/0.19.1?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/rolldown-plugin-dts/0.18.4/0.19.1?slim=true)
|

---

<details>
<summary>sxzz/rolldown-plugin-dts (rolldown-plugin-dts)</summary>

[`v0.19.1`](https://redirect.github.com/sxzz/rolldown-plugin-dts/releases/tag/v0.19.1)

[Compare
Source](https://redirect.github.com/sxzz/rolldown-plugin-dts/compare/v0.19.0...v0.19.1)

- Remove unused dep  -  by
[@&#8203;sxzz](https://redirect.github.com/sxzz)
[<samp>(430a0)</samp>](https://redirect.github.com/sxzz/rolldown-plugin-dts/commit/430a0b6)

GitHub](https://redirect.github.com/sxzz/rolldown-plugin-dts/compare/v0.19.0...v0.19.1)

[`v0.19.0`](https://redirect.github.com/sxzz/rolldown-plugin-dts/releases/tag/v0.19.0)

[Compare
Source](https://redirect.github.com/sxzz/rolldown-plugin-dts/compare/v0.18.4...v0.19.0)

- Drop `banner` / `footer`  -  by
[@&#8203;sxzz](https://redirect.github.com/sxzz)
[<samp>(56403)</samp>](https://redirect.github.com/sxzz/rolldown-plugin-dts/commit/5640374)

GitHub](https://redirect.github.com/sxzz/rolldown-plugin-dts/compare/v0.18.4...v0.19.0)

</details>

---

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/rolldown/rolldown).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi41OS4wIiwidXBkYXRlZEluVmVyIjoiNDIuNTkuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

fix: `postBanner` content should be placed after shebang (#7583)

The content generated by `postBanner` should be after the shebang;
otherwise, it will cause file errors.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Yunfei He <i.heyunfei@gmail.com>

fix(types): better "go to definition" experience for interface `OutputPlugin` (#7610)

Signed-off-by: Yunfei He <i.heyunfei@gmail.com>
Co-authored-by: Yunfei He <i.heyunfei@gmail.com>

fix(types): better "go to definition" experience for interface `OutputPlugin` (#7610)

Signed-off-by: Yunfei He <i.heyunfei@gmail.com>
Co-authored-by: Yunfei He <i.heyunfei@gmail.com>
@btea btea deleted the fix/postBanner-should-be-after-shebang branch December 22, 2025 01:05
IWANABETHATGUY pushed a commit that referenced this pull request Dec 22, 2025
This PR contains the following updates:

| Package | Change |
[Age](https://docs.renovatebot.com/merge-confidence/) |
[Adoption](https://docs.renovatebot.com/merge-confidence/) |
[Passing](https://docs.renovatebot.com/merge-confidence/) |
[Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|---|---|
|
[rolldown-plugin-dts](https://redirect.github.com/sxzz/rolldown-plugin-dts)
| [`^0.18.0` ->
`^0.19.0`](https://renovatebot.com/diffs/npm/rolldown-plugin-dts/0.18.4/0.19.1)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/rolldown-plugin-dts/0.19.1?slim=true)
|
![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/rolldown-plugin-dts/0.19.1?slim=true)
|
![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/rolldown-plugin-dts/0.18.4/0.19.1?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/rolldown-plugin-dts/0.18.4/0.19.1?slim=true)
|

---

<details>
<summary>sxzz/rolldown-plugin-dts (rolldown-plugin-dts)</summary>

[`v0.19.1`](https://redirect.github.com/sxzz/rolldown-plugin-dts/releases/tag/v0.19.1)

[Compare
Source](https://redirect.github.com/sxzz/rolldown-plugin-dts/compare/v0.19.0...v0.19.1)

- Remove unused dep  -  by
[@&#8203;sxzz](https://redirect.github.com/sxzz)
[<samp>(430a0)</samp>](https://redirect.github.com/sxzz/rolldown-plugin-dts/commit/430a0b6)

GitHub](https://redirect.github.com/sxzz/rolldown-plugin-dts/compare/v0.19.0...v0.19.1)

[`v0.19.0`](https://redirect.github.com/sxzz/rolldown-plugin-dts/releases/tag/v0.19.0)

[Compare
Source](https://redirect.github.com/sxzz/rolldown-plugin-dts/compare/v0.18.4...v0.19.0)

- Drop `banner` / `footer`  -  by
[@&#8203;sxzz](https://redirect.github.com/sxzz)
[<samp>(56403)</samp>](https://redirect.github.com/sxzz/rolldown-plugin-dts/commit/5640374)

GitHub](https://redirect.github.com/sxzz/rolldown-plugin-dts/compare/v0.18.4...v0.19.0)

</details>

---

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/rolldown/rolldown).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi41OS4wIiwidXBkYXRlZEluVmVyIjoiNDIuNTkuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

fix: `postBanner` content should be placed after shebang (#7583)

The content generated by `postBanner` should be after the shebang;
otherwise, it will cause file errors.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Yunfei He <i.heyunfei@gmail.com>

fix(types): better "go to definition" experience for interface `OutputPlugin` (#7610)

Signed-off-by: Yunfei He <i.heyunfei@gmail.com>
Co-authored-by: Yunfei He <i.heyunfei@gmail.com>

fix(types): better "go to definition" experience for interface `OutputPlugin` (#7610)

Signed-off-by: Yunfei He <i.heyunfei@gmail.com>
Co-authored-by: Yunfei He <i.heyunfei@gmail.com>
shulaoda added a commit that referenced this pull request Dec 22, 2025
## [1.0.0-beta.56] - 2025-12-22

### 💥 BREAKING CHANGES

- rename `MIXED_EXPORT` error to `MIXED_EXPORTS` (#7565) by @sapphi-red

### 🚀 Features

- rename `id` property to `exporter` in CIRCULAR_REEXPORT error (#7592) by @sapphi-red
- add `ids` property to `CIRCULAR_DEPENDENCY` error (#7591) by @sapphi-red
- node/dev: expose `devMode.lazy` (#7549) by @hyf0
- set log and pos properties for `parseAst` function errors (#7568) by @sapphi-red
- set log and pos properties for logs (#7567) by @sapphi-red
- test-dev-sever: support to manually configure port, run tests in concurrent (#7576) by @hyf0
- add `exporter` property to `MISSING_EXPORT` error (#7564) by @sapphi-red
- add `id` property to `PARSE_ERROR` error (#7563) by @sapphi-red
- support ImporterId hook filter (#7540) by @IWANABETHATGUY

### 🐛 Bug Fixes

- types: better "go to definition" experience for interface `OutputPlugin` (#7610) by @KazariEX
- `postBanner` content should be placed after shebang (#7583) by @btea
- use sanitized filename for preserve modules chunk name (#7603) by @IWANABETHATGUY
- correct filter out unused cjs namespace  (#7602) by @IWANABETHATGUY
- watch: property respect `notify.pollInternal` and `notify.compareContents` (#7595) by @sapphi-red
- make `cleanDir` work with default output directory (#7579) by @shulaoda
- merge `MISSING_NAME_OPTION_FOR_UMD_EXPORT` error to `MISSING_NAME_OPTION_FOR_IIFE_EXPORT` error (#7566) by @sapphi-red
- dev/hmr: ensure cjs modules with no exports reference correct `module` identifier (#7544) by @leegeunhyeok

### 🚜 Refactor

- remove `stable_id` field from `PARSE_ERROR` error (#7593) by @sapphi-red
- make include_runtime_symbol reuseable after linking stage (#7580) by @IWANABETHATGUY
- rust/dev: construct the bundler within itself (#7553) by @hyf0
- rust/watcher: polish API of `Watcher` struct (#7551) by @hyf0
- use `LinkingMetadata::stmt_info_included` to check if a stmt_info is included (#7572) by @IWANABETHATGUY
- use `LinkingMetadata::is_included` to check if a module is included (#7571) by @IWANABETHATGUY
- store module and stmt_info is included info to module meta (#7570) by @IWANABETHATGUY
- make include_* method reunsable after linking stage (#7552) by @IWANABETHATGUY
- rust/watcher: construct the bundler within watcher itself (#7550) by @hyf0
- extract make include_runtime_symbol reusable (#7546) by @IWANABETHATGUY

### ⚙️ Miscellaneous Tasks

- renovate: add `kill-port` in `ignoreDeps` in renovate.json (#7619) by @sapphi-red
- deps: update rust crates (#7617) by @renovate[bot]
- deps: update npm packages (#7616) by @renovate[bot]
- deps: update github-actions (#7615) by @renovate[bot]
- ci: skip benchmark workflows on draft PRs (#7611) by @Copilot
- deps: update dependency rolldown-plugin-dts to ^0.19.0 (#7607) by @renovate[bot]
- deps: update dependency oxlint-tsgolint to v0.10.0 (#7601) by @renovate[bot]
- deps: update dependency rolldown-plugin-dts to v0.18.4 (#7599) by @renovate[bot]
- deps: update notify (#7594) by @sapphi-red
- test-dev-server: add retry mechanism to hmr-full-bundle-mode tests (#7588) by @Copilot
- deps: update napi to v3.7.1 (#7590) by @renovate[bot]
- add JSDoc documentation for memfs type (#7587) by @Copilot
- deps: update dependency oxlint to v1.34.0 (#7589) by @renovate[bot]
- move some tests in ignored-by-unsupported-features that are passing (#7569) by @sapphi-red
- deps: update dependency oxlint-tsgolint to v0.9.2 (#7582) by @renovate[bot]
- deps: update oxc resolver to v11.16.0 (#7574) by @renovate[bot]
- test/dev-server: don't run `pnpm install` during tests (#7560) by @hyf0
- test/dev-server: use `kill-port@1` to improve performance (#7575) by @hyf0
- normalize error object to make some Rollup tests pass (#7562) by @sapphi-red
- ci: separate dev-server(hmr) tests and normal tests (#7558) by @hyf0
- ci: make native rolldown build reusable (#7557) by @hyf0
- resolve some TODOs (#7561) by @sapphi-red

### ❤️ New Contributors

* @KazariEX made their first contribution in [#7610](#7610)
* @leegeunhyeok made their first contribution in [#7544](#7544)

Co-authored-by: shulaoda <165626830+shulaoda@users.noreply.github.com>
IWANABETHATGUY pushed a commit that referenced this pull request Dec 22, 2025
This PR contains the following updates:

| Package | Change |
[Age](https://docs.renovatebot.com/merge-confidence/) |
[Adoption](https://docs.renovatebot.com/merge-confidence/) |
[Passing](https://docs.renovatebot.com/merge-confidence/) |
[Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|---|---|
|
[rolldown-plugin-dts](https://redirect.github.com/sxzz/rolldown-plugin-dts)
| [`^0.18.0` ->
`^0.19.0`](https://renovatebot.com/diffs/npm/rolldown-plugin-dts/0.18.4/0.19.1)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/rolldown-plugin-dts/0.19.1?slim=true)
|
![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/rolldown-plugin-dts/0.19.1?slim=true)
|
![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/rolldown-plugin-dts/0.18.4/0.19.1?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/rolldown-plugin-dts/0.18.4/0.19.1?slim=true)
|

---

<details>
<summary>sxzz/rolldown-plugin-dts (rolldown-plugin-dts)</summary>

[`v0.19.1`](https://redirect.github.com/sxzz/rolldown-plugin-dts/releases/tag/v0.19.1)

[Compare
Source](https://redirect.github.com/sxzz/rolldown-plugin-dts/compare/v0.19.0...v0.19.1)

- Remove unused dep  -  by
[@&#8203;sxzz](https://redirect.github.com/sxzz)
[<samp>(430a0)</samp>](https://redirect.github.com/sxzz/rolldown-plugin-dts/commit/430a0b6)

GitHub](https://redirect.github.com/sxzz/rolldown-plugin-dts/compare/v0.19.0...v0.19.1)

[`v0.19.0`](https://redirect.github.com/sxzz/rolldown-plugin-dts/releases/tag/v0.19.0)

[Compare
Source](https://redirect.github.com/sxzz/rolldown-plugin-dts/compare/v0.18.4...v0.19.0)

- Drop `banner` / `footer`  -  by
[@&#8203;sxzz](https://redirect.github.com/sxzz)
[<samp>(56403)</samp>](https://redirect.github.com/sxzz/rolldown-plugin-dts/commit/5640374)

GitHub](https://redirect.github.com/sxzz/rolldown-plugin-dts/compare/v0.18.4...v0.19.0)

</details>

---

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/rolldown/rolldown).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi41OS4wIiwidXBkYXRlZEluVmVyIjoiNDIuNTkuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

fix: `postBanner` content should be placed after shebang (#7583)

The content generated by `postBanner` should be after the shebang;
otherwise, it will cause file errors.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Yunfei He <i.heyunfei@gmail.com>

fix(types): better "go to definition" experience for interface `OutputPlugin` (#7610)

Signed-off-by: Yunfei He <i.heyunfei@gmail.com>
Co-authored-by: Yunfei He <i.heyunfei@gmail.com>

fix(types): better "go to definition" experience for interface `OutputPlugin` (#7610)

Signed-off-by: Yunfei He <i.heyunfei@gmail.com>
Co-authored-by: Yunfei He <i.heyunfei@gmail.com>
IWANABETHATGUY pushed a commit that referenced this pull request Dec 22, 2025
This PR contains the following updates:

| Package | Change |
[Age](https://docs.renovatebot.com/merge-confidence/) |
[Adoption](https://docs.renovatebot.com/merge-confidence/) |
[Passing](https://docs.renovatebot.com/merge-confidence/) |
[Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|---|---|
|
[rolldown-plugin-dts](https://redirect.github.com/sxzz/rolldown-plugin-dts)
| [`^0.18.0` ->
`^0.19.0`](https://renovatebot.com/diffs/npm/rolldown-plugin-dts/0.18.4/0.19.1)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/rolldown-plugin-dts/0.19.1?slim=true)
|
![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/rolldown-plugin-dts/0.19.1?slim=true)
|
![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/rolldown-plugin-dts/0.18.4/0.19.1?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/rolldown-plugin-dts/0.18.4/0.19.1?slim=true)
|

---

<details>
<summary>sxzz/rolldown-plugin-dts (rolldown-plugin-dts)</summary>

[`v0.19.1`](https://redirect.github.com/sxzz/rolldown-plugin-dts/releases/tag/v0.19.1)

[Compare
Source](https://redirect.github.com/sxzz/rolldown-plugin-dts/compare/v0.19.0...v0.19.1)

- Remove unused dep  -  by
[@&#8203;sxzz](https://redirect.github.com/sxzz)
[<samp>(430a0)</samp>](https://redirect.github.com/sxzz/rolldown-plugin-dts/commit/430a0b6)

GitHub](https://redirect.github.com/sxzz/rolldown-plugin-dts/compare/v0.19.0...v0.19.1)

[`v0.19.0`](https://redirect.github.com/sxzz/rolldown-plugin-dts/releases/tag/v0.19.0)

[Compare
Source](https://redirect.github.com/sxzz/rolldown-plugin-dts/compare/v0.18.4...v0.19.0)

- Drop `banner` / `footer`  -  by
[@&#8203;sxzz](https://redirect.github.com/sxzz)
[<samp>(56403)</samp>](https://redirect.github.com/sxzz/rolldown-plugin-dts/commit/5640374)

GitHub](https://redirect.github.com/sxzz/rolldown-plugin-dts/compare/v0.18.4...v0.19.0)

</details>

---

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/rolldown/rolldown).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi41OS4wIiwidXBkYXRlZEluVmVyIjoiNDIuNTkuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

fix: `postBanner` content should be placed after shebang (#7583)

The content generated by `postBanner` should be after the shebang;
otherwise, it will cause file errors.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Yunfei He <i.heyunfei@gmail.com>

fix(types): better "go to definition" experience for interface `OutputPlugin` (#7610)

Signed-off-by: Yunfei He <i.heyunfei@gmail.com>
Co-authored-by: Yunfei He <i.heyunfei@gmail.com>

fix(types): better "go to definition" experience for interface `OutputPlugin` (#7610)

Signed-off-by: Yunfei He <i.heyunfei@gmail.com>
Co-authored-by: Yunfei He <i.heyunfei@gmail.com>
IWANABETHATGUY pushed a commit that referenced this pull request Dec 22, 2025
This PR contains the following updates:

| Package | Change |
[Age](https://docs.renovatebot.com/merge-confidence/) |
[Adoption](https://docs.renovatebot.com/merge-confidence/) |
[Passing](https://docs.renovatebot.com/merge-confidence/) |
[Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|---|---|
|
[rolldown-plugin-dts](https://redirect.github.com/sxzz/rolldown-plugin-dts)
| [`^0.18.0` ->
`^0.19.0`](https://renovatebot.com/diffs/npm/rolldown-plugin-dts/0.18.4/0.19.1)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/rolldown-plugin-dts/0.19.1?slim=true)
|
![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/rolldown-plugin-dts/0.19.1?slim=true)
|
![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/rolldown-plugin-dts/0.18.4/0.19.1?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/rolldown-plugin-dts/0.18.4/0.19.1?slim=true)
|

---

<details>
<summary>sxzz/rolldown-plugin-dts (rolldown-plugin-dts)</summary>

[`v0.19.1`](https://redirect.github.com/sxzz/rolldown-plugin-dts/releases/tag/v0.19.1)

[Compare
Source](https://redirect.github.com/sxzz/rolldown-plugin-dts/compare/v0.19.0...v0.19.1)

- Remove unused dep  -  by
[@&#8203;sxzz](https://redirect.github.com/sxzz)
[<samp>(430a0)</samp>](https://redirect.github.com/sxzz/rolldown-plugin-dts/commit/430a0b6)

GitHub](https://redirect.github.com/sxzz/rolldown-plugin-dts/compare/v0.19.0...v0.19.1)

[`v0.19.0`](https://redirect.github.com/sxzz/rolldown-plugin-dts/releases/tag/v0.19.0)

[Compare
Source](https://redirect.github.com/sxzz/rolldown-plugin-dts/compare/v0.18.4...v0.19.0)

- Drop `banner` / `footer`  -  by
[@&#8203;sxzz](https://redirect.github.com/sxzz)
[<samp>(56403)</samp>](https://redirect.github.com/sxzz/rolldown-plugin-dts/commit/5640374)

GitHub](https://redirect.github.com/sxzz/rolldown-plugin-dts/compare/v0.18.4...v0.19.0)

</details>

---

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/rolldown/rolldown).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi41OS4wIiwidXBkYXRlZEluVmVyIjoiNDIuNTkuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

fix: `postBanner` content should be placed after shebang (#7583)

The content generated by `postBanner` should be after the shebang;
otherwise, it will cause file errors.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Yunfei He <i.heyunfei@gmail.com>

fix(types): better "go to definition" experience for interface `OutputPlugin` (#7610)

Signed-off-by: Yunfei He <i.heyunfei@gmail.com>
Co-authored-by: Yunfei He <i.heyunfei@gmail.com>

fix(types): better "go to definition" experience for interface `OutputPlugin` (#7610)

Signed-off-by: Yunfei He <i.heyunfei@gmail.com>
Co-authored-by: Yunfei He <i.heyunfei@gmail.com>
graphite-app bot pushed a commit that referenced this pull request Jan 26, 2026
## Summary

Implements the feature requested in #7583 (comment)

This PR adds a warning when both the source code and `postBanner` contain shebang lines.

## Changes

- [x] Add `DuplicateShebang` event kind to `EventKind` enum
- [x] Create new `duplicate_shebang.rs` event module
- [x] Update `mod.rs` to export the new event
- [x] Update `constructors.rs` to add constructor for DuplicateShebang
- [x] Modify `post_banner_footer.rs` to detect duplicate shebangs and emit warning
- [x] Add test case for duplicate shebang scenario
- [x] Run tests to verify the implementation - ✅ All tests pass
- [x] Run code review and address feedback
- [x] Address PR review feedback
- [x] Run format and generator
- [x] Fix lint and update CLI snapshot
- [x] Update JS snapshots
- [x] Fix test to run sequentially

## Behavior

When both source code and `postBanner` contain shebang:
- ✅ Original shebang preserved as first line
- ✅ postBanner placed after shebang (per PR #7583)
- ✅ Warning emitted: `[DUPLICATE_SHEBANG] Warning: Both the code and postBanner contain shebang in "main.js". This will cause a syntax error.`

## Example

**Input file:**
```javascript
#!/usr/bin/env node
console.log('hello');
```

**postBanner:**
```javascript
#!/usr/bin/env bun
/* Version 1.0.0 */
```

**Output:**
```javascript
#!/usr/bin/env node
#!/usr/bin/env bun
/* Version 1.0.0 */
console.log('hello');
```

**Warning:**
```
[DUPLICATE_SHEBANG] Warning: Both the code and postBanner contain shebang in "main.js". This will cause a syntax error.
```

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

💬 We'd love your input! Share your thoughts on Copilot coding agent in our [2 minute survey](https://gh.io/copilot-coding-agent-survey).
graphite-app bot pushed a commit that referenced this pull request Jan 26, 2026
## Summary

Implements the feature requested in #7583 (comment)

This PR adds a warning when both the source code and `postBanner` contain shebang lines.

## Changes

- [x] Add `DuplicateShebang` event kind to `EventKind` enum
- [x] Create new `duplicate_shebang.rs` event module
- [x] Update `mod.rs` to export the new event
- [x] Update `constructors.rs` to add constructor for DuplicateShebang
- [x] Modify `post_banner_footer.rs` to detect duplicate shebangs and emit warning
- [x] Add test case for duplicate shebang scenario
- [x] Run tests to verify the implementation - ✅ All tests pass
- [x] Run code review and address feedback
- [x] Address PR review feedback
- [x] Run format and generator
- [x] Fix lint and update CLI snapshot
- [x] Update JS snapshots
- [x] Fix test to run sequentially

## Behavior

When both source code and `postBanner` contain shebang:
- ✅ Original shebang preserved as first line
- ✅ postBanner placed after shebang (per PR #7583)
- ✅ Warning emitted: `[DUPLICATE_SHEBANG] Warning: Both the code and postBanner contain shebang in "main.js". This will cause a syntax error.`

## Example

**Input file:**
```javascript
#!/usr/bin/env node
console.log('hello');
```

**postBanner:**
```javascript
#!/usr/bin/env bun
/* Version 1.0.0 */
```

**Output:**
```javascript
#!/usr/bin/env node
#!/usr/bin/env bun
/* Version 1.0.0 */
console.log('hello');
```

**Warning:**
```
[DUPLICATE_SHEBANG] Warning: Both the code and postBanner contain shebang in "main.js". This will cause a syntax error.
```

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

💬 We'd love your input! Share your thoughts on Copilot coding agent in our [2 minute survey](https://gh.io/copilot-coding-agent-survey).
shulaoda added a commit that referenced this pull request Feb 26, 2026
…ang (#8459)

When `postBanner`/`postFooter` is combined with a source file containing
a shebang, the output sourcemap's generated line numbers are off by 1.

**Root cause**: `post_banner_footer` splits chunk content into the
shebang and `rest_content`, attaching the original sourcemap to
`rest_content`. The sourcemap was generated for the full content
(shebang at line 0), so all token `dst_line` values are 1-indexed
relative to `rest_content`. `SourceJoiner`'s `line_offset` then
compounds the error rather than correcting it.

**Changes**

- **`crates/rolldown_sourcemap/src/lib.rs`**: Add
`adjust_sourcemap_dst_lines(sourcemap, subtract)` — creates an adjusted
sourcemap with all token `dst_line` values decremented by `subtract`.
- **`crates/rolldown/src/stages/generate_stage/post_banner_footer.rs`**:
When a shebang is present and a sourcemap exists, call
`adjust_sourcemap_dst_lines(source_map, 1)` before handing the map to
`SourceJoiner`, so the map is correctly anchored to `rest_content`'s
line 0.
-
**`packages/rolldown/tests/fixtures/function/post-banner/sourcemap-with-shebang/`**:
New test fixture asserting correct sourcemap mappings when `postBanner`
is used with a shebang-bearing entry.

**Example** — with `postBanner: '/* banner */'` and entry
`#!/usr/bin/env node\nconsole.log('hello');`:

```
Line 0: #!/usr/bin/env node      ← shebang
Line 1: /* banner */             ← postBanner
Line 2: //#region ...
Line 3: console.log("hello");    ← sourcemap must point here, not line 4
```

Before the fix the sourcemap mapped `console.log` to line 4; after the
fix it correctly maps to line 3.

<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> 
> ----
> 
> *This section details on the original issue you should resolve*
> 
> <issue_title>Follow up issues of `postBanner/Footer`</issue_title>
> <issue_description>Caused by
#7583
> 
> - [ ] Incorrect sourcemap
#7583 (comment)
> - [x] Warning for duplicate shebang
https://github.com/rolldown/rolldown/pull/7583#issuecomment-3674790202</issue_description>
> 
> <agent_instructions>Correct the incorrect postBanner/Footer
sourcemap</agent_instructions>
> 
> ## Comments on the Issue (you are @copilot in this section)
> 
> <comments>
> <comment_new><author>@hyf0</author><body>
> > I tried the latest version and found that there were extra blank
lines between `postBanner` and shebang in the output.
[example](https://stackblitz.com/edit/vitejs-vite-zl8hy4bz?file=package.json)
> 
> Feel free to open a PR to fix it.</body></comment_new>
> </comments>
> 


</details>



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

- Fixes #7608

<!-- 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.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
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