Skip to content

Commit 3ec09fe

Browse files
authored
Merge pull request #159 from rollup/sync-ae1d14b7
docs(en): merge rollup/master into rollup-docs-cn/master @ ae1d14b
2 parents b10c452 + fbec424 commit 3ec09fe

Some content is hidden

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

47 files changed

+208
-30
lines changed

CHANGELOG.md

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

3+
## 4.26.0
4+
5+
_2024-11-13_
6+
7+
### Features
8+
9+
- Allow to avoid `await bundle.close()` via explicit resource management in TypeScript (#5721)
10+
11+
### Pull Requests
12+
13+
- [#5721](https://github.com/rollup/rollup/pull/5721): feat: support `using` for `RollupBuild` (@shulaoda)
14+
15+
## 4.25.0
16+
17+
_2024-11-09_
18+
19+
### Features
20+
21+
- Add `output.sourcemapDebugIds` option to add matching debug ids to sourcemaps and code for tools like Sentry or Rollbar (#5712)
22+
23+
### Bug Fixes
24+
25+
- Make it easier to manually reproduce base16 hashes by using a more standard base16 conversion algorithm (#5719)
26+
27+
### Pull Requests
28+
29+
- [#5712](https://github.com/rollup/rollup/pull/5712): feat: Add support for injecting Debug IDs (@timfish)
30+
- [#5717](https://github.com/rollup/rollup/pull/5717): fix(deps): update swc monorepo (major) (@renovate[bot])
31+
- [#5718](https://github.com/rollup/rollup/pull/5718): chore(deps): lock file maintenance minor/patch updates (@renovate[bot])
32+
- [#5719](https://github.com/rollup/rollup/pull/5719): Use a less surprising base-16 encoding (@lukastaegert)
33+
334
## 4.24.4
435

536
_2024-11-04_
@@ -97,6 +128,30 @@ _2024-09-27_
97128
- [#5682](https://github.com/rollup/rollup/pull/5682): chore(deps): update dependency @rollup/plugin-typescript to v12 (@renovate[bot])
98129
- [#5684](https://github.com/rollup/rollup/pull/5684): chore(deps): lock file maintenance minor/patch updates (@renovate[bot])
99130

131+
## 2.79.2
132+
133+
_2024-09-26_
134+
135+
### Bug Fixes
136+
137+
- Fix a vulnerability in generated code that affects IIFE, UMD and CJS bundles when run in a browser context (#5671)
138+
139+
### Pull Requests
140+
141+
- [#5671](https://github.com/rollup/rollup/pull/5671): Fix DOM Clobbering CVE (@lukastaegert)
142+
143+
## 3.29.5
144+
145+
_2024-09-21_
146+
147+
### Bug Fixes
148+
149+
- Fix a vulnerability in generated code that affects IIFE, UMD and CJS bundles when run in a browser context (#5671)
150+
151+
### Pull Requests
152+
153+
- [#5671](https://github.com/rollup/rollup/pull/5671): Fix DOM Clobbering CVE (@lukastaegert)
154+
100155
## 4.22.4
101156

102157
_2024-09-21_

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

cli/help.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ Basic options:
7171
--shimMissingExports Create shim variables for missing exports
7272
--silent Don't print warnings
7373
--sourcemapBaseUrl <url> Emit absolute sourcemap URLs with given base
74+
--sourcemapDebugIds Emit unique debug ids in source and sourcemaps
7475
--sourcemapExcludeSources Do not include source code in source maps
7576
--sourcemapFile <file> Specify bundle position for source maps
7677
--sourcemapFileNames <pattern> Name pattern for emitted sourcemaps

cli/run/build.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default async function build(
3030
stderr(cyan(`\n${bold(inputFiles!)}${bold(files.join(', '))}...`));
3131
}
3232

33-
const bundle = await rollup(inputOptions as any);
33+
await using bundle = await rollup(inputOptions as any);
3434
if (useStdout) {
3535
const output = outputOptions[0];
3636
if (output.sourcemap && output.sourcemap !== 'inline') {
@@ -48,7 +48,6 @@ export default async function build(
4848
}
4949

5050
await Promise.all(outputOptions.map(bundle.write));
51-
await bundle.close();
5251
if (!silent) {
5352
warnings.flush();
5453
stderr(green(`created ${bold(files.join(', '))} in ${bold(ms(Date.now() - start))}`));

docs/command-line-interface/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ export default {
109109
preserveModulesRoot,
110110
sourcemap,
111111
sourcemapBaseUrl,
112+
sourcemapDebugIds,
112113
sourcemapExcludeSources,
113114
sourcemapFile,
114115
sourcemapFileNames,
@@ -439,6 +440,7 @@ export default {
439440
--shimMissingExports 为丢失的导出创建卡扣变量
440441
--silent 不打印警告
441442
--sourcemapBaseUrl <url> 使用给定的基本 URL 发出绝对源映射 URL
443+
--sourcemapDebugIds 在源代码和源映射中生成唯一的 debug ID
442444
--sourcemapExcludeSources 在源映射中不包括源代码
443445
--sourcemapFile <file> 指定源映射的包位置
444446
--sourcemapFileNames <pattern> 编译后 sourcemap 的命名模式

docs/configuration-options/index.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1744,6 +1744,16 @@ export default {
17441744

17451745
默认情况下,Rollup 生成的 sourcemap 使用相对 URL 路径来引用它们描述的文件。该选项可提供一个绝对基础 URL 路径,例如 `https://example.com`,sourcemap 将使用绝对 URL 路径来代替。
17461746

1747+
### output.sourcemapDebugIds
1748+
1749+
| | |
1750+
| -----: | :--------------------------------------------- |
1751+
| 类型: | `boolean` |
1752+
| CLI: | `--sourcemapDebugIds`/`--no-sourcemapDebugIds` |
1753+
| 默认: | `false` |
1754+
1755+
如果设为 `true`,将在源代码和 sourcemap 中生成唯一的 ID,这有助于在不同的构建中识别 sourcemap。有关详细信息,请参阅 [TC39 sourcemap debug ID 提案](https://github.com/tc39/source-map/blob/main/proposals/debug-id.md)
1756+
17471757
### output.sourcemapExcludeSources {#output-sourcemapexcludesources}
17481758

17491759
| | |

docs/javascript-api/index.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,12 @@ async function build() {
5353
let bundle;
5454
let buildFailed = false;
5555
try {
56-
// 启动一次打包
56+
// 新建一个 bundle。如果你使用的是 TypeScript 或支持该特性的运行时,
57+
// 你可以这样写:
58+
//
59+
// await using bundle = await rollup(inputOptions);
60+
//
61+
// 这样做就不需要在下面显式地关闭释放 bundle。
5762
bundle = await rollup(inputOptions);
5863

5964
// 一个文件名数组,表示此产物所依赖的文件
@@ -208,6 +213,7 @@ const outputOptions = {
208213
preserveModulesRoot,
209214
sourcemap,
210215
sourcemapBaseUrl,
216+
sourcemapDebugIds,
211217
sourcemapExcludeSources,
212218
sourcemapFile,
213219
sourcemapFileNames,

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

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

rust/xxhash/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const CHARACTERS_BASE64: &[u8; 64] =
66

77
const CHARACTERS_BASE36: &[u8; 36] = b"abcdefghijklmnopqrstuvwxyz0123456789";
88

9-
const CHARACTERS_BASE16: &[u8; 16] = b"abcdef0123456789";
9+
const CHARACTERS_BASE16: &[u8; 16] = b"0123456789abcdef";
1010

1111
pub fn xxhash_base64_url(input: &[u8]) -> String {
1212
to_string(&xxh3_128(input).to_le_bytes(), 64, CHARACTERS_BASE64).unwrap()

0 commit comments

Comments
 (0)