@vercel/static-build 0.26.0 → 1.0.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.
Files changed (2) hide show
  1. package/dist/index.js +6 -7
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -16684,7 +16684,6 @@ async function getUpdatedDistPath(framework, outputDirPrefix, entrypointDir, dis
16684
16684
  return undefined;
16685
16685
  }
16686
16686
  const build = async ({ files, entrypoint, workPath, config, meta = {}, }) => {
16687
- var _a;
16688
16687
  await build_utils_1.download(files, workPath, meta);
16689
16688
  const mountpoint = path_1.default.dirname(entrypoint);
16690
16689
  const entrypointDir = path_1.default.join(workPath, mountpoint);
@@ -16771,14 +16770,14 @@ const build = async ({ files, entrypoint, workPath, config, meta = {}, }) => {
16771
16770
  https://github.com/facebook/create-react-app/pull/2501
16772
16771
  https://github.com/vercel/community/discussions/30
16773
16772
  */
16774
- if ((framework === null || framework === void 0 ? void 0 : framework.slug) === 'create-react-app') {
16773
+ if (framework?.slug === 'create-react-app') {
16775
16774
  spawnOpts.env.CI = 'false';
16776
16775
  }
16777
16776
  const { cliType, lockfileVersion } = await build_utils_1.scanParentDirs(entrypointDir);
16778
16777
  if (cliType === 'npm') {
16779
16778
  if (typeof lockfileVersion === 'number' &&
16780
16779
  lockfileVersion >= 2 &&
16781
- ((nodeVersion === null || nodeVersion === void 0 ? void 0 : nodeVersion.major) || 0) < 16) {
16780
+ (nodeVersion?.major || 0) < 16) {
16782
16781
  // Ensure that npm 7 is at the beginning of the `$PATH`
16783
16782
  spawnOpts.env.PATH = `/node16/bin-npm7${path_1.default.delimiter}${spawnOpts.env.PATH}`;
16784
16783
  console.log('Detected `package-lock.json` generated by npm 7...');
@@ -16886,7 +16885,7 @@ const build = async ({ files, entrypoint, workPath, config, meta = {}, }) => {
16886
16885
  if (isPipInstall) {
16887
16886
  // TODO: Add bins to PATH once we implement pip caching
16888
16887
  }
16889
- if ((_a = spawnOpts === null || spawnOpts === void 0 ? void 0 : spawnOpts.env) === null || _a === void 0 ? void 0 : _a.PATH) {
16888
+ if (spawnOpts?.env?.PATH) {
16890
16889
  // Append system path last so others above take precedence
16891
16890
  pathList.push(spawnOpts.env.PATH);
16892
16891
  }
@@ -17043,7 +17042,7 @@ const prepareCache = async ({ entrypoint, repoRootPath, workPath, config, }) =>
17043
17042
  const cacheFiles = {};
17044
17043
  // Build Output API v3 cache files
17045
17044
  const configV3 = await BuildOutputV3.readConfig(workPath);
17046
- if ((configV3 === null || configV3 === void 0 ? void 0 : configV3.cache) && Array.isArray(configV3.cache)) {
17045
+ if (configV3?.cache && Array.isArray(configV3.cache)) {
17047
17046
  for (const cacheGlob of configV3.cache) {
17048
17047
  Object.assign(cacheFiles, await build_utils_1.glob(cacheGlob, workPath));
17049
17048
  }
@@ -17054,7 +17053,7 @@ const prepareCache = async ({ entrypoint, repoRootPath, workPath, config, }) =>
17054
17053
  workPath,
17055
17054
  configFileName: 'build.json',
17056
17055
  });
17057
- if ((buildConfigV1 === null || buildConfigV1 === void 0 ? void 0 : buildConfigV1.cache) && Array.isArray(buildConfigV1.cache)) {
17056
+ if (buildConfigV1?.cache && Array.isArray(buildConfigV1.cache)) {
17058
17057
  for (const cacheGlob of buildConfigV1.cache) {
17059
17058
  Object.assign(cacheFiles, await build_utils_1.glob(cacheGlob, workPath));
17060
17059
  }
@@ -17065,7 +17064,7 @@ const prepareCache = async ({ entrypoint, repoRootPath, workPath, config, }) =>
17065
17064
  // Framework cache files
17066
17065
  const pkg = getPkg(entrypoint, workPath);
17067
17066
  const framework = getFramework(config, pkg);
17068
- if (framework === null || framework === void 0 ? void 0 : framework.cachePattern) {
17067
+ if (framework?.cachePattern) {
17069
17068
  Object.assign(cacheFiles, await build_utils_1.glob(framework.cachePattern, workPath));
17070
17069
  }
17071
17070
  return cacheFiles;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/static-build",
3
- "version": "0.26.0",
3
+ "version": "1.0.0",
4
4
  "license": "MIT",
5
5
  "main": "./dist/index",
6
6
  "homepage": "https://vercel.com/docs/build-step",
@@ -37,10 +37,10 @@
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": "3.1.1",
41
- "@vercel/frameworks": "1.0.0",
40
+ "@vercel/build-utils": "4.0.0",
41
+ "@vercel/frameworks": "1.0.1",
42
42
  "@vercel/ncc": "0.24.0",
43
- "@vercel/routing-utils": "1.13.3",
43
+ "@vercel/routing-utils": "1.13.4",
44
44
  "fs-extra": "10.0.0",
45
45
  "get-port": "5.0.0",
46
46
  "is-port-reachable": "2.0.1",
@@ -49,5 +49,5 @@
49
49
  "rc9": "1.2.0",
50
50
  "typescript": "4.3.4"
51
51
  },
52
- "gitHead": "ad436313e155b0e07cb14475e11c5c12e1b36f75"
52
+ "gitHead": "de0d2fba0b32588726a2799015eaff4e6bb65ffb"
53
53
  }