diff --git a/CHANGELOG.md b/CHANGELOG.md index 570a30d8f..f6c229fa1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # rollup changelog +## 4.44.1 + +_2025-06-26_ + +### Bug Fixes + +- Reinstate maxParallelFileOps limit of 1000 to resolve the issue for some (#5992) + +### Pull Requests + +- [#5988](https://github.com/rollup/rollup/pull/5988): fix(deps): lock file maintenance minor/patch updates (@renovate[bot], @lukastaegert) +- [#5992](https://github.com/rollup/rollup/pull/5992): Set maxParallelFileOps to 1000 (@lukastaegert) + ## 4.44.0 _2025-06-19_ diff --git a/browser/package.json b/browser/package.json index 07e9d89c6..8b40bfff6 100644 --- a/browser/package.json +++ b/browser/package.json @@ -1,6 +1,6 @@ { "name": "@rollup/browser", - "version": "4.44.0", + "version": "4.44.1", "description": "Next-generation ES module bundler browser build", "main": "dist/rollup.browser.js", "module": "dist/es/rollup.browser.js", diff --git a/docs/configuration-options/index.md b/docs/configuration-options/index.md index 2bc731d25..dc17d7138 100755 --- a/docs/configuration-options/index.md +++ b/docs/configuration-options/index.md @@ -637,7 +637,7 @@ buildWithCache() | -----: | :------------------------------ | | 类型: | `number` | | CLI: | `--maxParallelFileOps ` | -| 默认: | `Infinity` | +| 默认: | 1000 | 该选项限制 rollup 在读取模块或写入 chunk 时,同时能打开的文件数量。如果没有限制或者数值足够高,构建可能会失败,显示“EMFILE: Too many open files”(EMFILE:打开的文件数过多)。这取决于操作系统限制的句柄数(open file handles)大小。如果将限制设置得过低,并且使用了依赖 [`this.load`](../plugin-development/index.md#this-load) 上下文函数的插件(例如 `commonjs` 插件),那么可能会出现构建停滞且没有错误消息的情况,因为它限制了并行 `load` 调用的数量。 diff --git a/package-lock.json b/package-lock.json index b6d25710e..15bc2397c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "rollup", - "version": "4.44.0", + "version": "4.44.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "rollup", - "version": "4.44.0", + "version": "4.44.1", "license": "MIT", "dependencies": { "@types/estree": "1.0.8" diff --git a/package.json b/package.json index a87d5f8fb..7b24be89e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rollup", - "version": "4.44.0", + "version": "4.44.1", "description": "Next-generation ES module bundler", "main": "dist/rollup.js", "module": "dist/es/rollup.js", diff --git a/src/utils/options/normalizeInputOptions.ts b/src/utils/options/normalizeInputOptions.ts index e35b9cf95..471a450a2 100644 --- a/src/utils/options/normalizeInputOptions.ts +++ b/src/utils/options/normalizeInputOptions.ts @@ -176,8 +176,11 @@ const getMaxParallelFileOps = ( config: InputOptions ): NormalizedInputOptions['maxParallelFileOps'] => { const maxParallelFileOps = config.maxParallelFileOps; - if (typeof maxParallelFileOps !== 'number' || maxParallelFileOps <= 0) return Infinity; - return maxParallelFileOps; + if (typeof maxParallelFileOps === 'number') { + if (maxParallelFileOps <= 0) return Infinity; + return maxParallelFileOps; + } + return 1000; }; const getModuleContext = ( diff --git a/test/function/samples/options-hook/_config.js b/test/function/samples/options-hook/_config.js index 17846fad3..0583b7ffe 100644 --- a/test/function/samples/options-hook/_config.js +++ b/test/function/samples/options-hook/_config.js @@ -11,9 +11,8 @@ module.exports = defineTest({ name: 'test-plugin', buildStart(options) { // The fs option is not json stringifiable - const { fs, maxParallelFileOps, ...restOptions } = options; + const { fs, ...restOptions } = options; assert.ok(fs); - assert.strictEqual(maxParallelFileOps, Infinity); assert.deepStrictEqual(JSON.parse(JSON.stringify(restOptions)), { context: 'undefined', experimentalCacheExpiry: 10, @@ -22,6 +21,7 @@ module.exports = defineTest({ jsx: false, logLevel: 'info', makeAbsoluteExternalsRelative: 'ifRelativeSource', + maxParallelFileOps: 1000, perf: false, plugins: [ {