[node] Fix ESM dependency support (#9692)

This commit is contained in:
Chris Barber
2023-04-26 12:23:43 -05:00
committed by GitHub
parent fda76691d1
commit 65a6e713c8
54 changed files with 1750 additions and 138 deletions

View File

@@ -115,6 +115,11 @@ function validateResponseHeaders(res, podId) {
async function exec(directory, args = []) {
const token = await fetchCachedToken();
console.log(
`exec() ${binaryPath} dev ${directory} -t ***${
process.env.VERCEL_TEAM_ID ? ' --scope ***' : ''
} ${args.join(' ')}`
);
return execa(
binaryPath,
[
@@ -195,6 +200,11 @@ async function testFixture(directory, opts = {}, args = []) {
await runNpmInstall(directory);
const token = await fetchCachedToken();
console.log(
`testFixture() ${binaryPath} dev ${directory} -t ***${
process.env.VERCEL_TEAM_ID ? ' --scope ***' : ''
} -l ${port} ${args.join(' ')}`
);
const dev = execa(
binaryPath,
[
@@ -427,6 +437,11 @@ function testFixtureStdio(
try {
let printedOutput = false;
console.log(
`testFixtureStdio() ${binaryPath} dev -l ${port} -t ***${
process.env.VERCEL_TEAM_ID ? ' --scope ***' : ''
} --debug`
);
const env = skipDeploy
? { ...process.env, __VERCEL_SKIP_DEV_CMD: 1 }
: process.env;