Skip to content

Commit abe6e91

Browse files
authored
test: fix range for parent URL test (#5463)
**What's the problem this PR addresses?** The test added in #5362 doesn't run on Node.js v17. Fixes https://github.com/yarnpkg/berry/actions/runs/5060283241/jobs/9083017466 **How did you fix it?** Updated the range to match Node.js versions containing nodejs/node#42881 **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 ebfb96a commit abe6e91

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

β€Ž.yarn/versions/c594112e.ymlβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
declined:
2+
- "@yarnpkg/pnp"

β€Žpackages/acceptance-tests/pkg-tests-specs/sources/pnp-esm.test.tsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -972,7 +972,7 @@ describe(`Plug'n'Play - ESM`, () => {
972972
),
973973
);
974974

975-
(loaderFlags.HAS_CONSOLIDATED_HOOKS ? test : test.skip)(
975+
(loaderFlags.ALLOWS_NON_FILE_PARENT ? test : test.skip)(
976976
`it should allow importing files regardless of parent URL`,
977977
makeTemporaryEnv(
978978
{

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ export const WATCH_MODE_MESSAGE_USES_ARRAYS = major > 19 || (major === 19 && min
1515
// https://github.com/nodejs/node/pull/45659 changed the internal translators to be lazy loaded
1616
// TODO: Update the version range if https://github.com/nodejs/node/pull/46425 lands.
1717
export const HAS_LAZY_LOADED_TRANSLATORS = major > 19 || (major === 19 && minor >= 3);
18+
19+
// https://github.com/nodejs/node/pull/42881
20+
export const ALLOWS_NON_FILE_PARENT = major > 18 || (major === 18 && minor >= 1) || (major === 16 && minor >= 17);

0 commit comments

Comments
Β (0)