@vercel/redwood 1.0.2 → 1.0.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.
Files changed (2) hide show
  1. package/dist/index.js +6 -21
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -29,32 +29,17 @@ const build = async ({ workPath, files, entrypoint, meta = {}, config = {}, }) =
29
29
  spawnOpts.env = {};
30
30
  }
31
31
  const { cliType, lockfileVersion } = await (0, build_utils_1.scanParentDirs)(entrypointFsDirname);
32
- if (cliType === 'npm') {
33
- if (typeof lockfileVersion === 'number' &&
34
- lockfileVersion >= 2 &&
35
- (nodeVersion?.major || 0) < 16) {
36
- // Ensure that npm 7 is at the beginning of the `$PATH`
37
- spawnOpts.env.PATH = `/node16/bin-npm7${path_1.delimiter}${spawnOpts.env.PATH}`;
38
- console.log('Detected `package-lock.json` generated by npm 7...');
39
- }
40
- }
41
- else if (cliType === 'pnpm') {
42
- if (typeof lockfileVersion === 'number' && lockfileVersion === 5.4) {
43
- // Ensure that pnpm 7 is at the beginning of the `$PATH`
44
- spawnOpts.env.PATH = `/pnpm7/node_modules/.bin${path_1.delimiter}${spawnOpts.env.PATH}`;
45
- console.log('Detected `pnpm-lock.yaml` generated by pnpm 7...');
46
- }
47
- }
32
+ spawnOpts.env = (0, build_utils_1.getEnvForPackageManager)({
33
+ cliType,
34
+ lockfileVersion,
35
+ nodeVersion,
36
+ env: spawnOpts.env || {},
37
+ });
48
38
  if (typeof installCommand === 'string') {
49
39
  if (installCommand.trim()) {
50
40
  console.log(`Running "install" command: \`${installCommand}\`...`);
51
- const env = {
52
- YARN_NODE_LINKER: 'node-modules',
53
- ...spawnOpts.env,
54
- };
55
41
  await (0, build_utils_1.execCommand)(installCommand, {
56
42
  ...spawnOpts,
57
- env,
58
43
  cwd: entrypointFsDirname,
59
44
  });
60
45
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/redwood",
3
- "version": "1.0.2",
3
+ "version": "1.0.5",
4
4
  "main": "./dist/index.js",
5
5
  "license": "MIT",
6
6
  "homepage": "https://vercel.com/docs",
@@ -20,7 +20,7 @@
20
20
  "prepublishOnly": "node build.js"
21
21
  },
22
22
  "dependencies": {
23
- "@vercel/nft": "0.19.1",
23
+ "@vercel/nft": "0.20.1",
24
24
  "@vercel/routing-utils": "1.13.5",
25
25
  "semver": "6.1.1"
26
26
  },
@@ -28,7 +28,7 @@
28
28
  "@types/aws-lambda": "8.10.19",
29
29
  "@types/node": "*",
30
30
  "@types/semver": "6.0.0",
31
- "@vercel/build-utils": "4.2.0"
31
+ "@vercel/build-utils": "5.0.0"
32
32
  },
33
- "gitHead": "eed39913e1394477b224c38efe29429b17eeada6"
33
+ "gitHead": "621b53bc49a1ac4aaf6ab986f9bbbdd517af01f5"
34
34
  }