Skip to content

Commit 089ef00

Browse files
committed
fix: Stop using EBADF workaround for Node 24.16.0+
Node 24.16.0 backported nodejs/node#62835, so it can now disable the EBADF workaround to avoid similar breakage. This works similar to PR #7133.
1 parent 6861e75 commit 089ef00

5 files changed

Lines changed: 32 additions & 4 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.

β€Ž.yarn/versions/abc065bf.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/plugin-compat"
8+
- "@yarnpkg/plugin-constraints"
9+
- "@yarnpkg/plugin-dlx"
10+
- "@yarnpkg/plugin-essentials"
11+
- "@yarnpkg/plugin-init"
12+
- "@yarnpkg/plugin-interactive-tools"
13+
- "@yarnpkg/plugin-nm"
14+
- "@yarnpkg/plugin-npm-cli"
15+
- "@yarnpkg/plugin-pack"
16+
- "@yarnpkg/plugin-patch"
17+
- "@yarnpkg/plugin-pnpm"
18+
- "@yarnpkg/plugin-stage"
19+
- "@yarnpkg/plugin-typescript"
20+
- "@yarnpkg/plugin-version"
21+
- "@yarnpkg/plugin-workspace-tools"
22+
- "@yarnpkg/builder"
23+
- "@yarnpkg/core"
24+
- "@yarnpkg/doctor"
25+
- "@yarnpkg/nm"
26+
- "@yarnpkg/pnpify"
27+
- "@yarnpkg/sdks"

β€Žpackages/yarnpkg-pnp/sources/esm-loader/built-loader.jsβ€Ž

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 & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ export const SUPPORTS_IMPORT_ATTRIBUTES = major >= 21 || (major === 20 && minor
2222
export const SUPPORTS_IMPORT_ATTRIBUTES_ONLY = major >= 22;
2323

2424
// https://github.com/nodejs/node/pull/61769 β€” backported to v24.15.0 and v22.22.3
25-
// https://github.com/nodejs/node/pull/62835 fixed the broken stat (v26.1.0)
25+
// https://github.com/nodejs/node/pull/62835 fixed the broken stat (v26.1.0, backported to v24.16.0)
2626
export const HAS_BROKEN_FSTAT_FOR_ZIP_FDS =
2727
(major === 26 && minor < 1) ||
2828
(major === 25 && minor >= 7) ||
29-
(major === 24 && minor >= 15) ||
29+
(major === 24 && minor === 15) ||
3030
(major === 22 && (minor > 22 || (minor === 22 && patch >= 3)));

β€Žpackages/yarnpkg-pnp/tests/loaderFlags.test.tsβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ describe(`loaderFlags`, () => {
3131
it(`should keep the existing affected version ranges`, () => {
3232
expect(hasBrokenFstatForZipFds(`24.14.0`)).toBe(false);
3333
expect(hasBrokenFstatForZipFds(`24.15.0`)).toBe(true);
34+
expect(hasBrokenFstatForZipFds(`24.16.0`)).toBe(false);
3435
expect(hasBrokenFstatForZipFds(`25.6.0`)).toBe(false);
3536
expect(hasBrokenFstatForZipFds(`25.7.0`)).toBe(true);
3637
expect(hasBrokenFstatForZipFds(`26.0.0`)).toBe(true);

0 commit comments

Comments
Β (0)