@graphcommerce/magento-review 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,128 +1,14 @@
1
1
  # Change Log
2
2
 
3
- ## 10.0.0
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
-
83
- - [#2557](https://github.com/graphcommerce-org/graphcommerce/pull/2557) [`ceaadd8`](https://github.com/graphcommerce-org/graphcommerce/commit/ceaadd87f0648982a068a3b07b1fa149c9127f49) - ## Material UI v5 → v7 Migration
84
-
85
- This release upgrades Material UI from v5 to v7 with full CSS variables support. ([@paales](https://github.com/paales))
86
-
87
- ## 10.0.0-canary.72
88
-
89
- ## 10.0.0-canary.71
90
-
91
- ## 10.0.0-canary.70
92
-
93
- ## 10.0.0-canary.69
94
-
95
- ## 10.0.0-canary.68
96
-
97
- ### Major Changes
98
-
99
- - [#2557](https://github.com/graphcommerce-org/graphcommerce/pull/2557) [`ceaadd8`](https://github.com/graphcommerce-org/graphcommerce/commit/ceaadd87f0648982a068a3b07b1fa149c9127f49) - ## Material UI v5 → v7 Migration
100
-
101
- This release upgrades Material UI from v5 to v7 with full CSS variables support. ([@paales](https://github.com/paales))
102
-
103
- ## 10.0.0-canary.67
104
-
105
- ## 10.0.0-canary.66
106
-
107
- ## 10.0.0-canary.65
108
-
109
- ## 10.0.0-canary.64
110
-
111
- ## 10.0.0-canary.63
112
-
113
- ## 10.0.0-canary.62
3
+ ## 10.0.1-canary.1
114
4
 
115
- ## 10.0.0-canary.61
5
+ ## 10.0.1-canary.0
116
6
 
117
- ## 10.0.0-canary.60
118
-
119
- ## 10.0.0-canary.59
120
-
121
- ## 10.0.0-canary.58
7
+ ### Patch Changes
122
8
 
123
- ## 10.0.0-canary.57
9
+ - [#2568](https://github.com/graphcommerce-org/graphcommerce/pull/2568) [`ddeaf5d`](https://github.com/graphcommerce-org/graphcommerce/commit/ddeaf5df2c1f3902a80738a547a703221e02170f) - Solve hydration erorr while loading reviews ([@paales](https://github.com/paales))
124
10
 
125
- ## 10.0.0-canary.56
11
+ ## 10.0.0
126
12
 
127
13
  ### Major Changes
128
14
 
@@ -202,117 +88,9 @@
202
88
  - `@mui/*` modern alias rewrites
203
89
  - Debug plugins (`CircularDependencyPlugin`, `DuplicatesPlugin`) ([@paales](https://github.com/paales))
204
90
 
205
- ## 9.1.0-canary.55
206
-
207
- ## 9.1.0-canary.54
208
-
209
- ## 9.1.0-canary.53
210
-
211
- ## 9.1.0-canary.52
212
-
213
- ## 9.1.0-canary.51
214
-
215
- ## 9.1.0-canary.50
216
-
217
- ## 9.1.0-canary.49
218
-
219
- ## 9.1.0-canary.48
220
-
221
- ## 9.1.0-canary.47
222
-
223
- ## 9.1.0-canary.46
224
-
225
- ## 9.1.0-canary.45
226
-
227
- ## 9.1.0-canary.44
228
-
229
- ## 9.1.0-canary.43
230
-
231
- ## 9.1.0-canary.42
232
-
233
- ## 9.1.0-canary.41
234
-
235
- ## 9.1.0-canary.40
236
-
237
- ## 9.1.0-canary.39
238
-
239
- ## 9.1.0-canary.38
240
-
241
- ## 9.1.0-canary.37
242
-
243
- ## 9.1.0-canary.36
244
-
245
- ## 9.1.0-canary.35
246
-
247
- ## 9.1.0-canary.34
248
-
249
- ## 9.1.0-canary.33
250
-
251
- ## 9.1.0-canary.32
252
-
253
- ## 9.1.0-canary.31
254
-
255
- ## 9.1.0-canary.30
256
-
257
- ## 9.1.0-canary.29
258
-
259
- ## 9.1.0-canary.28
260
-
261
- ## 9.1.0-canary.27
262
-
263
- ## 9.1.0-canary.26
264
-
265
- ## 9.1.0-canary.25
266
-
267
- ## 9.1.0-canary.24
268
-
269
- ## 9.1.0-canary.23
270
-
271
- ## 9.1.0-canary.22
272
-
273
- ## 9.1.0-canary.21
274
-
275
- ## 9.1.0-canary.20
276
-
277
- ## 9.1.0-canary.19
278
-
279
- ## 9.1.0-canary.18
280
-
281
- ## 9.1.0-canary.17
282
-
283
- ## 9.1.0-canary.16
284
-
285
- ## 9.1.0-canary.15
286
-
287
- ## 9.0.4-canary.14
288
-
289
- ## 9.0.4-canary.13
290
-
291
- ## 9.0.4-canary.12
292
-
293
- ## 9.0.4-canary.11
294
-
295
- ## 9.0.4-canary.10
296
-
297
- ## 9.0.4-canary.9
298
-
299
- ## 9.0.4-canary.8
300
-
301
- ## 9.0.4-canary.7
302
-
303
- ## 9.0.4-canary.6
304
-
305
- ## 9.0.4-canary.5
306
-
307
- ## 9.0.4-canary.4
308
-
309
- ## 9.0.4-canary.3
310
-
311
- ## 9.0.4-canary.2
312
-
313
- ## 9.0.4-canary.1
91
+ - [#2557](https://github.com/graphcommerce-org/graphcommerce/pull/2557) [`ceaadd8`](https://github.com/graphcommerce-org/graphcommerce/commit/ceaadd87f0648982a068a3b07b1fa149c9127f49) - ## Material UI v5 → v7 Migration
314
92
 
315
- ## 9.0.4-canary.0
93
+ This release upgrades Material UI from v5 to v7 with full CSS variables support. ([@paales](https://github.com/paales))
316
94
 
317
95
  ## 9.0.0
318
96
 
@@ -41,7 +41,7 @@ export function ProductReviews(props: ProductReviewsProps) {
41
41
 
42
42
  const [reviewPage, setPage] = useState<number>(1)
43
43
 
44
- const { data: otherReviewsPage, loading } = useQuery(ProductReviewsPageDocument, {
44
+ const { data: otherReviewsPage } = useQuery(ProductReviewsPageDocument, {
45
45
  skip: reviewPage === 1,
46
46
  variables: {
47
47
  urlKey: url_key ?? '',
@@ -142,96 +142,95 @@ export function ProductReviews(props: ProductReviewsProps) {
142
142
  className={classes.container}
143
143
  sx={sxx((theme) => ({ marginTop: `calc(${theme.spacings.xxs} * -1)` }), sx)}
144
144
  >
145
- {!loading &&
146
- myReviews.items.map((review) => (
145
+ {myReviews.items.map((review) => (
146
+ <Box
147
+ key={review?.summary}
148
+ className={classes.review}
149
+ sx={(theme) => ({
150
+ display: 'grid',
151
+ gap: theme.spacings.sm,
152
+ borderBottom: `1px solid ${theme.vars.palette.divider}`,
153
+ padding: `${theme.spacings.md} 0`,
154
+ typography: 'body1',
155
+ })}
156
+ >
147
157
  <Box
148
- key={review?.summary}
149
- className={classes.review}
158
+ className={classes.title}
150
159
  sx={(theme) => ({
151
160
  display: 'grid',
152
- gap: theme.spacings.sm,
153
- borderBottom: `1px solid ${theme.vars.palette.divider}`,
154
- padding: `${theme.spacings.md} 0`,
155
- typography: 'body1',
161
+ gridAutoFlow: 'column',
162
+ justifyContent: 'start',
163
+ gap: theme.spacings.xs,
164
+ alignItems: 'center',
156
165
  })}
157
166
  >
167
+ <ProductReviewChip rating={review?.average_rating} />
168
+ <Typography component='h3' variant='h5'>
169
+ {review?.summary}
170
+ </Typography>
171
+ </Box>
172
+ <Typography variant='body1'>{review?.text}</Typography>
173
+
174
+ {(review?.ratings_breakdown.length ?? 0) > 1 && (
158
175
  <Box
159
- className={classes.title}
176
+ className={classes.ratingRow}
160
177
  sx={(theme) => ({
161
- display: 'grid',
162
- gridAutoFlow: 'column',
163
- justifyContent: 'start',
164
- gap: theme.spacings.xs,
165
- alignItems: 'center',
178
+ display: 'flex',
179
+ flexWrap: 'wrap',
180
+ gap: theme.spacings.sm,
181
+ color: theme.vars.palette.text.disabled,
182
+ typography: 'body2',
166
183
  })}
167
184
  >
168
- <ProductReviewChip rating={review?.average_rating} />
169
- <Typography component='h3' variant='h5'>
170
- {review?.summary}
171
- </Typography>
185
+ {review?.ratings_breakdown.map((ratingBreakdown) => (
186
+ <Box
187
+ key={`rating-${ratingBreakdown?.value}`}
188
+ className={classes.rating}
189
+ sx={(theme) => ({
190
+ display: 'grid',
191
+ gridAutoFlow: 'column',
192
+ gridTemplateColumns: '0.4fr 0.6fr',
193
+ justifyContent: 'space-between',
194
+ marginRight: theme.spacings.xxs,
195
+ rowGap: responsiveVal(8, 16),
196
+ gap: 8,
197
+ alignItems: 'center',
198
+ })}
199
+ >
200
+ <span>{ratingBreakdown?.name}</span>
201
+ <StarRatingField
202
+ readOnly
203
+ size='small'
204
+ defaultValue={Number(ratingBreakdown?.value ?? 0)}
205
+ />
206
+ </Box>
207
+ ))}
172
208
  </Box>
173
- <Typography variant='body1'>{review?.text}</Typography>
174
-
175
- {(review?.ratings_breakdown.length ?? 0) > 1 && (
176
- <Box
177
- className={classes.ratingRow}
178
- sx={(theme) => ({
179
- display: 'flex',
180
- flexWrap: 'wrap',
181
- gap: theme.spacings.sm,
182
- color: theme.vars.palette.text.disabled,
183
- typography: 'body2',
184
- })}
185
- >
186
- {review?.ratings_breakdown.map((ratingBreakdown) => (
187
- <Box
188
- key={`rating-${ratingBreakdown?.value}`}
189
- className={classes.rating}
190
- sx={(theme) => ({
191
- display: 'grid',
192
- gridAutoFlow: 'column',
193
- gridTemplateColumns: '0.4fr 0.6fr',
194
- justifyContent: 'space-between',
195
- marginRight: theme.spacings.xxs,
196
- rowGap: responsiveVal(8, 16),
197
- gap: 8,
198
- alignItems: 'center',
199
- })}
200
- >
201
- <span>{ratingBreakdown?.name}</span>
202
- <StarRatingField
203
- readOnly
204
- size='small'
205
- defaultValue={Number(ratingBreakdown?.value ?? 0)}
206
- />
207
- </Box>
208
- ))}
209
- </Box>
210
- )}
209
+ )}
211
210
 
211
+ <Box
212
+ className={classes.meta}
213
+ sx={(theme) => ({
214
+ color: theme.vars.palette.text.disabled,
215
+ display: 'grid',
216
+ gridAutoFlow: 'column',
217
+ justifyContent: 'space-between',
218
+ })}
219
+ >
220
+ <Box className={classes.nickname} sx={{ typography: 'body2' }}>
221
+ <Trans>Written by {review?.nickname}</Trans>
222
+ </Box>
212
223
  <Box
213
- className={classes.meta}
214
- sx={(theme) => ({
215
- color: theme.vars.palette.text.disabled,
216
- display: 'grid',
217
- gridAutoFlow: 'column',
218
- justifyContent: 'space-between',
219
- })}
224
+ component='time'
225
+ className={classes.date}
226
+ dateTime={review?.created_at}
227
+ sx={{ typography: 'body2' }}
220
228
  >
221
- <Box className={classes.nickname} sx={{ typography: 'body2' }}>
222
- <Trans>Written by {review?.nickname}</Trans>
223
- </Box>
224
- <Box
225
- component='time'
226
- className={classes.date}
227
- dateTime={review?.created_at}
228
- sx={{ typography: 'body2' }}
229
- >
230
- <DateTimeFormat dateStyle='long' timeStyle='short' date={review?.created_at} />
231
- </Box>
229
+ <DateTimeFormat dateStyle='long' timeStyle='short' date={review?.created_at} />
232
230
  </Box>
233
231
  </Box>
234
- ))}
232
+ </Box>
233
+ ))}
235
234
  {actions}
236
235
  </Box>
237
236
  )
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": "10.0.0",
5
+ "version": "10.0.1-canary.1",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -18,18 +18,18 @@
18
18
  "typescript": "5.9.3"
19
19
  },
20
20
  "peerDependencies": {
21
- "@graphcommerce/ecommerce-ui": "^10.0.0",
22
- "@graphcommerce/eslint-config-pwa": "^10.0.0",
23
- "@graphcommerce/graphql": "^10.0.0",
24
- "@graphcommerce/graphql-mesh": "^10.0.0",
25
- "@graphcommerce/image": "^10.0.0",
26
- "@graphcommerce/magento-customer": "^10.0.0",
27
- "@graphcommerce/magento-product": "^10.0.0",
28
- "@graphcommerce/magento-store": "^10.0.0",
29
- "@graphcommerce/next-ui": "^10.0.0",
30
- "@graphcommerce/prettier-config-pwa": "^10.0.0",
31
- "@graphcommerce/react-hook-form": "^10.0.0",
32
- "@graphcommerce/typescript-config-pwa": "^10.0.0",
21
+ "@graphcommerce/ecommerce-ui": "^10.0.1-canary.1",
22
+ "@graphcommerce/eslint-config-pwa": "^10.0.1-canary.1",
23
+ "@graphcommerce/graphql": "^10.0.1-canary.1",
24
+ "@graphcommerce/graphql-mesh": "^10.0.1-canary.1",
25
+ "@graphcommerce/image": "^10.0.1-canary.1",
26
+ "@graphcommerce/magento-customer": "^10.0.1-canary.1",
27
+ "@graphcommerce/magento-product": "^10.0.1-canary.1",
28
+ "@graphcommerce/magento-store": "^10.0.1-canary.1",
29
+ "@graphcommerce/next-ui": "^10.0.1-canary.1",
30
+ "@graphcommerce/prettier-config-pwa": "^10.0.1-canary.1",
31
+ "@graphcommerce/react-hook-form": "^10.0.1-canary.1",
32
+ "@graphcommerce/typescript-config-pwa": "^10.0.1-canary.1",
33
33
  "@lingui/core": "^5",
34
34
  "@lingui/macro": "^5",
35
35
  "@lingui/react": "^5",