fix(runner): compile descriptor bundles without import meta
This commit is contained in:
parent
62b79deb20
commit
d414396011
|
|
@ -68,6 +68,14 @@ export async function bundleVerifiedProviderEntrypoints({ write = true } = {}) {
|
|||
treeShaking: true,
|
||||
write,
|
||||
logLevel: "silent",
|
||||
define:
|
||||
format === "cjs"
|
||||
? {
|
||||
"import.meta.dirname": "__dirname",
|
||||
"import.meta.url":
|
||||
'require("node:url").pathToFileURL(__filename).href',
|
||||
}
|
||||
: undefined,
|
||||
});
|
||||
assertSelfContainedBundle(entrypoint, result);
|
||||
return result;
|
||||
|
|
|
|||
|
|
@ -16,6 +16,11 @@ test("provider entrypoints include self-contained ESM and descriptor-safe Common
|
|||
const source = bundle.outputFiles[0].text;
|
||||
assert.match(source, /^#!\/usr\/bin\/env node\n/);
|
||||
}
|
||||
assert.doesNotMatch(
|
||||
verifiedResult.outputFiles[0].text,
|
||||
/\bimport\.meta\b/,
|
||||
entrypoint.name,
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue