@graphcommerce/magento-review 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
|
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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 {
|
|
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={
|
|
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
|
|
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
|
|
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
|
|
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": "
|
|
5
|
+
"version": "10.0.0-canary.57",
|
|
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.
|
|
15
|
+
"schema-dts": "^1.1.5"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
|
-
"typescript": "5.
|
|
18
|
+
"typescript": "5.9.3"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
|
-
"@graphcommerce/ecommerce-ui": "^
|
|
22
|
-
"@graphcommerce/eslint-config-pwa": "^
|
|
23
|
-
"@graphcommerce/graphql": "^
|
|
24
|
-
"@graphcommerce/graphql-mesh": "^
|
|
25
|
-
"@graphcommerce/image": "^
|
|
26
|
-
"@graphcommerce/magento-customer": "^
|
|
27
|
-
"@graphcommerce/magento-product": "^
|
|
28
|
-
"@graphcommerce/magento-store": "^
|
|
29
|
-
"@graphcommerce/next-ui": "^
|
|
30
|
-
"@graphcommerce/prettier-config-pwa": "^
|
|
31
|
-
"@graphcommerce/react-hook-form": "^
|
|
32
|
-
"@graphcommerce/typescript-config-pwa": "^
|
|
33
|
-
"@lingui/core": "^
|
|
34
|
-
"@lingui/macro": "^
|
|
35
|
-
"@lingui/react": "^
|
|
21
|
+
"@graphcommerce/ecommerce-ui": "^10.0.0-canary.57",
|
|
22
|
+
"@graphcommerce/eslint-config-pwa": "^10.0.0-canary.57",
|
|
23
|
+
"@graphcommerce/graphql": "^10.0.0-canary.57",
|
|
24
|
+
"@graphcommerce/graphql-mesh": "^10.0.0-canary.57",
|
|
25
|
+
"@graphcommerce/image": "^10.0.0-canary.57",
|
|
26
|
+
"@graphcommerce/magento-customer": "^10.0.0-canary.57",
|
|
27
|
+
"@graphcommerce/magento-product": "^10.0.0-canary.57",
|
|
28
|
+
"@graphcommerce/magento-store": "^10.0.0-canary.57",
|
|
29
|
+
"@graphcommerce/next-ui": "^10.0.0-canary.57",
|
|
30
|
+
"@graphcommerce/prettier-config-pwa": "^10.0.0-canary.57",
|
|
31
|
+
"@graphcommerce/react-hook-form": "^10.0.0-canary.57",
|
|
32
|
+
"@graphcommerce/typescript-config-pwa": "^10.0.0-canary.57",
|
|
33
|
+
"@lingui/core": "^5",
|
|
34
|
+
"@lingui/macro": "^5",
|
|
35
|
+
"@lingui/react": "^5",
|
|
36
36
|
"@mui/material": "^5.10.16",
|
|
37
37
|
"next": "*",
|
|
38
|
-
"react": "^
|
|
39
|
-
"react-dom": "^
|
|
38
|
+
"react": "^19.2.0",
|
|
39
|
+
"react-dom": "^19.2.0"
|
|
40
|
+
},
|
|
41
|
+
"exports": {
|
|
42
|
+
".": "./index.ts"
|
|
40
43
|
}
|
|
41
44
|
}
|