Skip to content

Commit 9dfaf28

Browse files
authored
Merge pull request #172 from rollup/sync-70ef1cce
docs(en): merge rollup/master into rollup-docs-cn/master @ 70ef1cc
2 parents 981850d + 40659b3 commit 9dfaf28

File tree

12 files changed

+825
-667
lines changed

12 files changed

+825
-667
lines changed

.github/workflows/build-and-tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ jobs:
429429
name: bindings-${{ matrix.settings.target }}
430430
path: dist/
431431
- name: Run Smoke Test
432-
uses: uraimo/run-on-arch-action@v2
432+
uses: uraimo/run-on-arch-action@v3
433433
with:
434434
arch: ${{ matrix.settings.arch }}
435435
distro: ${{ matrix.settings.distro }}

CHANGELOG.md

+17
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
# rollup changelog
22

3+
## 4.35.0
4+
5+
_2025-03-08_
6+
7+
### Features
8+
9+
- Pass build errors to the closeBundle hook (#5867)
10+
11+
### Pull Requests
12+
13+
- [#5852](https://github.com/rollup/rollup/pull/5852): chore(deps): update dependency eslint-plugin-unicorn to v57 (@renovate[bot], @lukastaegert)
14+
- [#5862](https://github.com/rollup/rollup/pull/5862): fix(deps): update swc monorepo (major) (@renovate[bot], @lukastaegert)
15+
- [#5867](https://github.com/rollup/rollup/pull/5867): feat(5858): make closeBundle hook receive the last error (@GauBen)
16+
- [#5872](https://github.com/rollup/rollup/pull/5872): chore(deps): update dependency builtin-modules to v5 (@renovate[bot])
17+
- [#5873](https://github.com/rollup/rollup/pull/5873): chore(deps): update uraimo/run-on-arch-action action to v3 (@renovate[bot])
18+
- [#5874](https://github.com/rollup/rollup/pull/5874): fix(deps): lock file maintenance minor/patch updates (@renovate[bot])
19+
320
## 4.34.9
421

522
_2025-03-01_

browser/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@rollup/browser",
3-
"version": "4.34.9",
3+
"version": "4.35.0",
44
"description": "Next-generation ES module bundler browser build",
55
"main": "dist/rollup.browser.js",
66
"module": "dist/es/rollup.browser.js",

docs/plugin-development/index.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -877,14 +877,16 @@ function augmentWithDatePlugin() {
877877

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

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

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

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

890892
| | |

0 commit comments

Comments
 (0)