@graphcommerce/magento-payment-braintree 9.1.0-canary.55 → 10.0.0-canary.57

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,5 +1,87 @@
1
1
  # Change Log
2
2
 
3
+ ## 10.0.0-canary.57
4
+
5
+ ## 10.0.0-canary.56
6
+
7
+ ### Major Changes
8
+
9
+ - [#2546](https://github.com/graphcommerce-org/graphcommerce/pull/2546) [`ed9332a`](https://github.com/graphcommerce-org/graphcommerce/commit/ed9332a7f78966d932041d9a7725641edc92b28d) - ## GraphCommerce 10 - Turbopack Support
10
+
11
+ This major release brings full Turbopack compatibility, dramatically improving development speed.
12
+
13
+ ### 🚀 Turbopack-Compatible Interceptor System
14
+
15
+ The entire plugin/interceptor system has been rewritten to work with Turbopack:
16
+
17
+ - **No more Webpack plugins** - Removed `InterceptorPlugin` webpack plugin entirely
18
+ - **File-based interception** - Original files are moved to `.original.tsx` and replaced with interceptor content
19
+ - **Direct imports** - Interceptors import from `.original` files instead of embedding source
20
+ - **New CLI commands**:
21
+ - `graphcommerce codegen-interceptors` - Generate interceptor files
22
+ - `graphcommerce cleanup-interceptors` - Reset interceptor system, restore original files
23
+ - **Stable file hashing** - Deterministic interceptor generation for better caching
24
+
25
+ ### ⚙️ Treeshakable Configuration System
26
+
27
+ Replaced Webpack `DefinePlugin`-based `import.meta.graphCommerce` with a new generated configuration system:
28
+
29
+ - **New `codegen-config-values` command** - Generates TypeScript files with precise typing
30
+ - **Schema-driven** - Dynamically introspects Zod schemas to determine all available properties
31
+ - **Fully treeshakable** - Unused config values are eliminated from the bundle
32
+ - **Type-safe** - Uses `Get<GraphCommerceConfig, 'path'>` for nested property access
33
+ - **Separate files for nested objects** - Optimal treeshaking for complex configurations
34
+
35
+ ### 🔧 withGraphCommerce Changes
36
+
37
+ - **Removed** `InterceptorPlugin` - No longer needed with file-based interception
38
+ - **Removed** `DefinePlugin` for `import.meta.graphCommerce` - Replaced with generated config
39
+ - **Removed** `@mui/*` alias rewrites - No longer required
40
+ - **Added** Turbopack loader rules for `.yaml`, `.yml`, and `.po` files
41
+ - **Added** `serverExternalPackages` for all `@whatwg-node/*` packages
42
+ - **Added** `optimizePackageImports` for better bundle optimization
43
+ - **Added** `images.qualities: [52, 75]` for Next.js image optimization
44
+
45
+ ### 📦 Lingui Configuration
46
+
47
+ - **Renamed** `lingui.config.js` → `lingui.config.ts` with TypeScript support
48
+ - **Updated** `@graphcommerce/lingui-next/config` to TypeScript with proper exports
49
+ - **Simplified** formatter options
50
+
51
+ ### ⚛️ React 19 & Next.js 16 Compatibility
52
+
53
+ - Updated `RefObject<T>` types for React 19 (now includes `null` by default)
54
+ - Replaced deprecated `React.VFC` with `React.FC`
55
+ - Fixed `useRef` calls to require explicit initial values
56
+ - Updated `MutableRefObject` usage in `framer-scroller`
57
+
58
+ ### 📋 ESLint 9 Flat Config
59
+
60
+ - Migrated from legacy `.eslintrc` to new flat config format (`eslint.config.mjs`)
61
+ - Updated `@typescript-eslint/*` packages to v8
62
+ - Fixed AST selector for `SxProps` rule (`typeParameters` → `typeArguments`)
63
+
64
+ ### 🔄 Apollo Client
65
+
66
+ - Fixed deprecated `name` option → `clientAwareness: { name: 'ssr' }`
67
+ - Updated error handling types to accept `ApolloError | null | undefined`
68
+
69
+ ### ⚠️ Breaking Changes
70
+
71
+ - **Node.js 24.x not supported** - Restricted to `>=20 <24.0.0` due to [nodejs/undici#4290](https://github.com/nodejs/undici/issues/4290)
72
+ - **Interceptor files changed** - Original components now at `.original.tsx`
73
+ - **Config access changed** - Use generated config values instead of `import.meta.graphCommerce`
74
+ - **ESLint config format** - Must use flat config (`eslint.config.mjs`)
75
+ - **Lingui config** - Rename `lingui.config.js` to `lingui.config.ts`
76
+
77
+ ### 🗑️ Removed
78
+
79
+ - `InterceptorPlugin` webpack plugin
80
+ - `configToImportMeta` utility
81
+ - Webpack `DefinePlugin` usage for config
82
+ - `@mui/*` modern alias rewrites
83
+ - Debug plugins (`CircularDependencyPlugin`, `DuplicatesPlugin`) ([@paales](https://github.com/paales))
84
+
3
85
  ## 9.1.0-canary.55
4
86
 
5
87
  ## 9.1.0-canary.54
@@ -6,8 +6,8 @@ import { useCartLock } from '@graphcommerce/magento-cart-payment-method'
6
6
  import { ErrorSnackbar, FormRow, FullPageMessage } from '@graphcommerce/next-ui'
7
7
  import type { FieldValues, Path, UseControllerProps } from '@graphcommerce/react-hook-form'
8
8
  import { FormProvider, useController, useFormCompose } from '@graphcommerce/react-hook-form'
9
- import { i18n } from '@lingui/core'
10
- import { Trans } from '@lingui/react'
9
+ import { t } from '@lingui/core/macro'
10
+ import { Trans } from '@lingui/react/macro'
11
11
  import { Box, CircularProgress, TextField } from '@mui/material'
12
12
  import type { HostedFields } from 'braintree-web'
13
13
  import type {
@@ -54,9 +54,9 @@ export function BraintreeField<T extends FieldValues>(
54
54
  if (!hostedFields) return false
55
55
  const hostedField = hostedFields.getState().fields[name]
56
56
 
57
- if (hostedField.isEmpty) return i18n._(/* i18n */ 'This field is required')
58
- if (!hostedField.isPotentiallyValid) return i18n._(/* i18n */ 'This field is invalid')
59
- if (!hostedField.isValid) return i18n._(/* i18n */ 'This field is invalid')
57
+ if (hostedField.isEmpty) return t`This field is required`
58
+ if (!hostedField.isPotentiallyValid) return t`This field is invalid`
59
+ if (!hostedField.isValid) return t`This field is invalid`
60
60
 
61
61
  return true
62
62
  },
@@ -276,7 +276,7 @@ export function PaymentMethodOptions(props: PaymentOptionsProps) {
276
276
  {loading && (
277
277
  <FullPageMessage
278
278
  icon={<CircularProgress />}
279
- title={<Trans id='Loading' />}
279
+ title={<Trans>Loading</Trans>}
280
280
  disableMargin
281
281
  sx={{ mb: 0 }}
282
282
  />
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/magento-payment-braintree",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "9.1.0-canary.55",
5
+ "version": "10.0.0-canary.57",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -11,33 +11,37 @@
11
11
  "project": "./tsconfig.json"
12
12
  }
13
13
  },
14
+ "exports": {
15
+ ".": "./index.ts",
16
+ "./plugins/AddBraintreeMethods": "./plugins/AddBraintreeMethods.tsx"
17
+ },
14
18
  "devDependencies": {
15
- "@types/braintree-web": "^3.96.16"
19
+ "@types/braintree-web": "^3.96.17"
16
20
  },
17
21
  "dependencies": {
18
- "braintree-web": "^3.112.1"
22
+ "braintree-web": "^3.127.0"
19
23
  },
20
24
  "peerDependencies": {
21
- "@graphcommerce/eslint-config-pwa": "^9.1.0-canary.55",
22
- "@graphcommerce/graphql": "^9.1.0-canary.55",
23
- "@graphcommerce/image": "^9.1.0-canary.55",
24
- "@graphcommerce/magento-cart": "^9.1.0-canary.55",
25
- "@graphcommerce/magento-cart-payment-method": "^9.1.0-canary.55",
26
- "@graphcommerce/magento-cart-shipping-address": "^9.1.0-canary.55",
27
- "@graphcommerce/magento-product": "^9.1.0-canary.55",
28
- "@graphcommerce/magento-product-configurable": "^9.1.0-canary.55",
29
- "@graphcommerce/magento-store": "^9.1.0-canary.55",
30
- "@graphcommerce/next-ui": "^9.1.0-canary.55",
31
- "@graphcommerce/prettier-config-pwa": "^9.1.0-canary.55",
32
- "@graphcommerce/react-hook-form": "^9.1.0-canary.55",
33
- "@graphcommerce/typescript-config-pwa": "^9.1.0-canary.55",
34
- "@lingui/core": "^4.2.1",
35
- "@lingui/macro": "^4.2.1",
36
- "@lingui/react": "^4.2.1",
25
+ "@graphcommerce/eslint-config-pwa": "^10.0.0-canary.57",
26
+ "@graphcommerce/graphql": "^10.0.0-canary.57",
27
+ "@graphcommerce/image": "^10.0.0-canary.57",
28
+ "@graphcommerce/magento-cart": "^10.0.0-canary.57",
29
+ "@graphcommerce/magento-cart-payment-method": "^10.0.0-canary.57",
30
+ "@graphcommerce/magento-cart-shipping-address": "^10.0.0-canary.57",
31
+ "@graphcommerce/magento-product": "^10.0.0-canary.57",
32
+ "@graphcommerce/magento-product-configurable": "^10.0.0-canary.57",
33
+ "@graphcommerce/magento-store": "^10.0.0-canary.57",
34
+ "@graphcommerce/next-ui": "^10.0.0-canary.57",
35
+ "@graphcommerce/prettier-config-pwa": "^10.0.0-canary.57",
36
+ "@graphcommerce/react-hook-form": "^10.0.0-canary.57",
37
+ "@graphcommerce/typescript-config-pwa": "^10.0.0-canary.57",
38
+ "@lingui/core": "^5",
39
+ "@lingui/macro": "^5",
40
+ "@lingui/react": "^5",
37
41
  "@mui/material": "^5.10.16",
38
42
  "framer-motion": "^11.0.0",
39
43
  "next": "*",
40
- "react": "^18.2.0",
41
- "react-dom": "^18.2.0"
44
+ "react": "^19.2.0",
45
+ "react-dom": "^19.2.0"
42
46
  }
43
47
  }