@vercel/static-build 1.0.3 → 1.0.4

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 -23
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -16774,22 +16774,12 @@ const build = async ({ files, entrypoint, workPath, config, meta = {}, }) => {
16774
16774
  spawnOpts.env.CI = 'false';
16775
16775
  }
16776
16776
  const { cliType, lockfileVersion } = await build_utils_1.scanParentDirs(entrypointDir);
16777
- if (cliType === 'npm') {
16778
- if (typeof lockfileVersion === 'number' &&
16779
- lockfileVersion >= 2 &&
16780
- (nodeVersion?.major || 0) < 16) {
16781
- // Ensure that npm 7 is at the beginning of the `$PATH`
16782
- spawnOpts.env.PATH = `/node16/bin-npm7${path_1.default.delimiter}${spawnOpts.env.PATH}`;
16783
- console.log('Detected `package-lock.json` generated by npm 7...');
16784
- }
16785
- }
16786
- else if (cliType === 'pnpm') {
16787
- if (typeof lockfileVersion === 'number' && lockfileVersion === 5.4) {
16788
- // Ensure that pnpm 7 is at the beginning of the `$PATH`
16789
- spawnOpts.env.PATH = `/pnpm7/node_modules/.bin${path_1.default.delimiter}${spawnOpts.env.PATH}`;
16790
- console.log('Detected `pnpm-lock.yaml` generated by pnpm 7...');
16791
- }
16792
- }
16777
+ spawnOpts.env = build_utils_1.getEnvForPackageManager({
16778
+ cliType,
16779
+ lockfileVersion,
16780
+ nodeVersion,
16781
+ env: spawnOpts.env || {},
16782
+ });
16793
16783
  if (meta.isDev) {
16794
16784
  build_utils_1.debug('Skipping dependency installation because dev mode is enabled');
16795
16785
  }
@@ -16809,15 +16799,8 @@ const build = async ({ files, entrypoint, workPath, config, meta = {}, }) => {
16809
16799
  else if (typeof installCommand === 'string') {
16810
16800
  if (installCommand.trim()) {
16811
16801
  console.log(`Running "install" command: \`${installCommand}\`...`);
16812
- const env = {
16813
- YARN_NODE_LINKER: 'node-modules',
16814
- ...spawnOpts.env,
16815
- };
16816
16802
  await build_utils_1.execCommand(installCommand, {
16817
16803
  ...spawnOpts,
16818
- // Yarn v2 PnP mode may be activated, so force
16819
- // "node-modules" linker style
16820
- env,
16821
16804
  cwd: entrypointDir,
16822
16805
  });
16823
16806
  // Its not clear which command was run, so assume all
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/static-build",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "license": "MIT",
5
5
  "main": "./dist/index",
6
6
  "homepage": "https://vercel.com/docs/build-step",
@@ -37,7 +37,7 @@
37
37
  "@types/ms": "0.7.31",
38
38
  "@types/node-fetch": "2.5.4",
39
39
  "@types/promise-timeout": "1.3.0",
40
- "@vercel/build-utils": "4.2.1",
40
+ "@vercel/build-utils": "5.0.0",
41
41
  "@vercel/frameworks": "1.0.2",
42
42
  "@vercel/ncc": "0.24.0",
43
43
  "@vercel/routing-utils": "1.13.5",
@@ -49,5 +49,5 @@
49
49
  "rc9": "1.2.0",
50
50
  "typescript": "4.3.4"
51
51
  },
52
- "gitHead": "547e88228e180e883e5f07ab815a16960767bbf5"
52
+ "gitHead": "621b53bc49a1ac4aaf6ab986f9bbbdd517af01f5"
53
53
  }