@vercel/static-build 2.8.5 → 2.8.6
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 +28 -16
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -29152,23 +29152,27 @@ var build = async ({
|
|
|
29152
29152
|
config,
|
|
29153
29153
|
meta
|
|
29154
29154
|
);
|
|
29155
|
+
const spawnOpts = (0, import_build_utils4.getSpawnOptions)(meta, nodeVersion);
|
|
29156
|
+
if (!spawnOpts.env) {
|
|
29157
|
+
spawnOpts.env = {};
|
|
29158
|
+
}
|
|
29159
|
+
if (framework?.slug === "create-react-app") {
|
|
29160
|
+
spawnOpts.env.CI = "false";
|
|
29161
|
+
}
|
|
29155
29162
|
const {
|
|
29156
29163
|
cliType,
|
|
29157
29164
|
lockfileVersion,
|
|
29158
29165
|
packageJsonPackageManager,
|
|
29159
29166
|
turboSupportsCorepackHome
|
|
29160
29167
|
} = await (0, import_build_utils4.scanParentDirs)(entrypointDir, true);
|
|
29161
|
-
|
|
29168
|
+
spawnOpts.env = (0, import_build_utils4.getEnvForPackageManager)({
|
|
29162
29169
|
cliType,
|
|
29163
29170
|
lockfileVersion,
|
|
29164
29171
|
packageJsonPackageManager,
|
|
29165
|
-
env:
|
|
29172
|
+
env: spawnOpts.env || {},
|
|
29166
29173
|
turboSupportsCorepackHome,
|
|
29167
29174
|
projectCreatedAt: config.projectSettings?.createdAt
|
|
29168
29175
|
});
|
|
29169
|
-
if (framework?.slug === "create-react-app") {
|
|
29170
|
-
spawnEnv.CI = "false";
|
|
29171
|
-
}
|
|
29172
29176
|
if (meta.isDev) {
|
|
29173
29177
|
(0, import_build_utils4.debug)("Skipping dependency installation because dev mode is enabled");
|
|
29174
29178
|
} else {
|
|
@@ -29184,7 +29188,7 @@ var build = async ({
|
|
|
29184
29188
|
await (0, import_build_utils4.runNpmInstall)(
|
|
29185
29189
|
entrypointDir,
|
|
29186
29190
|
[],
|
|
29187
|
-
|
|
29191
|
+
spawnOpts,
|
|
29188
29192
|
meta,
|
|
29189
29193
|
config.projectSettings?.createdAt
|
|
29190
29194
|
);
|
|
@@ -29193,7 +29197,7 @@ var build = async ({
|
|
|
29193
29197
|
if (installCommand.trim()) {
|
|
29194
29198
|
console.log(`Running "install" command: \`${installCommand}\`...`);
|
|
29195
29199
|
await (0, import_build_utils4.execCommand)(installCommand, {
|
|
29196
|
-
|
|
29200
|
+
...spawnOpts,
|
|
29197
29201
|
cwd: entrypointDir
|
|
29198
29202
|
});
|
|
29199
29203
|
isNpmInstall = true;
|
|
@@ -29237,7 +29241,7 @@ var build = async ({
|
|
|
29237
29241
|
await (0, import_build_utils4.runNpmInstall)(
|
|
29238
29242
|
entrypointDir,
|
|
29239
29243
|
[],
|
|
29240
|
-
|
|
29244
|
+
spawnOpts,
|
|
29241
29245
|
meta,
|
|
29242
29246
|
config.projectSettings?.createdAt
|
|
29243
29247
|
);
|
|
@@ -29279,11 +29283,11 @@ var build = async ({
|
|
|
29279
29283
|
}
|
|
29280
29284
|
if (isPipInstall) {
|
|
29281
29285
|
}
|
|
29282
|
-
if (
|
|
29283
|
-
pathList.push(
|
|
29286
|
+
if (spawnOpts?.env?.PATH) {
|
|
29287
|
+
pathList.push(spawnOpts.env.PATH);
|
|
29284
29288
|
}
|
|
29285
|
-
|
|
29286
|
-
...
|
|
29289
|
+
spawnOpts.env = {
|
|
29290
|
+
...spawnOpts.env,
|
|
29287
29291
|
PATH: pathList.join(import_path6.default.delimiter),
|
|
29288
29292
|
GEM_HOME: gemHome
|
|
29289
29293
|
};
|
|
@@ -29301,7 +29305,7 @@ var build = async ({
|
|
|
29301
29305
|
const opts = {
|
|
29302
29306
|
cwd: entrypointDir,
|
|
29303
29307
|
stdio: "inherit",
|
|
29304
|
-
env: { ...
|
|
29308
|
+
env: { ...spawnOpts.env, PORT: String(devPort) }
|
|
29305
29309
|
};
|
|
29306
29310
|
const cmd = devCommand || `yarn run ${devScript}`;
|
|
29307
29311
|
const child = (0, import_build_utils4.spawnCommand)(cmd, opts);
|
|
@@ -29336,17 +29340,18 @@ Details: https://err.sh/vercel/vercel/now-static-build-failed-to-detect-a-server
|
|
|
29336
29340
|
}
|
|
29337
29341
|
try {
|
|
29338
29342
|
const found = typeof buildCommand === "string" ? await (0, import_build_utils4.execCommand)(buildCommand, {
|
|
29343
|
+
...spawnOpts,
|
|
29339
29344
|
// Yarn v2 PnP mode may be activated, so force
|
|
29340
29345
|
// "node-modules" linker style
|
|
29341
29346
|
env: {
|
|
29342
29347
|
YARN_NODE_LINKER: "node-modules",
|
|
29343
|
-
...
|
|
29348
|
+
...spawnOpts.env
|
|
29344
29349
|
},
|
|
29345
29350
|
cwd: entrypointDir
|
|
29346
29351
|
}) : await (0, import_build_utils4.runPackageJsonScript)(
|
|
29347
29352
|
entrypointDir,
|
|
29348
29353
|
["vercel-build", "now-build", "build"],
|
|
29349
|
-
|
|
29354
|
+
spawnOpts,
|
|
29350
29355
|
config.projectSettings?.createdAt
|
|
29351
29356
|
);
|
|
29352
29357
|
if (!found) {
|
|
@@ -29431,7 +29436,14 @@ Details: https://err.sh/vercel/vercel/now-static-build-failed-to-detect-a-server
|
|
|
29431
29436
|
}
|
|
29432
29437
|
if (!config.zeroConfig && entrypoint.endsWith(".sh")) {
|
|
29433
29438
|
(0, import_build_utils4.debug)(`Running build script "${entrypoint}"`);
|
|
29434
|
-
await (0, import_build_utils4.
|
|
29439
|
+
const nodeVersion = await (0, import_build_utils4.getNodeVersion)(
|
|
29440
|
+
entrypointDir,
|
|
29441
|
+
void 0,
|
|
29442
|
+
config,
|
|
29443
|
+
meta
|
|
29444
|
+
);
|
|
29445
|
+
const spawnOpts = (0, import_build_utils4.getSpawnOptions)(meta, nodeVersion);
|
|
29446
|
+
await (0, import_build_utils4.runShellScript)(import_path6.default.join(workPath, entrypoint), [], spawnOpts);
|
|
29435
29447
|
validateDistDir(distPath, workPath);
|
|
29436
29448
|
const output = await (0, import_build_utils4.glob)("**", distPath, mountpoint);
|
|
29437
29449
|
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.6",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "./dist/index",
|
|
6
6
|
"homepage": "https://vercel.com/docs/build-step",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@vercel/gatsby-plugin-vercel-analytics": "1.0.11",
|
|
17
|
-
"@vercel/gatsby-plugin-vercel-builder": "2.0.
|
|
17
|
+
"@vercel/gatsby-plugin-vercel-builder": "2.0.105",
|
|
18
18
|
"@vercel/static-config": "3.1.2",
|
|
19
19
|
"ts-morph": "12.0.0"
|
|
20
20
|
},
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@types/node-fetch": "2.5.4",
|
|
29
29
|
"@types/promise-timeout": "1.3.0",
|
|
30
30
|
"@types/semver": "7.3.13",
|
|
31
|
-
"@vercel/build-utils": "13.0.
|
|
31
|
+
"@vercel/build-utils": "13.0.1",
|
|
32
32
|
"@vercel/error-utils": "2.0.3",
|
|
33
33
|
"@vercel/frameworks": "3.15.2",
|
|
34
34
|
"@vercel/fs-detectors": "5.7.5",
|