Repository navigation
fix: require serializer.mjs in parallel worker pool files - #6055
Merged
JoshuaKGoldberg merged 1 commit intoJun 10, 2026
Merged
Conversation
|
|
This comment has been minimized.
This comment has been minimized.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6055 +/- ##
==========================================
+ Coverage 78.08% 78.12% +0.04%
==========================================
Files 63 63
Lines 4590 4590
Branches 977 977
==========================================
+ Hits 3584 3586 +2
+ Misses 1006 1004 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
2 of 3 tasks
Contributor
Author
|
The failing test is an existing flaky issue. I've prepared PRs to fix this: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Checklist
Cannot find module './serializer'in 12.0.0-beta-9.5 #6054status: accepting prsOverview
#6011 renamed lib/nodejs/serializer.js to serializer.mjs and updated one of its three consumers (lib/nodejs/worker.js), but the other two still require the module without an extension. CommonJS resolution never tries .mjs, so both requires fail unconditionally, and as of 12.0.0-beta-9.5 any --parallel run crashes at startup with Cannot find module './serializer' (see #6054 for a minimal reproduction).
This PR updates the three remaining stale requires to reference ./serializer.mjs explicitly, mirroring what worker.js already does:
lib/nodejs/utility files to ESM #6011).require() of a synchronous ESM graph is supported at Mocha's engines floor (^20.19.0 || >=22.12.0), so no loader changes are needed. Verified by applying the two lib/ changes to the published 12.0.0-beta-9.5 package: --parallel goes from the startup crash to passing, and serial runs are unaffected.
No new test is added: the fix makes the existing serializer spec loadable again, and any parallel-mode integration test exercises the repaired path by construction. #5969 (converting the worker-pool files themselves to ESM) will subsume these requires eventually; this is the minimal interim fix so the next beta doesn't ship with parallel mode unusable.