Skip to content

docs(en): merge rollup/master into rollup-docs-cn/master @ 70ef1cce #172

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Mar 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-and-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ jobs:
name: bindings-${{ matrix.settings.target }}
path: dist/
- name: Run Smoke Test
uses: uraimo/run-on-arch-action@v2
uses: uraimo/run-on-arch-action@v3
with:
arch: ${{ matrix.settings.arch }}
distro: ${{ matrix.settings.distro }}
Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# rollup changelog

## 4.35.0

_2025-03-08_

### Features

- Pass build errors to the closeBundle hook (#5867)

### Pull Requests

- [#5852](https://github.com/rollup/rollup/pull/5852): chore(deps): update dependency eslint-plugin-unicorn to v57 (@renovate[bot], @lukastaegert)
- [#5862](https://github.com/rollup/rollup/pull/5862): fix(deps): update swc monorepo (major) (@renovate[bot], @lukastaegert)
- [#5867](https://github.com/rollup/rollup/pull/5867): feat(5858): make closeBundle hook receive the last error (@GauBen)
- [#5872](https://github.com/rollup/rollup/pull/5872): chore(deps): update dependency builtin-modules to v5 (@renovate[bot])
- [#5873](https://github.com/rollup/rollup/pull/5873): chore(deps): update uraimo/run-on-arch-action action to v3 (@renovate[bot])
- [#5874](https://github.com/rollup/rollup/pull/5874): fix(deps): lock file maintenance minor/patch updates (@renovate[bot])

## 4.34.9

_2025-03-01_
Expand Down
2 changes: 1 addition & 1 deletion browser/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rollup/browser",
"version": "4.34.9",
"version": "4.35.0",
"description": "Next-generation ES module bundler browser build",
"main": "dist/rollup.browser.js",
"module": "dist/es/rollup.browser.js",
Expand Down
4 changes: 3 additions & 1 deletion docs/plugin-development/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -877,14 +877,16 @@ function augmentWithDatePlugin() {

| | |
| --: | :-- |
| 类型: | `closeBundle: () => Promise<void> \| void` |
| 类型: | `closeBundle: (error?: Error) => Promise<void> \| void` |
| 类别: | async,parallel |
| 上一个钩子: | 如果有构建错误,则为 [`buildEnd`](#buildend),否则为调用 [`bundle.close()`](../javascript-api/index.md#rollup-rollup),在这种情况下,这将是最后一个触发的钩子 |

可用于清理可能正在运行的任何外部服务。Rollup 的 CLI 将确保在每次运行后调用此钩子,但是 JavaScript API 的用户有责任在生成产物后手动调用 `bundle.close()`。因此,任何依赖此功能的插件都应在其文档中仔细提到这一点。

如果插件想要在监视模式下保留资源,则可以在此钩子中检查 [`this.meta.watchMode`](#this-meta) 并在 [`closeWatcher`](#closewatcher) 中执行必要的监视模式清理。

如果在构建过程或执行 `buildEnd` 钩子时发生错误,那么这个错误会作为第一个参数传递给这个钩子。

### footer

| | |
Expand Down
Loading