@shopify/cli 3.75.1 → 3.75.3

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 (116) hide show
  1. package/dist/assets/hydrogen/starter/CHANGELOG.md +206 -0
  2. package/dist/assets/hydrogen/starter/app/components/CartMain.tsx +1 -1
  3. package/dist/assets/hydrogen/starter/app/components/CartSummary.tsx +17 -6
  4. package/dist/assets/hydrogen/starter/app/entry.server.tsx +2 -3
  5. package/dist/assets/hydrogen/starter/app/root.tsx +9 -5
  6. package/dist/assets/hydrogen/starter/app/routes/[robots.txt].tsx +0 -1
  7. package/dist/assets/hydrogen/starter/app/routes/_index.tsx +2 -2
  8. package/dist/assets/hydrogen/starter/app/routes/account.addresses.tsx +17 -17
  9. package/dist/assets/hydrogen/starter/app/routes/account.orders.$id.tsx +3 -3
  10. package/dist/assets/hydrogen/starter/app/routes/account.orders._index.tsx +2 -2
  11. package/dist/assets/hydrogen/starter/app/routes/account.profile.tsx +6 -6
  12. package/dist/assets/hydrogen/starter/app/routes/account.tsx +2 -2
  13. package/dist/assets/hydrogen/starter/app/routes/blogs.$blogHandle.$articleHandle.tsx +2 -2
  14. package/dist/assets/hydrogen/starter/app/routes/blogs.$blogHandle._index.tsx +2 -2
  15. package/dist/assets/hydrogen/starter/app/routes/blogs._index.tsx +2 -2
  16. package/dist/assets/hydrogen/starter/app/routes/cart.tsx +5 -3
  17. package/dist/assets/hydrogen/starter/app/routes/collections.$handle.tsx +2 -2
  18. package/dist/assets/hydrogen/starter/app/routes/collections._index.tsx +2 -2
  19. package/dist/assets/hydrogen/starter/app/routes/collections.all.tsx +2 -2
  20. package/dist/assets/hydrogen/starter/app/routes/pages.$handle.tsx +2 -2
  21. package/dist/assets/hydrogen/starter/app/routes/policies.$handle.tsx +2 -2
  22. package/dist/assets/hydrogen/starter/app/routes/policies._index.tsx +2 -2
  23. package/dist/assets/hydrogen/starter/app/routes/products.$handle.tsx +2 -2
  24. package/dist/assets/hydrogen/starter/app/routes/search.tsx +1 -2
  25. package/dist/assets/hydrogen/starter/eslint.config.js +261 -0
  26. package/dist/assets/hydrogen/starter/guides/predictiveSearch/predictiveSearch.md +3 -3
  27. package/dist/assets/hydrogen/starter/guides/search/search.md +3 -3
  28. package/dist/assets/hydrogen/starter/package.json +24 -12
  29. package/dist/assets/hydrogen/starter/server.ts +3 -2
  30. package/dist/assets/hydrogen/starter/tsconfig.json +5 -1
  31. package/dist/assets/hydrogen/starter/vite.config.ts +7 -0
  32. package/dist/assets/hydrogen/vite/package.json +1 -1
  33. package/dist/assets/hydrogen/vite/vite.config.js +0 -1
  34. package/dist/{chunk-DXX7H2IH.js → chunk-22VHHB6E.js} +3 -3
  35. package/dist/{chunk-FGC2O2I5.js → chunk-2NZ7C43W.js} +6 -6
  36. package/dist/{chunk-FTFTFTDU.js → chunk-33Y36JTQ.js} +3 -3
  37. package/dist/{chunk-U673QDO3.js → chunk-3QMRSRBQ.js} +2 -2
  38. package/dist/{chunk-IRNTKQVQ.js → chunk-5R65XQBB.js} +3 -3
  39. package/dist/{chunk-7CQUOSVH.js → chunk-5U5CBWN6.js} +6 -6
  40. package/dist/{chunk-5CJ7VYH7.js → chunk-A2VS5S6I.js} +2 -2
  41. package/dist/{chunk-LJHVF5TJ.js → chunk-B5KBQUD7.js} +3 -3
  42. package/dist/{chunk-MTPFCNYB.js → chunk-BI6OG3SW.js} +3 -3
  43. package/dist/{chunk-YEOP3EMX.js → chunk-C33FHDOM.js} +2 -2
  44. package/dist/{chunk-H3VLXETQ.js → chunk-CM7HYAXG.js} +2 -2
  45. package/dist/{chunk-IEEXWVOL.js → chunk-EIDXBYRF.js} +2 -2
  46. package/dist/{chunk-PDZHLRZ2.js → chunk-FNGSPBMI.js} +7 -7
  47. package/dist/{chunk-IMWIHPKY.js → chunk-G4AWJOUT.js} +3 -3
  48. package/dist/{chunk-ORGKANED.js → chunk-G4WKRFAA.js} +3 -3
  49. package/dist/{chunk-UYZDNGSJ.js → chunk-GXE74MLK.js} +2 -2
  50. package/dist/{chunk-7HSAZRHC.js → chunk-IKLIMBXL.js} +3 -3
  51. package/dist/{chunk-IHA7JJN4.js → chunk-JTBKPH2T.js} +2 -2
  52. package/dist/{chunk-4EZQAZ74.js → chunk-K4H4V3DT.js} +6 -6
  53. package/dist/{chunk-VSC4NMYT.js → chunk-KD3XBFOR.js} +2 -2
  54. package/dist/{chunk-CV5T4LOB.js → chunk-KTZUTNES.js} +3 -3
  55. package/dist/{chunk-PB3V422W.js → chunk-LCLDLGWN.js} +5 -5
  56. package/dist/{chunk-KR2ZEBN3.js → chunk-LZMNVVKL.js} +4 -4
  57. package/dist/{chunk-245U5NQK.js → chunk-MAEFXTUW.js} +4 -4
  58. package/dist/{chunk-S3NMVYAF.js → chunk-MW2DSTSP.js} +4 -4
  59. package/dist/{chunk-JS6RLMBK.js → chunk-OV2HTJBT.js} +3 -3
  60. package/dist/{chunk-Y5RMFD7I.js → chunk-PD5FJTJV.js} +3 -3
  61. package/dist/{chunk-4MJNU2QF.js → chunk-QGVSI72K.js} +3 -3
  62. package/dist/{chunk-2TEPYAPA.js → chunk-QODWZ6PQ.js} +3 -3
  63. package/dist/{chunk-P654UJXI.js → chunk-RR6KDBGU.js} +5 -5
  64. package/dist/{chunk-63Z76ANM.js → chunk-USS26MJN.js} +2 -2
  65. package/dist/{chunk-7OOACYZ4.js → chunk-VJRNACS6.js} +3 -3
  66. package/dist/{chunk-NA34VFTA.js → chunk-WMN57UOI.js} +76 -76
  67. package/dist/{chunk-SXT3JFLA.js → chunk-WZLRLCYA.js} +4 -4
  68. package/dist/{chunk-UEEQNXRY.js → chunk-YFC422QN.js} +3 -3
  69. package/dist/{chunk-ZJSUUIVI.js → chunk-YJQB4KNO.js} +3 -3
  70. package/dist/cli/commands/auth/logout.js +12 -12
  71. package/dist/cli/commands/auth/logout.test.js +13 -13
  72. package/dist/cli/commands/cache/clear.js +11 -11
  73. package/dist/cli/commands/debug/command-flags.js +11 -11
  74. package/dist/cli/commands/docs/generate.js +11 -11
  75. package/dist/cli/commands/docs/generate.test.js +11 -11
  76. package/dist/cli/commands/help.js +11 -11
  77. package/dist/cli/commands/kitchen-sink/async.js +12 -12
  78. package/dist/cli/commands/kitchen-sink/async.test.js +12 -12
  79. package/dist/cli/commands/kitchen-sink/index.js +14 -14
  80. package/dist/cli/commands/kitchen-sink/index.test.js +14 -14
  81. package/dist/cli/commands/kitchen-sink/prompts.js +12 -12
  82. package/dist/cli/commands/kitchen-sink/prompts.test.js +12 -12
  83. package/dist/cli/commands/kitchen-sink/static.js +12 -12
  84. package/dist/cli/commands/kitchen-sink/static.test.js +12 -12
  85. package/dist/cli/commands/notifications/generate.js +12 -12
  86. package/dist/cli/commands/notifications/list.js +12 -12
  87. package/dist/cli/commands/search.js +12 -12
  88. package/dist/cli/commands/upgrade.js +12 -12
  89. package/dist/cli/commands/version.js +12 -12
  90. package/dist/cli/commands/version.test.js +12 -12
  91. package/dist/cli/services/commands/notifications.js +6 -6
  92. package/dist/cli/services/commands/search.js +2 -2
  93. package/dist/cli/services/commands/search.test.js +2 -2
  94. package/dist/cli/services/commands/version.js +3 -3
  95. package/dist/cli/services/commands/version.test.js +4 -4
  96. package/dist/cli/services/kitchen-sink/async.js +2 -2
  97. package/dist/cli/services/kitchen-sink/prompts.js +2 -2
  98. package/dist/cli/services/kitchen-sink/static.js +2 -2
  99. package/dist/cli/services/upgrade.js +3 -3
  100. package/dist/cli/services/upgrade.test.js +5 -5
  101. package/dist/{custom-oclif-loader-5N4JRQ46.js → custom-oclif-loader-T46YXHAL.js} +2 -2
  102. package/dist/{error-handler-VQHDL26P.js → error-handler-CQQM6XL7.js} +9 -9
  103. package/dist/hooks/postrun.js +7 -7
  104. package/dist/hooks/prerun.js +7 -7
  105. package/dist/index.js +119 -119
  106. package/dist/{local-NKJECUJ3.js → local-UIVNM7TY.js} +2 -2
  107. package/dist/{morph-BTANDGVW.js → morph-K3QSNZNW.js} +9 -9
  108. package/dist/{node-RIZFDTN7.js → node-Y5CCPBME.js} +15 -15
  109. package/dist/{node-package-manager-EOSRJYAN.js → node-package-manager-LYGJUDK2.js} +3 -3
  110. package/dist/tsconfig.tsbuildinfo +1 -1
  111. package/dist/{ui-II7LUT5P.js → ui-6CY7AHOT.js} +2 -2
  112. package/dist/{workerd-SKOXR5SE.js → workerd-S3A3XU2A.js} +14 -14
  113. package/oclif.manifest.json +1 -1
  114. package/package.json +7 -7
  115. package/dist/assets/hydrogen/starter/.eslintignore +0 -5
  116. package/dist/assets/hydrogen/starter/.eslintrc.cjs +0 -19
@@ -1,4 +1,4 @@
1
- import {defer, redirect, type LoaderFunctionArgs} from '@shopify/remix-oxygen';
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 defer({...deferredData, ...criticalData});
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 {defer, type LoaderFunctionArgs} from '@shopify/remix-oxygen';
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 defer({...deferredData, ...criticalData});
14
+ return {...deferredData, ...criticalData};
15
15
  }
16
16
 
17
17
  /**
@@ -1,4 +1,4 @@
1
- import {defer, type LoaderFunctionArgs} from '@shopify/remix-oxygen';
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 defer({...deferredData, ...criticalData});
19
+ return {...deferredData, ...criticalData};
20
20
  }
21
21
 
22
22
  /**
@@ -1,4 +1,4 @@
1
- import {defer, type LoaderFunctionArgs} from '@shopify/remix-oxygen';
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 defer({...deferredData, ...criticalData});
15
+ return {...deferredData, ...criticalData};
16
16
  }
17
17
 
18
18
  /**
@@ -1,4 +1,4 @@
1
- import {json, type LoaderFunctionArgs} from '@shopify/remix-oxygen';
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 json({policy});
41
+ return {policy};
42
42
  }
43
43
 
44
44
  export default function Policy() {
@@ -1,4 +1,4 @@
1
- import {json, type LoaderFunctionArgs} from '@shopify/remix-oxygen';
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 json({policies});
12
+ return {policies};
13
13
  }
14
14
 
15
15
  export default function Policies() {
@@ -1,4 +1,4 @@
1
- import {defer, type LoaderFunctionArgs} from '@shopify/remix-oxygen';
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 defer({...deferredData, ...criticalData});
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 json(await searchPromise);
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 json({term, result: {items, total}, error: null});
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 json({})
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 json(await searchPromise);
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 json({term, result: {total, items}});
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 json({})
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 json(await searchPromise);
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.0",
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 --ext .js,.ts,.jsx,.tsx .",
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.2",
18
- "@remix-run/server-runtime": "^2.15.2",
19
- "@shopify/hydrogen": "2025.1.0",
20
- "@shopify/remix-oxygen": "^2.0.10",
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": "^3.8.0",
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.2",
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": "^8.4.10",
39
+ "@types/eslint": "^9.6.1",
38
40
  "@types/react": "^18.2.22",
39
41
  "@types/react-dom": "^18.2.7",
40
- "eslint": "^8.20.0",
41
- "eslint-plugin-hydrogen": "0.12.2",
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": ["@shopify/oxygen-workers-types", "@remix-run/node", "vite/client"],
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 @@
5
5
  "dev": "shopify hydrogen dev --codegen"
6
6
  },
7
7
  "dependencies": {
8
- "isbot": "^3.8.0"
8
+ "isbot": "^5.1.21"
9
9
  },
10
10
  "devDependencies": {
11
11
  "vite": "^5.1.8",
@@ -14,7 +14,6 @@ export default defineConfig({
14
14
  v3_fetcherPersist: true,
15
15
  v3_relativeSplatPath: true,
16
16
  v3_throwAbortReason: true,
17
- v3_lazyRouteDiscovery: true,
18
17
  },
19
18
  }),
20
19
  tsconfigPaths(),
@@ -21,7 +21,7 @@ import {
21
21
  require_get_stream,
22
22
  runWithTimer,
23
23
  writeFile
24
- } from "./chunk-YEOP3EMX.js";
24
+ } from "./chunk-C33FHDOM.js";
25
25
  import {
26
26
  dirname,
27
27
  joinPath
@@ -13439,7 +13439,7 @@ async function latestVersion(packageName, options) {
13439
13439
  }
13440
13440
 
13441
13441
  // ../cli-kit/dist/public/node/node-package-manager.js
13442
- var import_semver3 = __toESM(require_semver()), yarnLockfile = "yarn.lock", npmLockfile = "package-lock.json", pnpmLockfile = "pnpm-lock.yaml", bunLockfile = "bun.lockb", pnpmWorkspaceFile = "pnpm-workspace.yaml", lockfiles = [yarnLockfile, pnpmLockfile, npmLockfile, bunLockfile], lockfilesByManager = {
13442
+ var import_semver3 = __toESM(require_semver(), 1), yarnLockfile = "yarn.lock", npmLockfile = "package-lock.json", pnpmLockfile = "pnpm-lock.yaml", bunLockfile = "bun.lockb", pnpmWorkspaceFile = "pnpm-workspace.yaml", lockfiles = [yarnLockfile, pnpmLockfile, npmLockfile, bunLockfile], lockfilesByManager = {
13443
13443
  yarn: yarnLockfile,
13444
13444
  npm: npmLockfile,
13445
13445
  pnpm: pnpmLockfile,
@@ -13748,4 +13748,4 @@ deep-extend/lib/deep-extend.js:
13748
13748
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
13749
13749
  *)
13750
13750
  */
13751
- //# sourceMappingURL=chunk-DXX7H2IH.js.map
13751
+ //# sourceMappingURL=chunk-22VHHB6E.js.map
@@ -2,16 +2,16 @@ import {
2
2
  getEnvironmentData,
3
3
  getLastSeenUserIdAfterAuth,
4
4
  getSensitiveEnvironmentData
5
- } from "./chunk-P654UJXI.js";
5
+ } from "./chunk-RR6KDBGU.js";
6
6
  import {
7
7
  fetch
8
- } from "./chunk-LJHVF5TJ.js";
8
+ } from "./chunk-B5KBQUD7.js";
9
9
  import {
10
10
  CLI_KIT_VERSION
11
- } from "./chunk-UYZDNGSJ.js";
11
+ } from "./chunk-GXE74MLK.js";
12
12
  import {
13
13
  runWithRateLimit
14
- } from "./chunk-DXX7H2IH.js";
14
+ } from "./chunk-22VHHB6E.js";
15
15
  import {
16
16
  alwaysLogAnalytics,
17
17
  alwaysLogMetrics,
@@ -28,7 +28,7 @@ import {
28
28
  outputDebug,
29
29
  outputToken,
30
30
  reportingRateLimit
31
- } from "./chunk-YEOP3EMX.js";
31
+ } from "./chunk-C33FHDOM.js";
32
32
  import {
33
33
  __commonJS,
34
34
  __esm,
@@ -15930,4 +15930,4 @@ export {
15930
15930
  requestIdsCollection,
15931
15931
  reportAnalyticsEvent
15932
15932
  };
15933
- //# sourceMappingURL=chunk-FGC2O2I5.js.map
15933
+ //# sourceMappingURL=chunk-2NZ7C43W.js.map
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  base_command_default
3
- } from "./chunk-KR2ZEBN3.js";
3
+ } from "./chunk-LZMNVVKL.js";
4
4
  import {
5
5
  renderTable,
6
6
  renderText
7
- } from "./chunk-YEOP3EMX.js";
7
+ } from "./chunk-C33FHDOM.js";
8
8
  import {
9
9
  require_lib
10
10
  } from "./chunk-VSKRQ3JT.js";
@@ -83,4 +83,4 @@ var import_core = __toESM(require_lib(), 1), CommandFlags = class _CommandFlags
83
83
  export {
84
84
  CommandFlags
85
85
  };
86
- //# sourceMappingURL=chunk-FTFTFTDU.js.map
86
+ //# sourceMappingURL=chunk-33Y36JTQ.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  openURL
3
- } from "./chunk-YEOP3EMX.js";
3
+ } from "./chunk-C33FHDOM.js";
4
4
  import {
5
5
  init_cjs_shims
6
6
  } from "./chunk-PKR7KJ6P.js";
@@ -15,4 +15,4 @@ async function searchService(query) {
15
15
  export {
16
16
  searchService
17
17
  };
18
- //# sourceMappingURL=chunk-U673QDO3.js.map
18
+ //# sourceMappingURL=chunk-3QMRSRBQ.js.map