Skip to content

Commit cc295f5

Browse files
authored
jest-worker: Avoid crash when "--max-old-space-size" inside process.execArgv (#12103)
1 parent 1d197dd commit cc295f5

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
### Fixes
66

7+
- `[jest-worker]` Add additonal `execArgv` to filter ([#12103](https://github.com/facebook/jest/pull/12103))
8+
79
### Chore & Maintenance
810

911
### Performance

packages/jest-worker/src/workers/NodeThreadsWorker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export default class ExperimentalWorker implements WorkerInterface {
6767
eval: false,
6868
// Suppress --max_old_space_size flags while preserving others (like --harmony). See https://nodejs.org/api/worker_threads.html#new-workerfilename-options
6969
execArgv: process.execArgv.filter(
70-
v => !/^--(max_old_space_size)/.test(v),
70+
v => !/^--(max_old_space_size|max-old-space-size)/.test(v),
7171
),
7272
// @ts-expect-error: added in newer versions
7373
resourceLimits: this._options.resourceLimits,

0 commit comments

Comments
 (0)