PnP: Include Node 22.22.3 in fstat workaround#7141
Merged
Conversation
Member
|
I think the CJS hook also need to be updated with |
Contributor
Author
clemyan
approved these changes
May 19, 2026
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.
What's the problem this PR addresses?
Closes #7140.
The
HAS_BROKEN_FSTAT_FOR_ZIP_FDSgate didn't include the Node v22.22.3 release line, even though the same ESM/module loader regression that affected newer Node releases was backportedthere.
This causes Yarn PnP's ESM loader to miss the fstat workaround on Node v22.22.3+, leading to
EBADF: bad file descriptor, fstatwhen loading CJS files from zip archives.How did you fix it?
The Node version parsing now includes the patch version, and
HAS_BROKEN_FSTAT_FOR_ZIP_FDSincludes Node v22.22.3+ without covering v22.22.0 through v22.22.2.I also added a focused unit test for the affected Node version ranges and regenerated the ESM loader artifacts.
Checklist