@vercel/build-utils 5.5.3 → 5.5.5
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/file-fs-ref.js +2 -1
- package/dist/file-ref.js +2 -1
- package/dist/fs/run-user-scripts.js +5 -10
- package/dist/index.js +9 -12
- package/package.json +2 -2
package/dist/file-fs-ref.js
CHANGED
@@ -8,7 +8,8 @@ const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
8
8
|
const multistream_1 = __importDefault(require("multistream"));
|
9
9
|
const path_1 = __importDefault(require("path"));
|
10
10
|
const async_sema_1 = __importDefault(require("async-sema"));
|
11
|
-
const
|
11
|
+
const DEFAULT_SEMA = 20;
|
12
|
+
const semaToPreventEMFILE = new async_sema_1.default(parseInt(process.env.VERCEL_INTERNAL_FILE_FS_REF_SEMA || String(DEFAULT_SEMA), 10) || DEFAULT_SEMA);
|
12
13
|
class FileFsRef {
|
13
14
|
constructor({ mode = 0o100644, contentType, fsPath }) {
|
14
15
|
assert_1.default(typeof mode === 'number');
|
package/dist/file-ref.js
CHANGED
@@ -8,7 +8,8 @@ const node_fetch_1 = __importDefault(require("node-fetch"));
|
|
8
8
|
const multistream_1 = __importDefault(require("multistream"));
|
9
9
|
const async_retry_1 = __importDefault(require("async-retry"));
|
10
10
|
const async_sema_1 = __importDefault(require("async-sema"));
|
11
|
-
const
|
11
|
+
const DEFAULT_SEMA = 5;
|
12
|
+
const semaToDownloadFromS3 = new async_sema_1.default(parseInt(process.env.VERCEL_INTERNAL_FILE_REF_SEMA || String(DEFAULT_SEMA), 10) || DEFAULT_SEMA);
|
12
13
|
class BailableError extends Error {
|
13
14
|
constructor(...args) {
|
14
15
|
super(...args);
|
@@ -147,27 +147,22 @@ function getSpawnOptions(meta, nodeVersion) {
|
|
147
147
|
exports.getSpawnOptions = getSpawnOptions;
|
148
148
|
async function getNodeVersion(destPath, _nodeVersion, config = {}, meta = {}) {
|
149
149
|
const latest = node_version_1.getLatestNodeVersion();
|
150
|
-
if (meta
|
150
|
+
if (meta.isDev) {
|
151
151
|
// Use the system-installed version of `node` in PATH for `vercel dev`
|
152
152
|
return { ...latest, runtime: 'nodejs' };
|
153
153
|
}
|
154
154
|
const { packageJson } = await scanParentDirs(destPath, true);
|
155
155
|
let { nodeVersion } = config;
|
156
156
|
let isAuto = true;
|
157
|
-
if (packageJson
|
157
|
+
if (packageJson?.engines?.node) {
|
158
158
|
const { node } = packageJson.engines;
|
159
|
-
if (nodeVersion &&
|
160
|
-
semver_1.validRange(node) &&
|
161
|
-
!semver_1.intersects(nodeVersion, node) &&
|
162
|
-
!meta.isDev) {
|
159
|
+
if (nodeVersion && semver_1.validRange(node) && !semver_1.intersects(nodeVersion, node)) {
|
163
160
|
console.warn(`Warning: Due to "engines": { "node": "${node}" } in your \`package.json\` file, the Node.js Version defined in your Project Settings ("${nodeVersion}") will not apply. Learn More: http://vercel.link/node-version`);
|
164
161
|
}
|
165
|
-
else if (semver_1.coerce(node)?.raw === node
|
162
|
+
else if (semver_1.coerce(node)?.raw === node) {
|
166
163
|
console.warn(`Warning: Detected "engines": { "node": "${node}" } in your \`package.json\` with major.minor.patch, but only major Node.js Version can be selected. Learn More: http://vercel.link/node-version`);
|
167
164
|
}
|
168
|
-
else if (semver_1.validRange(node) &&
|
169
|
-
semver_1.intersects(`${latest.major + 1}.x`, node) &&
|
170
|
-
!meta.isDev) {
|
165
|
+
else if (semver_1.validRange(node) && semver_1.intersects(`${latest.major + 1}.x`, node)) {
|
171
166
|
console.warn(`Warning: Detected "engines": { "node": "${node}" } in your \`package.json\` that will automatically upgrade when a new major Node.js Version is released. Learn More: http://vercel.link/node-version`);
|
172
167
|
}
|
173
168
|
nodeVersion = node;
|
package/dist/index.js
CHANGED
@@ -30349,7 +30349,8 @@ const fs_extra_1 = __importDefault(__webpack_require__(5392));
|
|
30349
30349
|
const multistream_1 = __importDefault(__webpack_require__(8179));
|
30350
30350
|
const path_1 = __importDefault(__webpack_require__(5622));
|
30351
30351
|
const async_sema_1 = __importDefault(__webpack_require__(5758));
|
30352
|
-
const
|
30352
|
+
const DEFAULT_SEMA = 20;
|
30353
|
+
const semaToPreventEMFILE = new async_sema_1.default(parseInt(process.env.VERCEL_INTERNAL_FILE_FS_REF_SEMA || String(DEFAULT_SEMA), 10) || DEFAULT_SEMA);
|
30353
30354
|
class FileFsRef {
|
30354
30355
|
constructor({ mode = 0o100644, contentType, fsPath }) {
|
30355
30356
|
assert_1.default(typeof mode === 'number');
|
@@ -30427,7 +30428,8 @@ const node_fetch_1 = __importDefault(__webpack_require__(2197));
|
|
30427
30428
|
const multistream_1 = __importDefault(__webpack_require__(8179));
|
30428
30429
|
const async_retry_1 = __importDefault(__webpack_require__(3691));
|
30429
30430
|
const async_sema_1 = __importDefault(__webpack_require__(5758));
|
30430
|
-
const
|
30431
|
+
const DEFAULT_SEMA = 5;
|
30432
|
+
const semaToDownloadFromS3 = new async_sema_1.default(parseInt(process.env.VERCEL_INTERNAL_FILE_REF_SEMA || String(DEFAULT_SEMA), 10) || DEFAULT_SEMA);
|
30431
30433
|
class BailableError extends Error {
|
30432
30434
|
constructor(...args) {
|
30433
30435
|
super(...args);
|
@@ -31020,27 +31022,22 @@ function getSpawnOptions(meta, nodeVersion) {
|
|
31020
31022
|
exports.getSpawnOptions = getSpawnOptions;
|
31021
31023
|
async function getNodeVersion(destPath, _nodeVersion, config = {}, meta = {}) {
|
31022
31024
|
const latest = node_version_1.getLatestNodeVersion();
|
31023
|
-
if (meta
|
31025
|
+
if (meta.isDev) {
|
31024
31026
|
// Use the system-installed version of `node` in PATH for `vercel dev`
|
31025
31027
|
return { ...latest, runtime: 'nodejs' };
|
31026
31028
|
}
|
31027
31029
|
const { packageJson } = await scanParentDirs(destPath, true);
|
31028
31030
|
let { nodeVersion } = config;
|
31029
31031
|
let isAuto = true;
|
31030
|
-
if (packageJson
|
31032
|
+
if (packageJson?.engines?.node) {
|
31031
31033
|
const { node } = packageJson.engines;
|
31032
|
-
if (nodeVersion &&
|
31033
|
-
semver_1.validRange(node) &&
|
31034
|
-
!semver_1.intersects(nodeVersion, node) &&
|
31035
|
-
!meta.isDev) {
|
31034
|
+
if (nodeVersion && semver_1.validRange(node) && !semver_1.intersects(nodeVersion, node)) {
|
31036
31035
|
console.warn(`Warning: Due to "engines": { "node": "${node}" } in your \`package.json\` file, the Node.js Version defined in your Project Settings ("${nodeVersion}") will not apply. Learn More: http://vercel.link/node-version`);
|
31037
31036
|
}
|
31038
|
-
else if (semver_1.coerce(node)?.raw === node
|
31037
|
+
else if (semver_1.coerce(node)?.raw === node) {
|
31039
31038
|
console.warn(`Warning: Detected "engines": { "node": "${node}" } in your \`package.json\` with major.minor.patch, but only major Node.js Version can be selected. Learn More: http://vercel.link/node-version`);
|
31040
31039
|
}
|
31041
|
-
else if (semver_1.validRange(node) &&
|
31042
|
-
semver_1.intersects(`${latest.major + 1}.x`, node) &&
|
31043
|
-
!meta.isDev) {
|
31040
|
+
else if (semver_1.validRange(node) && semver_1.intersects(`${latest.major + 1}.x`, node)) {
|
31044
31041
|
console.warn(`Warning: Detected "engines": { "node": "${node}" } in your \`package.json\` that will automatically upgrade when a new major Node.js Version is released. Learn More: http://vercel.link/node-version`);
|
31045
31042
|
}
|
31046
31043
|
nodeVersion = node;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vercel/build-utils",
|
3
|
-
"version": "5.5.
|
3
|
+
"version": "5.5.5",
|
4
4
|
"license": "MIT",
|
5
5
|
"main": "./dist/index.js",
|
6
6
|
"types": "./dist/index.d.js",
|
@@ -47,5 +47,5 @@
|
|
47
47
|
"typescript": "4.3.4",
|
48
48
|
"yazl": "2.5.1"
|
49
49
|
},
|
50
|
-
"gitHead": "
|
50
|
+
"gitHead": "40f38948a04d83a9e260ddd455685d74e3eb9209"
|
51
51
|
}
|