-
-
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
fix: upgrade write-atomic-file
to support worker_threads
#7680
Conversation
This comment has been minimized.
This comment has been minimized.
9ebde4b
to
9d43a34
Compare
write-atomic-file
to support worker_threadswrite-atomic-file
to support worker_threads
The fix has been merged and released upstream(:tada:), so I've changed this PR to just update the dep. I verified that the reproduction from the OP now passes. This will still fail CI, however (see #7681) |
I just released a patch release with a fix for a |
Thanks for the heads-up! 0e1855e |
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. |
Summary
EDIT: We can probably just bump the version instead, hopefully the PR will land really quick 🙂 npm/write-file-atomic#37 (comment)
Due toworker_threads
sharingprocess.pid
with its parent,write-file-atomic
doesn't really work when run inside a worker. See this example (usingjest-worker@24.0.0-alpha.12
):With this fork, we useworker_threads.threadId
instead ofprocess.pid
.To test, navigate to
e2e/coverage-report
and run../../jest --coverage --coverageThreshold '{"global": {"lines": 100}}' --collectCoverageOnlyFrom cached-duplicates/a/identical.js --collectCoverageOnlyFrom cached-duplicates/b/identical.js -- identical.test.js --no-cache
Without this change, it crashes every time due to being unable to write the cache file. With these changes, it passes
Opened up PR: npm/write-file-atomic#37Test plan
Green CI on node 11 (or at last fixed coverage tests) 🤞