Skip to content

Commit 39315ff

Browse files
authored
Merge pull request #30 from rollup/sync-28c7b7cf
docs(en): merge rollup/master into rollup-docs-cn/master @ 28c7b7c
2 parents d9d2cac + 9ffe379 commit 39315ff

File tree

105 files changed

+1353
-501
lines changed

Some content is hidden

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

105 files changed

+1353
-501
lines changed

.github/workflows/deploy-website.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

.github/workflows/repl-artefacts.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
comment-author: 'github-actions[bot]'
5858
body-includes: 'Thank you for your contribution!'
5959
- name: Create or update comment
60-
uses: peter-evans/create-or-update-comment@v2
60+
uses: peter-evans/create-or-update-comment@v3
6161
id: createInitialComment
6262
with:
6363
comment-id: ${{ steps.findComment.outputs.comment-id }}
@@ -74,14 +74,14 @@ jobs:
7474
7575
or load it into the REPL:
7676
https://rollupjs.org/repl/?pr=${{ github.event.number }}
77-
- name: Update comment for Netlify deploy
78-
uses: jakepartusch/wait-for-netlify-action@v1
79-
id: waitForNetlify
77+
- name: Find Vercel preview URL
78+
uses: patrickedqvist/wait-for-vercel-preview@v1.3.1
79+
id: waitForVercel
8080
with:
81-
site_name: "rollupjs"
82-
- name: Update comment for Netlify
83-
uses: peter-evans/create-or-update-comment@v2
84-
if: ${{ steps.waitForNetlify.outputs.url }}
81+
token: ${{ secrets.GITHUB_TOKEN }}
82+
- name: Update comment with Vercel preview URL
83+
uses: peter-evans/create-or-update-comment@v3
84+
if: ${{ steps.waitForVercel.outputs.url }}
8585
with:
8686
comment-id: ${{ steps.createInitialComment.outputs.comment-id }}
8787
issue-number: ${{ github.event.number }}
@@ -96,4 +96,4 @@ jobs:
9696
```
9797
9898
or load it into the REPL:
99-
${{ steps.waitForNetlify.outputs.url }}/repl/?pr=${{ github.event.number }}
99+
${{ steps.waitForVercel.outputs.url }}/repl/?pr=${{ github.event.number }}

.github/workflows/tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
- master
77
pull_request:
88
types: [synchronize, opened, reopened]
9+
merge_group:
910

1011
permissions:
1112
contents: read

.zhlintignore

Whitespace-only changes.

.zhlintrc

Lines changed: 0 additions & 4 deletions
This file was deleted.

CHANGELOG.md

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

3+
## 3.21.0
4+
5+
_2023-04-23_
6+
7+
### Features
8+
9+
- Support tree-shaking of named exports in dynamic imports when using destructuring and similar patterns (#4952)
10+
11+
### Pull Requests
12+
13+
- [#4952](https://github.com/rollup/rollup/pull/4952): feat: tree-shake deterministic dynamic imports (@antfu)
14+
15+
## 3.20.7
16+
17+
_2023-04-21_
18+
19+
### Bug Fixes
20+
21+
- Properly track array element mutations when iterating with a for-of loop (#4949)
22+
- Handle default exporting an anonymous class that extends another class (#4950)
23+
24+
### Pull Requests
25+
26+
- [#4943](https://github.com/rollup/rollup/pull/4943): Add a test for reserved keywords used as import/export specifiers (@Andarist)
27+
- [#4949](https://github.com/rollup/rollup/pull/4949): Deoptimize right side in for-of loops (@lukastaegert)
28+
- [#4950](https://github.com/rollup/rollup/pull/4950): Support default exported classes that extend other classes (@lukastaegert)
29+
30+
## 3.20.6
31+
32+
_2023-04-18_
33+
34+
### Bug Fixes
35+
36+
- Revert handling of non-JS import and export names due to regressions (#4914)
37+
38+
### Pull Requests
39+
40+
- [#4914](https://github.com/rollup/rollup/pull/4914): feat: add locales in vitepress config (@iDestin)
41+
- [#4946](https://github.com/rollup/rollup/pull/4946): Revert #4939 for now (@lukastaegert)
42+
43+
## 3.20.5
44+
45+
_2023-04-18_
46+
47+
### Bug Fixes
48+
49+
- Handle import and export names that are not valid JavaScript identifiers (#4939)
50+
51+
### Pull Requests
52+
53+
- [#4939](https://github.com/rollup/rollup/pull/4939): Fixed imports/exports that are illegal identifiers in the es output (@Andarist)
54+
- [#4941](https://github.com/rollup/rollup/pull/4941): Reinstate global styles (@lukastaegert)
55+
56+
## 3.20.4
57+
58+
_2023-04-17_
59+
60+
### Bug Fixes
61+
62+
- Do not remove breaks statements after switch statements with conditional breaks (#4937)
63+
64+
### Pull Requests
65+
66+
- [#4937](https://github.com/rollup/rollup/pull/4937): fix: handle conditional breaks in nested switch statement cases (@TrickyPi and @lukastaegert)
67+
68+
## 3.20.3
69+
70+
_2023-04-16_
71+
72+
### Bug Fixes
73+
74+
- Reduce memory consumption for function call parameter analysis (#4938)
75+
- Fix types for `shouldTransformCachedModule` (#4932)
76+
77+
### Pull Requests
78+
79+
- [#4925](https://github.com/rollup/rollup/pull/4925): chore: repl style add scoped (@btea)
80+
- [#4926](https://github.com/rollup/rollup/pull/4926): docs: Update the x_google_ignorelist url (@jecfish)
81+
- [#4932](https://github.com/rollup/rollup/pull/4932): Allow shouldTransformCachedModule to return null (@bluwy)
82+
- [#4935](https://github.com/rollup/rollup/pull/4935): Bump peter-evans/create-or-update-comment from 2 to 3 (@dependabot[bot])
83+
- [#4936](https://github.com/rollup/rollup/pull/4936): Disable puppeteer sandbox to fix Vercel deployment (@lukastaegert)
84+
- [#4938](https://github.com/rollup/rollup/pull/4938): Improve memory usage for parameter deoptimizations (@lukastaegert)
85+
386
## 3.20.2
487

588
_2023-03-24_

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": "3.20.2",
3+
"version": "3.21.0",
44
"description": "Next-generation ES module bundler browser build",
55
"main": "dist/rollup.browser.js",
66
"module": "dist/es/rollup.browser.js",

docs/.vitepress/config.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ export default defineConfig({
2525
['meta', { content: 'The JavaScript module bundler', name: 'twitter:description' }],
2626
['meta', { content: 'https://rollupjs.org/twitter-card.jpg', name: 'twitter:image' }]
2727
],
28+
locales: {
29+
root: { label: '简体中文' },
30+
zh: { label: 'English', link: 'https://rollupjs.org' }
31+
},
2832
markdown: {
2933
anchor: {
3034
callback,
@@ -129,7 +133,6 @@ export default defineConfig({
129133
title: 'Rollup 中文文档',
130134
transformPageData,
131135
vite: {
132-
optimizeDeps: { include: ['moment-mini', '@braintree/sanitize-url'] },
133136
plugins: [
134137
renderMermaidGraphsPlugin(),
135138
{

docs/configuration-options/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1419,7 +1419,7 @@ export default {
14191419
| --: | :-- |
14201420
| 类型: | `boolean \| (relativeSourcePath: string, sourcemapPath: string) => boolean` |
14211421

1422-
该选项决定是否忽略 sourcemap 中列出的源文件,用于填充 [`x_google_ignoreList` source map 扩展](https://developer.chrome.com/blog/devtools-better-angular-debugging/#the-x_google_ignorelist-source-map-extension)。`relativeSourcePath` 是生成的 `.map` 文件到相应源文件的相对路径,而 `sourcemapPath` 是生成的 sourcemap 文件的绝对路径。
1422+
该选项决定是否忽略 sourcemap 中列出的源文件,用于填充 [`x_google_ignoreList` source map 扩展](https://developer.chrome.com/articles/x-google-ignore-list/)。`relativeSourcePath` 是生成的 `.map` 文件到相应源文件的相对路径,而 `sourcemapPath` 是生成的 sourcemap 文件的绝对路径。
14231423

14241424
```js
14251425
import path from 'node:path';

docs/plugin-development/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -564,14 +564,14 @@ type ShouldTransformCachedModuleHook = (options: {
564564
meta: { [plugin: string]: any };
565565
moduleSideEffects: boolean | 'no-treeshake';
566566
syntheticNamedExports: boolean | string;
567-
}) => boolean;
567+
}) => boolean | NullValue;
568568
```
569569

570570
如果使用 Rollup 缓存(例如在观察模式下或通过 JavaScript API 明确使用),如果在 [`load`](#transform) 钩子之后,加载的 `code` 与缓存副本的代码相同,则 Rollup 将跳过模块的 [`transform`](#transform) 钩子。为了防止这种情况,插件可以实现此钩子并返回 `true`,以丢弃缓存副本并转换模块。
571571

572572
此钩子还可用于查找已缓存的模块并访问其缓存的元信息。
573573

574-
如果插件没有返回 `true`,则 Rollup 将为其他插件触发此钩子,否则所有剩余的插件都将被跳过。
574+
如果插件没有返回布尔值,则 Rollup 将为其他插件触发此钩子,否则所有剩余的插件都将被跳过。
575575

576576
### transform
577577

0 commit comments

Comments
 (0)