Skip to content

Commit 44aba03

Browse files
committed
docs(en): merging all conflicts
2 parents f269fd1 + 2029f63 commit 44aba03

54 files changed

Lines changed: 1342 additions & 698 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

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

Lines changed: 41 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- name: Setup Node
3636
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
3737
with:
38-
node-version: 24.7.0
38+
node-version: 24.8.0
3939
- name: Install and Cache Node Dependencies
4040
uses: ./.github/actions/install-and-cache-node-deps
4141
- name: Lint
@@ -82,6 +82,24 @@ jobs:
8282
target: i686-pc-windows-msvc
8383
- host: windows-latest
8484
target: aarch64-pc-windows-msvc
85+
- host: windows-latest
86+
target: x86_64-pc-windows-gnu
87+
msystem: ucrt64
88+
toolchain: ucrt-x86_64
89+
setup: |
90+
rustup default
91+
rustVersion=$(sed -n 's/channel *= *"\(.*\)"/\1/p' rust-toolchain.toml)
92+
rustup install "$rustVersion"
93+
rustup set default-host x86_64-pc-windows-gnu
94+
rustup show
95+
build: >-
96+
set -e &&
97+
which rustup &&
98+
rustup target add x86_64-pc-windows-gnu &&
99+
rustup component add rust-src --toolchain nightly-2025-07-25-x86_64-pc-windows-gnu &&
100+
npm run build:napi -- --release --target x86_64-pc-windows-gnu
101+
env:
102+
MINGW_ARCH: ucrt64
85103

86104
# MacOS
87105
- host: macos-latest
@@ -200,9 +218,22 @@ jobs:
200218
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
201219
- name: Setup Node
202220
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
203-
if: ${{ !matrix.settings.docker }}
221+
if: ${{ !matrix.settings.docker && matrix.settings.target != 'x86_64-pc-windows-gnu' }}
222+
with:
223+
node-version: 24.8.0
224+
- uses: msys2/setup-msys2@v2
225+
if: ${{ matrix.settings.target == 'x86_64-pc-windows-gnu' }}
204226
with:
205-
node-version: 24.7.0
227+
msystem: ${{ matrix.settings.msystem }}
228+
install: mingw-w64-${{ matrix.settings.toolchain }}-toolchain base-devel binutils
229+
pacboy: >-
230+
rustup:p
231+
nodejs:p
232+
rust-wasm:p
233+
rust-src:p
234+
update: true
235+
path-type: inherit
236+
release: false
206237
- name: Install Toolchain
207238
uses: dtolnay/rust-toolchain@stable
208239
if: ${{ !matrix.settings.docker }}
@@ -211,7 +242,7 @@ jobs:
211242
components: rust-src
212243
- name: Setup OpenHarmony SDK
213244
if: ${{ contains(matrix.settings.target, 'ohos') }}
214-
uses: openharmony-rs/setup-ohos-sdk@52d50de65363f895558a43de0dceb1f8e3679b1c # v0.2.3
245+
uses: openharmony-rs/setup-ohos-sdk@3c181b3244cec76aaec289ab84fb00f55f2fce3f # v0.2.4
215246
- name: Restore Cargo cache
216247
uses: actions/cache/restore@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
217248
if: matrix.settings.cache-cargo != false
@@ -229,7 +260,7 @@ jobs:
229260
with:
230261
version: 0.14.1
231262
- name: Install cargo-zigbuild
232-
uses: taiki-e/install-action@0c5db7f7f897c03b771660e91d065338615679f4 # v2.60.0
263+
uses: taiki-e/install-action@cc60de1d6831d7e9c4342f618ce7a5d6a9f223a4 # v2.61.6
233264
if: ${{ matrix.settings.cross == 'zig' }}
234265
env:
235266
GITHUB_TOKEN: ${{ github.token }}
@@ -253,10 +284,14 @@ jobs:
253284
image: ${{ matrix.settings.docker }}
254285
options: '--user 0:0 -v ${{ github.workspace }}/.cargo-cache/git/db:/usr/local/cargo/git/db -v ${{ github.workspace }}/.cargo/registry/cache:/usr/local/cargo/registry/cache -v ${{ github.workspace }}/.cargo/registry/index:/usr/local/cargo/registry/index -v ${{ github.workspace }}:/build -w /build'
255286
run: ${{ matrix.settings.build }}
287+
- name: Msys2 build
288+
if: ${{ matrix.settings.target == 'x86_64-pc-windows-gnu' }}
289+
run: ${{ matrix.settings.build }}
290+
shell: msys2 {0}
256291
- name: Build (Matrix override)
257292
env: ${{ matrix.settings.env || fromJSON('{}') }}
258293
run: ${{ matrix.settings.build }}
259-
if: ${{ !matrix.settings.docker && matrix.settings.build }}
294+
if: ${{ !matrix.settings.docker && matrix.settings.build && matrix.settings.target != 'x86_64-pc-windows-gnu' }}
260295
- name: Build (Classic)
261296
env: ${{ matrix.settings.env || fromJSON('{}') }}
262297
run: npm run build:napi -- --release --target ${{ matrix.settings.target }} ${{ matrix.settings.cross == 'zig' && '-x' || matrix.settings.cross == 'napi' && '--use-napi-cross' || matrix.settings.cross == 'cross' && '--use-cross' || '' }}

.github/workflows/performance-report.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ permissions:
1717

1818
jobs:
1919
build-artefacts:
20-
if: ${{ github.event.pull_request.head.repo.full_name == 'rollup/rollup' || contains( toJson(github.event.pull_request.labels), 'x⁸ ⚙️ build repl artefacts' ) }}
20+
if: >-
21+
${{ github.event.pull_request.head.repo.full_name == 'rollup/rollup' ||
22+
(github.event.action == 'labeled' && github.event.label.name == 'x⁸ ⚙️ build repl artefacts') }}
2123
strategy:
2224
matrix:
2325
settings:
@@ -51,7 +53,7 @@ jobs:
5153
- name: Setup Node
5254
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
5355
with:
54-
node-version: 24.7.0
56+
node-version: 24.8.0
5557
- name: Install and Cache Node Dependencies
5658
uses: ./.github/actions/install-and-cache-node-deps
5759
- name: Build artefacts 123
@@ -93,7 +95,7 @@ jobs:
9395
- name: Setup Node
9496
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
9597
with:
96-
node-version: 24.7.0
98+
node-version: 24.8.0
9799
- name: Install and Cache Node Dependencies
98100
uses: ./.github/actions/install-and-cache-node-deps
99101
- name: Download all artifacts

.github/workflows/repl-artefacts.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,21 @@ jobs:
1919
upload:
2020
permissions:
2121
pull-requests: write # for peter-evans/find-comment and peter-evans/create-or-update-comment
22-
if: ${{ github.event.pull_request.head.repo.full_name == 'rollup/rollup' || contains( toJson(github.event.pull_request.labels), 'x⁸ ⚙️ build repl artefacts' ) }}
22+
if: >-
23+
${{ github.event.pull_request.head.repo.full_name == 'rollup/rollup' ||
24+
(github.event.action == 'labeled' && github.event.label.name == 'x⁸ ⚙️ build repl artefacts') }}
2325
runs-on: ubuntu-latest
2426
name: Upload
2527
steps:
2628
- name: Checkout Commit
2729
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2830
with:
2931
ref: refs/pull/${{ github.event.number }}/merge
32+
- name: Remove 'x⁸ ⚙️ build repl artefacts' label
33+
if: ${{ github.event.action == 'labeled' }}
34+
run: gh pr edit ${{ github.event.pull_request.number }} --remove-label 'x⁸ ⚙️ build repl artefacts'
35+
env:
36+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3037
- name: Install Toolchain
3138
uses: dtolnay/rust-toolchain@stable
3239
with:
@@ -46,7 +53,7 @@ jobs:
4653
- name: Setup Node
4754
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
4855
with:
49-
node-version: 24.7.0
56+
node-version: 24.8.0
5057
- name: Install and Cache Node Dependencies
5158
uses: ./.github/actions/install-and-cache-node-deps
5259
- name: Build artefacts

CHANGELOG.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,42 @@
11
# rollup changelog
22

3+
## 4.52.0
4+
5+
_2025-09-19_
6+
7+
### Features
8+
9+
- Add option `output.onlyExplicitManualChunks` to turn off merging additional dependencies into manual chunks (#6087)
10+
- Add support for x86_64-pc-windows-gnu platform (#6110)
11+
12+
### Pull Requests
13+
14+
- [#6087](https://github.com/rollup/rollup/pull/6087): fix: manualChunks and non manualChunks shared dependencies are merged with the first manualChunk encountered alphabetically (@maiieul)
15+
- [#6110](https://github.com/rollup/rollup/pull/6110): Add support x86_64-pc-windows-gnu (@lsq, @lukastaegert)
16+
- [#6118](https://github.com/rollup/rollup/pull/6118): Automatically remove REPL artefacts label from PRs (@lukastaegert)
17+
18+
## 4.51.0
19+
20+
_2025-09-19_
21+
22+
### Features
23+
24+
- Support ROLLUP_FILE_URL_OBJ placeholder to inject file URLs into the generated code (#6108)
25+
26+
### Bug Fixes
27+
28+
- Improve OpenHarmony build to work in more situations (#6115)
29+
30+
### Pull Requests
31+
32+
- [#6108](https://github.com/rollup/rollup/pull/6108): feat: support ROLLUP_FILE_URL_OBJ for URL object instead of string (@guybedford, @lukastaegert)
33+
- [#6112](https://github.com/rollup/rollup/pull/6112): Disable Cargo cache for Android (@lukastaegert)
34+
- [#6113](https://github.com/rollup/rollup/pull/6113): fix(deps): update rust crate swc_compiler_base to v35 (@renovate[bot])
35+
- [#6114](https://github.com/rollup/rollup/pull/6114): chore(deps): lock file maintenance minor/patch updates (@renovate[bot])
36+
- [#6115](https://github.com/rollup/rollup/pull/6115): Disable local_dynamic_tls for OpenHarmony (@hqzing)
37+
- [#6116](https://github.com/rollup/rollup/pull/6116): chore(deps): lock file maintenance minor/patch updates (@renovate[bot])
38+
- [#6117](https://github.com/rollup/rollup/pull/6117): chore(deps): lock file maintenance (@renovate[bot])
39+
340
## 4.50.2
441

542
_2025-09-15_

browser/package.json

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

docs/configuration-options/index.md

Lines changed: 75 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1440,21 +1440,31 @@ export default {
14401440
| --: | :-- |
14411441
| 类型: | `{ [chunkAlias: string]: string[] } \| ((id: string, {getModuleInfo, getModuleIds}) => string \| void)` |
14421442

1443+
<<<<<<< HEAD
14431444
该选项允许你创建自定义的公共 chunk。当值为对象形式时,每个属性代表一个 chunk,其中包含列出的模块及其所有依赖,除非他们已经在其他 chunk 中,否则将会是模块图(module graph)的一部分。chunk 的名称由对象属性的键决定。
14441445

14451446
请注意,列出的模块本身不一定是模块图的一部分,该特性对于使用 `@rollup/plugin-node-resolve` 包并从中使用深度引用(deep imports)是非常有用的。例如:
1447+
=======
1448+
Allows the creation of custom shared common chunks. The object form can be used for an easier and safer manual chunking, and the function form can be used for a more powerful and controlled behavior.
1449+
1450+
When using the object form, each property represents a chunk that contains the listed modules and all their dependencies if they are part of the module graph unless they are already in another manual chunk. The name of the chunk will be determined by the property key. Note that it is not necessary for the listed modules themselves to be part of the module graph, which is useful if you are working with `@rollup/plugin-node-resolve` and use deep imports from packages. For instance
1451+
>>>>>>> 2029f639f983289619538c60bc14eebc638c6926
14461452
14471453
```javascript
1448-
({
1449-
manualChunks: {
1450-
lodash: ['lodash']
1451-
}
1452-
});
1454+
manualChunks: {
1455+
lodash: ['lodash'];
1456+
}
14531457
```
14541458

1459+
<<<<<<< HEAD
14551460
上述例子中,即使你只是使用 `import get from 'lodash/get'` 形式引入,Rollup 也会将 lodash 的所有模块放到一个自定义 chunk 中。
14561461

14571462
当该选项值为函数形式时,每个被解析的模块都会经过该函数处理。如果函数返回字符串,那么该模块及其所有依赖将被添加到以返回字符串命名的自定义 chunk 中。例如,以下例子会创建一个命名为 `vendor` 的 chunk,它包含所有在 `node_modules` 中的依赖:
1463+
=======
1464+
will merge all lodash modules into a manual chunk even if you are only using imports of the form `import get from 'lodash/get'`.
1465+
1466+
When using the function form, each resolved module id will be passed to the function. If a string is returned, the module and all its dependencies will be added to the manual chunk with the given name. For instance this will create a `vendor` chunk containing all dependencies inside `node_modules`:
1467+
>>>>>>> 2029f639f983289619538c60bc14eebc638c6926
14581468
14591469
```javascript twoslash
14601470
// ---cut-start---
@@ -1469,7 +1479,13 @@ function manualChunks(id) {
14691479
}
14701480
```
14711481

1482+
<<<<<<< HEAD
14721483
请注意,如果自定义 chunk 在使用相应模块之前触发了副作用,那么它可能改变整个应用的行为。
1484+
=======
1485+
By default, the function form will also merge dependencies of the returned ids into the manualChunk. If you need stricter behavior, you can use [output.onlyExplicitManualChunks](#output-onlyexplicitmanualchunks), which will be the default in Rollup 5.
1486+
1487+
Be aware that manual chunks can change the behaviour of the application if side effects are triggered before the corresponding modules are actually used.
1488+
>>>>>>> 2029f639f983289619538c60bc14eebc638c6926
14731489
14741490
`manualChunks` 值为函数形式时,它的第二个参数是一个对象,包含 `getModuleInfo` 函数和 `getModuleIds` 函数,其工作方式与插件上下文中的 [`this.getModuleInfo`](../plugin-development/index.md#this-getmoduleinfo)[`this.getModuleIds`](../plugin-development/index.md#this-getmoduleids) 相同。
14751491

@@ -3107,4 +3123,58 @@ _使用 [`output.externalImportAttributes`](#output-externalimportattributes)
31073123
| CLI: | `--externalImportAssertions`/`--no-externalImportAssertions` |
31083124
| 默认: | `true` |
31093125

3126+
<<<<<<< HEAD
31103127
是否在输出中为外部导入添加导入断言,如果输出格式为 `es`。默认情况下,断言来自输入文件,但是插件可以稍后添加或删除断言。例如,`import "foo" assert {type: "json"}` 将导致相同的导入出现在输出中,除非将该选项设置为 `false`。请注意,模块的所有导入都需要具有一致的断言,否则将发出警告。
3128+
=======
3129+
Whether to add import assertions to external imports in the output if the output format is `es`. By default, assertions are taken from the input files, but plugins can add or remove assertions later. E.g. `import "foo" assert {type: "json"}` will cause the same import to appear in the output unless the option is set to `false`. Note that all imports of a module need to have consistent assertions, otherwise a warning is emitted.
3130+
3131+
### output.onlyExplicitManualChunks
3132+
3133+
| | |
3134+
| ----: | :-------- |
3135+
| Type: | `boolean` |
3136+
3137+
If set to true, using the [output.manualChunks](#output-manualchunks) function form won't merge dependencies into the output chunk.
3138+
3139+
For instance, with
3140+
3141+
```js
3142+
// src/main.js (entry point)
3143+
import './manual1';
3144+
import './manual2';
3145+
3146+
console.log('main');
3147+
3148+
// src/manual1.js
3149+
import './dep.js';
3150+
3151+
console.log('manual1');
3152+
3153+
// src/manual2.js
3154+
import './dep.js';
3155+
3156+
console.log('manual2');
3157+
3158+
// src/dep.js
3159+
console.log('dep');
3160+
```
3161+
3162+
and
3163+
3164+
<!-- prettier-ignore-start -->
3165+
3166+
```js twoslash
3167+
// ---cut-start---
3168+
/** @type {import('rollup').GetManualChunk} */
3169+
// ---cut-end---
3170+
function manualChunks(id) {
3171+
if (id.endsWith('manual1.js') && id.endsWith('manual2.js')) {
3172+
return 'manual';
3173+
}
3174+
}
3175+
```
3176+
3177+
the dep.js `export const dep = 'dep';` code, won't be merged into the `manual` output chunk. This gives you full control over what code goes into which manual chunks, and if your manual chunking is very granular, this can prevent import graph inaccuracies and help reduce cache invalidation.
3178+
3179+
Note: although this option is new in Rollup 4, it is marked as deprecated because it will become the new default for the function form in Rollup 5.
3180+
>>>>>>> 2029f639f983289619538c60bc14eebc638c6926

native.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@ const bindingsByPlatformAndArch = {
3232
win32: {
3333
arm64: { base: 'win32-arm64-msvc' },
3434
ia32: { base: 'win32-ia32-msvc' },
35-
x64: { base: 'win32-x64-msvc' }
35+
x64: {
36+
base: report.getReport().header.osName.startsWith('MINGW32_NT')
37+
? 'win32-x64-gnu'
38+
: 'win32-x64-msvc'
39+
}
3640
}
3741
};
3842

npm/win32-x64-gnu/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# `@rollup/rollup-win32-x64-gnu`
2+
3+
This is the **x86_64-pc-windows-gnu** binary for `rollup`

npm/win32-x64-gnu/package.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"name": "@rollup/rollup-win32-x64-gnu",
3+
"version": "0.0.0",
4+
"os": [
5+
"win32"
6+
],
7+
"cpu": [
8+
"x64"
9+
],
10+
"files": [
11+
"rollup.win32-x64-gnu.node"
12+
],
13+
"description": "Native bindings for Rollup",
14+
"author": "Lukas Taegert-Atkinson",
15+
"homepage": "https://rollupjs.org/",
16+
"license": "MIT",
17+
"repository": "rollup/rollup",
18+
"main": "./rollup.win32-x64-gnu.node"
19+
}

0 commit comments

Comments
 (0)