From 108a4dcde6df25e6016ec33ec1fee8a72d2369a0 Mon Sep 17 00:00:00 2001 From: Rafael Franco Date: Thu, 16 Apr 2026 15:12:31 -0300 Subject: [PATCH 1/3] 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 #7103 --- .pnp.loader.mjs | 2 +- packages/yarnpkg-pnp/sources/esm-loader/loaderFlags.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.pnp.loader.mjs b/.pnp.loader.mjs index 99fa4ff14b3..45359e90c3c 100644 --- a/.pnp.loader.mjs +++ b/.pnp.loader.mjs @@ -1433,7 +1433,7 @@ const WATCH_MODE_MESSAGE_USES_ARRAYS = major > 19 || major === 19 && minor >= 2 const HAS_LAZY_LOADED_TRANSLATORS = major === 20 && minor < 6 || major === 19 && minor >= 3; const SUPPORTS_IMPORT_ATTRIBUTES = major >= 21 || major === 20 && minor >= 10 || major === 18 && minor >= 20; const SUPPORTS_IMPORT_ATTRIBUTES_ONLY = major >= 22; -const HAS_BROKEN_FSTAT_FOR_ZIP_FDS = major > 25 || major === 25 && minor >= 7; +const HAS_BROKEN_FSTAT_FOR_ZIP_FDS = major > 25 || major === 25 && minor >= 7 || major === 24 && minor >= 15; function readPackageScope(checkPath) { const rootSeparatorIndex = checkPath.indexOf(npath.sep); diff --git a/packages/yarnpkg-pnp/sources/esm-loader/loaderFlags.ts b/packages/yarnpkg-pnp/sources/esm-loader/loaderFlags.ts index 8ac389abb17..ad13971e000 100644 --- a/packages/yarnpkg-pnp/sources/esm-loader/loaderFlags.ts +++ b/packages/yarnpkg-pnp/sources/esm-loader/loaderFlags.ts @@ -21,4 +21,5 @@ export const SUPPORTS_IMPORT_ATTRIBUTES = major >= 21 || (major === 20 && minor // https://github.com/nodejs/node/pull/52104 export const SUPPORTS_IMPORT_ATTRIBUTES_ONLY = major >= 22; -export const HAS_BROKEN_FSTAT_FOR_ZIP_FDS = major > 25 || (major === 25 && minor >= 7); +// https://github.com/nodejs/node/pull/61769 — backported to v24.15.0 +export const HAS_BROKEN_FSTAT_FOR_ZIP_FDS = major > 25 || (major === 25 && minor >= 7) || (major === 24 && minor >= 15); From 178b87d6d86e5e2f216d7705ec4b7565cc1d67c0 Mon Sep 17 00:00:00 2001 From: Rafael Franco Date: Thu, 16 Apr 2026 15:22:39 -0300 Subject: [PATCH 2/3] chore: revert manual .pnp.loader.mjs edit, add version bump file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The .pnp.loader.mjs is auto-generated — revert manual edit and let CI rebuild it. Add .yarn/versions/7103.yml to declare the patch bump. --- .pnp.loader.mjs | 2 +- .yarn/versions/7103.yml | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 .yarn/versions/7103.yml diff --git a/.pnp.loader.mjs b/.pnp.loader.mjs index 45359e90c3c..99fa4ff14b3 100644 --- a/.pnp.loader.mjs +++ b/.pnp.loader.mjs @@ -1433,7 +1433,7 @@ const WATCH_MODE_MESSAGE_USES_ARRAYS = major > 19 || major === 19 && minor >= 2 const HAS_LAZY_LOADED_TRANSLATORS = major === 20 && minor < 6 || major === 19 && minor >= 3; const SUPPORTS_IMPORT_ATTRIBUTES = major >= 21 || major === 20 && minor >= 10 || major === 18 && minor >= 20; const SUPPORTS_IMPORT_ATTRIBUTES_ONLY = major >= 22; -const HAS_BROKEN_FSTAT_FOR_ZIP_FDS = major > 25 || major === 25 && minor >= 7 || major === 24 && minor >= 15; +const HAS_BROKEN_FSTAT_FOR_ZIP_FDS = major > 25 || major === 25 && minor >= 7; function readPackageScope(checkPath) { const rootSeparatorIndex = checkPath.indexOf(npath.sep); diff --git a/.yarn/versions/7103.yml b/.yarn/versions/7103.yml new file mode 100644 index 00000000000..b12c539a627 --- /dev/null +++ b/.yarn/versions/7103.yml @@ -0,0 +1,21 @@ +releases: + "@yarnpkg/cli": patch + "@yarnpkg/plugin-pnp": patch + "@yarnpkg/pnp": patch + +declined: + - "@yarnpkg/plugin-compat" + - "@yarnpkg/plugin-constraints" + - "@yarnpkg/plugin-dlx" + - "@yarnpkg/plugin-essentials" + - "@yarnpkg/plugin-init" + - "@yarnpkg/plugin-interactive-tools" + - "@yarnpkg/plugin-nm" + - "@yarnpkg/plugin-npm-cli" + - "@yarnpkg/plugin-pack" + - "@yarnpkg/plugin-patch" + - "@yarnpkg/plugin-pnpm" + - "@yarnpkg/plugin-stage" + - "@yarnpkg/plugin-typescript" + - "@yarnpkg/plugin-version" + - "@yarnpkg/plugin-workspace-tools" From 63c7057b11a56a624081c59cd47014ad30e31dc6 Mon Sep 17 00:00:00 2001 From: Rafael Franco Date: Thu, 16 Apr 2026 15:28:39 -0300 Subject: [PATCH 3/3] chore: add missing declined packages to version file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add @yarnpkg/builder, @yarnpkg/core, @yarnpkg/doctor, @yarnpkg/nm, @yarnpkg/pnpify, and @yarnpkg/sdks to the declined list — they depend on packages planned for release but don't need a bump themselves. --- .yarn/versions/7103.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.yarn/versions/7103.yml b/.yarn/versions/7103.yml index b12c539a627..02bff9a5fab 100644 --- a/.yarn/versions/7103.yml +++ b/.yarn/versions/7103.yml @@ -4,6 +4,12 @@ releases: "@yarnpkg/pnp": patch declined: + - "@yarnpkg/builder" + - "@yarnpkg/core" + - "@yarnpkg/doctor" + - "@yarnpkg/nm" + - "@yarnpkg/pnpify" + - "@yarnpkg/sdks" - "@yarnpkg/plugin-compat" - "@yarnpkg/plugin-constraints" - "@yarnpkg/plugin-dlx"