@vercel/redwood 2.4.0 → 2.4.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.
Files changed (2) hide show
  1. package/dist/index.js +15 -18
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -821,7 +821,7 @@ var require_superstatic = __commonJS({
821
821
  convertTrailingSlash: () => convertTrailingSlash,
822
822
  getCleanUrls: () => getCleanUrls2,
823
823
  pathToRegexp: () => pathToRegexp,
824
- sourceToRegex: () => sourceToRegex
824
+ sourceToRegex: () => sourceToRegex2
825
825
  });
826
826
  module2.exports = __toCommonJS2(superstatic_exports);
827
827
  var import_url = require("url");
@@ -899,7 +899,7 @@ var require_superstatic = __commonJS({
899
899
  }
900
900
  function convertRedirects(redirects, defaultStatus = 308) {
901
901
  return redirects.map((r) => {
902
- const { src, segments } = sourceToRegex(r.source);
902
+ const { src, segments } = sourceToRegex2(r.source);
903
903
  const hasSegments = collectHasSegments(r.has);
904
904
  normalizeHasKeys(r.has);
905
905
  normalizeHasKeys(r.missing);
@@ -932,7 +932,7 @@ var require_superstatic = __commonJS({
932
932
  }
933
933
  function convertRewrites(rewrites, internalParamNames) {
934
934
  return rewrites.map((r) => {
935
- const { src, segments } = sourceToRegex(r.source);
935
+ const { src, segments } = sourceToRegex2(r.source);
936
936
  const hasSegments = collectHasSegments(r.has);
937
937
  normalizeHasKeys(r.has);
938
938
  normalizeHasKeys(r.missing);
@@ -963,7 +963,7 @@ var require_superstatic = __commonJS({
963
963
  function convertHeaders(headers) {
964
964
  return headers.map((h) => {
965
965
  const obj = {};
966
- const { src, segments } = sourceToRegex(h.source);
966
+ const { src, segments } = sourceToRegex2(h.source);
967
967
  const hasSegments = collectHasSegments(h.has);
968
968
  normalizeHasKeys(h.has);
969
969
  normalizeHasKeys(h.missing);
@@ -1025,7 +1025,7 @@ var require_superstatic = __commonJS({
1025
1025
  }
1026
1026
  return routes;
1027
1027
  }
1028
- function sourceToRegex(source) {
1028
+ function sourceToRegex2(source) {
1029
1029
  const keys = [];
1030
1030
  const r = pathToRegexp("632", source, keys, {
1031
1031
  strict: true,
@@ -2077,7 +2077,8 @@ var require_dist3 = __commonJS({
2077
2077
  isHandler: () => isHandler,
2078
2078
  isValidHandleValue: () => isValidHandleValue,
2079
2079
  mergeRoutes: () => import_merge.mergeRoutes,
2080
- normalizeRoutes: () => normalizeRoutes
2080
+ normalizeRoutes: () => normalizeRoutes,
2081
+ sourceToRegex: () => import_superstatic2.sourceToRegex
2081
2082
  });
2082
2083
  module2.exports = __toCommonJS2(src_exports2);
2083
2084
  var import_url = require("url");
@@ -2457,21 +2458,17 @@ var build = async ({
2457
2458
  config,
2458
2459
  meta
2459
2460
  );
2460
- const spawnOpts = (0, import_build_utils.getSpawnOptions)(meta, nodeVersion);
2461
- if (!spawnOpts.env) {
2462
- spawnOpts.env = {};
2463
- }
2464
2461
  const {
2465
2462
  cliType,
2466
2463
  lockfileVersion,
2467
2464
  packageJsonPackageManager,
2468
2465
  turboSupportsCorepackHome
2469
2466
  } = await (0, import_build_utils.scanParentDirs)(entrypointFsDirname, true);
2470
- spawnOpts.env = (0, import_build_utils.getEnvForPackageManager)({
2467
+ const spawnEnv = (0, import_build_utils.getEnvForPackageManager)({
2471
2468
  cliType,
2472
2469
  lockfileVersion,
2473
2470
  packageJsonPackageManager,
2474
- env: spawnOpts.env || {},
2471
+ env: process.env,
2475
2472
  turboSupportsCorepackHome,
2476
2473
  projectCreatedAt: config.projectSettings?.createdAt
2477
2474
  });
@@ -2479,7 +2476,7 @@ var build = async ({
2479
2476
  if (installCommand.trim()) {
2480
2477
  console.log(`Running "install" command: \`${installCommand}\`...`);
2481
2478
  await (0, import_build_utils.execCommand)(installCommand, {
2482
- ...spawnOpts,
2479
+ env: spawnEnv,
2483
2480
  cwd: entrypointFsDirname
2484
2481
  });
2485
2482
  } else {
@@ -2489,7 +2486,7 @@ var build = async ({
2489
2486
  await (0, import_build_utils.runNpmInstall)(
2490
2487
  entrypointFsDirname,
2491
2488
  [],
2492
- spawnOpts,
2489
+ { env: spawnEnv },
2493
2490
  meta,
2494
2491
  config.projectSettings?.createdAt
2495
2492
  );
@@ -2504,7 +2501,7 @@ var build = async ({
2504
2501
  if (buildCommand) {
2505
2502
  (0, import_build_utils.debug)(`Executing build command "${buildCommand}"`);
2506
2503
  await (0, import_build_utils.execCommand)(buildCommand, {
2507
- ...spawnOpts,
2504
+ env: spawnEnv,
2508
2505
  cwd: workPath
2509
2506
  });
2510
2507
  } else if (hasScript("vercel-build", pkg)) {
@@ -2512,7 +2509,7 @@ var build = async ({
2512
2509
  await (0, import_build_utils.runPackageJsonScript)(
2513
2510
  workPath,
2514
2511
  "vercel-build",
2515
- spawnOpts,
2512
+ { env: spawnEnv },
2516
2513
  config.projectSettings?.createdAt
2517
2514
  );
2518
2515
  } else if (hasScript("build", pkg)) {
@@ -2520,7 +2517,7 @@ var build = async ({
2520
2517
  await (0, import_build_utils.runPackageJsonScript)(
2521
2518
  workPath,
2522
2519
  "build",
2523
- spawnOpts,
2520
+ { env: spawnEnv },
2524
2521
  config.projectSettings?.createdAt
2525
2522
  );
2526
2523
  } else {
@@ -2538,7 +2535,7 @@ var build = async ({
2538
2535
  cmd = "yarn rw deploy vercel";
2539
2536
  }
2540
2537
  await (0, import_build_utils.execCommand)(cmd, {
2541
- ...spawnOpts,
2538
+ env: spawnEnv,
2542
2539
  cwd: workPath
2543
2540
  });
2544
2541
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/redwood",
3
- "version": "2.4.0",
3
+ "version": "2.4.1",
4
4
  "main": "./dist/index.js",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://vercel.com/docs",
@@ -22,8 +22,8 @@
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": "12.2.0",
26
- "@vercel/routing-utils": "5.2.0",
25
+ "@vercel/build-utils": "13.0.0",
26
+ "@vercel/routing-utils": "5.2.1",
27
27
  "execa": "3.2.0",
28
28
  "fs-extra": "11.1.0",
29
29
  "jest-junit": "16.0.0"