@vercel/next 4.6.0 → 4.6.1
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 +41 -33
- package/package.json +2 -2
package/dist/index.js
CHANGED
@@ -15703,7 +15703,7 @@ function isLegacyNext(nextVersion) {
|
|
15703
15703
|
}
|
15704
15704
|
var build = async (buildOptions) => {
|
15705
15705
|
let { workPath, repoRootPath } = buildOptions;
|
15706
|
-
const
|
15706
|
+
const builderSpan = buildOptions.span ?? new import_build_utils3.Span({ name: "vc.builder" });
|
15707
15707
|
const {
|
15708
15708
|
files,
|
15709
15709
|
entrypoint,
|
@@ -15817,11 +15817,11 @@ var build = async (buildOptions) => {
|
|
15817
15817
|
typeof trimmedInstallCommand === "undefined" || // Case 1: We have a install command which is non zero length
|
15818
15818
|
Boolean(trimmedInstallCommand)
|
15819
15819
|
);
|
15820
|
-
|
15820
|
+
builderSpan.setAttributes({
|
15821
15821
|
install: JSON.stringify(shouldRunInstallCommand)
|
15822
15822
|
});
|
15823
15823
|
if (shouldRunInstallCommand) {
|
15824
|
-
await
|
15824
|
+
await builderSpan.child(import_build_utils3.BUILDER_INSTALLER_STEP, {
|
15825
15825
|
cliType,
|
15826
15826
|
lockfileVersion: lockfileVersion?.toString(),
|
15827
15827
|
packageJsonPackageManager,
|
@@ -15909,37 +15909,45 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
|
|
15909
15909
|
if (isServerMode) {
|
15910
15910
|
env.NODE_ENV = "production";
|
15911
15911
|
}
|
15912
|
-
|
15913
|
-
|
15914
|
-
|
15915
|
-
}).trace(async () => {
|
15916
|
-
if (buildCommand) {
|
15917
|
-
const nodeBinPaths = (0, import_build_utils3.getNodeBinPaths)({
|
15918
|
-
start: entryPath,
|
15919
|
-
base: repoRootPath
|
15920
|
-
});
|
15921
|
-
const nodeBinPath = nodeBinPaths.join(import_path5.default.delimiter);
|
15922
|
-
env.PATH = `${nodeBinPath}${import_path5.default.delimiter}${env.PATH}`;
|
15923
|
-
if (!env.YARN_NODE_LINKER) {
|
15924
|
-
env.YARN_NODE_LINKER = "node-modules";
|
15925
|
-
}
|
15926
|
-
(0, import_build_utils3.debug)(
|
15927
|
-
`Added "${nodeBinPath}" to PATH env because a build command was used.`
|
15928
|
-
);
|
15929
|
-
console.log(`Running "${buildCommand}"`);
|
15930
|
-
await (0, import_build_utils3.execCommand)(buildCommand, {
|
15931
|
-
...spawnOpts,
|
15932
|
-
cwd: entryPath,
|
15933
|
-
env
|
15934
|
-
});
|
15935
|
-
} else if (buildScriptName) {
|
15936
|
-
await (0, import_build_utils3.runPackageJsonScript)(entryPath, buildScriptName, {
|
15937
|
-
...spawnOpts,
|
15938
|
-
env
|
15939
|
-
});
|
15940
|
-
}
|
15912
|
+
const shouldRunCompileStep = Boolean(buildCommand) || Boolean(buildScriptName);
|
15913
|
+
builderSpan.setAttributes({
|
15914
|
+
build: JSON.stringify(shouldRunCompileStep)
|
15941
15915
|
});
|
15942
|
-
(
|
15916
|
+
if (shouldRunCompileStep) {
|
15917
|
+
await builderSpan.child(import_build_utils3.BUILDER_COMPILE_STEP, {
|
15918
|
+
buildCommand,
|
15919
|
+
buildScriptName
|
15920
|
+
}).trace(async () => {
|
15921
|
+
if (buildCommand) {
|
15922
|
+
const nodeBinPaths = (0, import_build_utils3.getNodeBinPaths)({
|
15923
|
+
start: entryPath,
|
15924
|
+
base: repoRootPath
|
15925
|
+
});
|
15926
|
+
const nodeBinPath = nodeBinPaths.join(import_path5.default.delimiter);
|
15927
|
+
env.PATH = `${nodeBinPath}${import_path5.default.delimiter}${env.PATH}`;
|
15928
|
+
if (!env.YARN_NODE_LINKER) {
|
15929
|
+
env.YARN_NODE_LINKER = "node-modules";
|
15930
|
+
}
|
15931
|
+
(0, import_build_utils3.debug)(
|
15932
|
+
`Added "${nodeBinPath}" to PATH env because a build command was used.`
|
15933
|
+
);
|
15934
|
+
console.log(`Running "${buildCommand}"`);
|
15935
|
+
await (0, import_build_utils3.execCommand)(buildCommand, {
|
15936
|
+
...spawnOpts,
|
15937
|
+
cwd: entryPath,
|
15938
|
+
env
|
15939
|
+
});
|
15940
|
+
} else if (buildScriptName) {
|
15941
|
+
await (0, import_build_utils3.runPackageJsonScript)(entryPath, buildScriptName, {
|
15942
|
+
...spawnOpts,
|
15943
|
+
env
|
15944
|
+
});
|
15945
|
+
}
|
15946
|
+
});
|
15947
|
+
(0, import_build_utils3.debug)("build command exited");
|
15948
|
+
} else {
|
15949
|
+
console.log(`Skipping "build" command...`);
|
15950
|
+
}
|
15943
15951
|
if (buildCallback) {
|
15944
15952
|
await buildCallback(buildOptions);
|
15945
15953
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vercel/next",
|
3
|
-
"version": "4.6.
|
3
|
+
"version": "4.6.1",
|
4
4
|
"license": "Apache-2.0",
|
5
5
|
"main": "./dist/index",
|
6
6
|
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",
|
@@ -30,7 +30,7 @@
|
|
30
30
|
"@types/semver": "6.0.0",
|
31
31
|
"@types/text-table": "0.2.1",
|
32
32
|
"@types/webpack-sources": "3.2.0",
|
33
|
-
"@vercel/build-utils": "9.3.
|
33
|
+
"@vercel/build-utils": "9.3.1",
|
34
34
|
"@vercel/routing-utils": "5.0.4",
|
35
35
|
"async-sema": "3.0.1",
|
36
36
|
"buffer-crc32": "0.2.13",
|