@shopify/cli-hydrogen 11.1.8 → 11.1.10
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/starter/CHANGELOG.md +30 -0
- package/dist/assets/hydrogen/starter/app/components/MockShopNotice.tsx +20 -0
- package/dist/assets/hydrogen/starter/app/entry.client.tsx +2 -3
- package/dist/assets/hydrogen/starter/app/routes/_index.tsx +4 -5
- package/dist/assets/hydrogen/starter/app/routes/account.addresses.tsx +12 -12
- package/dist/assets/hydrogen/starter/app/routes/account.tsx +4 -7
- package/dist/assets/hydrogen/starter/app/routes/blogs.$blogHandle._index.tsx +2 -9
- package/dist/assets/hydrogen/starter/app/routes/blogs._index.tsx +1 -4
- package/dist/assets/hydrogen/starter/app/routes/cart.tsx +1 -5
- package/dist/assets/hydrogen/starter/app/routes/collections.all.tsx +1 -3
- package/dist/assets/hydrogen/starter/app/routes/pages.$handle.tsx +2 -8
- package/dist/assets/hydrogen/starter/app/routes/policies.$handle.tsx +1 -4
- package/dist/assets/hydrogen/starter/app/routes/policies._index.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/routes/products.$handle.tsx +2 -9
- package/dist/assets/hydrogen/starter/app/routes/search.tsx +18 -12
- package/dist/assets/hydrogen/starter/app/styles/app.css +51 -0
- package/dist/assets/hydrogen/starter/guides/predictiveSearch/predictiveSearch.md +3 -3
- package/dist/assets/hydrogen/starter/guides/search/search.md +1 -1
- package/dist/assets/hydrogen/starter/package.json +9 -9
- package/dist/commands/hydrogen/dev.js +0 -4
- package/dist/commands/hydrogen/init.d.ts +2 -4
- package/dist/commands/hydrogen/init.js +2 -8
- package/dist/commands/hydrogen/preview.js +1 -1
- package/dist/commands/hydrogen/setup/css.js +1 -1
- package/dist/commands/hydrogen/setup/vite.js +1 -1
- package/dist/commands/hydrogen/setup.js +31 -33
- package/dist/commands/hydrogen/upgrade.js +7 -0
- package/dist/lib/build.js +4 -5
- package/dist/lib/codegen.js +2 -2
- package/dist/lib/format-code.js +3 -3
- package/dist/lib/mini-oxygen/workerd.js +3 -5
- package/dist/lib/onboarding/common.js +19 -26
- package/dist/lib/onboarding/local.js +46 -59
- package/dist/lib/template-pack.js +84 -0
- package/oclif.manifest.json +2 -9
- package/package.json +18 -15
- package/dist/lib/react-router-version-check.js +0 -82
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# skeleton
|
|
2
2
|
|
|
3
|
+
## 2026.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Added a notice with relevant information on how to link a store in case there is no store linked yet ([#3448](https://github.com/Shopify/hydrogen/pull/3448)) by [@fredericoo](https://github.com/fredericoo)
|
|
8
|
+
|
|
9
|
+
- Fixed an issue where users without addresses could not add the first one ([#3456](https://github.com/Shopify/hydrogen/pull/3456)) by [@fredericoo](https://github.com/fredericoo)
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [[`ff93a1daf2207e52e1f8331f9ff2ccd1f9b7fed6`](https://github.com/Shopify/hydrogen/commit/ff93a1daf2207e52e1f8331f9ff2ccd1f9b7fed6)]:
|
|
12
|
+
- @shopify/hydrogen@2026.1.1
|
|
13
|
+
|
|
14
|
+
## 2026.1.0
|
|
15
|
+
|
|
16
|
+
### Major Changes
|
|
17
|
+
|
|
18
|
+
- Updated to Storefront API 2026-01 and Customer Account API 2026-01. ([#3434](https://github.com/Shopify/hydrogen/pull/3434)) by [@kdaviduik](https://github.com/kdaviduik)
|
|
19
|
+
|
|
20
|
+
This is a quarterly API version update aligned with Shopify's API release schedule.
|
|
21
|
+
|
|
22
|
+
**Action Required**: The `cartDiscountCodesUpdate` mutation now requires the `discountCodes` argument. If you have custom cart discount code logic, verify your mutations include this field.
|
|
23
|
+
|
|
24
|
+
Review the changelogs for other changes that may affect your storefront:
|
|
25
|
+
- [Storefront API 2026-01 changelog](https://shopify.dev/changelog?filter=api&api_version=2026-01&api_type=storefront-graphql)
|
|
26
|
+
- [Customer Account API 2026-01 changelog](https://shopify.dev/changelog?filter=api&api_version=2026-01&api_type=customer-account-graphql)
|
|
27
|
+
|
|
28
|
+
### Patch Changes
|
|
29
|
+
|
|
30
|
+
- Updated dependencies [[`d46c8864aea059cac7dda4871a565f76a04b1495`](https://github.com/Shopify/hydrogen/commit/d46c8864aea059cac7dda4871a565f76a04b1495)]:
|
|
31
|
+
- @shopify/hydrogen@2026.0.0
|
|
32
|
+
|
|
3
33
|
## 2025.10.1
|
|
4
34
|
|
|
5
35
|
### Major Changes
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export function MockShopNotice() {
|
|
2
|
+
return (
|
|
3
|
+
<section
|
|
4
|
+
className="mock-shop-notice"
|
|
5
|
+
aria-labelledby="mock-shop-notice-heading"
|
|
6
|
+
>
|
|
7
|
+
<div className="inner">
|
|
8
|
+
<h2 id="mock-shop-notice-heading">Welcome to Hydrogen!</h2>
|
|
9
|
+
<p>
|
|
10
|
+
You’re seeing mocked products because no store is connected to
|
|
11
|
+
this project yet.
|
|
12
|
+
</p>
|
|
13
|
+
<p>
|
|
14
|
+
Link a store by running <code>npx shopify hydrogen link</code> in your
|
|
15
|
+
terminal.
|
|
16
|
+
</p>
|
|
17
|
+
</div>
|
|
18
|
+
</section>
|
|
19
|
+
);
|
|
20
|
+
}
|
|
@@ -6,9 +6,8 @@ import {NonceProvider} from '@shopify/hydrogen';
|
|
|
6
6
|
if (!window.location.origin.includes('webcache.googleusercontent.com')) {
|
|
7
7
|
startTransition(() => {
|
|
8
8
|
// Extract nonce from existing script tags
|
|
9
|
-
const existingNonce =
|
|
10
|
-
.querySelector<HTMLScriptElement>('script[nonce]')
|
|
11
|
-
?.nonce;
|
|
9
|
+
const existingNonce =
|
|
10
|
+
document.querySelector<HTMLScriptElement>('script[nonce]')?.nonce;
|
|
12
11
|
|
|
13
12
|
hydrateRoot(
|
|
14
13
|
document,
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Await,
|
|
3
|
-
useLoaderData,
|
|
4
|
-
Link,
|
|
5
|
-
} from 'react-router';
|
|
1
|
+
import {Await, useLoaderData, Link} from 'react-router';
|
|
6
2
|
import type {Route} from './+types/_index';
|
|
7
3
|
import {Suspense} from 'react';
|
|
8
4
|
import {Image} from '@shopify/hydrogen';
|
|
@@ -11,6 +7,7 @@ import type {
|
|
|
11
7
|
RecommendedProductsQuery,
|
|
12
8
|
} from 'storefrontapi.generated';
|
|
13
9
|
import {ProductItem} from '~/components/ProductItem';
|
|
10
|
+
import {MockShopNotice} from '~/components/MockShopNotice';
|
|
14
11
|
|
|
15
12
|
export const meta: Route.MetaFunction = () => {
|
|
16
13
|
return [{title: 'Hydrogen | Home'}];
|
|
@@ -37,6 +34,7 @@ async function loadCriticalData({context}: Route.LoaderArgs) {
|
|
|
37
34
|
]);
|
|
38
35
|
|
|
39
36
|
return {
|
|
37
|
+
isShopLinked: Boolean(context.env.PUBLIC_STORE_DOMAIN),
|
|
40
38
|
featuredCollection: collections.nodes[0],
|
|
41
39
|
};
|
|
42
40
|
}
|
|
@@ -64,6 +62,7 @@ export default function Homepage() {
|
|
|
64
62
|
const data = useLoaderData<typeof loader>();
|
|
65
63
|
return (
|
|
66
64
|
<div className="home">
|
|
65
|
+
{data.isShopLinked ? null : <MockShopNotice />}
|
|
67
66
|
<FeaturedCollection collection={data.featuredCollection} />
|
|
68
67
|
<RecommendedProducts products={data.recommendedProducts} />
|
|
69
68
|
</div>
|
|
@@ -264,23 +264,23 @@ export default function Addresses() {
|
|
|
264
264
|
<div className="account-addresses">
|
|
265
265
|
<h2>Addresses</h2>
|
|
266
266
|
<br />
|
|
267
|
-
|
|
268
|
-
<p>You have no addresses saved.</p>
|
|
269
|
-
) : (
|
|
267
|
+
<div>
|
|
270
268
|
<div>
|
|
271
|
-
<
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
269
|
+
<legend>Create address</legend>
|
|
270
|
+
<NewAddressForm key={addresses.nodes.length} />
|
|
271
|
+
</div>
|
|
272
|
+
<br />
|
|
273
|
+
<hr />
|
|
274
|
+
<br />
|
|
275
|
+
{!addresses.nodes.length ? (
|
|
276
|
+
<p>You have no addresses saved.</p>
|
|
277
|
+
) : (
|
|
278
278
|
<ExistingAddresses
|
|
279
279
|
addresses={addresses}
|
|
280
280
|
defaultAddress={defaultAddress}
|
|
281
281
|
/>
|
|
282
|
-
|
|
283
|
-
|
|
282
|
+
)}
|
|
283
|
+
</div>
|
|
284
284
|
</div>
|
|
285
285
|
);
|
|
286
286
|
}
|
|
@@ -14,14 +14,11 @@ export function shouldRevalidate() {
|
|
|
14
14
|
|
|
15
15
|
export async function loader({context}: Route.LoaderArgs) {
|
|
16
16
|
const {customerAccount} = context;
|
|
17
|
-
const {data, errors} = await customerAccount.query(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
variables: {
|
|
21
|
-
language: customerAccount.i18n.language,
|
|
22
|
-
},
|
|
17
|
+
const {data, errors} = await customerAccount.query(CUSTOMER_DETAILS_QUERY, {
|
|
18
|
+
variables: {
|
|
19
|
+
language: customerAccount.i18n.language,
|
|
23
20
|
},
|
|
24
|
-
);
|
|
21
|
+
});
|
|
25
22
|
|
|
26
23
|
if (errors?.length || !data?.customer) {
|
|
27
24
|
throw new Error('Customer not found');
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Link,
|
|
3
|
-
useLoaderData,
|
|
4
|
-
} from 'react-router';
|
|
1
|
+
import {Link, useLoaderData} from 'react-router';
|
|
5
2
|
import type {Route} from './+types/blogs.$blogHandle._index';
|
|
6
3
|
import {Image, getPaginationVariables} from '@shopify/hydrogen';
|
|
7
4
|
import type {ArticleItemFragment} from 'storefrontapi.generated';
|
|
@@ -26,11 +23,7 @@ export async function loader(args: Route.LoaderArgs) {
|
|
|
26
23
|
* Load data necessary for rendering content above the fold. This is the critical data
|
|
27
24
|
* needed to render the page. If it's unavailable, the whole page should 400 or 500 error.
|
|
28
25
|
*/
|
|
29
|
-
async function loadCriticalData({
|
|
30
|
-
context,
|
|
31
|
-
request,
|
|
32
|
-
params,
|
|
33
|
-
}: Route.LoaderArgs) {
|
|
26
|
+
async function loadCriticalData({context, request, params}: Route.LoaderArgs) {
|
|
34
27
|
const paginationVariables = getPaginationVariables(request, {
|
|
35
28
|
pageBy: 4,
|
|
36
29
|
});
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Link,
|
|
3
|
-
useLoaderData,
|
|
4
|
-
} from 'react-router';
|
|
1
|
+
import {Link, useLoaderData} from 'react-router';
|
|
5
2
|
import type {Route} from './+types/blogs._index';
|
|
6
3
|
import {getPaginationVariables} from '@shopify/hydrogen';
|
|
7
4
|
import {PaginatedResourceSection} from '~/components/PaginatedResourceSection';
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
useLoaderData,
|
|
3
|
-
data,
|
|
4
|
-
type HeadersFunction,
|
|
5
|
-
} from 'react-router';
|
|
1
|
+
import {useLoaderData, data, type HeadersFunction} from 'react-router';
|
|
6
2
|
import type {Route} from './+types/cart';
|
|
7
3
|
import type {CartQueryDataReturn} from '@shopify/hydrogen';
|
|
8
4
|
import {CartForm} from '@shopify/hydrogen';
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import type {Route} from './+types/collections.all';
|
|
2
|
-
import {
|
|
3
|
-
useLoaderData,
|
|
4
|
-
} from 'react-router';
|
|
2
|
+
import {useLoaderData} from 'react-router';
|
|
5
3
|
import {getPaginationVariables, Image, Money} from '@shopify/hydrogen';
|
|
6
4
|
import {PaginatedResourceSection} from '~/components/PaginatedResourceSection';
|
|
7
5
|
import {ProductItem} from '~/components/ProductItem';
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
useLoaderData,
|
|
3
|
-
} from 'react-router';
|
|
1
|
+
import {useLoaderData} from 'react-router';
|
|
4
2
|
import type {Route} from './+types/pages.$handle';
|
|
5
3
|
import {redirectIfHandleIsLocalized} from '~/lib/redirect';
|
|
6
4
|
|
|
@@ -22,11 +20,7 @@ export async function loader(args: Route.LoaderArgs) {
|
|
|
22
20
|
* Load data necessary for rendering content above the fold. This is the critical data
|
|
23
21
|
* needed to render the page. If it's unavailable, the whole page should 400 or 500 error.
|
|
24
22
|
*/
|
|
25
|
-
async function loadCriticalData({
|
|
26
|
-
context,
|
|
27
|
-
request,
|
|
28
|
-
params,
|
|
29
|
-
}: Route.LoaderArgs) {
|
|
23
|
+
async function loadCriticalData({context, request, params}: Route.LoaderArgs) {
|
|
30
24
|
if (!params.handle) {
|
|
31
25
|
throw new Error('Missing page handle');
|
|
32
26
|
}
|
|
@@ -4,7 +4,7 @@ import type {PoliciesQuery, PolicyItemFragment} from 'storefrontapi.generated';
|
|
|
4
4
|
|
|
5
5
|
export async function loader({context}: Route.LoaderArgs) {
|
|
6
6
|
const data: PoliciesQuery = await context.storefront.query(POLICIES_QUERY);
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
const shopPolicies = data.shop;
|
|
9
9
|
const policies: PolicyItemFragment[] = [
|
|
10
10
|
shopPolicies?.privacyPolicy,
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
redirect,
|
|
3
|
-
useLoaderData,
|
|
4
|
-
} from 'react-router';
|
|
1
|
+
import {redirect, useLoaderData} from 'react-router';
|
|
5
2
|
import type {Route} from './+types/products.$handle';
|
|
6
3
|
import {
|
|
7
4
|
getSelectedProductOptions,
|
|
@@ -40,11 +37,7 @@ export async function loader(args: Route.LoaderArgs) {
|
|
|
40
37
|
* Load data necessary for rendering content above the fold. This is the critical data
|
|
41
38
|
* needed to render the page. If it's unavailable, the whole page should 400 or 500 error.
|
|
42
39
|
*/
|
|
43
|
-
async function loadCriticalData({
|
|
44
|
-
context,
|
|
45
|
-
params,
|
|
46
|
-
request,
|
|
47
|
-
}: Route.LoaderArgs) {
|
|
40
|
+
async function loadCriticalData({context, params, request}: Route.LoaderArgs) {
|
|
48
41
|
const {handle} = params;
|
|
49
42
|
const {storefront} = context;
|
|
50
43
|
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
useLoaderData,
|
|
3
|
-
} from 'react-router';
|
|
1
|
+
import {useLoaderData} from 'react-router';
|
|
4
2
|
import type {Route} from './+types/search';
|
|
5
3
|
import {getPaginationVariables, Analytics} from '@shopify/hydrogen';
|
|
6
4
|
import {SearchForm} from '~/components/SearchForm';
|
|
@@ -10,7 +8,10 @@ import {
|
|
|
10
8
|
type PredictiveSearchReturn,
|
|
11
9
|
getEmptyPredictiveSearchResult,
|
|
12
10
|
} from '~/lib/search';
|
|
13
|
-
import type {
|
|
11
|
+
import type {
|
|
12
|
+
RegularSearchQuery,
|
|
13
|
+
PredictiveSearchQuery,
|
|
14
|
+
} from 'storefrontapi.generated';
|
|
14
15
|
|
|
15
16
|
export const meta: Route.MetaFunction = () => {
|
|
16
17
|
return [{title: `Hydrogen | Search`}];
|
|
@@ -225,9 +226,13 @@ async function regularSearch({
|
|
|
225
226
|
const term = String(url.searchParams.get('q') || '');
|
|
226
227
|
|
|
227
228
|
// Search articles, pages, and products for the `q` term
|
|
228
|
-
const {
|
|
229
|
-
|
|
230
|
-
|
|
229
|
+
const {
|
|
230
|
+
errors,
|
|
231
|
+
...items
|
|
232
|
+
}: {errors?: Array<{message: string}>} & RegularSearchQuery =
|
|
233
|
+
await storefront.query(SEARCH_QUERY, {
|
|
234
|
+
variables: {...variables, term},
|
|
235
|
+
});
|
|
231
236
|
|
|
232
237
|
if (!items) {
|
|
233
238
|
throw new Error('No search data returned from Shopify API');
|
|
@@ -389,17 +394,18 @@ async function predictiveSearch({
|
|
|
389
394
|
if (!term) return {type, term, result: getEmptyPredictiveSearchResult()};
|
|
390
395
|
|
|
391
396
|
// Predictively search articles, collections, pages, products, and queries (suggestions)
|
|
392
|
-
const {
|
|
393
|
-
|
|
394
|
-
|
|
397
|
+
const {
|
|
398
|
+
predictiveSearch: items,
|
|
399
|
+
errors,
|
|
400
|
+
}: PredictiveSearchQuery & {errors?: Array<{message: string}>} =
|
|
401
|
+
await storefront.query(PREDICTIVE_SEARCH_QUERY, {
|
|
395
402
|
variables: {
|
|
396
403
|
// customize search options as needed
|
|
397
404
|
limit,
|
|
398
405
|
limitScope: 'EACH',
|
|
399
406
|
term,
|
|
400
407
|
},
|
|
401
|
-
}
|
|
402
|
-
);
|
|
408
|
+
});
|
|
403
409
|
|
|
404
410
|
if (errors) {
|
|
405
411
|
throw new Error(
|
|
@@ -22,6 +22,57 @@ img {
|
|
|
22
22
|
cursor: pointer;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
/*
|
|
26
|
+
* --------------------------------------------------
|
|
27
|
+
* components/MockShopNotice
|
|
28
|
+
* --------------------------------------------------
|
|
29
|
+
*/
|
|
30
|
+
.mock-shop-notice {
|
|
31
|
+
background: var(--color-light);
|
|
32
|
+
border: 1px solid var(--color-dark);
|
|
33
|
+
border-left-width: 0.5rem;
|
|
34
|
+
margin: 1rem 0;
|
|
35
|
+
padding: 0;
|
|
36
|
+
|
|
37
|
+
.inner {
|
|
38
|
+
padding: 0.875rem 1rem;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
h2 {
|
|
42
|
+
font-size: 1.6rem;
|
|
43
|
+
font-weight: 700;
|
|
44
|
+
line-height: 1.4;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
p {
|
|
48
|
+
font-size: 1rem;
|
|
49
|
+
line-height: 1.4;
|
|
50
|
+
margin-bottom: 0.5rem;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
footer {
|
|
54
|
+
background: rgba(0, 0, 0, 0.06);
|
|
55
|
+
padding: 0.5rem 1rem;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.small {
|
|
59
|
+
font-size: 0.875rem;
|
|
60
|
+
line-height: 1.4;
|
|
61
|
+
margin-bottom: 0.5rem;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
code {
|
|
65
|
+
background: rgba(0, 0, 0, 0.06);
|
|
66
|
+
border-radius: 0.25rem;
|
|
67
|
+
padding: 0.1em 0.3em;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
a {
|
|
71
|
+
text-decoration: underline;
|
|
72
|
+
text-underline-offset: 6px;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
25
76
|
/*
|
|
26
77
|
* --------------------------------------------------
|
|
27
78
|
* components/Aside
|
|
@@ -15,7 +15,7 @@ This integration uses the storefront API (SFAPI) [predictiveSearch](https://shop
|
|
|
15
15
|
|
|
16
16
|
| File | Description |
|
|
17
17
|
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
18
|
-
| [`app/components/SearchFormPredictive.tsx`](../../app/components/SearchFormPredictive.tsx) | A fully customizable form component configured to make form `GET` requests to the `/search` route.
|
|
18
|
+
| [`app/components/SearchFormPredictive.tsx`](../../app/components/SearchFormPredictive.tsx) | A fully customizable form component configured to make form `GET` requests to the `/search` route. |
|
|
19
19
|
| [`app/components/SearchResultsPredictive.tsx`](../../app/components/SearchResultsPredictive.tsx) | A fully customizable search results wrapper, that provides compound components to render `articles`, `pages`, `products`, `collections` and `queries`. |
|
|
20
20
|
|
|
21
21
|
## Instructions
|
|
@@ -217,10 +217,10 @@ export async function loader({request, context}: LoaderFunctionArgs) {
|
|
|
217
217
|
const isPredictive = url.searchParams.has('predictive');
|
|
218
218
|
|
|
219
219
|
if (!isPredictive) {
|
|
220
|
-
return {}
|
|
220
|
+
return {};
|
|
221
221
|
}
|
|
222
222
|
|
|
223
|
-
const searchPromise = predictiveSearch({request, context})
|
|
223
|
+
const searchPromise = predictiveSearch({request, context});
|
|
224
224
|
|
|
225
225
|
searchPromise.catch((error: Error) => {
|
|
226
226
|
console.error(error);
|
|
@@ -212,7 +212,7 @@ export async function loader({request, context}: LoaderFunctionArgs) {
|
|
|
212
212
|
const isRegular = !url.searchParams.has('predictive');
|
|
213
213
|
|
|
214
214
|
if (!isRegular) {
|
|
215
|
-
return {}
|
|
215
|
+
return {};
|
|
216
216
|
}
|
|
217
217
|
|
|
218
218
|
const searchPromise = regularSearch({request, context});
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "skeleton",
|
|
3
3
|
"private": true,
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "
|
|
5
|
+
"version": "2026.1.1",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build": "shopify hydrogen build --codegen",
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
},
|
|
15
15
|
"prettier": "@shopify/prettier-config",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@shopify/hydrogen": "
|
|
17
|
+
"@shopify/hydrogen": "*2026.1.1",
|
|
18
18
|
"graphql": "^16.10.0",
|
|
19
19
|
"graphql-tag": "^2.12.6",
|
|
20
20
|
"isbot": "^5.1.22",
|
|
21
|
-
"react": "18.3.1",
|
|
22
|
-
"react-dom": "18.3.1",
|
|
21
|
+
"react": "^18.3.1",
|
|
22
|
+
"react-dom": "^18.3.1",
|
|
23
23
|
"react-router": "7.12.0",
|
|
24
24
|
"react-router-dom": "7.12.0"
|
|
25
25
|
},
|
|
@@ -31,14 +31,14 @@
|
|
|
31
31
|
"@react-router/dev": "7.12.0",
|
|
32
32
|
"@react-router/fs-routes": "7.12.0",
|
|
33
33
|
"@shopify/cli": "3.85.4",
|
|
34
|
-
"@shopify/hydrogen-codegen": "
|
|
35
|
-
"@shopify/mini-oxygen": "
|
|
34
|
+
"@shopify/hydrogen-codegen": "0.3.3",
|
|
35
|
+
"@shopify/mini-oxygen": "4.0.1",
|
|
36
36
|
"@shopify/oxygen-workers-types": "^4.1.6",
|
|
37
37
|
"@shopify/prettier-config": "^1.1.2",
|
|
38
38
|
"@total-typescript/ts-reset": "^0.6.1",
|
|
39
39
|
"@types/eslint": "^9.6.1",
|
|
40
|
-
"@types/react": "^18.
|
|
41
|
-
"@types/react-dom": "^18.
|
|
40
|
+
"@types/react": "^18.3.28",
|
|
41
|
+
"@types/react-dom": "^18.3.7",
|
|
42
42
|
"@typescript-eslint/eslint-plugin": "^8.21.0",
|
|
43
43
|
"@typescript-eslint/parser": "^8.21.0",
|
|
44
44
|
"eslint": "^9.18.0",
|
|
@@ -58,6 +58,6 @@
|
|
|
58
58
|
"vite-tsconfig-paths": "^4.3.1"
|
|
59
59
|
},
|
|
60
60
|
"engines": {
|
|
61
|
-
"node": "
|
|
61
|
+
"node": "^22 || ^24"
|
|
62
62
|
}
|
|
63
63
|
}
|
|
@@ -11,7 +11,6 @@ import { commonFlags, overrideFlag, flagsToCamelObject, DEFAULT_INSPECTOR_PORT,
|
|
|
11
11
|
import { spawnCodegenProcess } from '../../lib/codegen.js';
|
|
12
12
|
import { getAllEnvironmentVariables } from '../../lib/environment-variables.js';
|
|
13
13
|
import { displayDevUpgradeNotice } from './upgrade.js';
|
|
14
|
-
import { checkReactRouterVersions } from '../../lib/react-router-version-check.js';
|
|
15
14
|
import { getDevConfigInBackground, TUNNEL_DOMAIN, startTunnelAndPushConfig, isMockShop, notifyIssueWithTunnelAndMockShop, getUtilityBannerlines, getDebugBannerLine } from '../../lib/dev-shared.js';
|
|
16
15
|
import { getCliCommand } from '../../lib/shell.js';
|
|
17
16
|
import { findPort } from '../../lib/find-port.js';
|
|
@@ -238,9 +237,6 @@ async function runDev({
|
|
|
238
237
|
viteServer.bindCLIShortcuts({ print: true });
|
|
239
238
|
console.log("\n");
|
|
240
239
|
const storefrontTitle = (await backgroundPromise).storefrontTitle;
|
|
241
|
-
if (!disableVersionCheck) {
|
|
242
|
-
await checkReactRouterVersions(root);
|
|
243
|
-
}
|
|
244
240
|
showSuccessBanner({
|
|
245
241
|
disableVirtualRoutes,
|
|
246
242
|
debug,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { PackageManager } from '@shopify/cli-kit/node/node-package-manager';
|
|
1
2
|
import * as _oclif_core_lib_interfaces_parser_js from '@oclif/core/lib/interfaces/parser.js';
|
|
2
3
|
import Command from '@shopify/cli-kit/node/base-command';
|
|
3
|
-
import { PackageManager } from '@shopify/cli-kit/node/node-package-manager';
|
|
4
4
|
|
|
5
5
|
declare const SETUP_I18N_STRATEGIES: readonly ["subfolders", "domains", "subdomains"];
|
|
6
6
|
type I18nStrategy = (typeof SETUP_I18N_STRATEGIES)[number];
|
|
@@ -24,7 +24,6 @@ type InitOptions = {
|
|
|
24
24
|
i18n?: I18nChoice;
|
|
25
25
|
token?: string;
|
|
26
26
|
force?: boolean;
|
|
27
|
-
routes?: boolean;
|
|
28
27
|
shortcut?: boolean;
|
|
29
28
|
installDeps?: boolean;
|
|
30
29
|
git?: boolean;
|
|
@@ -41,7 +40,6 @@ declare class Init extends Command {
|
|
|
41
40
|
static descriptionWithMarkdown: string;
|
|
42
41
|
static description: string;
|
|
43
42
|
static flags: {
|
|
44
|
-
routes: _oclif_core_lib_interfaces_parser_js.BooleanFlag<boolean>;
|
|
45
43
|
git: _oclif_core_lib_interfaces_parser_js.BooleanFlag<boolean>;
|
|
46
44
|
quickstart: _oclif_core_lib_interfaces_parser_js.BooleanFlag<boolean>;
|
|
47
45
|
'package-manager': _oclif_core_lib_interfaces_parser_js.OptionFlag<string | undefined, _oclif_core_lib_interfaces_parser_js.CustomOptions>;
|
|
@@ -60,7 +58,7 @@ declare class Init extends Command {
|
|
|
60
58
|
declare function runInit({ markets, ...options }?: InitOptions & {
|
|
61
59
|
markets?: InitOptions['i18n'];
|
|
62
60
|
}): Promise<{
|
|
63
|
-
language?:
|
|
61
|
+
language?: Language;
|
|
64
62
|
packageManager: "npm" | "pnpm" | "yarn" | "bun" | "unknown";
|
|
65
63
|
cssStrategy?: CssStrategy;
|
|
66
64
|
cliCommand: CliCommand;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Command from '@shopify/cli-kit/node/base-command';
|
|
2
2
|
import { Flags } from '@oclif/core';
|
|
3
3
|
import { AbortError } from '@shopify/cli-kit/node/error';
|
|
4
|
-
import { commonFlags,
|
|
4
|
+
import { commonFlags, flagsToCamelObject, parseProcessFlags } from '../../lib/flags.js';
|
|
5
5
|
import { checkCurrentCLIVersion } from '../../lib/check-cli-version.js';
|
|
6
6
|
import { STYLING_CHOICES } from '../../lib/setups/css/index.js';
|
|
7
7
|
import { I18N_CHOICES } from '../../lib/setups/i18n/index.js';
|
|
@@ -36,11 +36,6 @@ class Init extends Command {
|
|
|
36
36
|
...commonFlags.styling,
|
|
37
37
|
...commonFlags.markets,
|
|
38
38
|
...commonFlags.shortcut,
|
|
39
|
-
routes: Flags.boolean({
|
|
40
|
-
description: "Generate routes for all pages.",
|
|
41
|
-
env: "SHOPIFY_HYDROGEN_FLAG_ROUTES",
|
|
42
|
-
allowNo: true
|
|
43
|
-
}),
|
|
44
39
|
git: Flags.boolean({
|
|
45
40
|
description: "Init Git and create initial commits.",
|
|
46
41
|
env: "SHOPIFY_HYDROGEN_FLAG_GIT",
|
|
@@ -48,7 +43,7 @@ class Init extends Command {
|
|
|
48
43
|
allowNo: true
|
|
49
44
|
}),
|
|
50
45
|
quickstart: Flags.boolean({
|
|
51
|
-
description: "Scaffolds a new Hydrogen project with a set of sensible defaults. Equivalent to `shopify hydrogen init --path hydrogen-quickstart --mock-shop --language js --shortcut --
|
|
46
|
+
description: "Scaffolds a new Hydrogen project with a set of sensible defaults. Equivalent to `shopify hydrogen init --path hydrogen-quickstart --mock-shop --language js --shortcut --markets none`",
|
|
52
47
|
env: "SHOPIFY_HYDROGEN_FLAG_QUICKSTART",
|
|
53
48
|
default: false
|
|
54
49
|
}),
|
|
@@ -91,7 +86,6 @@ async function runInit({
|
|
|
91
86
|
options.language ??= "js";
|
|
92
87
|
options.mockShop ??= true;
|
|
93
88
|
options.path ??= "./hydrogen-quickstart";
|
|
94
|
-
options.routes ??= true;
|
|
95
89
|
options.shortcut ??= true;
|
|
96
90
|
options.styling ??= "none";
|
|
97
91
|
}
|
|
@@ -5,7 +5,7 @@ import { outputInfo } from '@shopify/cli-kit/node/output';
|
|
|
5
5
|
import { resolvePath, joinPath } from '@shopify/cli-kit/node/path';
|
|
6
6
|
import { setH2OVerbose, isH2Verbose, muteDevLogs } from '../../lib/log.js';
|
|
7
7
|
import { getProjectPaths, isClassicProject } from '../../lib/remix-config.js';
|
|
8
|
-
import {
|
|
8
|
+
import { commonFlags, overrideFlag, flagsToCamelObject, DEFAULT_APP_PORT } from '../../lib/flags.js';
|
|
9
9
|
import { startMiniOxygen } from '../../lib/mini-oxygen/index.js';
|
|
10
10
|
import { getAllEnvironmentVariables } from '../../lib/environment-variables.js';
|
|
11
11
|
import { getConfig } from '../../lib/shopify-config.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolvePath } from '@shopify/cli-kit/node/path';
|
|
2
|
-
import {
|
|
2
|
+
import { commonFlags, overrideFlag, flagsToCamelObject } from '../../../lib/flags.js';
|
|
3
3
|
import Command from '@shopify/cli-kit/node/base-command';
|
|
4
4
|
import { renderSuccess, renderTasks, renderWarning } from '@shopify/cli-kit/node/ui';
|
|
5
5
|
import { getPackageManager, installNodeModules } from '@shopify/cli-kit/node/node-package-manager';
|
|
@@ -5,7 +5,7 @@ import { removeFile, moveFile, readFile, writeFile, fileExists } from '@shopify/
|
|
|
5
5
|
import { readAndParsePackageJson, installNodeModules, getPackageManager } from '@shopify/cli-kit/node/node-package-manager';
|
|
6
6
|
import { commonFlags, flagsToCamelObject } from '../../../lib/flags.js';
|
|
7
7
|
import { getRawRemixConfig } from '../../../lib/remix-config.js';
|
|
8
|
-
import {
|
|
8
|
+
import { replaceFileContent, mergePackageJson } from '../../../lib/file.js';
|
|
9
9
|
import { importLangAstGrep } from '../../../lib/ast.js';
|
|
10
10
|
import { getAssetsDir } from '../../../lib/build.js';
|
|
11
11
|
import { getCodeFormatOptions, formatCode } from '../../../lib/format-code.js';
|