@vercel/static-build 1.0.3 → 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 +41 -23
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -10091,6 +10091,41 @@ exports.frameworks = [
10091
10091
  },
10092
10092
  ],
10093
10093
  },
10094
+ {
10095
+ name: 'Hydrogen',
10096
+ slug: 'hydrogen',
10097
+ demo: 'https://hydrogen-template.vercel.app',
10098
+ logo: 'https://raw.githubusercontent.com/vercel/vercel/main/packages/frameworks/logos/hydrogen.svg',
10099
+ tagline: 'React framework for headless commerce',
10100
+ description: 'React framework for headless commerce',
10101
+ website: 'https://hydrogen.shopify.dev',
10102
+ useRuntime: { src: 'package.json', use: '@vercel/hydrogen' },
10103
+ detectors: {
10104
+ every: [
10105
+ {
10106
+ path: 'hydrogen.config.js',
10107
+ },
10108
+ ],
10109
+ },
10110
+ settings: {
10111
+ installCommand: {
10112
+ placeholder: '`yarn install`, `pnpm install`, or `npm install`',
10113
+ },
10114
+ buildCommand: {
10115
+ value: 'shopify hydrogen build',
10116
+ placeholder: '`npm run build` or `shopify hydrogen build`',
10117
+ },
10118
+ devCommand: {
10119
+ value: 'shopify hydrogen dev',
10120
+ placeholder: 'shopify hydrogen dev',
10121
+ },
10122
+ outputDirectory: {
10123
+ value: 'dist',
10124
+ },
10125
+ },
10126
+ dependency: '@shopify/hydrogen',
10127
+ getOutputDirName: async () => 'dist',
10128
+ },
10094
10129
  {
10095
10130
  name: 'Other',
10096
10131
  slug: null,
@@ -16774,22 +16809,12 @@ const build = async ({ files, entrypoint, workPath, config, meta = {}, }) => {
16774
16809
  spawnOpts.env.CI = 'false';
16775
16810
  }
16776
16811
  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
- }
16812
+ spawnOpts.env = build_utils_1.getEnvForPackageManager({
16813
+ cliType,
16814
+ lockfileVersion,
16815
+ nodeVersion,
16816
+ env: spawnOpts.env || {},
16817
+ });
16793
16818
  if (meta.isDev) {
16794
16819
  build_utils_1.debug('Skipping dependency installation because dev mode is enabled');
16795
16820
  }
@@ -16809,15 +16834,8 @@ const build = async ({ files, entrypoint, workPath, config, meta = {}, }) => {
16809
16834
  else if (typeof installCommand === 'string') {
16810
16835
  if (installCommand.trim()) {
16811
16836
  console.log(`Running "install" command: \`${installCommand}\`...`);
16812
- const env = {
16813
- YARN_NODE_LINKER: 'node-modules',
16814
- ...spawnOpts.env,
16815
- };
16816
16837
  await build_utils_1.execCommand(installCommand, {
16817
16838
  ...spawnOpts,
16818
- // Yarn v2 PnP mode may be activated, so force
16819
- // "node-modules" linker style
16820
- env,
16821
16839
  cwd: entrypointDir,
16822
16840
  });
16823
16841
  // 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.5",
4
4
  "license": "MIT",
5
5
  "main": "./dist/index",
6
6
  "homepage": "https://vercel.com/docs/build-step",
@@ -37,8 +37,8 @@
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",
41
- "@vercel/frameworks": "1.0.2",
40
+ "@vercel/build-utils": "5.0.1",
41
+ "@vercel/frameworks": "1.1.0",
42
42
  "@vercel/ncc": "0.24.0",
43
43
  "@vercel/routing-utils": "1.13.5",
44
44
  "fs-extra": "10.0.0",
@@ -49,5 +49,5 @@
49
49
  "rc9": "1.2.0",
50
50
  "typescript": "4.3.4"
51
51
  },
52
- "gitHead": "547e88228e180e883e5f07ab815a16960767bbf5"
52
+ "gitHead": "0a2af4fb94d71a7a23ffc72fb68748be1177f345"
53
53
  }