Commit deaf916
fix: Node 25.7+ EBADF by reading CJS source of zip files (#7070)
Attempts to fix the EBADF encountered due to patching fs by doing the
whole read instead.
I did this to get my own changes past a client (i.e. convincing them it
isn't me that is the issue); I'm not sure this is the right long term
choice.
## What's the problem this PR addresses?
#7065
Can't load zipped CJS modules in Node 25.7+
## How did you fix it?
Return the source of zipped files instead of letting Node read it. I
basically just went off this comment:
nodejs/node#62012 (comment)
I'm not certain this is the most desirable way to do this, and if it is
I'm not sure if there are other places that will need additional fixes.
My knowledge of the codebase makes this an uneasy 'this works for me'
solution. I suspect that if it is a reasonable solution, there may be
some deletion that can be done.
## Checklist
- [x] I have read the [Contributing
Guide](https://yarnpkg.com/advanced/contributing).
- [x] I have set the packages that need to be released for my changes to
be effective.
- [x] I will check that all automated PR checks pass before the PR gets
reviewed.
---------
Co-authored-by: Normal Gaussian <[email protected]>
Co-authored-by: Maël Nison <[email protected]>1 parent 888ca61 commit deaf916
5 files changed
Lines changed: 45 additions & 8 deletions
File tree
- .yarn/versions
- packages/yarnpkg-pnp/sources/esm-loader
- hooks
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
64 | 69 | | |
65 | 70 | | |
66 | | - | |
| 71 | + | |
67 | 72 | | |
68 | 73 | | |
69 | 74 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
0 commit comments