@vercel/redwood 2.4.1 → 2.4.2

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.
Files changed (2) hide show
  1. package/dist/index.js +12 -8
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -2458,17 +2458,21 @@ var build = async ({
2458
2458
  config,
2459
2459
  meta
2460
2460
  );
2461
+ const spawnOpts = (0, import_build_utils.getSpawnOptions)(meta, nodeVersion);
2462
+ if (!spawnOpts.env) {
2463
+ spawnOpts.env = {};
2464
+ }
2461
2465
  const {
2462
2466
  cliType,
2463
2467
  lockfileVersion,
2464
2468
  packageJsonPackageManager,
2465
2469
  turboSupportsCorepackHome
2466
2470
  } = await (0, import_build_utils.scanParentDirs)(entrypointFsDirname, true);
2467
- const spawnEnv = (0, import_build_utils.getEnvForPackageManager)({
2471
+ spawnOpts.env = (0, import_build_utils.getEnvForPackageManager)({
2468
2472
  cliType,
2469
2473
  lockfileVersion,
2470
2474
  packageJsonPackageManager,
2471
- env: process.env,
2475
+ env: spawnOpts.env || {},
2472
2476
  turboSupportsCorepackHome,
2473
2477
  projectCreatedAt: config.projectSettings?.createdAt
2474
2478
  });
@@ -2476,7 +2480,7 @@ var build = async ({
2476
2480
  if (installCommand.trim()) {
2477
2481
  console.log(`Running "install" command: \`${installCommand}\`...`);
2478
2482
  await (0, import_build_utils.execCommand)(installCommand, {
2479
- env: spawnEnv,
2483
+ ...spawnOpts,
2480
2484
  cwd: entrypointFsDirname
2481
2485
  });
2482
2486
  } else {
@@ -2486,7 +2490,7 @@ var build = async ({
2486
2490
  await (0, import_build_utils.runNpmInstall)(
2487
2491
  entrypointFsDirname,
2488
2492
  [],
2489
- { env: spawnEnv },
2493
+ spawnOpts,
2490
2494
  meta,
2491
2495
  config.projectSettings?.createdAt
2492
2496
  );
@@ -2501,7 +2505,7 @@ var build = async ({
2501
2505
  if (buildCommand) {
2502
2506
  (0, import_build_utils.debug)(`Executing build command "${buildCommand}"`);
2503
2507
  await (0, import_build_utils.execCommand)(buildCommand, {
2504
- env: spawnEnv,
2508
+ ...spawnOpts,
2505
2509
  cwd: workPath
2506
2510
  });
2507
2511
  } else if (hasScript("vercel-build", pkg)) {
@@ -2509,7 +2513,7 @@ var build = async ({
2509
2513
  await (0, import_build_utils.runPackageJsonScript)(
2510
2514
  workPath,
2511
2515
  "vercel-build",
2512
- { env: spawnEnv },
2516
+ spawnOpts,
2513
2517
  config.projectSettings?.createdAt
2514
2518
  );
2515
2519
  } else if (hasScript("build", pkg)) {
@@ -2517,7 +2521,7 @@ var build = async ({
2517
2521
  await (0, import_build_utils.runPackageJsonScript)(
2518
2522
  workPath,
2519
2523
  "build",
2520
- { env: spawnEnv },
2524
+ spawnOpts,
2521
2525
  config.projectSettings?.createdAt
2522
2526
  );
2523
2527
  } else {
@@ -2535,7 +2539,7 @@ var build = async ({
2535
2539
  cmd = "yarn rw deploy vercel";
2536
2540
  }
2537
2541
  await (0, import_build_utils.execCommand)(cmd, {
2538
- env: spawnEnv,
2542
+ ...spawnOpts,
2539
2543
  cwd: workPath
2540
2544
  });
2541
2545
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/redwood",
3
- "version": "2.4.1",
3
+ "version": "2.4.2",
4
4
  "main": "./dist/index.js",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://vercel.com/docs",
@@ -22,7 +22,7 @@
22
22
  "@types/aws-lambda": "8.10.19",
23
23
  "@types/node": "14.18.33",
24
24
  "@types/semver": "6.0.0",
25
- "@vercel/build-utils": "13.0.0",
25
+ "@vercel/build-utils": "13.0.1",
26
26
  "@vercel/routing-utils": "5.2.1",
27
27
  "execa": "3.2.0",
28
28
  "fs-extra": "11.1.0",