From 803d654f99d750309cd1a663ff21967ee697c9fc Mon Sep 17 00:00:00 2001 From: Malte Ubl Date: Mon, 26 Oct 2026 16:01:24 -0700 Subject: [PATCH] Make corpus 6839's package an island with a spread require Main resolves computed createRequire specifiers at run time, so the package's computed require no longer makes an island; a spread argument list still does. --- .../node_modules/pathkit/build/index.mjs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/corpus/6839-node-island-path-mapped/node_modules/pathkit/build/index.mjs b/tests/corpus/6839-node-island-path-mapped/node_modules/pathkit/build/index.mjs index e41172550..04b3bb548 100644 --- a/tests/corpus/6839-node-island-path-mapped/node_modules/pathkit/build/index.mjs +++ b/tests/corpus/6839-node-island-path-mapped/node_modules/pathkit/build/index.mjs @@ -1,8 +1,8 @@ -// The loader picks its part with a computed require() specifier, which -// scriptc does not compile natively: the package runs in a Node island. +// The loader requires its part with spread arguments, which scriptc does +// not compile natively: the package runs in a Node island. import { createRequire } from "node:module"; const load = createRequire(import.meta.url); -const { Route } = ["./route.cjs"].map((p) => load(p))[0]; +const { Route } = load(...["./route.cjs"]); export function route(path, weight) { return new Route(path, weight); }