Skip to content

Commit 0a0a7b6

Browse files
authored
Merge pull request #199 from rollup/sync-ae871d76
docs(en): merge rollup/master into rollup-docs-cn/master @ ae871d7
2 parents bf9f493 + 21de6e7 commit 0a0a7b6

86 files changed

Lines changed: 1205 additions & 833 deletions

File tree

Some content is hidden

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

.github/actions/install-and-cache-node-deps/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ runs:
55
steps:
66
- name: Restore Node dependencies cache
77
id: cache-node-modules
8-
uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
8+
uses: actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
99
with:
1010
path: |
1111
node_modules
@@ -24,7 +24,7 @@ runs:
2424
shell: bash
2525
- name: Save Node dependencies cache
2626
if: steps.cache-node-modules.outputs.cache-hit != 'true' && github.ref == 'refs/heads/master'
27-
uses: actions/cache/save@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
27+
uses: actions/cache/save@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
2828
with:
2929
path: |
3030
node_modules

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ jobs:
213213
if: ${{ matrix.settings.target != 'x86_64-pc-windows-gnu' }}
214214
with:
215215
node-version: 24.10.0
216-
- uses: msys2/setup-msys2@4f806de0a5a7294ffabaff804b38a9b435a73bda # v2
216+
- uses: msys2/setup-msys2@cafece8e6baf9247cf9b1bf95097b0b983cc558d # v2
217217
if: ${{ matrix.settings.target == 'x86_64-pc-windows-gnu' }}
218218
with:
219219
msystem: ${{ matrix.settings.msystem }}
@@ -227,16 +227,16 @@ jobs:
227227
path-type: inherit
228228
release: false
229229
- name: Install Toolchain
230-
uses: dtolnay/rust-toolchain@stable
230+
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
231231
with:
232232
toolchain: nightly-2025-07-25
233233
components: ${{ matrix.settings.build-std && 'rust-src' || '' }}
234234
targets: ${{ !matrix.settings.build-std && matrix.settings.target || '' }}
235235
- name: Setup OpenHarmony SDK
236236
if: ${{ contains(matrix.settings.target, 'ohos') }}
237-
uses: openharmony-rs/setup-ohos-sdk@3c181b3244cec76aaec289ab84fb00f55f2fce3f # v0.2.4
237+
uses: openharmony-rs/setup-ohos-sdk@eb82b94ef522b07269679195c2512f22e922ef3b # v1.0.0
238238
- name: Restore Cargo cache
239-
uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
239+
uses: actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
240240
if: matrix.settings.cache-cargo != false
241241
with:
242242
path: |
@@ -252,7 +252,7 @@ jobs:
252252
with:
253253
version: 0.14.1
254254
- name: Install cargo-zigbuild
255-
uses: taiki-e/install-action@de6bbd1333b8f331563d54a051e542c7dfef81c3 # v2.68.34
255+
uses: taiki-e/install-action@328a871ad8f62ecac78390391f463ccabc974b72 # v2.69.9
256256
if: ${{ matrix.settings.cross == 'zig' }}
257257
env:
258258
GITHUB_TOKEN: ${{ github.token }}
@@ -284,7 +284,7 @@ jobs:
284284
shell: bash
285285
- name: Save Cargo cache
286286
if: github.ref == 'refs/heads/master' && matrix.settings.cache-cargo != false
287-
uses: actions/cache/save@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
287+
uses: actions/cache/save@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
288288
with:
289289
path: |
290290
~/.cargo/registry/index/
@@ -323,7 +323,7 @@ jobs:
323323
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
324324

325325
- name: Restore Cargo cache
326-
uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
326+
uses: actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
327327
with:
328328
path: |
329329
~/.cargo/registry/index/
@@ -350,7 +350,7 @@ jobs:
350350
351351
- name: Save Cargo cache
352352
if: github.ref == 'refs/heads/master'
353-
uses: actions/cache/save@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
353+
uses: actions/cache/save@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
354354
with:
355355
path: |
356356
~/.cargo/registry/index/
@@ -534,7 +534,7 @@ jobs:
534534
env:
535535
CI: true
536536
- name: Upload coverage
537-
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
537+
uses: codecov/codecov-action@1af58845a975a7985b0beb0cbe6fbbb71a41dbad # v5.5.3
538538
if: matrix.coverage
539539
with:
540540
fail_ci_if_error: true

.github/workflows/performance-report.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ jobs:
3535
with:
3636
ref: ${{matrix.settings.ref}}
3737
- name: Install Toolchain
38-
uses: dtolnay/rust-toolchain@stable
38+
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
3939
with:
4040
toolchain: nightly-2025-07-25
4141
components: rust-src
4242
- name: Restore Cargo cache
43-
uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
43+
uses: actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
4444
with:
4545
path: |
4646
~/.cargo/registry/index/
@@ -77,12 +77,12 @@ jobs:
7777
with:
7878
ref: ${{ github.event.pull_request.head.sha }}
7979
- name: Install Toolchain
80-
uses: dtolnay/rust-toolchain@stable
80+
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
8181
with:
8282
toolchain: nightly-2025-07-25
8383
components: rust-src
8484
- name: Restore Cargo cache
85-
uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
85+
uses: actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
8686
with:
8787
path: |
8888
~/.cargo/registry/index/

.github/workflows/repl-artefacts.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ jobs:
3535
env:
3636
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3737
- name: Install Toolchain
38-
uses: dtolnay/rust-toolchain@stable
38+
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
3939
with:
4040
toolchain: nightly-2025-07-25
4141
components: rust-src
4242
- name: Restore Cargo cache
43-
uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
43+
uses: actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
4444
with:
4545
path: |
4646
~/.cargo/registry/index/
@@ -61,7 +61,7 @@ jobs:
6161
npm exec -- concurrently -c green,blue,yellow 'npm:build:napi -- --release' 'npm run build:wasm' 'npm:build:cjs' &&
6262
npm run build:copy-native && npm run build:bootstrap
6363
- name: Upload "${{ github.event.number }}/rollup.browser.js" to bucket
64-
uses: zdurham/s3-upload-github-action@master
64+
uses: zdurham/s3-upload-github-action@161dfa6991b9d88a97f02f4aeb5dcd26ea7e03cd # master
6565
with:
6666
args: --cache-control max-age=300,public
6767
env:
@@ -72,7 +72,7 @@ jobs:
7272
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
7373
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
7474
- name: Upload "${{ github.event.number }}/rollup.browser.js.map" to bucket
75-
uses: zdurham/s3-upload-github-action@master
75+
uses: zdurham/s3-upload-github-action@161dfa6991b9d88a97f02f4aeb5dcd26ea7e03cd # master
7676
with:
7777
args: --cache-control max-age=300,public
7878
env:
@@ -83,7 +83,7 @@ jobs:
8383
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
8484
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
8585
- name: Upload "${{ github.event.number }}/bindings_wasm_bg.wasm" to bucket
86-
uses: zdurham/s3-upload-github-action@master
86+
uses: zdurham/s3-upload-github-action@161dfa6991b9d88a97f02f4aeb5dcd26ea7e03cd # master
8787
with:
8888
args: --cache-control max-age=300,public
8989
env:

CHANGELOG.md

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

3+
## 4.60.1
4+
5+
_2026-03-30_
6+
7+
### Bug Fixes
8+
9+
- Resolve a situation where side effect imports could be dropped due to a caching issue (#6286)
10+
11+
### Pull Requests
12+
13+
- [#6286](https://github.com/rollup/rollup/pull/6286): fix: skip dropping side-effects on namespaceReexportsByName cache hit (#6274) (@littlegrayss, @TrickyPi)
14+
- [#6317](https://github.com/rollup/rollup/pull/6317): chore(deps): pin dependencies (@renovate[bot], @lukastaegert)
15+
- [#6318](https://github.com/rollup/rollup/pull/6318): chore(deps): update msys2/setup-msys2 digest to cafece8 (@renovate[bot], @lukastaegert)
16+
- [#6319](https://github.com/rollup/rollup/pull/6319): chore(deps): update minor/patch updates (@renovate[bot], @lukastaegert)
17+
- [#6320](https://github.com/rollup/rollup/pull/6320): chore(deps): pin dependency typescript to v5 (@renovate[bot], @lukastaegert)
18+
- [#6321](https://github.com/rollup/rollup/pull/6321): chore(deps): update openharmony-rs/setup-ohos-sdk action to v1 (@renovate[bot], @lukastaegert)
19+
- [#6322](https://github.com/rollup/rollup/pull/6322): fix(deps): update swc monorepo (major) (@renovate[bot], @lukastaegert)
20+
- [#6323](https://github.com/rollup/rollup/pull/6323): chore(deps): lock file maintenance (@renovate[bot])
21+
- [#6324](https://github.com/rollup/rollup/pull/6324): chore(deps): lock file maintenance (@renovate[bot], @lukastaegert)
22+
23+
## 4.60.0
24+
25+
_2026-03-22_
26+
27+
### Features
28+
29+
- Support source phase imports as long as they are external (#6279)
30+
31+
### Pull Requests
32+
33+
- [#6279](https://github.com/rollup/rollup/pull/6279): feat: external only Source Phase imports support (@guybedford, @lukastaegert)
34+
35+
## 4.59.1
36+
37+
_2026-03-21_
38+
39+
### Bug Fixes
40+
41+
- Fix a crash when using lazy dynamic imports with moduleSideEffects:false (#6306)
42+
43+
### Pull Requests
44+
45+
- [#6281](https://github.com/rollup/rollup/pull/6281): fix(deps): update minor/patch updates (@renovate[bot], @lukastaegert)
46+
- [#6282](https://github.com/rollup/rollup/pull/6282): chore(deps): update github artifact actions (major) (@renovate[bot], @lukastaegert)
47+
- [#6283](https://github.com/rollup/rollup/pull/6283): chore(deps): update dependency nyc to v18 (@renovate[bot], @lukastaegert)
48+
- [#6284](https://github.com/rollup/rollup/pull/6284): fix(deps): update swc monorepo (major) (@renovate[bot])
49+
- [#6285](https://github.com/rollup/rollup/pull/6285): chore(deps): lock file maintenance (@renovate[bot])
50+
- [#6290](https://github.com/rollup/rollup/pull/6290): chore(deps): update minor/patch updates (@renovate[bot], @lukastaegert)
51+
- [#6291](https://github.com/rollup/rollup/pull/6291): chore(deps): update dependency @shikijs/vitepress-twoslash to v4 (@renovate[bot])
52+
- [#6292](https://github.com/rollup/rollup/pull/6292): chore(deps): lock file maintenance (@renovate[bot])
53+
- [#6297](https://github.com/rollup/rollup/pull/6297): chore(deps): update minor/patch updates (@renovate[bot])
54+
- [#6298](https://github.com/rollup/rollup/pull/6298): chore(deps): lock file maintenance (@renovate[bot])
55+
- [#6299](https://github.com/rollup/rollup/pull/6299): chore(deps): lock file maintenance (@renovate[bot])
56+
- [#6300](https://github.com/rollup/rollup/pull/6300): docs: update packagephobia link (@bluwy)
57+
- [#6301](https://github.com/rollup/rollup/pull/6301): chore(deps): update dependency lint-staged to ^16.3.3 (@renovate[bot])
58+
- [#6306](https://github.com/rollup/rollup/pull/6306): fix: fix chunk assignment for deoptimized module with dynamic import (@JoaoBrlt, @lukastaegert)
59+
- [#6307](https://github.com/rollup/rollup/pull/6307): chore(deps): update minor/patch updates (@renovate[bot])
60+
- [#6308](https://github.com/rollup/rollup/pull/6308): chore(deps): update dependency lru-cache to v11 (@renovate[bot])
61+
- [#6309](https://github.com/rollup/rollup/pull/6309): chore(deps): update dependency vite to v8 (@renovate[bot])
62+
- [#6310](https://github.com/rollup/rollup/pull/6310): chore(deps): lock file maintenance (@renovate[bot])
63+
- [#6311](https://github.com/rollup/rollup/pull/6311): chore(deps): lock file maintenance (@renovate[bot])
64+
- [#6312](https://github.com/rollup/rollup/pull/6312): chore(deps): lock file maintenance (@renovate[bot])
65+
366
## 4.59.0
467

568
_2026-02-22_

audit-resolve.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@
1414
"decision": "ignore",
1515
"madeAt": 1772778003517,
1616
"expiresAt": 1775369996393
17+
},
18+
"1115519|@rollup/plugin-terser>serialize-javascript": {
19+
"decision": "ignore",
20+
"madeAt": 1774678997033,
21+
"expiresAt": 1777270978460
22+
},
23+
"1115519|mocha>diff>serialize-javascript": {
24+
"decision": "ignore",
25+
"madeAt": 1774678997033,
26+
"expiresAt": 1777270978460
1727
}
1828
},
1929
"rules": {},

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.59.0",
3+
"version": "4.60.1",
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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ rollup -i src/main.js ... -e foo,bar,baz
5858

5959
当创建 `iife``umd` 格式的 bundle 时,你需要通过 [`output.globals`](#output-globals) 选项提供全局变量名,以替换掉外部引入。
6060

61+
请注意,[source phase 导入](../es-module-syntax/index.md#source-phase-import)`import source x from 'y'`)必须是外部的。如果 source phase 导入解析到非外部模块,Rollup 将抛出错误。
62+
6163
如果一个相对引入,即以 `./``../` 开头,被标记为 `external`,rollup 将在内部将该模块 ID 解析为绝对路径,以便引入的不同外部模块可以合并。当写入生成的 bundle 后,这些引入模块将再次被转换为相对引入。例如:
6264

6365
```js

docs/es-module-syntax/index.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,18 @@ import('./modules.js').then(({ default: DefaultExport, NamedExport }) => {
6666

6767
这对于代码分解应用程序和动态使用模块非常有用。
6868

69+
### Source Phase 导入 {#source-phase-import}
70+
71+
使用 [Source Phase Imports 提案](https://github.com/tc39/proposal-source-phase-imports) 导入模块的 Source Phase 表示,而不执行它。
72+
73+
这对于通过模块系统导入编译好的 WebAssembly 模块非常有用,而无需依赖 fetch API:
74+
75+
```js
76+
import source myModule from './module.wasm';
77+
```
78+
79+
Source phase 导入必须是[外部的](../configuration-options/index.md#external) —— 如果 source phase 导入解析到非外部模块,Rollup 将抛出错误。在 `es` 输出格式中,它们会被保留为 `import source` 声明。其他输出格式(`cjs``amd``iife``umd``system`)不支持 source phase 导入,如果存在则会抛出错误。
80+
6981
## 导出 {#exporting}
7082

7183
### 具名导出 {#named-exports}

0 commit comments

Comments
 (0)