@shopify/cli-hydrogen 11.1.15 → 11.1.16
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.
- package/dist/assets/hydrogen/routes/locale-check.ts +1 -1
- package/dist/assets/hydrogen/starter/CHANGELOG.md +9 -0
- package/dist/assets/hydrogen/starter/package.json +2 -2
- package/dist/assets/hydrogen/starter/vite.config.ts +5 -1
- package/dist/commands/hydrogen/generate/route.js +1 -1
- package/dist/commands/hydrogen/setup/markets.js +1 -1
- package/dist/lib/setups/routes/generate.js +4 -1
- package/dist/lib/transpile/morph/functions.js +1 -1
- package/dist/lib/transpile/morph/typedefs.js +2 -3
- package/oclif.manifest.json +3 -3
- package/package.json +1 -1
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# skeleton
|
|
2
2
|
|
|
3
|
+
## 2026.4.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fix `set-cookie-parser` and `cookie` resolution warnings during `dev` by using Vite's nested dependency syntax (`react-router > dep`). These are CJS transitive dependencies of `react-router` that weren't resolvable by bare name with strict package managers like pnpm. ([#3698](https://github.com/Shopify/hydrogen/pull/3698)) by [@fredericoo](https://github.com/fredericoo)
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`f84ab400c62d89827574d0fa65ba310a2e75f36f`](https://github.com/Shopify/hydrogen/commit/f84ab400c62d89827574d0fa65ba310a2e75f36f)]:
|
|
10
|
+
- @shopify/hydrogen@2026.4.1
|
|
11
|
+
|
|
3
12
|
## 2026.4.0
|
|
4
13
|
|
|
5
14
|
### Major Changes
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "skeleton",
|
|
3
3
|
"private": true,
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "2026.4.
|
|
5
|
+
"version": "2026.4.1",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build": "shopify hydrogen build --codegen",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"prettier": "@shopify/prettier-config",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@shopify/hydrogen": "2026.4.
|
|
17
|
+
"@shopify/hydrogen": "2026.4.1",
|
|
18
18
|
"graphql": "^16.10.0",
|
|
19
19
|
"graphql-tag": "^2.12.6",
|
|
20
20
|
"isbot": "^5.1.22",
|
|
@@ -23,7 +23,11 @@ export default defineConfig({
|
|
|
23
23
|
* Include 'example-dep' in the array below.
|
|
24
24
|
* @see https://vitejs.dev/config/dep-optimization-options
|
|
25
25
|
*/
|
|
26
|
-
include: [
|
|
26
|
+
include: [
|
|
27
|
+
'react-router > set-cookie-parser',
|
|
28
|
+
'react-router > cookie',
|
|
29
|
+
'react-router',
|
|
30
|
+
],
|
|
27
31
|
},
|
|
28
32
|
},
|
|
29
33
|
server: {
|
|
@@ -12,7 +12,7 @@ class GenerateRoute extends Command {
|
|
|
12
12
|
static description = "Generates a standard Shopify route.";
|
|
13
13
|
static flags = {
|
|
14
14
|
adapter: Flags.string({
|
|
15
|
-
description: "
|
|
15
|
+
description: "React Router adapter used in the route. The default is `react-router`.",
|
|
16
16
|
env: "SHOPIFY_HYDROGEN_FLAG_ADAPTER"
|
|
17
17
|
}),
|
|
18
18
|
typescript: Flags.boolean({
|
|
@@ -45,7 +45,7 @@ async function runSetupMarkets({
|
|
|
45
45
|
}
|
|
46
46
|
]);
|
|
47
47
|
renderSuccess({
|
|
48
|
-
headline: `
|
|
48
|
+
headline: `Markets support setup complete with strategy ${I18N_STRATEGY_NAME_MAP[strategy].toLowerCase()}.`,
|
|
49
49
|
body: `You can now modify the supported locales in ${remixConfig.serverEntryPoint ?? "your server entry file."}
|
|
50
50
|
`
|
|
51
51
|
});
|
|
@@ -186,7 +186,10 @@ async function generateProjectFile(routeFrom, {
|
|
|
186
186
|
return result;
|
|
187
187
|
}
|
|
188
188
|
function replaceAdapters(templateContent, adapter) {
|
|
189
|
-
return templateContent.replace(
|
|
189
|
+
return templateContent.replace(
|
|
190
|
+
/(from\s+['"])react-router(['"])/g,
|
|
191
|
+
`$1${adapter}$2`
|
|
192
|
+
);
|
|
190
193
|
}
|
|
191
194
|
function getDestinationRoute(routeFrom, localePrefix, options) {
|
|
192
195
|
const routePath = routeFrom.replace(ASSETS_STARTER_DIR_ROUTES + "/", "");
|
|
@@ -35,7 +35,7 @@ function isAnnotableType(type) {
|
|
|
35
35
|
}
|
|
36
36
|
function normalizeType(type) {
|
|
37
37
|
const normalizedType = type.replace(/^\(\)\s+=>\s+/, "").replace(/typeof import\("[^"]+"\)\./, "typeof ");
|
|
38
|
-
return normalizedType === "SerializeFrom<any>" ? `{
|
|
38
|
+
return normalizedType === "SerializeFrom<any>" ? `{ReturnType<typeof useLoaderData<typeof loader>>}` : `{${normalizedType}}`;
|
|
39
39
|
}
|
|
40
40
|
function generateParameterDocumentation(functionNode, docNode) {
|
|
41
41
|
const params = functionNode.getParameters();
|
|
@@ -28,7 +28,6 @@ function generateTypeDefs(sourceFile, code) {
|
|
|
28
28
|
typedefs.push("");
|
|
29
29
|
const knownGenerics = {
|
|
30
30
|
MetaFunction: "T",
|
|
31
|
-
SerializeFrom: "T",
|
|
32
31
|
Fetcher: "T",
|
|
33
32
|
PartialPredictiveSearchResult: "ItemType, ExtraProps",
|
|
34
33
|
PartialSearchResult: "ItemType"
|
|
@@ -52,7 +51,7 @@ function generateTypeDefs(sourceFile, code) {
|
|
|
52
51
|
}
|
|
53
52
|
if (/(function loader\(|const loader =)/.test(source)) {
|
|
54
53
|
typedefs.push(
|
|
55
|
-
`/** @typedef {
|
|
54
|
+
`/** @typedef {ReturnType<typeof useLoaderData<typeof loader>>} LoaderReturnData */`
|
|
56
55
|
);
|
|
57
56
|
code = code.replace(
|
|
58
57
|
/^\s+?const\s+([\w\d]+|\{[\w\d\s,.]+\})\s+?=\s+?useLoaderData\(\)/gms,
|
|
@@ -72,7 +71,7 @@ function generateTypeDefs(sourceFile, code) {
|
|
|
72
71
|
}
|
|
73
72
|
if (/(function action\(|const action =)/.test(source)) {
|
|
74
73
|
typedefs.push(
|
|
75
|
-
`/** @typedef {
|
|
74
|
+
`/** @typedef {ReturnType<typeof useActionData<typeof action>>} ActionReturnData */`
|
|
76
75
|
);
|
|
77
76
|
code = code.replace(
|
|
78
77
|
/^\s+?const\s+([\w\d]+|\{[\w\d\s,.]+\})\s+?=\s+?useActionData\(\)/gms,
|
package/oclif.manifest.json
CHANGED
|
@@ -854,7 +854,7 @@
|
|
|
854
854
|
"description": "Generates a standard Shopify route.",
|
|
855
855
|
"flags": {
|
|
856
856
|
"adapter": {
|
|
857
|
-
"description": "
|
|
857
|
+
"description": "React Router adapter used in the route. The default is `react-router`.",
|
|
858
858
|
"env": "SHOPIFY_HYDROGEN_FLAG_ADAPTER",
|
|
859
859
|
"name": "adapter",
|
|
860
860
|
"hasDynamicHelp": false,
|
|
@@ -917,7 +917,7 @@
|
|
|
917
917
|
"description": "Generates all supported standard shopify routes.",
|
|
918
918
|
"flags": {
|
|
919
919
|
"adapter": {
|
|
920
|
-
"description": "
|
|
920
|
+
"description": "React Router adapter used in the route. The default is `react-router`.",
|
|
921
921
|
"env": "SHOPIFY_HYDROGEN_FLAG_ADAPTER",
|
|
922
922
|
"name": "adapter",
|
|
923
923
|
"hasDynamicHelp": false,
|
|
@@ -1675,5 +1675,5 @@
|
|
|
1675
1675
|
]
|
|
1676
1676
|
}
|
|
1677
1677
|
},
|
|
1678
|
-
"version": "11.1.
|
|
1678
|
+
"version": "11.1.16"
|
|
1679
1679
|
}
|