@graphcommerce/demo-magento-graphcommerce 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
|
# @graphcommerce/demo-magento-graphcommerce
|
|
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
|
|
@@ -3,7 +3,7 @@ import { cacheFirst } from '@graphcommerce/graphql'
|
|
|
3
3
|
import { StoreConfigDocument } from '@graphcommerce/magento-store'
|
|
4
4
|
import type { GetStaticProps } from '@graphcommerce/next-ui'
|
|
5
5
|
import { LayoutTitle } from '@graphcommerce/next-ui'
|
|
6
|
-
import {
|
|
6
|
+
import { t } from '@lingui/core/macro'
|
|
7
7
|
import { Container, Divider, Link } from '@mui/material'
|
|
8
8
|
import type { GetStaticPaths } from 'next'
|
|
9
9
|
import type { LayoutNavigationProps } from '../../components'
|
|
@@ -76,7 +76,7 @@ export const getStaticProps: GetPageStaticProps = async (context) => {
|
|
|
76
76
|
return {
|
|
77
77
|
props: {
|
|
78
78
|
url,
|
|
79
|
-
up: url !== 'index' ? { href: '/', title:
|
|
79
|
+
up: url !== 'index' ? { href: '/', title: t`Home` } : null,
|
|
80
80
|
...(await layout).data,
|
|
81
81
|
apolloState: await conf.then(() => client.cache.extract()),
|
|
82
82
|
},
|
|
@@ -4,7 +4,7 @@ import { ProductListDocument } from '@graphcommerce/magento-product'
|
|
|
4
4
|
import { StoreConfigDocument } from '@graphcommerce/magento-store'
|
|
5
5
|
import type { GetStaticProps } from '@graphcommerce/next-ui'
|
|
6
6
|
import { LayoutHeader, LayoutTitle, SidebarGallery } from '@graphcommerce/next-ui'
|
|
7
|
-
import {
|
|
7
|
+
import { t } from '@lingui/core/macro'
|
|
8
8
|
import type { LayoutNavigationProps } from '../../components'
|
|
9
9
|
import { LayoutNavigation } from '../../components'
|
|
10
10
|
import { graphqlSharedClient, graphqlSsrClient } from '../../lib/graphql/graphqlSsrClient'
|
|
@@ -101,7 +101,7 @@ export const getStaticProps: GetPageStaticProps = async (context) => {
|
|
|
101
101
|
return {
|
|
102
102
|
props: {
|
|
103
103
|
...(await productList).data,
|
|
104
|
-
up: { href: '/', title:
|
|
104
|
+
up: { href: '/', title: t`Home` },
|
|
105
105
|
apolloState: await conf.then(() => client.cache.extract()),
|
|
106
106
|
},
|
|
107
107
|
}
|
|
@@ -2,8 +2,8 @@ import type { PageOptions } from '@graphcommerce/framer-next-pages'
|
|
|
2
2
|
import { cacheFirst } from '@graphcommerce/graphql'
|
|
3
3
|
import { StoreConfigDocument } from '@graphcommerce/magento-store'
|
|
4
4
|
import { LayoutHeader, LayoutTitle } from '@graphcommerce/next-ui'
|
|
5
|
-
import type { GetStaticProps } from '@graphcommerce/next-ui
|
|
6
|
-
import {
|
|
5
|
+
import type { GetStaticProps } from '@graphcommerce/next-ui'
|
|
6
|
+
import { t } from '@lingui/core/macro'
|
|
7
7
|
import { Container, Typography } from '@mui/material'
|
|
8
8
|
import { useEffect, useRef, useState } from 'react'
|
|
9
9
|
import type { LayoutMinimalProps } from '../../components'
|
|
@@ -129,7 +129,7 @@ export const getStaticProps: GetPageStaticProps = async (context) => {
|
|
|
129
129
|
return {
|
|
130
130
|
props: {
|
|
131
131
|
...(await layout).data,
|
|
132
|
-
up: { href: '/', title:
|
|
132
|
+
up: { href: '/', title: t`Home` },
|
|
133
133
|
apolloState: await conf.then(() => client.cache.extract()),
|
|
134
134
|
},
|
|
135
135
|
}
|
package/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {}
|
package/package.json
CHANGED
|
@@ -2,11 +2,17 @@
|
|
|
2
2
|
"name": "@graphcommerce/demo-magento-graphcommerce",
|
|
3
3
|
"homepage": "https://www.graphcommerce.org/",
|
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce",
|
|
5
|
-
"version": "
|
|
5
|
+
"version": "10.0.0-canary.56",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"scripts": {
|
|
8
8
|
"dev": "tsc -W"
|
|
9
9
|
},
|
|
10
|
+
"exports": {
|
|
11
|
+
".": "./index.ts",
|
|
12
|
+
"./plugins/demo/DemoRowLinks": "./plugins/demo/DemoRowLinks.tsx",
|
|
13
|
+
"./plugins/demo/DemoProductListItemConfigurable": "./plugins/demo/DemoProductListItemConfigurable.tsx",
|
|
14
|
+
"./plugins/demo/DemoRecentlyViewedProducts": "./plugins/demo/DemoRecentlyViewedProducts.tsx"
|
|
15
|
+
},
|
|
10
16
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
11
17
|
"eslintConfig": {
|
|
12
18
|
"extends": "@graphcommerce/eslint-config-pwa",
|
|
@@ -15,18 +21,18 @@
|
|
|
15
21
|
}
|
|
16
22
|
},
|
|
17
23
|
"peerDependencies": {
|
|
18
|
-
"@graphcommerce/eslint-config-pwa": "^
|
|
19
|
-
"@graphcommerce/framer-scroller": "^
|
|
20
|
-
"@graphcommerce/magento-product": "^
|
|
21
|
-
"@graphcommerce/magento-product-configurable": "^
|
|
22
|
-
"@graphcommerce/magento-recently-viewed-products": "^
|
|
23
|
-
"@graphcommerce/next-ui": "^
|
|
24
|
-
"@graphcommerce/prettier-config-pwa": "^
|
|
25
|
-
"@graphcommerce/typescript-config-pwa": "^
|
|
24
|
+
"@graphcommerce/eslint-config-pwa": "^10.0.0-canary.56",
|
|
25
|
+
"@graphcommerce/framer-scroller": "^10.0.0-canary.56",
|
|
26
|
+
"@graphcommerce/magento-product": "^10.0.0-canary.56",
|
|
27
|
+
"@graphcommerce/magento-product-configurable": "^10.0.0-canary.56",
|
|
28
|
+
"@graphcommerce/magento-recently-viewed-products": "^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/typescript-config-pwa": "^10.0.0-canary.56",
|
|
26
32
|
"@mui/material": "^5.10.16",
|
|
27
33
|
"framer-motion": "^11.0.0",
|
|
28
34
|
"next": "*",
|
|
29
|
-
"react": "^
|
|
30
|
-
"react-dom": "^
|
|
35
|
+
"react": "^19.2.0",
|
|
36
|
+
"react-dom": "^19.2.0"
|
|
31
37
|
}
|
|
32
38
|
}
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
type RecentlyViewedProductsProps,
|
|
7
7
|
} from '@graphcommerce/magento-recently-viewed-products'
|
|
8
8
|
import type { PluginConfig, PluginProps } from '@graphcommerce/next-config'
|
|
9
|
+
import { recentlyViewedProducts } from '@graphcommerce/next-config/config'
|
|
9
10
|
import {
|
|
10
11
|
filterNonNullableKeys,
|
|
11
12
|
RenderType,
|
|
@@ -34,7 +35,7 @@ export function RecentlyViewedProducts(props: PluginProps<RecentlyViewedProducts
|
|
|
34
35
|
})
|
|
35
36
|
|
|
36
37
|
if (
|
|
37
|
-
!
|
|
38
|
+
!recentlyViewedProducts?.enabled ||
|
|
38
39
|
(!productList.loading && !productList.products.length && isInView)
|
|
39
40
|
) {
|
|
40
41
|
return null
|