-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jest-worker: Avoid crash when "--max-old-space-size" inside process.execArgv
#12097
Conversation
@kherock hi! Fyi, change the code from you last commit, maybe you can help with review? |
Found old PR with similar problem - https://github.com/parcel-bundler/parcel/pull/5017/files |
Codecov Report
@@ Coverage Diff @@
## main #12097 +/- ##
==========================================
- Coverage 68.91% 68.90% -0.01%
==========================================
Files 324 324
Lines 16681 16682 +1
Branches 4814 4814
==========================================
Hits 11495 11495
- Misses 5153 5154 +1
Partials 33 33
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems fine to me. I'd suggest adding a unit test assertion for this, there's a similar one you can borrow testing --inspect
in the child process worker test file.
I am also seeing this error as of 27.4.0 version of jest-worker and angular 12 cli. Had to downgrade to jest-worker 27.3.1 to fix the compilation failure
|
I faced same error in angular 12 cli, and also it was proved that the problem was caused by 27.4.0:
|
process.execArgv
@kherock @SimenB: According to Node's official documentation hyphens are supposed to be used, not undescore. We used underscore before but are now using hyphens. Can we patch both? |
PR welcome |
Didn't get to add test(
Thanks!
Good catch, thanks! |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
jest-worker used by terser-webpack-plugin
In our cli, we run build process with max-old-space-size flag by default, and use terser-webpack-plugin inside.
So, terser-webpack-plugin initialize ExperimentalWorker, and ExperimentalWorker pass max-old-space-size to NodeJS worker, then process failed with error: