Skip to content

Commit 108a4dc

Browse files
committed
fix: widen EBADF fstat version gate to include Node 24.15+
The breaking change from nodejs/node#61769 was backported to Node v24.15.0, but the version guard only covered Node >= 25.7. This adds the Node 24.15+ range so PnP correctly reads CJS source from zip files on that version as well. Fixes yarnpkg#7103
1 parent baebea1 commit 108a4dc

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

.pnp.loader.mjs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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)