@vercel/hydrogen 1.0.11 → 1.2.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 +23 -5
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -69,7 +69,8 @@ var build = async ({
69
69
  packageJsonPackageManager,
70
70
  nodeVersion,
71
71
  env: spawnOpts.env || {},
72
- turboSupportsCorepackHome
72
+ turboSupportsCorepackHome,
73
+ projectCreatedAt: config.projectSettings?.createdAt
73
74
  });
74
75
  if (typeof installCommand === "string") {
75
76
  if (installCommand.trim()) {
@@ -82,7 +83,14 @@ var build = async ({
82
83
  console.log(`Skipping "install" command...`);
83
84
  }
84
85
  } else {
85
- await (0, import_build_utils.runNpmInstall)(entrypointDir, [], spawnOpts, meta, nodeVersion);
86
+ await (0, import_build_utils.runNpmInstall)(
87
+ entrypointDir,
88
+ [],
89
+ spawnOpts,
90
+ meta,
91
+ nodeVersion,
92
+ config.projectSettings?.createdAt
93
+ );
86
94
  }
87
95
  const edgeEntryDir = (0, import_path.join)(workPath, ".vercel/cache/hydrogen");
88
96
  const edgeEntryRelative = (0, import_path.relative)(edgeEntryDir, workPath);
@@ -111,10 +119,20 @@ var build = async ({
111
119
  );
112
120
  if (hasScript("vercel-build", pkg)) {
113
121
  (0, import_build_utils.debug)(`Executing "yarn vercel-build"`);
114
- await (0, import_build_utils.runPackageJsonScript)(entrypointDir, "vercel-build", spawnOpts);
122
+ await (0, import_build_utils.runPackageJsonScript)(
123
+ entrypointDir,
124
+ "vercel-build",
125
+ spawnOpts,
126
+ config.projectSettings?.createdAt
127
+ );
115
128
  } else if (hasScript("build", pkg)) {
116
129
  (0, import_build_utils.debug)(`Executing "yarn build"`);
117
- await (0, import_build_utils.runPackageJsonScript)(entrypointDir, "build", spawnOpts);
130
+ await (0, import_build_utils.runPackageJsonScript)(
131
+ entrypointDir,
132
+ "build",
133
+ spawnOpts,
134
+ config.projectSettings?.createdAt
135
+ );
118
136
  } else {
119
137
  await (0, import_build_utils.execCommand)("shopify hydrogen build", {
120
138
  ...spawnOpts,
@@ -165,7 +183,7 @@ function hasScript(scriptName, pkg) {
165
183
  // src/prepare-cache.ts
166
184
  var import_build_utils2 = require("@vercel/build-utils");
167
185
  var prepareCache = ({ repoRootPath, workPath }) => {
168
- return (0, import_build_utils2.glob)("**/node_modules/**", repoRootPath || workPath);
186
+ return (0, import_build_utils2.glob)(import_build_utils2.defaultCachePathGlob, repoRootPath || workPath);
169
187
  };
170
188
 
171
189
  // src/index.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/hydrogen",
3
- "version": "1.0.11",
3
+ "version": "1.2.0",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/index.js",
6
6
  "homepage": "https://vercel.com/docs",
@@ -20,7 +20,7 @@
20
20
  "devDependencies": {
21
21
  "@types/jest": "27.5.1",
22
22
  "@types/node": "14.18.33",
23
- "@vercel/build-utils": "9.0.1",
23
+ "@vercel/build-utils": "10.2.0",
24
24
  "execa": "3.2.0",
25
25
  "fs-extra": "11.1.0",
26
26
  "jest-junit": "16.0.0"