@shopify/cli 3.75.1 → 3.75.2
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 +206 -0
- package/dist/assets/hydrogen/starter/app/components/CartMain.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/components/CartSummary.tsx +17 -6
- package/dist/assets/hydrogen/starter/app/entry.server.tsx +2 -3
- package/dist/assets/hydrogen/starter/app/root.tsx +9 -5
- package/dist/assets/hydrogen/starter/app/routes/[robots.txt].tsx +0 -1
- package/dist/assets/hydrogen/starter/app/routes/_index.tsx +2 -2
- package/dist/assets/hydrogen/starter/app/routes/account.addresses.tsx +17 -17
- package/dist/assets/hydrogen/starter/app/routes/account.orders.$id.tsx +3 -3
- package/dist/assets/hydrogen/starter/app/routes/account.orders._index.tsx +2 -2
- package/dist/assets/hydrogen/starter/app/routes/account.profile.tsx +6 -6
- package/dist/assets/hydrogen/starter/app/routes/account.tsx +2 -2
- package/dist/assets/hydrogen/starter/app/routes/blogs.$blogHandle.$articleHandle.tsx +2 -2
- package/dist/assets/hydrogen/starter/app/routes/blogs.$blogHandle._index.tsx +2 -2
- package/dist/assets/hydrogen/starter/app/routes/blogs._index.tsx +2 -2
- package/dist/assets/hydrogen/starter/app/routes/cart.tsx +5 -3
- package/dist/assets/hydrogen/starter/app/routes/collections.$handle.tsx +2 -2
- package/dist/assets/hydrogen/starter/app/routes/collections._index.tsx +2 -2
- package/dist/assets/hydrogen/starter/app/routes/collections.all.tsx +2 -2
- package/dist/assets/hydrogen/starter/app/routes/pages.$handle.tsx +2 -2
- package/dist/assets/hydrogen/starter/app/routes/policies.$handle.tsx +2 -2
- package/dist/assets/hydrogen/starter/app/routes/policies._index.tsx +2 -2
- package/dist/assets/hydrogen/starter/app/routes/products.$handle.tsx +2 -2
- package/dist/assets/hydrogen/starter/app/routes/search.tsx +1 -2
- package/dist/assets/hydrogen/starter/eslint.config.js +261 -0
- package/dist/assets/hydrogen/starter/guides/predictiveSearch/predictiveSearch.md +3 -3
- package/dist/assets/hydrogen/starter/guides/search/search.md +3 -3
- package/dist/assets/hydrogen/starter/package.json +24 -12
- package/dist/assets/hydrogen/starter/server.ts +3 -2
- package/dist/assets/hydrogen/starter/tsconfig.json +5 -1
- package/dist/assets/hydrogen/starter/vite.config.ts +7 -0
- package/dist/assets/hydrogen/vite/package.json +1 -1
- package/dist/assets/hydrogen/vite/vite.config.js +0 -1
- package/dist/{chunk-LJHVF5TJ.js → chunk-2OIJ27EK.js} +3 -3
- package/dist/{chunk-YEOP3EMX.js → chunk-3AS5GKO6.js} +2 -2
- package/dist/{chunk-4MJNU2QF.js → chunk-3LRCKABH.js} +3 -3
- package/dist/{chunk-2TEPYAPA.js → chunk-3PD7N6QH.js} +3 -3
- package/dist/{chunk-VSC4NMYT.js → chunk-3WJDY4FZ.js} +2 -2
- package/dist/{chunk-NA34VFTA.js → chunk-57OHFYZW.js} +76 -76
- package/dist/{chunk-S3NMVYAF.js → chunk-BCU7E3NX.js} +4 -4
- package/dist/{chunk-ZJSUUIVI.js → chunk-BLPW2I3W.js} +3 -3
- package/dist/{chunk-DXX7H2IH.js → chunk-CBFYOUNJ.js} +2 -2
- package/dist/{chunk-P654UJXI.js → chunk-CFJGHT34.js} +5 -5
- package/dist/{chunk-7OOACYZ4.js → chunk-CUFY74G5.js} +3 -3
- package/dist/{chunk-5CJ7VYH7.js → chunk-DAEGCVUK.js} +2 -2
- package/dist/{chunk-UEEQNXRY.js → chunk-E4SQU64X.js} +3 -3
- package/dist/{chunk-CV5T4LOB.js → chunk-EA462PLP.js} +3 -3
- package/dist/{chunk-IHA7JJN4.js → chunk-FCDX2H3B.js} +2 -2
- package/dist/{chunk-Y5RMFD7I.js → chunk-FIJ3WWBF.js} +3 -3
- package/dist/{chunk-7CQUOSVH.js → chunk-FKREMPHC.js} +6 -6
- package/dist/{chunk-IMWIHPKY.js → chunk-FLZ6KRMX.js} +3 -3
- package/dist/{chunk-PDZHLRZ2.js → chunk-GQRPLC7G.js} +7 -7
- package/dist/{chunk-PB3V422W.js → chunk-HCLJQ3JM.js} +5 -5
- package/dist/{chunk-FTFTFTDU.js → chunk-IQHA2TDB.js} +3 -3
- package/dist/{chunk-ORGKANED.js → chunk-J6EMXSVU.js} +3 -3
- package/dist/{chunk-63Z76ANM.js → chunk-M6SVFMGS.js} +2 -2
- package/dist/{chunk-7HSAZRHC.js → chunk-MTSKUOEE.js} +3 -3
- package/dist/{chunk-245U5NQK.js → chunk-NDR4O4J3.js} +4 -4
- package/dist/{chunk-H3VLXETQ.js → chunk-NE67IDBS.js} +2 -2
- package/dist/{chunk-JS6RLMBK.js → chunk-NL5GQTGL.js} +3 -3
- package/dist/{chunk-4EZQAZ74.js → chunk-OPWN6NKB.js} +6 -6
- package/dist/{chunk-U673QDO3.js → chunk-OZMNUR4V.js} +2 -2
- package/dist/{chunk-KR2ZEBN3.js → chunk-SWU2TFTH.js} +4 -4
- package/dist/{chunk-FGC2O2I5.js → chunk-ULYXT25M.js} +6 -6
- package/dist/{chunk-SXT3JFLA.js → chunk-URFDLLOJ.js} +4 -4
- package/dist/{chunk-MTPFCNYB.js → chunk-V3GIXKKS.js} +3 -3
- package/dist/{chunk-UYZDNGSJ.js → chunk-VMNX6XTS.js} +2 -2
- package/dist/{chunk-IEEXWVOL.js → chunk-XMFUQCSH.js} +2 -2
- package/dist/{chunk-IRNTKQVQ.js → chunk-Y6NCC7TZ.js} +3 -3
- package/dist/cli/commands/auth/logout.js +12 -12
- package/dist/cli/commands/auth/logout.test.js +13 -13
- package/dist/cli/commands/cache/clear.js +11 -11
- package/dist/cli/commands/debug/command-flags.js +11 -11
- package/dist/cli/commands/docs/generate.js +11 -11
- package/dist/cli/commands/docs/generate.test.js +11 -11
- package/dist/cli/commands/help.js +11 -11
- package/dist/cli/commands/kitchen-sink/async.js +12 -12
- package/dist/cli/commands/kitchen-sink/async.test.js +12 -12
- package/dist/cli/commands/kitchen-sink/index.js +14 -14
- package/dist/cli/commands/kitchen-sink/index.test.js +14 -14
- package/dist/cli/commands/kitchen-sink/prompts.js +12 -12
- package/dist/cli/commands/kitchen-sink/prompts.test.js +12 -12
- package/dist/cli/commands/kitchen-sink/static.js +12 -12
- package/dist/cli/commands/kitchen-sink/static.test.js +12 -12
- package/dist/cli/commands/notifications/generate.js +12 -12
- package/dist/cli/commands/notifications/list.js +12 -12
- package/dist/cli/commands/search.js +12 -12
- package/dist/cli/commands/upgrade.js +12 -12
- package/dist/cli/commands/version.js +12 -12
- package/dist/cli/commands/version.test.js +12 -12
- package/dist/cli/services/commands/notifications.js +6 -6
- package/dist/cli/services/commands/search.js +2 -2
- package/dist/cli/services/commands/search.test.js +2 -2
- package/dist/cli/services/commands/version.js +3 -3
- package/dist/cli/services/commands/version.test.js +4 -4
- package/dist/cli/services/kitchen-sink/async.js +2 -2
- package/dist/cli/services/kitchen-sink/prompts.js +2 -2
- package/dist/cli/services/kitchen-sink/static.js +2 -2
- package/dist/cli/services/upgrade.js +3 -3
- package/dist/cli/services/upgrade.test.js +5 -5
- package/dist/{custom-oclif-loader-5N4JRQ46.js → custom-oclif-loader-6WQBP6PR.js} +2 -2
- package/dist/{error-handler-VQHDL26P.js → error-handler-YTUPADNE.js} +9 -9
- package/dist/hooks/postrun.js +7 -7
- package/dist/hooks/prerun.js +7 -7
- package/dist/index.js +113 -113
- package/dist/{local-NKJECUJ3.js → local-WKQFIQIN.js} +2 -2
- package/dist/{morph-BTANDGVW.js → morph-KTKQ6R2Q.js} +9 -9
- package/dist/{node-RIZFDTN7.js → node-A6TLJZ4P.js} +15 -15
- package/dist/{node-package-manager-EOSRJYAN.js → node-package-manager-EOJWZP46.js} +3 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-II7LUT5P.js → ui-ZPCXVCGS.js} +2 -2
- package/dist/{workerd-SKOXR5SE.js → workerd-VGNNMJ6S.js} +14 -14
- package/oclif.manifest.json +1 -1
- package/package.json +7 -7
- package/dist/assets/hydrogen/starter/.eslintignore +0 -5
- package/dist/assets/hydrogen/starter/.eslintrc.cjs +0 -19
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {redirect, type LoaderFunctionArgs} from '@shopify/remix-oxygen';
|
|
2
2
|
import {useLoaderData, Link, type MetaFunction} from '@remix-run/react';
|
|
3
3
|
import {
|
|
4
4
|
getPaginationVariables,
|
|
@@ -21,7 +21,7 @@ export async function loader(args: LoaderFunctionArgs) {
|
|
|
21
21
|
// Await the critical data required to render initial state of the page
|
|
22
22
|
const criticalData = await loadCriticalData(args);
|
|
23
23
|
|
|
24
|
-
return
|
|
24
|
+
return {...deferredData, ...criticalData};
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {useLoaderData, Link} from '@remix-run/react';
|
|
2
|
-
import {
|
|
2
|
+
import {type LoaderFunctionArgs} from '@shopify/remix-oxygen';
|
|
3
3
|
import {getPaginationVariables, Image} from '@shopify/hydrogen';
|
|
4
4
|
import type {CollectionFragment} from 'storefrontapi.generated';
|
|
5
5
|
import {PaginatedResourceSection} from '~/components/PaginatedResourceSection';
|
|
@@ -11,7 +11,7 @@ export async function loader(args: LoaderFunctionArgs) {
|
|
|
11
11
|
// Await the critical data required to render initial state of the page
|
|
12
12
|
const criticalData = await loadCriticalData(args);
|
|
13
13
|
|
|
14
|
-
return
|
|
14
|
+
return {...deferredData, ...criticalData};
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {type LoaderFunctionArgs} from '@shopify/remix-oxygen';
|
|
2
2
|
import {useLoaderData, Link, type MetaFunction} from '@remix-run/react';
|
|
3
3
|
import {getPaginationVariables, Image, Money} from '@shopify/hydrogen';
|
|
4
4
|
import type {ProductItemFragment} from 'storefrontapi.generated';
|
|
@@ -16,7 +16,7 @@ export async function loader(args: LoaderFunctionArgs) {
|
|
|
16
16
|
// Await the critical data required to render initial state of the page
|
|
17
17
|
const criticalData = await loadCriticalData(args);
|
|
18
18
|
|
|
19
|
-
return
|
|
19
|
+
return {...deferredData, ...criticalData};
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {type LoaderFunctionArgs} from '@shopify/remix-oxygen';
|
|
2
2
|
import {useLoaderData, type MetaFunction} from '@remix-run/react';
|
|
3
3
|
|
|
4
4
|
export const meta: MetaFunction<typeof loader> = ({data}) => {
|
|
@@ -12,7 +12,7 @@ export async function loader(args: LoaderFunctionArgs) {
|
|
|
12
12
|
// Await the critical data required to render initial state of the page
|
|
13
13
|
const criticalData = await loadCriticalData(args);
|
|
14
14
|
|
|
15
|
-
return
|
|
15
|
+
return {...deferredData, ...criticalData};
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {type LoaderFunctionArgs} from '@shopify/remix-oxygen';
|
|
2
2
|
import {Link, useLoaderData, type MetaFunction} from '@remix-run/react';
|
|
3
3
|
import {type Shop} from '@shopify/hydrogen/storefront-api-types';
|
|
4
4
|
|
|
@@ -38,7 +38,7 @@ export async function loader({params, context}: LoaderFunctionArgs) {
|
|
|
38
38
|
throw new Response('Could not find the policy', {status: 404});
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
return
|
|
41
|
+
return {policy};
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
export default function Policy() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {type LoaderFunctionArgs} from '@shopify/remix-oxygen';
|
|
2
2
|
import {useLoaderData, Link} from '@remix-run/react';
|
|
3
3
|
|
|
4
4
|
export async function loader({context}: LoaderFunctionArgs) {
|
|
@@ -9,7 +9,7 @@ export async function loader({context}: LoaderFunctionArgs) {
|
|
|
9
9
|
throw new Response('No policies found', {status: 404});
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
return
|
|
12
|
+
return {policies};
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export default function Policies() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {type LoaderFunctionArgs} from '@shopify/remix-oxygen';
|
|
2
2
|
import {useLoaderData, type MetaFunction} from '@remix-run/react';
|
|
3
3
|
import {
|
|
4
4
|
getSelectedProductOptions,
|
|
@@ -29,7 +29,7 @@ export async function loader(args: LoaderFunctionArgs) {
|
|
|
29
29
|
// Await the critical data required to render initial state of the page
|
|
30
30
|
const criticalData = await loadCriticalData(args);
|
|
31
31
|
|
|
32
|
-
return
|
|
32
|
+
return {...deferredData, ...criticalData};
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
/**
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import {
|
|
2
|
-
json,
|
|
3
2
|
type LoaderFunctionArgs,
|
|
4
3
|
type ActionFunctionArgs,
|
|
5
4
|
} from '@shopify/remix-oxygen';
|
|
@@ -29,7 +28,7 @@ export async function loader({request, context}: LoaderFunctionArgs) {
|
|
|
29
28
|
return {term: '', result: null, error: error.message};
|
|
30
29
|
});
|
|
31
30
|
|
|
32
|
-
return
|
|
31
|
+
return await searchPromise;
|
|
33
32
|
}
|
|
34
33
|
|
|
35
34
|
/**
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
import {fixupConfigRules, fixupPluginRules} from '@eslint/compat';
|
|
2
|
+
import eslintComments from 'eslint-plugin-eslint-comments';
|
|
3
|
+
import react from 'eslint-plugin-react';
|
|
4
|
+
import reactHooks from 'eslint-plugin-react-hooks';
|
|
5
|
+
import jsxA11Y from 'eslint-plugin-jsx-a11y';
|
|
6
|
+
import globals from 'globals';
|
|
7
|
+
import typescriptEslint from '@typescript-eslint/eslint-plugin';
|
|
8
|
+
import _import from 'eslint-plugin-import';
|
|
9
|
+
import tsParser from '@typescript-eslint/parser';
|
|
10
|
+
import jest from 'eslint-plugin-jest';
|
|
11
|
+
import path from 'node:path';
|
|
12
|
+
import {fileURLToPath} from 'node:url';
|
|
13
|
+
import js from '@eslint/js';
|
|
14
|
+
import {FlatCompat} from '@eslint/eslintrc';
|
|
15
|
+
|
|
16
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
17
|
+
const __dirname = path.dirname(__filename);
|
|
18
|
+
const compat = new FlatCompat({
|
|
19
|
+
baseDirectory: __dirname,
|
|
20
|
+
recommendedConfig: js.configs.recommended,
|
|
21
|
+
allConfig: js.configs.all,
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export default [
|
|
25
|
+
{
|
|
26
|
+
ignores: [
|
|
27
|
+
'**/node_modules/',
|
|
28
|
+
'**/build/',
|
|
29
|
+
'**/*.graphql.d.ts',
|
|
30
|
+
'**/*.graphql.ts',
|
|
31
|
+
'**/*.generated.d.ts',
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
...fixupConfigRules(
|
|
35
|
+
compat.extends(
|
|
36
|
+
'eslint:recommended',
|
|
37
|
+
'plugin:eslint-comments/recommended',
|
|
38
|
+
'plugin:react/recommended',
|
|
39
|
+
'plugin:react-hooks/recommended',
|
|
40
|
+
'plugin:jsx-a11y/recommended',
|
|
41
|
+
),
|
|
42
|
+
),
|
|
43
|
+
{
|
|
44
|
+
plugins: {
|
|
45
|
+
'eslint-comments': fixupPluginRules(eslintComments),
|
|
46
|
+
react: fixupPluginRules(react),
|
|
47
|
+
'react-hooks': fixupPluginRules(reactHooks),
|
|
48
|
+
'jsx-a11y': fixupPluginRules(jsxA11Y),
|
|
49
|
+
},
|
|
50
|
+
languageOptions: {
|
|
51
|
+
globals: {
|
|
52
|
+
...globals.browser,
|
|
53
|
+
...globals.node,
|
|
54
|
+
},
|
|
55
|
+
ecmaVersion: 'latest',
|
|
56
|
+
sourceType: 'module',
|
|
57
|
+
parserOptions: {
|
|
58
|
+
ecmaFeatures: {
|
|
59
|
+
jsx: true,
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
settings: {
|
|
64
|
+
react: {
|
|
65
|
+
version: 'detect',
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
rules: {
|
|
69
|
+
'eslint-comments/no-unused-disable': 'error',
|
|
70
|
+
'no-console': [
|
|
71
|
+
'warn',
|
|
72
|
+
{
|
|
73
|
+
allow: ['warn', 'error'],
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
'no-use-before-define': 'off',
|
|
77
|
+
'no-warning-comments': 'off',
|
|
78
|
+
'object-shorthand': [
|
|
79
|
+
'error',
|
|
80
|
+
'always',
|
|
81
|
+
{
|
|
82
|
+
avoidQuotes: true,
|
|
83
|
+
},
|
|
84
|
+
],
|
|
85
|
+
'no-useless-escape': 'off',
|
|
86
|
+
'no-case-declarations': 'off',
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
...fixupConfigRules(
|
|
90
|
+
compat.extends(
|
|
91
|
+
'plugin:react/recommended',
|
|
92
|
+
'plugin:react/jsx-runtime',
|
|
93
|
+
'plugin:react-hooks/recommended',
|
|
94
|
+
'plugin:jsx-a11y/recommended',
|
|
95
|
+
),
|
|
96
|
+
).map((config) => ({
|
|
97
|
+
...config,
|
|
98
|
+
files: ['**/*.{js,jsx,ts,tsx}'],
|
|
99
|
+
})),
|
|
100
|
+
{
|
|
101
|
+
files: ['**/*.{js,jsx,ts,tsx}'],
|
|
102
|
+
plugins: {
|
|
103
|
+
react: fixupPluginRules(react),
|
|
104
|
+
'jsx-a11y': fixupPluginRules(jsxA11Y),
|
|
105
|
+
},
|
|
106
|
+
settings: {
|
|
107
|
+
react: {
|
|
108
|
+
version: 'detect',
|
|
109
|
+
},
|
|
110
|
+
formComponents: ['Form'],
|
|
111
|
+
linkComponents: [
|
|
112
|
+
{
|
|
113
|
+
name: 'Link',
|
|
114
|
+
linkAttribute: 'to',
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
name: 'NavLink',
|
|
118
|
+
linkAttribute: 'to',
|
|
119
|
+
},
|
|
120
|
+
],
|
|
121
|
+
'import/resolver': {
|
|
122
|
+
typescript: {},
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
rules: {
|
|
126
|
+
'jsx-a11y/control-has-associated-label': 'off',
|
|
127
|
+
'jsx-a11y/label-has-for': 'off',
|
|
128
|
+
'react/display-name': 'off',
|
|
129
|
+
'react/no-array-index-key': 'warn',
|
|
130
|
+
'react/prop-types': 'off',
|
|
131
|
+
'react/react-in-jsx-scope': 'off',
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
...fixupConfigRules(
|
|
135
|
+
compat.extends(
|
|
136
|
+
'plugin:@typescript-eslint/recommended',
|
|
137
|
+
'plugin:import/recommended',
|
|
138
|
+
'plugin:import/typescript',
|
|
139
|
+
),
|
|
140
|
+
).map((config) => ({
|
|
141
|
+
...config,
|
|
142
|
+
files: ['**/*.{ts,tsx}'],
|
|
143
|
+
})),
|
|
144
|
+
{
|
|
145
|
+
files: ['**/*.{ts,tsx}'],
|
|
146
|
+
plugins: {
|
|
147
|
+
'@typescript-eslint': fixupPluginRules(typescriptEslint),
|
|
148
|
+
import: fixupPluginRules(_import),
|
|
149
|
+
},
|
|
150
|
+
languageOptions: {
|
|
151
|
+
parser: tsParser,
|
|
152
|
+
parserOptions: {
|
|
153
|
+
projectService: {
|
|
154
|
+
allowDefaultProject: ['.graphqlrc.ts'],
|
|
155
|
+
},
|
|
156
|
+
tsconfigRootDir: __dirname,
|
|
157
|
+
ecmaFeatures: {
|
|
158
|
+
jsx: true,
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
settings: {
|
|
163
|
+
'import/internal-regex': '^~/',
|
|
164
|
+
'import/resolvers': {
|
|
165
|
+
node: {
|
|
166
|
+
extensions: ['.ts', '.tsx'],
|
|
167
|
+
},
|
|
168
|
+
typescript: {
|
|
169
|
+
alwaysTryTypes: true,
|
|
170
|
+
project: __dirname,
|
|
171
|
+
},
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
rules: {
|
|
175
|
+
'@typescript-eslint/ban-ts-comment': 'off',
|
|
176
|
+
'@typescript-eslint/naming-convention': 'off',
|
|
177
|
+
'@typescript-eslint/no-non-null-asserted-optional-chain': 'off',
|
|
178
|
+
},
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
files: ['**/.eslintrc.cjs'],
|
|
182
|
+
languageOptions: {
|
|
183
|
+
globals: {
|
|
184
|
+
...globals.node,
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
...compat.extends('plugin:jest/recommended').map((config) => ({
|
|
189
|
+
...config,
|
|
190
|
+
files: ['**/*.test.*'],
|
|
191
|
+
})),
|
|
192
|
+
{
|
|
193
|
+
files: ['**/*.test.*'],
|
|
194
|
+
plugins: {
|
|
195
|
+
jest,
|
|
196
|
+
},
|
|
197
|
+
languageOptions: {
|
|
198
|
+
globals: {
|
|
199
|
+
...globals.node,
|
|
200
|
+
...globals.jest,
|
|
201
|
+
},
|
|
202
|
+
},
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
files: ['**/*.server.*'],
|
|
206
|
+
rules: {
|
|
207
|
+
'react-hooks/rules-of-hooks': 'off',
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
...fixupConfigRules(
|
|
211
|
+
compat.extends(
|
|
212
|
+
'plugin:@typescript-eslint/eslint-recommended',
|
|
213
|
+
'plugin:@typescript-eslint/recommended',
|
|
214
|
+
),
|
|
215
|
+
).map((config) => ({
|
|
216
|
+
...config,
|
|
217
|
+
files: ['**/*.ts', '**/*.tsx'],
|
|
218
|
+
})),
|
|
219
|
+
{
|
|
220
|
+
files: ['**/*.ts', '**/*.tsx'],
|
|
221
|
+
languageOptions: {
|
|
222
|
+
parser: tsParser,
|
|
223
|
+
},
|
|
224
|
+
rules: {
|
|
225
|
+
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
|
226
|
+
'@typescript-eslint/naming-convention': [
|
|
227
|
+
'error',
|
|
228
|
+
{
|
|
229
|
+
selector: 'default',
|
|
230
|
+
format: ['camelCase', 'PascalCase', 'UPPER_CASE'],
|
|
231
|
+
leadingUnderscore: 'allowSingleOrDouble',
|
|
232
|
+
trailingUnderscore: 'allowSingleOrDouble',
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
selector: 'typeLike',
|
|
236
|
+
format: ['PascalCase'],
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
selector: 'typeParameter',
|
|
240
|
+
format: ['PascalCase'],
|
|
241
|
+
leadingUnderscore: 'allow',
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
selector: 'interface',
|
|
245
|
+
format: ['PascalCase'],
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
selector: 'property',
|
|
249
|
+
format: null,
|
|
250
|
+
},
|
|
251
|
+
],
|
|
252
|
+
'@typescript-eslint/no-empty-function': 'off',
|
|
253
|
+
'@typescript-eslint/no-empty-interface': 'off',
|
|
254
|
+
'@typescript-eslint/no-empty-object-type': 'off',
|
|
255
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
256
|
+
'@typescript-eslint/no-non-null-assertion': 'off',
|
|
257
|
+
'@typescript-eslint/no-unused-vars': 'off',
|
|
258
|
+
'react/prop-types': 'off',
|
|
259
|
+
},
|
|
260
|
+
},
|
|
261
|
+
];
|
|
@@ -194,7 +194,7 @@ async function predictiveSearch({
|
|
|
194
194
|
|
|
195
195
|
const total = Object.values(items).reduce((acc, {length}) => acc + length, 0);
|
|
196
196
|
|
|
197
|
-
return
|
|
197
|
+
return {term, result: {items, total}, error: null};
|
|
198
198
|
}
|
|
199
199
|
```
|
|
200
200
|
|
|
@@ -217,7 +217,7 @@ 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
223
|
const searchPromise = predictiveSearch({request, context})
|
|
@@ -227,7 +227,7 @@ export async function loader({request, context}: LoaderFunctionArgs) {
|
|
|
227
227
|
return {term: '', result: null, error: error.message};
|
|
228
228
|
});
|
|
229
229
|
|
|
230
|
-
return
|
|
230
|
+
return await searchPromise;
|
|
231
231
|
}
|
|
232
232
|
```
|
|
233
233
|
|
|
@@ -191,7 +191,7 @@ async function search({
|
|
|
191
191
|
return acc + nodes.length;
|
|
192
192
|
}, 0);
|
|
193
193
|
|
|
194
|
-
return
|
|
194
|
+
return {term, result: {total, items}};
|
|
195
195
|
}
|
|
196
196
|
```
|
|
197
197
|
|
|
@@ -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});
|
|
@@ -222,7 +222,7 @@ export async function loader({request, context}: LoaderFunctionArgs) {
|
|
|
222
222
|
return {term: '', result: null, error: error.message};
|
|
223
223
|
});
|
|
224
224
|
|
|
225
|
-
return
|
|
225
|
+
return await searchPromise;
|
|
226
226
|
}
|
|
227
227
|
```
|
|
228
228
|
|
|
@@ -2,43 +2,55 @@
|
|
|
2
2
|
"name": "skeleton",
|
|
3
3
|
"private": true,
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "2025.1.
|
|
5
|
+
"version": "2025.1.1",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build": "shopify hydrogen build --codegen",
|
|
9
9
|
"dev": "shopify hydrogen dev --codegen",
|
|
10
10
|
"preview": "shopify hydrogen preview --build",
|
|
11
|
-
"lint": "eslint --no-error-on-unmatched-pattern
|
|
11
|
+
"lint": "eslint --no-error-on-unmatched-pattern .",
|
|
12
12
|
"typecheck": "tsc --noEmit",
|
|
13
13
|
"codegen": "shopify hydrogen codegen"
|
|
14
14
|
},
|
|
15
15
|
"prettier": "@shopify/prettier-config",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@remix-run/react": "^2.15.
|
|
18
|
-
"@remix-run/server-runtime": "^2.15.
|
|
19
|
-
"@shopify/hydrogen": "2025.1.
|
|
20
|
-
"@shopify/remix-oxygen": "^2.0.
|
|
17
|
+
"@remix-run/react": "^2.15.3",
|
|
18
|
+
"@remix-run/server-runtime": "^2.15.3",
|
|
19
|
+
"@shopify/hydrogen": "2025.1.1",
|
|
20
|
+
"@shopify/remix-oxygen": "^2.0.11",
|
|
21
21
|
"graphql": "^16.6.0",
|
|
22
22
|
"graphql-tag": "^2.12.6",
|
|
23
|
-
"isbot": "^
|
|
23
|
+
"isbot": "^5.1.21",
|
|
24
24
|
"react": "^18.2.0",
|
|
25
25
|
"react-dom": "^18.2.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
+
"@eslint/compat": "^1.2.5",
|
|
29
|
+
"@eslint/eslintrc": "^3.2.0",
|
|
30
|
+
"@eslint/js": "^9.18.0",
|
|
28
31
|
"@graphql-codegen/cli": "5.0.2",
|
|
29
|
-
"@remix-run/dev": "^2.15.
|
|
30
|
-
"@remix-run/eslint-config": "^2.15.2",
|
|
32
|
+
"@remix-run/dev": "^2.15.3",
|
|
31
33
|
"@shopify/cli": "~3.74.1",
|
|
32
34
|
"@shopify/hydrogen-codegen": "^0.3.2",
|
|
33
35
|
"@shopify/mini-oxygen": "^3.1.1",
|
|
34
36
|
"@shopify/oxygen-workers-types": "^4.1.2",
|
|
35
37
|
"@shopify/prettier-config": "^1.1.2",
|
|
36
38
|
"@total-typescript/ts-reset": "^0.4.2",
|
|
37
|
-
"@types/eslint": "^
|
|
39
|
+
"@types/eslint": "^9.6.1",
|
|
38
40
|
"@types/react": "^18.2.22",
|
|
39
41
|
"@types/react-dom": "^18.2.7",
|
|
40
|
-
"eslint": "^8.
|
|
41
|
-
"eslint
|
|
42
|
+
"@typescript-eslint/eslint-plugin": "^8.21.0",
|
|
43
|
+
"@typescript-eslint/parser": "^8.21.0",
|
|
44
|
+
"eslint": "^9.18.0",
|
|
45
|
+
"eslint-config-prettier": "^10.0.1",
|
|
46
|
+
"eslint-import-resolver-typescript": "^3.7.0",
|
|
47
|
+
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
48
|
+
"eslint-plugin-import": "^2.31.0",
|
|
49
|
+
"eslint-plugin-jest": "^28.11.0",
|
|
50
|
+
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
51
|
+
"eslint-plugin-react": "^7.37.4",
|
|
52
|
+
"eslint-plugin-react-hooks": "^5.1.0",
|
|
53
|
+
"globals": "^15.14.0",
|
|
42
54
|
"prettier": "^2.8.4",
|
|
43
55
|
"typescript": "^5.2.2",
|
|
44
56
|
"vite": "^5.1.8",
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
// @ts-ignore
|
|
2
1
|
// Virtual entry point for the app
|
|
2
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
3
|
+
// @ts-ignore
|
|
4
|
+
// eslint-disable-next-line import/no-unresolved
|
|
3
5
|
import * as remixBuild from 'virtual:remix/server-build';
|
|
4
6
|
import {storefrontRedirect} from '@shopify/hydrogen';
|
|
5
7
|
import {createRequestHandler} from '@shopify/remix-oxygen';
|
|
@@ -55,7 +57,6 @@ export default {
|
|
|
55
57
|
|
|
56
58
|
return response;
|
|
57
59
|
} catch (error) {
|
|
58
|
-
// eslint-disable-next-line no-console
|
|
59
60
|
console.error(error);
|
|
60
61
|
return new Response('An unexpected error occurred', {status: 500});
|
|
61
62
|
}
|
|
@@ -14,7 +14,11 @@
|
|
|
14
14
|
"forceConsistentCasingInFileNames": true,
|
|
15
15
|
"skipLibCheck": true,
|
|
16
16
|
"baseUrl": ".",
|
|
17
|
-
"types": [
|
|
17
|
+
"types": [
|
|
18
|
+
"@shopify/oxygen-workers-types",
|
|
19
|
+
"@remix-run/node",
|
|
20
|
+
"vite/client"
|
|
21
|
+
],
|
|
18
22
|
"paths": {
|
|
19
23
|
"~/*": ["app/*"]
|
|
20
24
|
},
|
|
@@ -4,6 +4,12 @@ import {oxygen} from '@shopify/mini-oxygen/vite';
|
|
|
4
4
|
import {vitePlugin as remix} from '@remix-run/dev';
|
|
5
5
|
import tsconfigPaths from 'vite-tsconfig-paths';
|
|
6
6
|
|
|
7
|
+
declare module "@remix-run/server-runtime" {
|
|
8
|
+
interface Future {
|
|
9
|
+
v3_singleFetch: true;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
7
13
|
export default defineConfig({
|
|
8
14
|
plugins: [
|
|
9
15
|
hydrogen(),
|
|
@@ -15,6 +21,7 @@ export default defineConfig({
|
|
|
15
21
|
v3_relativeSplatPath: true,
|
|
16
22
|
v3_throwAbortReason: true,
|
|
17
23
|
v3_lazyRouteDiscovery: true,
|
|
24
|
+
v3_singleFetch: true,
|
|
18
25
|
},
|
|
19
26
|
}),
|
|
20
27
|
tsconfigPaths(),
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from "./chunk-25IMI7TH.js";
|
|
6
6
|
import {
|
|
7
7
|
CLI_KIT_VERSION
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-VMNX6XTS.js";
|
|
9
9
|
import {
|
|
10
10
|
Environment,
|
|
11
11
|
firstPartyDev,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
outputDebug,
|
|
15
15
|
runWithTimer,
|
|
16
16
|
serviceEnvironment
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-3AS5GKO6.js";
|
|
18
18
|
import {
|
|
19
19
|
__commonJS,
|
|
20
20
|
__require,
|
|
@@ -31271,4 +31271,4 @@ mime-types/index.js:
|
|
|
31271
31271
|
* MIT Licensed
|
|
31272
31272
|
*)
|
|
31273
31273
|
*/
|
|
31274
|
-
//# sourceMappingURL=chunk-
|
|
31274
|
+
//# sourceMappingURL=chunk-2OIJ27EK.js.map
|
|
@@ -29471,7 +29471,7 @@ function createRuntimeMetadataContainer(defaultPublicMetadata = {}) {
|
|
|
29471
29471
|
try {
|
|
29472
29472
|
await getAndSet();
|
|
29473
29473
|
} catch (error) {
|
|
29474
|
-
let { sendErrorToBugsnag } = await import("./error-handler-
|
|
29474
|
+
let { sendErrorToBugsnag } = await import("./error-handler-YTUPADNE.js");
|
|
29475
29475
|
await sendErrorToBugsnag(error, "unexpected_error");
|
|
29476
29476
|
}
|
|
29477
29477
|
}, durationStack = [];
|
|
@@ -31476,4 +31476,4 @@ react-reconciler/cjs/react-reconciler-constants.development.js:
|
|
|
31476
31476
|
* LICENSE file in the root directory of this source tree.
|
|
31477
31477
|
*)
|
|
31478
31478
|
*/
|
|
31479
|
-
//# sourceMappingURL=chunk-
|
|
31479
|
+
//# sourceMappingURL=chunk-3AS5GKO6.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
generate
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-URFDLLOJ.js";
|
|
4
4
|
import {
|
|
5
5
|
base_command_default
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SWU2TFTH.js";
|
|
7
7
|
import {
|
|
8
8
|
init_cjs_shims
|
|
9
9
|
} from "./chunk-PKR7KJ6P.js";
|
|
@@ -25,4 +25,4 @@ var Generate = class extends base_command_default {
|
|
|
25
25
|
export {
|
|
26
26
|
Generate
|
|
27
27
|
};
|
|
28
|
-
//# sourceMappingURL=chunk-
|
|
28
|
+
//# sourceMappingURL=chunk-3LRCKABH.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
searchService
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-OZMNUR4V.js";
|
|
4
4
|
import {
|
|
5
5
|
base_command_default
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SWU2TFTH.js";
|
|
7
7
|
import {
|
|
8
8
|
require_lib
|
|
9
9
|
} from "./chunk-VSKRQ3JT.js";
|
|
@@ -45,4 +45,4 @@ var import_core = __toESM(require_lib(), 1), Search = class _Search extends base
|
|
|
45
45
|
export {
|
|
46
46
|
Search
|
|
47
47
|
};
|
|
48
|
-
//# sourceMappingURL=chunk-
|
|
48
|
+
//# sourceMappingURL=chunk-3PD7N6QH.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
base_command_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SWU2TFTH.js";
|
|
4
4
|
import {
|
|
5
5
|
require_lib
|
|
6
6
|
} from "./chunk-VSKRQ3JT.js";
|
|
@@ -43,4 +43,4 @@ var HelpCommand = class _HelpCommand extends base_command_default {
|
|
|
43
43
|
export {
|
|
44
44
|
HelpCommand
|
|
45
45
|
};
|
|
46
|
-
//# sourceMappingURL=chunk-
|
|
46
|
+
//# sourceMappingURL=chunk-3WJDY4FZ.js.map
|