@graphcommerce/magento-product-downloadable 10.0.0-canary.68 → 10.0.0
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 +111 -0
- package/components/DownloadsPage/DownloadsPage.tsx +2 -4
- package/copy/pages/downloadable/download/link/id/[id].tsx +1 -4
- package/copy/pages/downloadable/download/linkSample/link_id/[id].tsx +1 -7
- package/copy/pages/downloadable/download/sample/sample_id/[id].tsx +1 -7
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,116 @@
|
|
|
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
|
+
- [#2565](https://github.com/graphcommerce-org/graphcommerce/pull/2565) [`c96dfcd`](https://github.com/graphcommerce-org/graphcommerce/commit/c96dfcdca981baca387c270ad9e2b9515cdd00cc) - Updated to Apollo Client 4 ([@paales](https://github.com/paales))
|
|
84
|
+
|
|
85
|
+
### Minor Changes
|
|
86
|
+
|
|
87
|
+
- [#2493](https://github.com/graphcommerce-org/graphcommerce/pull/2493) [`01ba1a7`](https://github.com/graphcommerce-org/graphcommerce/commit/01ba1a73c86778ea9b34059ec092723b4a56b92b) - Improved Downloadable products functionality:
|
|
88
|
+
|
|
89
|
+
- Account Dashboard Link and Download Page
|
|
90
|
+
- Download samples / linkSamples and links from the backend.
|
|
91
|
+
- CartItem edit functionality for the DownloadableCartItem
|
|
92
|
+
- Dynamic ProductPagePrice for downloadable options ([@paales](https://github.com/paales))
|
|
93
|
+
|
|
94
|
+
### Patch Changes
|
|
95
|
+
|
|
96
|
+
- [#2499](https://github.com/graphcommerce-org/graphcommerce/pull/2499) [`6b2b44c`](https://github.com/graphcommerce-org/graphcommerce/commit/6b2b44ca853279144d7768067f3462d4d4bf0af1) - Implement the Cart options as priceModifiers so the logic can be somewhat re-used for multiple locations ([@paales](https://github.com/paales))
|
|
97
|
+
|
|
98
|
+
- [#2499](https://github.com/graphcommerce-org/graphcommerce/pull/2499) [`2409514`](https://github.com/graphcommerce-org/graphcommerce/commit/240951428ac0bdc11649f4190b6d51c004680b34) - Order/Invoice/CreditMemo and Shipment views ([@paales](https://github.com/paales))
|
|
99
|
+
|
|
100
|
+
- [#2499](https://github.com/graphcommerce-org/graphcommerce/pull/2499) [`ef441bf`](https://github.com/graphcommerce-org/graphcommerce/commit/ef441bf44a23519e395f4b2143465a5e46bf2e7e) - Support for links_purchased_separately and links_title ([@paales](https://github.com/paales))
|
|
101
|
+
|
|
102
|
+
## 10.0.0-canary.72
|
|
103
|
+
|
|
104
|
+
## 10.0.0-canary.71
|
|
105
|
+
|
|
106
|
+
## 10.0.0-canary.70
|
|
107
|
+
|
|
108
|
+
### Major Changes
|
|
109
|
+
|
|
110
|
+
- [#2565](https://github.com/graphcommerce-org/graphcommerce/pull/2565) [`c96dfcd`](https://github.com/graphcommerce-org/graphcommerce/commit/c96dfcdca981baca387c270ad9e2b9515cdd00cc) - Updated to Apollo Client 4 ([@paales](https://github.com/paales))
|
|
111
|
+
|
|
112
|
+
## 10.0.0-canary.69
|
|
113
|
+
|
|
3
114
|
## 10.0.0-canary.68
|
|
4
115
|
|
|
5
116
|
## 10.0.0-canary.67
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ApolloClient
|
|
1
|
+
import type { ApolloClient } from '@graphcommerce/graphql'
|
|
2
2
|
import {
|
|
3
3
|
getCustomerAccountIsDisabled,
|
|
4
4
|
useCustomerQuery,
|
|
@@ -111,9 +111,7 @@ export function DownloadsPage() {
|
|
|
111
111
|
)
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
export function createGetStaticProps(
|
|
115
|
-
client: ApolloClient<NormalizedCacheObject>,
|
|
116
|
-
): DownloadsGetStaticProps {
|
|
114
|
+
export function createGetStaticProps(client: ApolloClient): DownloadsGetStaticProps {
|
|
117
115
|
return async (context) => {
|
|
118
116
|
if (getCustomerAccountIsDisabled(context.locale)) return { notFound: true }
|
|
119
117
|
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
// managed by: graphcommerce
|
|
2
|
-
// to modify this file, change it to managed by: local
|
|
3
|
-
|
|
4
1
|
import type { PageOptions } from '@graphcommerce/framer-next-pages'
|
|
5
2
|
import { cacheFirst } from '@graphcommerce/graphql'
|
|
6
3
|
import { StoreConfigDocument } from '@graphcommerce/magento-store'
|
|
@@ -47,7 +44,7 @@ export const getServerSideProps: GetServerSideProps<Props & LayoutNavigationProp
|
|
|
47
44
|
const staticClient = graphqlSsrClient(context)
|
|
48
45
|
const conf = await staticClient.query({ query: StoreConfigDocument })
|
|
49
46
|
|
|
50
|
-
const baseUrl = conf.data
|
|
47
|
+
const baseUrl = conf.data?.storeConfig?.secure_base_url
|
|
51
48
|
if (!baseUrl) return { notFound: true }
|
|
52
49
|
|
|
53
50
|
const downloadUrl = new URL(baseUrl)
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
// managed by: graphcommerce
|
|
2
|
-
// to modify this file, change it to managed by: local
|
|
3
|
-
|
|
4
|
-
// managed by: graphcommerce
|
|
5
|
-
// to modify this file, change it to managed by: local
|
|
6
|
-
|
|
7
1
|
import type { PageOptions } from '@graphcommerce/framer-next-pages'
|
|
8
2
|
import { cacheFirst } from '@graphcommerce/graphql'
|
|
9
3
|
import { StoreConfigDocument } from '@graphcommerce/magento-store'
|
|
@@ -50,7 +44,7 @@ export const getServerSideProps: GetServerSideProps<Props & LayoutNavigationProp
|
|
|
50
44
|
const staticClient = graphqlSsrClient(context)
|
|
51
45
|
const conf = await staticClient.query({ query: StoreConfigDocument })
|
|
52
46
|
|
|
53
|
-
const baseUrl = conf.data
|
|
47
|
+
const baseUrl = conf.data?.storeConfig?.secure_base_url
|
|
54
48
|
if (!baseUrl) return { notFound: true }
|
|
55
49
|
|
|
56
50
|
const downloadUrl = new URL(baseUrl)
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
// managed by: graphcommerce
|
|
2
|
-
// to modify this file, change it to managed by: local
|
|
3
|
-
|
|
4
|
-
// managed by: graphcommerce
|
|
5
|
-
// to modify this file, change it to managed by: local
|
|
6
|
-
|
|
7
1
|
import type { PageOptions } from '@graphcommerce/framer-next-pages'
|
|
8
2
|
import { cacheFirst } from '@graphcommerce/graphql'
|
|
9
3
|
import { StoreConfigDocument } from '@graphcommerce/magento-store'
|
|
@@ -50,7 +44,7 @@ export const getServerSideProps: GetServerSideProps<Props & LayoutNavigationProp
|
|
|
50
44
|
const staticClient = graphqlSsrClient(context)
|
|
51
45
|
const conf = await staticClient.query({ query: StoreConfigDocument })
|
|
52
46
|
|
|
53
|
-
const baseUrl = conf.data
|
|
47
|
+
const baseUrl = conf.data?.storeConfig?.secure_base_url
|
|
54
48
|
if (!baseUrl) return { notFound: true }
|
|
55
49
|
|
|
56
50
|
const downloadUrl = new URL(baseUrl)
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@graphcommerce/magento-product-downloadable",
|
|
3
3
|
"homepage": "https://www.graphcommerce.org/",
|
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce",
|
|
5
|
-
"version": "10.0.0
|
|
5
|
+
"version": "10.0.0",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
8
8
|
"eslintConfig": {
|
|
@@ -12,17 +12,17 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"@graphcommerce/ecommerce-ui": "^10.0.0
|
|
16
|
-
"@graphcommerce/eslint-config-pwa": "^10.0.0
|
|
17
|
-
"@graphcommerce/graphql": "^10.0.0
|
|
18
|
-
"@graphcommerce/magento-cart": "^10.0.0
|
|
19
|
-
"@graphcommerce/magento-cart-items": "^10.0.0
|
|
20
|
-
"@graphcommerce/magento-customer": "^10.0.0
|
|
21
|
-
"@graphcommerce/magento-product": "^10.0.0
|
|
22
|
-
"@graphcommerce/magento-store": "^10.0.0
|
|
23
|
-
"@graphcommerce/next-ui": "^10.0.0
|
|
24
|
-
"@graphcommerce/prettier-config-pwa": "^10.0.0
|
|
25
|
-
"@graphcommerce/typescript-config-pwa": "^10.0.0
|
|
15
|
+
"@graphcommerce/ecommerce-ui": "^10.0.0",
|
|
16
|
+
"@graphcommerce/eslint-config-pwa": "^10.0.0",
|
|
17
|
+
"@graphcommerce/graphql": "^10.0.0",
|
|
18
|
+
"@graphcommerce/magento-cart": "^10.0.0",
|
|
19
|
+
"@graphcommerce/magento-cart-items": "^10.0.0",
|
|
20
|
+
"@graphcommerce/magento-customer": "^10.0.0",
|
|
21
|
+
"@graphcommerce/magento-product": "^10.0.0",
|
|
22
|
+
"@graphcommerce/magento-store": "^10.0.0",
|
|
23
|
+
"@graphcommerce/next-ui": "^10.0.0",
|
|
24
|
+
"@graphcommerce/prettier-config-pwa": "^10.0.0",
|
|
25
|
+
"@graphcommerce/typescript-config-pwa": "^10.0.0",
|
|
26
26
|
"@lingui/core": "^5",
|
|
27
27
|
"@lingui/macro": "^5",
|
|
28
28
|
"@lingui/react": "^5",
|