@vercel/build-utils 6.5.0 → 6.6.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/fs/run-user-scripts.js +10 -1
- package/dist/get-prefixed-env-vars.js +2 -1
- package/dist/index.js +12 -2
- package/package.json +2 -2
@@ -332,6 +332,7 @@ function getEnvForPackageManager({ cliType, lockfileVersion, nodeVersion, env, }
|
|
332
332
|
const oldPath = env.PATH + '';
|
333
333
|
const npm7 = '/node16/bin-npm7';
|
334
334
|
const pnpm7 = '/pnpm7/node_modules/.bin';
|
335
|
+
const pnpm8 = '/pnpm8/node_modules/.bin';
|
335
336
|
const corepackEnabled = env.ENABLE_EXPERIMENTAL_COREPACK === '1';
|
336
337
|
if (cliType === 'npm') {
|
337
338
|
if (typeof lockfileVersion === 'number' &&
|
@@ -351,7 +352,15 @@ function getEnvForPackageManager({ cliType, lockfileVersion, nodeVersion, env, }
|
|
351
352
|
!corepackEnabled) {
|
352
353
|
// Ensure that pnpm 7 is at the beginning of the `$PATH`
|
353
354
|
newEnv.PATH = `${pnpm7}${path_1.default.delimiter}${oldPath}`;
|
354
|
-
console.log(
|
355
|
+
console.log(`Detected \`pnpm-lock.yaml\` version ${lockfileVersion} generated by pnpm 7...`);
|
356
|
+
}
|
357
|
+
else if (typeof lockfileVersion === 'number' &&
|
358
|
+
lockfileVersion >= 6 &&
|
359
|
+
!oldPath.includes(pnpm8) &&
|
360
|
+
!corepackEnabled) {
|
361
|
+
// Ensure that pnpm 8 is at the beginning of the `$PATH`
|
362
|
+
newEnv.PATH = `${pnpm8}${path_1.default.delimiter}${oldPath}`;
|
363
|
+
console.log(`Detected \`pnpm-lock.yaml\` version ${lockfileVersion} generated by pnpm 8...`);
|
355
364
|
}
|
356
365
|
}
|
357
366
|
else {
|
@@ -9,10 +9,11 @@ exports.getPrefixedEnvVars = void 0;
|
|
9
9
|
*/
|
10
10
|
function getPrefixedEnvVars({ envPrefix, envs, }) {
|
11
11
|
const vercelSystemEnvPrefix = 'VERCEL_';
|
12
|
+
const allowed = ['VERCEL_URL', 'VERCEL_ENV', 'VERCEL_REGION'];
|
12
13
|
const newEnvs = {};
|
13
14
|
if (envPrefix && envs.VERCEL_URL) {
|
14
15
|
Object.keys(envs)
|
15
|
-
.filter(key => key.startsWith(
|
16
|
+
.filter(key => allowed.includes(key) || key.startsWith('VERCEL_GIT_'))
|
16
17
|
.forEach(key => {
|
17
18
|
const newKey = `${envPrefix}${key}`;
|
18
19
|
if (!(newKey in envs)) {
|
package/dist/index.js
CHANGED
@@ -31329,6 +31329,7 @@ function getEnvForPackageManager({ cliType, lockfileVersion, nodeVersion, env, }
|
|
31329
31329
|
const oldPath = env.PATH + '';
|
31330
31330
|
const npm7 = '/node16/bin-npm7';
|
31331
31331
|
const pnpm7 = '/pnpm7/node_modules/.bin';
|
31332
|
+
const pnpm8 = '/pnpm8/node_modules/.bin';
|
31332
31333
|
const corepackEnabled = env.ENABLE_EXPERIMENTAL_COREPACK === '1';
|
31333
31334
|
if (cliType === 'npm') {
|
31334
31335
|
if (typeof lockfileVersion === 'number' &&
|
@@ -31348,7 +31349,15 @@ function getEnvForPackageManager({ cliType, lockfileVersion, nodeVersion, env, }
|
|
31348
31349
|
!corepackEnabled) {
|
31349
31350
|
// Ensure that pnpm 7 is at the beginning of the `$PATH`
|
31350
31351
|
newEnv.PATH = `${pnpm7}${path_1.default.delimiter}${oldPath}`;
|
31351
|
-
console.log(
|
31352
|
+
console.log(`Detected \`pnpm-lock.yaml\` version ${lockfileVersion} generated by pnpm 7...`);
|
31353
|
+
}
|
31354
|
+
else if (typeof lockfileVersion === 'number' &&
|
31355
|
+
lockfileVersion >= 6 &&
|
31356
|
+
!oldPath.includes(pnpm8) &&
|
31357
|
+
!corepackEnabled) {
|
31358
|
+
// Ensure that pnpm 8 is at the beginning of the `$PATH`
|
31359
|
+
newEnv.PATH = `${pnpm8}${path_1.default.delimiter}${oldPath}`;
|
31360
|
+
console.log(`Detected \`pnpm-lock.yaml\` version ${lockfileVersion} generated by pnpm 8...`);
|
31352
31361
|
}
|
31353
31362
|
}
|
31354
31363
|
else {
|
@@ -31603,10 +31612,11 @@ exports.getPrefixedEnvVars = void 0;
|
|
31603
31612
|
*/
|
31604
31613
|
function getPrefixedEnvVars({ envPrefix, envs, }) {
|
31605
31614
|
const vercelSystemEnvPrefix = 'VERCEL_';
|
31615
|
+
const allowed = ['VERCEL_URL', 'VERCEL_ENV', 'VERCEL_REGION'];
|
31606
31616
|
const newEnvs = {};
|
31607
31617
|
if (envPrefix && envs.VERCEL_URL) {
|
31608
31618
|
Object.keys(envs)
|
31609
|
-
.filter(key => key.startsWith(
|
31619
|
+
.filter(key => allowed.includes(key) || key.startsWith('VERCEL_GIT_'))
|
31610
31620
|
.forEach(key => {
|
31611
31621
|
const newKey = `${envPrefix}${key}`;
|
31612
31622
|
if (!(newKey in envs)) {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vercel/build-utils",
|
3
|
-
"version": "6.
|
3
|
+
"version": "6.6.0",
|
4
4
|
"license": "MIT",
|
5
5
|
"main": "./dist/index.js",
|
6
6
|
"types": "./dist/index.d.js",
|
@@ -51,5 +51,5 @@
|
|
51
51
|
"typescript": "4.3.4",
|
52
52
|
"yazl": "2.5.1"
|
53
53
|
},
|
54
|
-
"gitHead": "
|
54
|
+
"gitHead": "54514a44afef48726220bc8be8d20f4fda8e8b4f"
|
55
55
|
}
|