Skip to content

Commit 7b2a0c3

Browse files
authored
fix: Widen EBADF fstat version gate to include Node 24.15+ (#7104)
## What's the problem this PR addresses? #7103 The fix in #7070 added a version gate for the EBADF fstat error: ```js export const HAS_BROKEN_FSTAT_FOR_ZIP_FDS = major > 25 || (major === 25 && minor >= 7); ``` However, the breaking change from [nodejs/node#61769](nodejs/node#61769) (`lib: reduce cycles in esm loader and load it in snapshot`) was backported to **Node v24.15.0**, causing the identical `EBADF: bad file descriptor, fstat` error on that version. Works on v24.14.1, fails on v24.15.0. ## How did you fix it? Widened the version gate to also cover Node 24.15+: ```js export const HAS_BROKEN_FSTAT_FOR_ZIP_FDS = major > 25 || (major === 25 && minor >= 7) || (major === 24 && minor >= 15); ``` ## 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.
1 parent baebea1 commit 7b2a0c3

2 files changed

Lines changed: 29 additions & 1 deletion

File tree

ā€Ž.yarn/versions/7103.ymlā€Ž

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
releases:
2+
"@yarnpkg/cli": patch
3+
"@yarnpkg/plugin-pnp": patch
4+
"@yarnpkg/pnp": patch
5+
6+
declined:
7+
- "@yarnpkg/builder"
8+
- "@yarnpkg/core"
9+
- "@yarnpkg/doctor"
10+
- "@yarnpkg/nm"
11+
- "@yarnpkg/pnpify"
12+
- "@yarnpkg/sdks"
13+
- "@yarnpkg/plugin-compat"
14+
- "@yarnpkg/plugin-constraints"
15+
- "@yarnpkg/plugin-dlx"
16+
- "@yarnpkg/plugin-essentials"
17+
- "@yarnpkg/plugin-init"
18+
- "@yarnpkg/plugin-interactive-tools"
19+
- "@yarnpkg/plugin-nm"
20+
- "@yarnpkg/plugin-npm-cli"
21+
- "@yarnpkg/plugin-pack"
22+
- "@yarnpkg/plugin-patch"
23+
- "@yarnpkg/plugin-pnpm"
24+
- "@yarnpkg/plugin-stage"
25+
- "@yarnpkg/plugin-typescript"
26+
- "@yarnpkg/plugin-version"
27+
- "@yarnpkg/plugin-workspace-tools"

ā€Žpackages/yarnpkg-pnp/sources/esm-loader/loaderFlags.tsā€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,5 @@ export const SUPPORTS_IMPORT_ATTRIBUTES = major >= 21 || (major === 20 && minor
2121
// https://github.com/nodejs/node/pull/52104
2222
export const SUPPORTS_IMPORT_ATTRIBUTES_ONLY = major >= 22;
2323

24-
export const HAS_BROKEN_FSTAT_FOR_ZIP_FDS = major > 25 || (major === 25 && minor >= 7);
24+
// https://github.com/nodejs/node/pull/61769 — backported to v24.15.0
25+
export const HAS_BROKEN_FSTAT_FOR_ZIP_FDS = major > 25 || (major === 25 && minor >= 7) || (major === 24 && minor >= 15);

0 commit comments

Comments
Ā (0)
⚔