Open JLHwung opened 1 month ago
It seems that the behaviour on Node.js 23 actually does more good to the Babel repo than the upgrade disruption: We have nailed several unsound imports that won't be revealed unless pnp mode is enabled. At this time this issue no longer blocks Babel's adaption to Node.js 23.
I guess this issue might be related to https://github.com/nodejs/node/issues/55410. If yarn used path.resolve
internally, then the behaviour change in node 23 might prevent yarn hoisting some packages. Hopefully it will be reverted in the next release.
Self-service
Describe the bug
Yarn 4.3.1 generated different nm layout on Node.js 23 when
enableTransparentWorkspaces
isfalse
. I also tested on Yarn 4.5.1, the nm layout is identical to yarn 4.3.1.To reproduce
Expected: there are no differences between these two file. As there are no differences when running yarn on node.js 22 vs node.js 20.
Actual: Their are differences from
@babel/*
packages, and it seems that yarn 4 on Node.js 23 are hoisting less packages to the top level than Node.js 22/20.Environment
System: OS: macOS 14.7 CPU: (10) arm64 Apple M1 Max Binaries: Node: 20.13.1 - /private/var/folders/qq/f33w791j6wgb405mt9lgpw3w0000gn/T/xfs-b5fa2615/node Yarn: 4.5.1 - /private/var/folders/qq/f33w791j6wgb405mt9lgpw3w0000gn/T/xfs-b5fa2615/yarn npm: 10.5.2 - ~/.nvm/versions/node/v20.13.1/bin/npm bun: 0.5.1 - ~/.bun/bin/bun npmPackages: jest: ^30.0.0-alpha.2 => 30.0.0-alpha.2
Additional context
This issue currently blocks https://github.com/babel/babel/pull/16912.