@vercel/static-build 2.8.18 → 2.8.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +17 -29
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -29342,33 +29342,29 @@ var build = async ({
|
|
|
29342
29342
|
}
|
|
29343
29343
|
}
|
|
29344
29344
|
}
|
|
29345
|
-
const nodeVersion = await (0, import_build_utils4.
|
|
29345
|
+
const nodeVersion = await (0, import_build_utils4.getNodeVersion)(
|
|
29346
29346
|
entrypointDir,
|
|
29347
29347
|
void 0,
|
|
29348
29348
|
config,
|
|
29349
29349
|
meta
|
|
29350
29350
|
);
|
|
29351
|
-
const spawnOpts = (0, import_build_utils4.getSpawnOptions)(meta, nodeVersion);
|
|
29352
|
-
if (!spawnOpts.env) {
|
|
29353
|
-
spawnOpts.env = {};
|
|
29354
|
-
}
|
|
29355
|
-
if (framework?.slug === "create-react-app") {
|
|
29356
|
-
spawnOpts.env.CI = "false";
|
|
29357
|
-
}
|
|
29358
29351
|
const {
|
|
29359
29352
|
cliType,
|
|
29360
29353
|
lockfileVersion,
|
|
29361
29354
|
packageJsonPackageManager,
|
|
29362
29355
|
turboSupportsCorepackHome
|
|
29363
29356
|
} = await (0, import_build_utils4.scanParentDirs)(entrypointDir, true);
|
|
29364
|
-
|
|
29357
|
+
const spawnEnv = (0, import_build_utils4.getEnvForPackageManager)({
|
|
29365
29358
|
cliType,
|
|
29366
29359
|
lockfileVersion,
|
|
29367
29360
|
packageJsonPackageManager,
|
|
29368
|
-
env:
|
|
29361
|
+
env: process.env,
|
|
29369
29362
|
turboSupportsCorepackHome,
|
|
29370
29363
|
projectCreatedAt: config.projectSettings?.createdAt
|
|
29371
29364
|
});
|
|
29365
|
+
if (framework?.slug === "create-react-app") {
|
|
29366
|
+
spawnEnv.CI = "false";
|
|
29367
|
+
}
|
|
29372
29368
|
if (meta.isDev) {
|
|
29373
29369
|
(0, import_build_utils4.debug)("Skipping dependency installation because dev mode is enabled");
|
|
29374
29370
|
} else {
|
|
@@ -29384,7 +29380,7 @@ var build = async ({
|
|
|
29384
29380
|
await (0, import_build_utils4.runNpmInstall)(
|
|
29385
29381
|
entrypointDir,
|
|
29386
29382
|
[],
|
|
29387
|
-
|
|
29383
|
+
{ env: spawnEnv },
|
|
29388
29384
|
meta,
|
|
29389
29385
|
config.projectSettings?.createdAt
|
|
29390
29386
|
);
|
|
@@ -29393,7 +29389,7 @@ var build = async ({
|
|
|
29393
29389
|
if (installCommand.trim()) {
|
|
29394
29390
|
console.log(`Running "install" command: \`${installCommand}\`...`);
|
|
29395
29391
|
await (0, import_build_utils4.execCommand)(installCommand, {
|
|
29396
|
-
|
|
29392
|
+
env: spawnEnv,
|
|
29397
29393
|
cwd: entrypointDir
|
|
29398
29394
|
});
|
|
29399
29395
|
isNpmInstall = true;
|
|
@@ -29437,7 +29433,7 @@ var build = async ({
|
|
|
29437
29433
|
await (0, import_build_utils4.runNpmInstall)(
|
|
29438
29434
|
entrypointDir,
|
|
29439
29435
|
[],
|
|
29440
|
-
|
|
29436
|
+
{ env: spawnEnv },
|
|
29441
29437
|
meta,
|
|
29442
29438
|
config.projectSettings?.createdAt
|
|
29443
29439
|
);
|
|
@@ -29479,11 +29475,11 @@ var build = async ({
|
|
|
29479
29475
|
}
|
|
29480
29476
|
if (isPipInstall) {
|
|
29481
29477
|
}
|
|
29482
|
-
if (
|
|
29483
|
-
pathList.push(
|
|
29478
|
+
if (spawnEnv.PATH) {
|
|
29479
|
+
pathList.push(spawnEnv.PATH);
|
|
29484
29480
|
}
|
|
29485
|
-
|
|
29486
|
-
...
|
|
29481
|
+
const cliEnv = {
|
|
29482
|
+
...process.env,
|
|
29487
29483
|
PATH: pathList.join(import_path6.default.delimiter),
|
|
29488
29484
|
GEM_HOME: gemHome
|
|
29489
29485
|
};
|
|
@@ -29501,7 +29497,7 @@ var build = async ({
|
|
|
29501
29497
|
const opts = {
|
|
29502
29498
|
cwd: entrypointDir,
|
|
29503
29499
|
stdio: "inherit",
|
|
29504
|
-
env: { ...
|
|
29500
|
+
env: { ...cliEnv, PORT: String(devPort) }
|
|
29505
29501
|
};
|
|
29506
29502
|
const cmd = devCommand || `yarn run ${devScript}`;
|
|
29507
29503
|
const child = (0, import_build_utils4.spawnCommand)(cmd, opts);
|
|
@@ -29536,18 +29532,17 @@ Details: https://err.sh/vercel/vercel/now-static-build-failed-to-detect-a-server
|
|
|
29536
29532
|
}
|
|
29537
29533
|
try {
|
|
29538
29534
|
const found = typeof buildCommand === "string" ? await (0, import_build_utils4.execCommand)(buildCommand, {
|
|
29539
|
-
...spawnOpts,
|
|
29540
29535
|
// Yarn v2 PnP mode may be activated, so force
|
|
29541
29536
|
// "node-modules" linker style
|
|
29542
29537
|
env: {
|
|
29543
29538
|
YARN_NODE_LINKER: "node-modules",
|
|
29544
|
-
...
|
|
29539
|
+
...cliEnv
|
|
29545
29540
|
},
|
|
29546
29541
|
cwd: entrypointDir
|
|
29547
29542
|
}) : await (0, import_build_utils4.runPackageJsonScript)(
|
|
29548
29543
|
entrypointDir,
|
|
29549
29544
|
["vercel-build", "now-build", "build"],
|
|
29550
|
-
|
|
29545
|
+
{ env: cliEnv },
|
|
29551
29546
|
config.projectSettings?.createdAt
|
|
29552
29547
|
);
|
|
29553
29548
|
if (!found) {
|
|
@@ -29632,14 +29627,7 @@ Details: https://err.sh/vercel/vercel/now-static-build-failed-to-detect-a-server
|
|
|
29632
29627
|
}
|
|
29633
29628
|
if (!config.zeroConfig && entrypoint.endsWith(".sh")) {
|
|
29634
29629
|
(0, import_build_utils4.debug)(`Running build script "${entrypoint}"`);
|
|
29635
|
-
|
|
29636
|
-
entrypointDir,
|
|
29637
|
-
void 0,
|
|
29638
|
-
config,
|
|
29639
|
-
meta
|
|
29640
|
-
);
|
|
29641
|
-
const spawnOpts = (0, import_build_utils4.getSpawnOptions)(meta, nodeVersion);
|
|
29642
|
-
await (0, import_build_utils4.runShellScript)(import_path6.default.join(workPath, entrypoint), [], spawnOpts);
|
|
29630
|
+
await (0, import_build_utils4.runShellScript)(import_path6.default.join(workPath, entrypoint));
|
|
29643
29631
|
validateDistDir(distPath, workPath);
|
|
29644
29632
|
const output = await (0, import_build_utils4.glob)("**", distPath, mountpoint);
|
|
29645
29633
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/static-build",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.20",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "./dist/index",
|
|
6
6
|
"homepage": "https://vercel.com/docs/build-step",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"ts-morph": "12.0.0",
|
|
17
17
|
"@vercel/gatsby-plugin-vercel-analytics": "1.0.11",
|
|
18
18
|
"@vercel/static-config": "3.1.2",
|
|
19
|
-
"@vercel/gatsby-plugin-vercel-builder": "2.0.
|
|
19
|
+
"@vercel/gatsby-plugin-vercel-builder": "2.0.119"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@types/aws-lambda": "8.10.64",
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
"rc9": "1.2.0",
|
|
39
39
|
"semver": "7.5.2",
|
|
40
40
|
"tree-kill": "1.2.2",
|
|
41
|
+
"@vercel/build-utils": "13.2.9",
|
|
41
42
|
"@vercel/error-utils": "2.0.3",
|
|
42
43
|
"@vercel/frameworks": "3.15.5",
|
|
43
|
-
"@vercel/build-utils": "13.2.7",
|
|
44
44
|
"@vercel/routing-utils": "5.3.2",
|
|
45
45
|
"@vercel/fs-detectors": "5.7.13"
|
|
46
46
|
},
|