@graphcommerce/magento-wishlist 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
  # @graphcommerce/magento-wishlist
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
@@ -1,4 +1,5 @@
1
1
  import type { ProductListItemFragment } from '@graphcommerce/magento-product'
2
+ import { wishlistShowFeedbackMessage } from '@graphcommerce/next-config/config'
2
3
  import type { IconSvgProps } from '@graphcommerce/next-ui'
3
4
  import {
4
5
  extendableComponent,
@@ -7,8 +8,8 @@ import {
7
8
  IconSvg,
8
9
  MessageSnackbar,
9
10
  } from '@graphcommerce/next-ui'
10
- import { i18n } from '@lingui/core'
11
- import { Trans } from '@lingui/react'
11
+ import { t } from '@lingui/core/macro'
12
+ import { Trans } from '@lingui/react/macro'
12
13
  import type { IconButtonProps, SxProps, Theme } from '@mui/material'
13
14
  import { Box, Button, IconButton } from '@mui/material'
14
15
  import React from 'react'
@@ -42,12 +43,8 @@ export const ProductWishlistIconButton = React.memo<ProductWishlistChipProps>((p
42
43
  className={classes.wishlistButton}
43
44
  {...buttonProps}
44
45
  sx={[(theme) => ({ padding: theme.spacings.xxs }), ...(Array.isArray(sx) ? sx : [sx])]}
45
- title={
46
- current ? i18n._(/* i18n */ 'Remove from wishlist') : i18n._(/* i18n */ 'Add to wishlist')
47
- }
48
- aria-label={
49
- current ? i18n._(/* i18n */ 'Remove from wishlist') : i18n._(/* i18n */ 'Add to wishlist')
50
- }
46
+ title={current ? t`Remove from wishlist` : t`Add to wishlist`}
47
+ aria-label={current ? t`Remove from wishlist` : t`Add to wishlist`}
51
48
  >
52
49
  {current ? (
53
50
  <IconSvg
@@ -80,7 +77,7 @@ export const ProductWishlistIconButton = React.memo<ProductWishlistChipProps>((p
80
77
  )}
81
78
  </IconButton>
82
79
 
83
- {import.meta.graphCommerce.wishlistShowFeedbackMessage && (
80
+ {wishlistShowFeedbackMessage && (
84
81
  <MessageSnackbar
85
82
  open={showSuccess}
86
83
  onClose={hideShowSuccess}
@@ -98,15 +95,13 @@ export const ProductWishlistIconButton = React.memo<ProductWishlistChipProps>((p
98
95
  color='secondary'
99
96
  endIcon={<IconSvg src={iconChevronRight} />}
100
97
  >
101
- <Trans id='View wishlist' />
98
+ <Trans>View wishlist</Trans>
102
99
  </Button>
103
100
  }
104
101
  >
105
- <Trans
106
- id='<0>{name}</0> has been added to your wishlist!'
107
- components={{ 0: <strong /> }}
108
- values={{ name: product.name }}
109
- />
102
+ <Trans>
103
+ <strong>{product.name}</strong> has been added to your wishlist!
104
+ </Trans>
110
105
  </MessageSnackbar>
111
106
  )}
112
107
  </Box>
@@ -1,5 +1,5 @@
1
1
  import { DesktopHeaderBadge, extendableComponent, iconHeart, IconSvg } from '@graphcommerce/next-ui'
2
- import { i18n } from '@lingui/core'
2
+ import { t } from '@lingui/core/macro'
3
3
  import type { BadgeProps, FabProps as FabPropsType, SxProps, Theme } from '@mui/material'
4
4
  import { Fab } from '@mui/material'
5
5
  import React from 'react'
@@ -27,7 +27,7 @@ function WishlistFabContent(props: WishlistFabContentProps) {
27
27
  href='/wishlist'
28
28
  color='inherit'
29
29
  data-test-id='wishlist-fab'
30
- aria-label={i18n._(/* i18n */ 'Wishlist')}
30
+ aria-label={t`Wishlist`}
31
31
  size='large'
32
32
  className={classes.root}
33
33
  {...FabProps}
@@ -1,7 +1,7 @@
1
1
  import { productLink } from '@graphcommerce/magento-product/hooks/useProductLink'
2
2
  import { type WishlistItemActionCardProps } from '@graphcommerce/magento-wishlist'
3
3
  import { iconChevronRight, IconSvg, nonNullable } from '@graphcommerce/next-ui'
4
- import { Trans } from '@lingui/react'
4
+ import { Trans } from '@lingui/react/macro'
5
5
  import { Button } from '@mui/material'
6
6
  import { AddWishlistItemToCart } from '../WishlistItem/AddWishlistItemToCart'
7
7
 
@@ -36,7 +36,7 @@ export function ConfigurableWishlistItemAction(props: ConfigurableWishlistItemAc
36
36
  href={`${productLink(product)}?wishlistItemId=${id}`}
37
37
  endIcon={<IconSvg src={iconChevronRight} />}
38
38
  >
39
- <Trans id='Configure' />
39
+ <Trans>Configure</Trans>
40
40
  </Button>
41
41
  ) : (
42
42
  <AddWishlistItemToCart product={product} selectedOptions={selectedOptions} />
@@ -4,7 +4,7 @@ import { AddProductsToCartForm, useProductLink } from '@graphcommerce/magento-pr
4
4
  import { Money } from '@graphcommerce/magento-store'
5
5
  import type { ActionCardProps } from '@graphcommerce/next-ui'
6
6
  import { ActionCard, actionCardImageSizes, extendableComponent } from '@graphcommerce/next-ui'
7
- import { Trans } from '@lingui/react'
7
+ import { Trans } from '@lingui/react/macro'
8
8
  import type { ButtonProps, SxProps, Theme } from '@mui/material'
9
9
  import { Button, Link } from '@mui/material'
10
10
  import type { ReactNode } from 'react'
@@ -173,7 +173,7 @@ export function WishlistItemActionCard(props: WishlistItemActionCardProps) {
173
173
  onClick={() => remove([id])}
174
174
  {...actionButtonProps}
175
175
  >
176
- <Trans id='Remove' />
176
+ <Trans>Remove</Trans>
177
177
  </Button>
178
178
  }
179
179
  size={size}
@@ -1,8 +1,9 @@
1
1
  import { useQuery } from '@graphcommerce/graphql'
2
2
  import { useCustomerSession } from '@graphcommerce/magento-customer'
3
3
  import { StoreConfigDocument } from '@graphcommerce/magento-store'
4
+ import { wishlistHideForGuests } from '@graphcommerce/next-config/config'
4
5
 
5
- const showForGuest = !import.meta.graphCommerce.wishlistHideForGuests
6
+ const showForGuest = !wishlistHideForGuests
6
7
 
7
8
  /**
8
9
  * Checks whether the wishlist is enabled.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphcommerce/magento-wishlist",
3
- "version": "9.1.0-canary.55",
3
+ "version": "10.0.0-canary.57",
4
4
  "sideEffects": false,
5
5
  "prettier": "@graphcommerce/prettier-config-pwa",
6
6
  "browserslist": [
@@ -13,27 +13,33 @@
13
13
  }
14
14
  },
15
15
  "peerDependencies": {
16
- "@graphcommerce/ecommerce-ui": "^9.1.0-canary.55",
17
- "@graphcommerce/eslint-config-pwa": "^9.1.0-canary.55",
18
- "@graphcommerce/graphql": "^9.1.0-canary.55",
19
- "@graphcommerce/graphql-mesh": "^9.1.0-canary.55",
20
- "@graphcommerce/image": "^9.1.0-canary.55",
21
- "@graphcommerce/magento-cart": "^9.1.0-canary.55",
22
- "@graphcommerce/magento-customer": "^9.1.0-canary.55",
23
- "@graphcommerce/magento-product": "^9.1.0-canary.55",
24
- "@graphcommerce/magento-product-configurable": "^9.1.0-canary.55",
25
- "@graphcommerce/magento-store": "^9.1.0-canary.55",
26
- "@graphcommerce/next-config": "^9.1.0-canary.55",
27
- "@graphcommerce/next-ui": "^9.1.0-canary.55",
28
- "@graphcommerce/prettier-config-pwa": "^9.1.0-canary.55",
29
- "@graphcommerce/typescript-config-pwa": "^9.1.0-canary.55",
30
- "@lingui/core": "^4.2.1",
31
- "@lingui/macro": "^4.2.1",
32
- "@lingui/react": "^4.2.1",
16
+ "@graphcommerce/ecommerce-ui": "^10.0.0-canary.57",
17
+ "@graphcommerce/eslint-config-pwa": "^10.0.0-canary.57",
18
+ "@graphcommerce/graphql": "^10.0.0-canary.57",
19
+ "@graphcommerce/graphql-mesh": "^10.0.0-canary.57",
20
+ "@graphcommerce/image": "^10.0.0-canary.57",
21
+ "@graphcommerce/magento-cart": "^10.0.0-canary.57",
22
+ "@graphcommerce/magento-customer": "^10.0.0-canary.57",
23
+ "@graphcommerce/magento-product": "^10.0.0-canary.57",
24
+ "@graphcommerce/magento-product-configurable": "^10.0.0-canary.57",
25
+ "@graphcommerce/magento-store": "^10.0.0-canary.57",
26
+ "@graphcommerce/next-config": "^10.0.0-canary.57",
27
+ "@graphcommerce/next-ui": "^10.0.0-canary.57",
28
+ "@graphcommerce/prettier-config-pwa": "^10.0.0-canary.57",
29
+ "@graphcommerce/typescript-config-pwa": "^10.0.0-canary.57",
30
+ "@lingui/core": "^5",
31
+ "@lingui/macro": "^5",
32
+ "@lingui/react": "^5",
33
33
  "@mui/material": "^5.10.16",
34
34
  "framer-motion": "^11.0.0",
35
35
  "next": "*",
36
- "react": "^18.2.0",
37
- "react-dom": "^18.2.0"
36
+ "react": "^19.2.0",
37
+ "react-dom": "^19.2.0"
38
+ },
39
+ "exports": {
40
+ ".": "./index.ts",
41
+ "./plugins/WishlistProductAddToCartFormPlugin": "./plugins/WishlistProductAddToCartFormPlugin.tsx",
42
+ "./plugins/BundleWishlistItemActionCard": "./plugins/BundleWishlistItemActionCard.tsx",
43
+ "./plugins/ConfigurableWishlistItemActionCard": "./plugins/ConfigurableWishlistItemActionCard.tsx"
38
44
  }
39
45
  }
@@ -2,7 +2,7 @@ import { productLink } from '@graphcommerce/magento-product/hooks/useProductLink
2
2
  import type { WishlistItemActionCardProps } from '@graphcommerce/magento-wishlist'
3
3
  import type { PluginConfig, PluginProps } from '@graphcommerce/next-config'
4
4
  import { iconChevronRight, IconSvg } from '@graphcommerce/next-ui'
5
- import { Trans } from '@lingui/react'
5
+ import { Trans } from '@lingui/react/macro'
6
6
  import { Button } from '@mui/material'
7
7
 
8
8
  export const config: PluginConfig = {
@@ -27,7 +27,7 @@ export function WishlistItemActionCard(props: PluginProps<WishlistItemActionCard
27
27
  href={productLink(product)}
28
28
  endIcon={<IconSvg src={iconChevronRight} />}
29
29
  >
30
- <Trans id='Configure' />
30
+ <Trans>Configure</Trans>
31
31
  </Button>
32
32
  }
33
33
  />