vercel 50.0.0 → 50.0.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 +80 -2
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -92912,6 +92912,29 @@ async function findVercelConfigFile(workPath) {
|
|
|
92912
92912
|
}
|
|
92913
92913
|
return foundFiles[0] || null;
|
|
92914
92914
|
}
|
|
92915
|
+
function parseConfigLoaderError(stderr) {
|
|
92916
|
+
if (!stderr.trim()) {
|
|
92917
|
+
return "";
|
|
92918
|
+
}
|
|
92919
|
+
const moduleNotFoundMatch = stderr.match(
|
|
92920
|
+
/Error \[ERR_MODULE_NOT_FOUND\]: Cannot find package '([^']+)'/
|
|
92921
|
+
);
|
|
92922
|
+
if (moduleNotFoundMatch) {
|
|
92923
|
+
const packageName2 = moduleNotFoundMatch[1];
|
|
92924
|
+
return `Cannot find package '${packageName2}'. Make sure it's installed in your project dependencies.`;
|
|
92925
|
+
}
|
|
92926
|
+
const syntaxErrorMatch = stderr.match(/SyntaxError: (.+?)(?:\n|$)/);
|
|
92927
|
+
if (syntaxErrorMatch) {
|
|
92928
|
+
return `Syntax error: ${syntaxErrorMatch[1]}`;
|
|
92929
|
+
}
|
|
92930
|
+
const errorMatch = stderr.match(
|
|
92931
|
+
/^(?:Error|TypeError|ReferenceError): (.+?)(?:\n|$)/m
|
|
92932
|
+
);
|
|
92933
|
+
if (errorMatch) {
|
|
92934
|
+
return errorMatch[1];
|
|
92935
|
+
}
|
|
92936
|
+
return stderr.trim();
|
|
92937
|
+
}
|
|
92915
92938
|
async function compileVercelConfig(workPath) {
|
|
92916
92939
|
const vercelJsonPath = (0, import_path12.join)(workPath, "vercel.json");
|
|
92917
92940
|
const nowJsonPath = (0, import_path12.join)(workPath, "now.json");
|
|
@@ -92996,6 +93019,18 @@ async function compileVercelConfig(workPath) {
|
|
|
92996
93019
|
const child = (0, import_child_process3.fork)(loaderPath, [tempOutPath], {
|
|
92997
93020
|
stdio: ["pipe", "pipe", "pipe", "ipc"]
|
|
92998
93021
|
});
|
|
93022
|
+
let stderrOutput = "";
|
|
93023
|
+
let stdoutOutput = "";
|
|
93024
|
+
if (child.stderr) {
|
|
93025
|
+
child.stderr.on("data", (data) => {
|
|
93026
|
+
stderrOutput += data.toString();
|
|
93027
|
+
});
|
|
93028
|
+
}
|
|
93029
|
+
if (child.stdout) {
|
|
93030
|
+
child.stdout.on("data", (data) => {
|
|
93031
|
+
stdoutOutput += data.toString();
|
|
93032
|
+
});
|
|
93033
|
+
}
|
|
92999
93034
|
const timeout = setTimeout(() => {
|
|
93000
93035
|
child.kill();
|
|
93001
93036
|
reject(new Error("Config loader timed out after 10 seconds"));
|
|
@@ -93012,7 +93047,20 @@ async function compileVercelConfig(workPath) {
|
|
|
93012
93047
|
child.on("exit", (code2) => {
|
|
93013
93048
|
clearTimeout(timeout);
|
|
93014
93049
|
if (code2 !== 0) {
|
|
93015
|
-
|
|
93050
|
+
if (stderrOutput.trim()) {
|
|
93051
|
+
output_manager_default.log(stderrOutput);
|
|
93052
|
+
}
|
|
93053
|
+
if (stdoutOutput.trim()) {
|
|
93054
|
+
output_manager_default.log(stdoutOutput);
|
|
93055
|
+
}
|
|
93056
|
+
const parsedError = parseConfigLoaderError(stderrOutput);
|
|
93057
|
+
if (parsedError) {
|
|
93058
|
+
reject(new Error(parsedError));
|
|
93059
|
+
} else if (stdoutOutput.trim()) {
|
|
93060
|
+
reject(new Error(stdoutOutput.trim()));
|
|
93061
|
+
} else {
|
|
93062
|
+
reject(new Error(`Config loader exited with code ${code2}`));
|
|
93063
|
+
}
|
|
93016
93064
|
}
|
|
93017
93065
|
});
|
|
93018
93066
|
});
|
|
@@ -149471,6 +149519,34 @@ async function main3(client2) {
|
|
|
149471
149519
|
async function doBuild(client2, project, buildsJson, cwd, outputDir, span, standalone = false) {
|
|
149472
149520
|
const { localConfigPath } = client2;
|
|
149473
149521
|
const workPath = (0, import_path28.join)(cwd, project.settings.rootDirectory || ".");
|
|
149522
|
+
const sourceConfigFile = await findSourceVercelConfigFile(workPath);
|
|
149523
|
+
let corepackShimDir;
|
|
149524
|
+
if (sourceConfigFile && process.env.VERCEL_TS_CONFIG_ENABLED) {
|
|
149525
|
+
corepackShimDir = await initCorepack({ repoRootPath: cwd });
|
|
149526
|
+
const installCommand2 = project.settings.installCommand;
|
|
149527
|
+
if (typeof installCommand2 === "string") {
|
|
149528
|
+
if (installCommand2.trim()) {
|
|
149529
|
+
output_manager_default.log(`Running install command before config compilation...`);
|
|
149530
|
+
await (0, import_build_utils14.runCustomInstallCommand)({
|
|
149531
|
+
destPath: workPath,
|
|
149532
|
+
installCommand: installCommand2,
|
|
149533
|
+
spawnOpts: { env: process.env },
|
|
149534
|
+
projectCreatedAt: project.settings.createdAt
|
|
149535
|
+
});
|
|
149536
|
+
} else {
|
|
149537
|
+
output_manager_default.debug("Skipping empty install command");
|
|
149538
|
+
}
|
|
149539
|
+
} else {
|
|
149540
|
+
output_manager_default.log(`Installing dependencies before config compilation...`);
|
|
149541
|
+
await (0, import_build_utils14.runNpmInstall)(
|
|
149542
|
+
workPath,
|
|
149543
|
+
[],
|
|
149544
|
+
{ env: process.env },
|
|
149545
|
+
void 0,
|
|
149546
|
+
project.settings.createdAt
|
|
149547
|
+
);
|
|
149548
|
+
}
|
|
149549
|
+
}
|
|
149474
149550
|
const compileResult = await compileVercelConfig(workPath);
|
|
149475
149551
|
const vercelConfigPath = localConfigPath || compileResult.configPath || (0, import_path28.join)(workPath, "vercel.json");
|
|
149476
149552
|
const [pkg, vercelConfig, nowConfig, hasInstrumentation] = await Promise.all([
|
|
@@ -149603,7 +149679,9 @@ async function doBuild(client2, project, buildsJson, cwd, outputDir, span, stand
|
|
|
149603
149679
|
const buildResults = /* @__PURE__ */ new Map();
|
|
149604
149680
|
const overrides = [];
|
|
149605
149681
|
const repoRootPath = cwd;
|
|
149606
|
-
|
|
149682
|
+
if (!corepackShimDir) {
|
|
149683
|
+
corepackShimDir = await initCorepack({ repoRootPath });
|
|
149684
|
+
}
|
|
149607
149685
|
const diagnostics = {};
|
|
149608
149686
|
for (const build2 of sortedBuilders) {
|
|
149609
149687
|
if (typeof build2.src !== "string")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vercel",
|
|
3
|
-
"version": "50.0.
|
|
3
|
+
"version": "50.0.1",
|
|
4
4
|
"preferGlobal": true,
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"description": "The command-line interface for Vercel",
|
|
@@ -27,21 +27,21 @@
|
|
|
27
27
|
"esbuild": "0.27.0",
|
|
28
28
|
"jose": "5.9.6",
|
|
29
29
|
"@vercel/backends": "0.0.17",
|
|
30
|
-
"@vercel/build-utils": "13.2.3",
|
|
31
30
|
"@vercel/detect-agent": "1.0.0",
|
|
31
|
+
"@vercel/build-utils": "13.2.3",
|
|
32
|
+
"@vercel/express": "0.1.20",
|
|
32
33
|
"@vercel/fastify": "0.1.17",
|
|
33
34
|
"@vercel/go": "3.2.4",
|
|
34
|
-
"@vercel/express": "0.1.20",
|
|
35
35
|
"@vercel/h3": "0.1.23",
|
|
36
36
|
"@vercel/elysia": "0.1.14",
|
|
37
|
+
"@vercel/hydrogen": "1.3.3",
|
|
37
38
|
"@vercel/hono": "0.2.17",
|
|
38
|
-
"@vercel/next": "4.15.8",
|
|
39
39
|
"@vercel/nestjs": "0.2.18",
|
|
40
|
-
"@vercel/hydrogen": "1.3.3",
|
|
41
40
|
"@vercel/node": "5.5.15",
|
|
42
|
-
"@vercel/
|
|
41
|
+
"@vercel/next": "4.15.8",
|
|
43
42
|
"@vercel/python": "6.1.3",
|
|
44
43
|
"@vercel/remix-builder": "5.5.6",
|
|
44
|
+
"@vercel/redwood": "2.4.6",
|
|
45
45
|
"@vercel/ruby": "2.2.3",
|
|
46
46
|
"@vercel/rust": "1.0.4",
|
|
47
47
|
"@vercel/static-build": "2.8.14"
|
|
@@ -169,13 +169,13 @@
|
|
|
169
169
|
"xdg-app-paths": "5.1.0",
|
|
170
170
|
"yauzl-promise": "2.1.3",
|
|
171
171
|
"@vercel-internals/constants": "1.0.4",
|
|
172
|
-
"@vercel-internals/types": "3.0.6",
|
|
173
172
|
"@vercel-internals/get-package-json": "1.0.0",
|
|
173
|
+
"@vercel-internals/types": "3.0.6",
|
|
174
|
+
"@vercel/error-utils": "2.0.3",
|
|
174
175
|
"@vercel/client": "17.2.16",
|
|
175
|
-
"@vercel/frameworks": "3.15.4",
|
|
176
176
|
"@vercel/fs-detectors": "5.7.10",
|
|
177
|
-
"@vercel/
|
|
178
|
-
"@vercel/
|
|
177
|
+
"@vercel/frameworks": "3.15.4",
|
|
178
|
+
"@vercel/routing-utils": "5.3.1"
|
|
179
179
|
},
|
|
180
180
|
"scripts": {
|
|
181
181
|
"test": "jest --reporters=default --reporters=jest-junit --env node --verbose --bail",
|