@graphcommerce/googlerecaptcha 10.0.0 → 10.0.1-canary.1

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/CHANGELOG.md CHANGED
@@ -1,130 +1,14 @@
1
1
  # Change Log
2
2
 
3
- ## 10.0.0
4
-
5
- ### Major Changes
3
+ ## 10.0.1-canary.1
6
4
 
7
- - [#2546](https://github.com/graphcommerce-org/graphcommerce/pull/2546) [`ed9332a`](https://github.com/graphcommerce-org/graphcommerce/commit/ed9332a7f78966d932041d9a7725641edc92b28d) - ## GraphCommerce 10 - Turbopack Support
8
-
9
- This major release brings full Turbopack compatibility, dramatically improving development speed.
10
-
11
- ### 🚀 Turbopack-Compatible Interceptor System
12
-
13
- The entire plugin/interceptor system has been rewritten to work with Turbopack:
14
-
15
- - **No more Webpack plugins** - Removed `InterceptorPlugin` webpack plugin entirely
16
- - **File-based interception** - Original files are moved to `.original.tsx` and replaced with interceptor content
17
- - **Direct imports** - Interceptors import from `.original` files instead of embedding source
18
- - **New CLI commands**:
19
- - `graphcommerce codegen-interceptors` - Generate interceptor files
20
- - `graphcommerce cleanup-interceptors` - Reset interceptor system, restore original files
21
- - **Stable file hashing** - Deterministic interceptor generation for better caching
22
-
23
- ### ⚙️ Treeshakable Configuration System
24
-
25
- Replaced Webpack `DefinePlugin`-based `import.meta.graphCommerce` with a new generated configuration system:
26
-
27
- - **New `codegen-config-values` command** - Generates TypeScript files with precise typing
28
- - **Schema-driven** - Dynamically introspects Zod schemas to determine all available properties
29
- - **Fully treeshakable** - Unused config values are eliminated from the bundle
30
- - **Type-safe** - Uses `Get<GraphCommerceConfig, 'path'>` for nested property access
31
- - **Separate files for nested objects** - Optimal treeshaking for complex configurations
32
-
33
- ### 🔧 withGraphCommerce Changes
34
-
35
- - **Removed** `InterceptorPlugin` - No longer needed with file-based interception
36
- - **Removed** `DefinePlugin` for `import.meta.graphCommerce` - Replaced with generated config
37
- - **Removed** `@mui/*` alias rewrites - No longer required
38
- - **Added** Turbopack loader rules for `.yaml`, `.yml`, and `.po` files
39
- - **Added** `serverExternalPackages` for all `@whatwg-node/*` packages
40
- - **Added** `optimizePackageImports` for better bundle optimization
41
- - **Added** `images.qualities: [52, 75]` for Next.js image optimization
42
-
43
- ### 📦 Lingui Configuration
44
-
45
- - **Renamed** `lingui.config.js` → `lingui.config.ts` with TypeScript support
46
- - **Updated** `@graphcommerce/lingui-next/config` to TypeScript with proper exports
47
- - **Simplified** formatter options
48
-
49
- ### ⚛️ React 19 & Next.js 16 Compatibility
50
-
51
- - Updated `RefObject<T>` types for React 19 (now includes `null` by default)
52
- - Replaced deprecated `React.VFC` with `React.FC`
53
- - Fixed `useRef` calls to require explicit initial values
54
- - Updated `MutableRefObject` usage in `framer-scroller`
55
-
56
- ### 📋 ESLint 9 Flat Config
57
-
58
- - Migrated from legacy `.eslintrc` to new flat config format (`eslint.config.mjs`)
59
- - Updated `@typescript-eslint/*` packages to v8
60
- - Fixed AST selector for `SxProps` rule (`typeParameters` → `typeArguments`)
61
-
62
- ### 🔄 Apollo Client
63
-
64
- - Fixed deprecated `name` option → `clientAwareness: { name: 'ssr' }`
65
- - Updated error handling types to accept `ApolloError | null | undefined`
66
-
67
- ### ⚠️ Breaking Changes
68
-
69
- - **Node.js 24.x not supported** - Restricted to `>=20 <24.0.0` due to [nodejs/undici#4290](https://github.com/nodejs/undici/issues/4290)
70
- - **Interceptor files changed** - Original components now at `.original.tsx`
71
- - **Config access changed** - Use generated config values instead of `import.meta.graphCommerce`
72
- - **ESLint config format** - Must use flat config (`eslint.config.mjs`)
73
- - **Lingui config** - Rename `lingui.config.js` to `lingui.config.ts`
74
-
75
- ### 🗑️ Removed
76
-
77
- - `InterceptorPlugin` webpack plugin
78
- - `configToImportMeta` utility
79
- - Webpack `DefinePlugin` usage for config
80
- - `@mui/*` modern alias rewrites
81
- - Debug plugins (`CircularDependencyPlugin`, `DuplicatesPlugin`) ([@paales](https://github.com/paales))
82
-
83
- - [#2565](https://github.com/graphcommerce-org/graphcommerce/pull/2565) [`c96dfcd`](https://github.com/graphcommerce-org/graphcommerce/commit/c96dfcdca981baca387c270ad9e2b9515cdd00cc) - Updated to Apollo Client 4 ([@paales](https://github.com/paales))
5
+ ## 10.0.1-canary.0
84
6
 
85
7
  ### Patch Changes
86
8
 
87
- - [#2537](https://github.com/graphcommerce-org/graphcommerce/pull/2537) [`31397f9`](https://github.com/graphcommerce-org/graphcommerce/commit/31397f9c5b2d85895d6e00732b2e3d7a99ffee53) - Solve issue where a magento store reference was added to the graphql-mesh package. ([@paales](https://github.com/paales))
88
-
89
- - [#2496](https://github.com/graphcommerce-org/graphcommerce/pull/2496) [`a261149`](https://github.com/graphcommerce-org/graphcommerce/commit/a261149b6b32ad6a35606da2d530b8e41bfa10a0) - ReCaptcha now using the `recaptchaV3Config` query and add a fallback for Magento 2.4.6 and earlier to still use the configuration. Magento 2.4.7 doesn't need that configuration anymore. ([@paales](https://github.com/paales))
90
-
91
- ## 10.0.0-canary.72
92
-
93
- ## 10.0.0-canary.71
94
-
95
- ## 10.0.0-canary.70
96
-
97
- ### Major Changes
98
-
99
- - [#2565](https://github.com/graphcommerce-org/graphcommerce/pull/2565) [`c96dfcd`](https://github.com/graphcommerce-org/graphcommerce/commit/c96dfcdca981baca387c270ad9e2b9515cdd00cc) - Updated to Apollo Client 4 ([@paales](https://github.com/paales))
100
-
101
- ## 10.0.0-canary.69
102
-
103
- ## 10.0.0-canary.68
104
-
105
- ## 10.0.0-canary.67
106
-
107
- ## 10.0.0-canary.66
108
-
109
- ## 10.0.0-canary.65
110
-
111
- ## 10.0.0-canary.64
112
-
113
- ## 10.0.0-canary.63
114
-
115
- ## 10.0.0-canary.62
116
-
117
- ## 10.0.0-canary.61
118
-
119
- ## 10.0.0-canary.60
120
-
121
- ## 10.0.0-canary.59
122
-
123
- ## 10.0.0-canary.58
9
+ - [#2568](https://github.com/graphcommerce-org/graphcommerce/pull/2568) [`f1b60ac`](https://github.com/graphcommerce-org/graphcommerce/commit/f1b60accf5e8fdbcba15b7567dce7ff68f37db88) - Solve issue where the cache wasn't available from the context anymore in @apollo/client@4 now uses the operation.client.cache ([@paales](https://github.com/paales))
124
10
 
125
- ## 10.0.0-canary.57
126
-
127
- ## 10.0.0-canary.56
11
+ ## 10.0.0
128
12
 
129
13
  ### Major Changes
130
14
 
@@ -204,126 +88,14 @@
204
88
  - `@mui/*` modern alias rewrites
205
89
  - Debug plugins (`CircularDependencyPlugin`, `DuplicatesPlugin`) ([@paales](https://github.com/paales))
206
90
 
207
- ## 9.1.0-canary.55
208
-
209
- ## 9.1.0-canary.54
210
-
211
- ## 9.1.0-canary.53
212
-
213
- ## 9.1.0-canary.52
214
-
215
- ## 9.1.0-canary.51
91
+ - [#2565](https://github.com/graphcommerce-org/graphcommerce/pull/2565) [`c96dfcd`](https://github.com/graphcommerce-org/graphcommerce/commit/c96dfcdca981baca387c270ad9e2b9515cdd00cc) - Updated to Apollo Client 4 ([@paales](https://github.com/paales))
216
92
 
217
93
  ### Patch Changes
218
94
 
219
95
  - [#2537](https://github.com/graphcommerce-org/graphcommerce/pull/2537) [`31397f9`](https://github.com/graphcommerce-org/graphcommerce/commit/31397f9c5b2d85895d6e00732b2e3d7a99ffee53) - Solve issue where a magento store reference was added to the graphql-mesh package. ([@paales](https://github.com/paales))
220
96
 
221
- ## 9.1.0-canary.50
222
-
223
- ## 9.1.0-canary.49
224
-
225
- ## 9.1.0-canary.48
226
-
227
- ## 9.1.0-canary.47
228
-
229
- ## 9.1.0-canary.46
230
-
231
- ## 9.1.0-canary.45
232
-
233
- ## 9.1.0-canary.44
234
-
235
- ## 9.1.0-canary.43
236
-
237
- ## 9.1.0-canary.42
238
-
239
- ## 9.1.0-canary.41
240
-
241
- ## 9.1.0-canary.40
242
-
243
- ## 9.1.0-canary.39
244
-
245
- ## 9.1.0-canary.38
246
-
247
- ## 9.1.0-canary.37
248
-
249
- ## 9.1.0-canary.36
250
-
251
- ## 9.1.0-canary.35
252
-
253
- ## 9.1.0-canary.34
254
-
255
- ## 9.1.0-canary.33
256
-
257
- ## 9.1.0-canary.32
258
-
259
- ## 9.1.0-canary.31
260
-
261
- ## 9.1.0-canary.30
262
-
263
- ## 9.1.0-canary.29
264
-
265
- ## 9.1.0-canary.28
266
-
267
- ## 9.1.0-canary.27
268
-
269
- ## 9.1.0-canary.26
270
-
271
- ## 9.1.0-canary.25
272
-
273
- ## 9.1.0-canary.24
274
-
275
- ## 9.1.0-canary.23
276
-
277
- ## 9.1.0-canary.22
278
-
279
- ## 9.1.0-canary.21
280
-
281
- ## 9.1.0-canary.20
282
-
283
- ## 9.1.0-canary.19
284
-
285
- ## 9.1.0-canary.18
286
-
287
- ## 9.1.0-canary.17
288
-
289
- ### Patch Changes
290
-
291
97
  - [#2496](https://github.com/graphcommerce-org/graphcommerce/pull/2496) [`a261149`](https://github.com/graphcommerce-org/graphcommerce/commit/a261149b6b32ad6a35606da2d530b8e41bfa10a0) - ReCaptcha now using the `recaptchaV3Config` query and add a fallback for Magento 2.4.6 and earlier to still use the configuration. Magento 2.4.7 doesn't need that configuration anymore. ([@paales](https://github.com/paales))
292
98
 
293
- ## 9.1.0-canary.16
294
-
295
- ## 9.1.0-canary.15
296
-
297
- ## 9.0.4-canary.14
298
-
299
- ## 9.0.4-canary.13
300
-
301
- ## 9.0.4-canary.12
302
-
303
- ## 9.0.4-canary.11
304
-
305
- ## 9.0.4-canary.10
306
-
307
- ## 9.0.4-canary.9
308
-
309
- ## 9.0.4-canary.8
310
-
311
- ## 9.0.4-canary.7
312
-
313
- ## 9.0.4-canary.6
314
-
315
- ## 9.0.4-canary.5
316
-
317
- ## 9.0.4-canary.4
318
-
319
- ## 9.0.4-canary.3
320
-
321
- ## 9.0.4-canary.2
322
-
323
- ## 9.0.4-canary.1
324
-
325
- ## 9.0.4-canary.0
326
-
327
99
  ## 9.0.0
328
100
 
329
101
  ### Patch Changes
@@ -12,7 +12,7 @@ const isMutation = (operation: ApolloLink.Request) =>
12
12
 
13
13
  /** Apollo link that adds the Google reCAPTCHA token to the request context. */
14
14
  export const recaptchaLink = new SetContextLink(async (prevContext, operation) => {
15
- const siteKey = prevContext.cache?.readQuery({ query: RecaptchaV3ConfigDocument })
15
+ const siteKey = operation.client.cache.readQuery({ query: RecaptchaV3ConfigDocument })
16
16
  ?.recaptchaV3Config?.website_key
17
17
 
18
18
  if (!siteKey || !globalThis.grecaptcha || !isMutation(operation)) return {}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/googlerecaptcha",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "10.0.0",
5
+ "version": "10.0.1-canary.1",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -23,13 +23,13 @@
23
23
  "@types/grecaptcha": "^3.0.9"
24
24
  },
25
25
  "peerDependencies": {
26
- "@graphcommerce/eslint-config-pwa": "^10.0.0",
27
- "@graphcommerce/graphql": "^10.0.0",
28
- "@graphcommerce/graphql-mesh": "^10.0.0",
29
- "@graphcommerce/magento-store": "^10.0.0",
30
- "@graphcommerce/next-ui": "^10.0.0",
31
- "@graphcommerce/prettier-config-pwa": "^10.0.0",
32
- "@graphcommerce/typescript-config-pwa": "^10.0.0",
26
+ "@graphcommerce/eslint-config-pwa": "^10.0.1-canary.1",
27
+ "@graphcommerce/graphql": "^10.0.1-canary.1",
28
+ "@graphcommerce/graphql-mesh": "^10.0.1-canary.1",
29
+ "@graphcommerce/magento-store": "^10.0.1-canary.1",
30
+ "@graphcommerce/next-ui": "^10.0.1-canary.1",
31
+ "@graphcommerce/prettier-config-pwa": "^10.0.1-canary.1",
32
+ "@graphcommerce/typescript-config-pwa": "^10.0.1-canary.1",
33
33
  "@mui/material": "^7.0.0",
34
34
  "graphql": "^16.9.0",
35
35
  "next": "*",