@graphcommerce/magento-review 9.1.0-canary.55 → 10.0.0-canary.56

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,85 @@
1
1
  # Change Log
2
2
 
3
+ ## 10.0.0-canary.56
4
+
5
+ ### Major Changes
6
+
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
+
3
83
  ## 9.1.0-canary.55
4
84
 
5
85
  ## 9.1.0-canary.54
@@ -12,7 +12,7 @@ import {
12
12
  StarRatingField,
13
13
  } from '@graphcommerce/next-ui'
14
14
  import { useFormGqlMutation } from '@graphcommerce/react-hook-form'
15
- import { Trans } from '@lingui/react'
15
+ import { Trans } from '@lingui/react/macro'
16
16
  import type { SxProps, Theme } from '@mui/material'
17
17
  import { Alert, Box, Button, Typography } from '@mui/material'
18
18
  import { useRouter } from 'next/router'
@@ -79,11 +79,11 @@ export function CreateProductReviewForm(props: CreateProductReviewFormProps) {
79
79
  return (
80
80
  <>
81
81
  <Alert severity='success' variant='standard'>
82
- <Trans id='Thank you! Your review was successfully submitted for approval' />
82
+ <Trans>Thank you! Your review was successfully submitted for approval</Trans>
83
83
  </Alert>
84
84
  <Box mt={6}>
85
85
  <OverlayCloseButton variant='pill' color='secondary' size='large'>
86
- <Trans id='Continue shopping'>Continue shopping</Trans>
86
+ <Trans>Continue shopping</Trans>
87
87
  </OverlayCloseButton>
88
88
  </Box>
89
89
  </>
@@ -97,7 +97,7 @@ export function CreateProductReviewForm(props: CreateProductReviewFormProps) {
97
97
  variant='outlined'
98
98
  type='text'
99
99
  error={!!formState.errors.nickname || !!error}
100
- label={<Trans id='Name' />}
100
+ label={<Trans>Name</Trans>}
101
101
  required={required.nickname}
102
102
  name='nickname'
103
103
  rules={{ required: required.nickname }}
@@ -178,7 +178,7 @@ export function CreateProductReviewForm(props: CreateProductReviewFormProps) {
178
178
  variant='outlined'
179
179
  type='text'
180
180
  error={!!formState.errors.summary || !!error}
181
- label={<Trans id='Summary' />}
181
+ label={<Trans>Summary</Trans>}
182
182
  required={required.summary}
183
183
  name='summary'
184
184
  rules={{ required: required.summary }}
@@ -194,7 +194,7 @@ export function CreateProductReviewForm(props: CreateProductReviewFormProps) {
194
194
  variant='outlined'
195
195
  type='text'
196
196
  error={!!formState.errors.text || !!error}
197
- label={<Trans id='Review' />}
197
+ label={<Trans>Review</Trans>}
198
198
  required={required.text}
199
199
  name='text'
200
200
  rules={{ required: required.text }}
@@ -215,7 +215,7 @@ export function CreateProductReviewForm(props: CreateProductReviewFormProps) {
215
215
  size='medium'
216
216
  className={classes.submitButton}
217
217
  >
218
- <Trans id='Submit review' />
218
+ <Trans>Submit review</Trans>
219
219
  </Button>
220
220
  </FormActions>
221
221
 
@@ -1,5 +1,5 @@
1
1
  import { iconStar, IconSvg } from '@graphcommerce/next-ui'
2
- import { i18n } from '@lingui/core'
2
+ import { t } from '@lingui/core/macro'
3
3
  import type { ChipProps } from '@mui/material'
4
4
  import { Chip } from '@mui/material'
5
5
  import React from 'react'
@@ -38,7 +38,7 @@ export function ProductReviewChip(props: ProductReviewChipProps) {
38
38
  icon={<IconSvg src={iconStar} sx={{ stroke: '#FFDA1C', fill: '#FFDA1C' }} />}
39
39
  color='default'
40
40
  size='medium'
41
- aria-label={i18n._(/* i18n */ 'Review score')}
41
+ aria-label={t`Review score`}
42
42
  label={`${normalizedRating}/5`}
43
43
  {...chipProps}
44
44
  />
@@ -6,7 +6,7 @@ import {
6
6
  responsiveVal,
7
7
  StarRatingField,
8
8
  } from '@graphcommerce/next-ui'
9
- import { Trans } from '@lingui/react'
9
+ import { Trans } from '@lingui/react/macro'
10
10
  import type { SxProps, Theme } from '@mui/material'
11
11
  import { Box, Button, Link, Typography } from '@mui/material'
12
12
  import { useRouter } from 'next/router'
@@ -79,7 +79,7 @@ export function ProductReviews(props: ProductReviewsProps) {
79
79
  },
80
80
  })}
81
81
  >
82
- <Trans id='Write a review' />
82
+ <Trans>Write a review</Trans>
83
83
  </Button>
84
84
 
85
85
  {!!total_pages && total_pages > 1 && (
@@ -130,7 +130,7 @@ export function ProductReviews(props: ProductReviewsProps) {
130
130
  })}
131
131
  >
132
132
  <Typography variant='subtitle1'>
133
- <Trans id='Be the first to write a review!' />
133
+ <Trans>Be the first to write a review!</Trans>
134
134
  </Typography>
135
135
  </Box>
136
136
  </Box>
@@ -224,7 +224,7 @@ export function ProductReviews(props: ProductReviewsProps) {
224
224
  })}
225
225
  >
226
226
  <Box className={classes.nickname} sx={{ typography: 'body2' }}>
227
- <Trans id='Written by {nickname}' values={{ nickname: review?.nickname }} />
227
+ <Trans>Written by {review?.nickname}</Trans>
228
228
  </Box>
229
229
  <Box
230
230
  component='time'
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/magento-review",
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.56",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -12,30 +12,33 @@
12
12
  }
13
13
  },
14
14
  "dependencies": {
15
- "schema-dts": "^1.1.2"
15
+ "schema-dts": "^1.1.5"
16
16
  },
17
17
  "devDependencies": {
18
- "typescript": "5.7.2"
18
+ "typescript": "5.9.3"
19
19
  },
20
20
  "peerDependencies": {
21
- "@graphcommerce/ecommerce-ui": "^9.1.0-canary.55",
22
- "@graphcommerce/eslint-config-pwa": "^9.1.0-canary.55",
23
- "@graphcommerce/graphql": "^9.1.0-canary.55",
24
- "@graphcommerce/graphql-mesh": "^9.1.0-canary.55",
25
- "@graphcommerce/image": "^9.1.0-canary.55",
26
- "@graphcommerce/magento-customer": "^9.1.0-canary.55",
27
- "@graphcommerce/magento-product": "^9.1.0-canary.55",
28
- "@graphcommerce/magento-store": "^9.1.0-canary.55",
29
- "@graphcommerce/next-ui": "^9.1.0-canary.55",
30
- "@graphcommerce/prettier-config-pwa": "^9.1.0-canary.55",
31
- "@graphcommerce/react-hook-form": "^9.1.0-canary.55",
32
- "@graphcommerce/typescript-config-pwa": "^9.1.0-canary.55",
33
- "@lingui/core": "^4.2.1",
34
- "@lingui/macro": "^4.2.1",
35
- "@lingui/react": "^4.2.1",
21
+ "@graphcommerce/ecommerce-ui": "^10.0.0-canary.56",
22
+ "@graphcommerce/eslint-config-pwa": "^10.0.0-canary.56",
23
+ "@graphcommerce/graphql": "^10.0.0-canary.56",
24
+ "@graphcommerce/graphql-mesh": "^10.0.0-canary.56",
25
+ "@graphcommerce/image": "^10.0.0-canary.56",
26
+ "@graphcommerce/magento-customer": "^10.0.0-canary.56",
27
+ "@graphcommerce/magento-product": "^10.0.0-canary.56",
28
+ "@graphcommerce/magento-store": "^10.0.0-canary.56",
29
+ "@graphcommerce/next-ui": "^10.0.0-canary.56",
30
+ "@graphcommerce/prettier-config-pwa": "^10.0.0-canary.56",
31
+ "@graphcommerce/react-hook-form": "^10.0.0-canary.56",
32
+ "@graphcommerce/typescript-config-pwa": "^10.0.0-canary.56",
33
+ "@lingui/core": "^5",
34
+ "@lingui/macro": "^5",
35
+ "@lingui/react": "^5",
36
36
  "@mui/material": "^5.10.16",
37
37
  "next": "*",
38
- "react": "^18.2.0",
39
- "react-dom": "^18.2.0"
38
+ "react": "^19.2.0",
39
+ "react-dom": "^19.2.0"
40
+ },
41
+ "exports": {
42
+ ".": "./index.ts"
40
43
  }
41
44
  }