@vercel/node 24.0.3 → 25.0.0
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 +46 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -72549,8 +72549,18 @@ async function downloadInstallAndBundle({
|
|
|
72549
72549
|
turboSupportsCorepackHome,
|
|
72550
72550
|
projectCreatedAt: config.projectSettings?.createdAt
|
|
72551
72551
|
});
|
|
72552
|
+
const functionInstallCommand = (0, import_build_utils6.findMatchingFunction)(config.functions, [
|
|
72553
|
+
entrypoint
|
|
72554
|
+
])?.functionConfig?.installCommand;
|
|
72552
72555
|
const installCommand = config.projectSettings?.installCommand;
|
|
72553
|
-
if (typeof
|
|
72556
|
+
if (typeof functionInstallCommand === "string") {
|
|
72557
|
+
await runFunctionInstallCommand({
|
|
72558
|
+
installCommand: functionInstallCommand,
|
|
72559
|
+
workPath,
|
|
72560
|
+
spawnEnv,
|
|
72561
|
+
meta
|
|
72562
|
+
});
|
|
72563
|
+
} else if (typeof installCommand === "string" && considerBuildCommand) {
|
|
72554
72564
|
if (installCommand.trim()) {
|
|
72555
72565
|
console.log(`Running "install" command: \`${installCommand}\`...`);
|
|
72556
72566
|
await (0, import_build_utils6.execCommand)(installCommand, {
|
|
@@ -72585,6 +72595,41 @@ async function downloadInstallAndBundle({
|
|
|
72585
72595
|
lockfileVersion
|
|
72586
72596
|
};
|
|
72587
72597
|
}
|
|
72598
|
+
var pendingFunctionInstalls = /* @__PURE__ */ new WeakMap();
|
|
72599
|
+
async function runFunctionInstallCommand({
|
|
72600
|
+
installCommand,
|
|
72601
|
+
workPath,
|
|
72602
|
+
spawnEnv,
|
|
72603
|
+
meta
|
|
72604
|
+
}) {
|
|
72605
|
+
if (!installCommand.trim()) {
|
|
72606
|
+
console.log(`Skipping "install" command...`);
|
|
72607
|
+
return;
|
|
72608
|
+
}
|
|
72609
|
+
if (meta.isDev) {
|
|
72610
|
+
(0, import_build_utils6.debug)("Skipping dependency installation because dev mode is enabled");
|
|
72611
|
+
return;
|
|
72612
|
+
}
|
|
72613
|
+
const ran = meta.functionInstallCommandSet instanceof Set ? meta.functionInstallCommandSet : /* @__PURE__ */ new Set();
|
|
72614
|
+
meta.functionInstallCommandSet = ran;
|
|
72615
|
+
const key = `${workPath}\0${installCommand}`;
|
|
72616
|
+
if (ran.has(key)) {
|
|
72617
|
+
return;
|
|
72618
|
+
}
|
|
72619
|
+
const pending = pendingFunctionInstalls.get(ran) ?? /* @__PURE__ */ new Map();
|
|
72620
|
+
pendingFunctionInstalls.set(ran, pending);
|
|
72621
|
+
let install = pending.get(key);
|
|
72622
|
+
if (!install) {
|
|
72623
|
+
console.log(`Running "install" command: \`${installCommand}\`...`);
|
|
72624
|
+
install = (0, import_build_utils6.execCommand)(installCommand, { env: spawnEnv, cwd: workPath }).then(() => {
|
|
72625
|
+
ran.add(key);
|
|
72626
|
+
}).finally(() => {
|
|
72627
|
+
pending.delete(key);
|
|
72628
|
+
});
|
|
72629
|
+
pending.set(key, install);
|
|
72630
|
+
}
|
|
72631
|
+
await install;
|
|
72632
|
+
}
|
|
72588
72633
|
function renameTStoJS(path) {
|
|
72589
72634
|
if (path.endsWith(".ts")) {
|
|
72590
72635
|
return path.slice(0, -3) + ".js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/node",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "25.0.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "./dist/index",
|
|
6
6
|
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/node-js",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@vercel/static-config": "3.4.4"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
|
-
"@vercel/build-utils": "14.
|
|
39
|
+
"@vercel/build-utils": "14.22.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@babel/core": "7.24.4",
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
"tree-kill": "1.2.2",
|
|
60
60
|
"vite": "^6.4.3",
|
|
61
61
|
"vitest": "^4.1.10",
|
|
62
|
-
"@vercel/
|
|
63
|
-
"@vercel/
|
|
62
|
+
"@vercel/build-utils": "14.22.0",
|
|
63
|
+
"@vercel/functions": "3.10.1"
|
|
64
64
|
},
|
|
65
65
|
"scripts": {
|
|
66
66
|
"build": "node build.mjs",
|