@graphcommerce/magento-store 7.0.0-canary.21 → 7.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
CHANGED
|
@@ -1,6 +1,190 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
## 7.0.0
|
|
3
|
+
## 7.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [`e55d8c390`](https://github.com/graphcommerce-org/graphcommerce/commit/e55d8c390d90b4bb7bab11c6a99027ac72bd7e3e) - Created a new sidebar layout system, can be configured with productFiltersLayout in the graphcommerce.config.js ([@paales](https://github.com/paales))
|
|
8
|
+
|
|
9
|
+
### Minor Changes
|
|
10
|
+
|
|
11
|
+
- [#1961](https://github.com/graphcommerce-org/graphcommerce/pull/1961) [`4a759c662`](https://github.com/graphcommerce-org/graphcommerce/commit/4a759c66215eaa69edc342b898e05e8f92c3ba9a) - Add Open Graph meta tags to all pages ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#1914](https://github.com/graphcommerce-org/graphcommerce/pull/1914) [`c237f2f2c`](https://github.com/graphcommerce-org/graphcommerce/commit/c237f2f2c87d9e3c8aefc536a13b5b9203556f27) - Category pages now have the ability to select the displayed pageSize of a page if the backend provides multiple options. A non-default pageSize and a non-default sort option will now receive noindex meta tags when viewed. ([@paales](https://github.com/paales))
|
|
16
|
+
|
|
17
|
+
- [#1967](https://github.com/graphcommerce-org/graphcommerce/pull/1967) [`888fe88e6`](https://github.com/graphcommerce-org/graphcommerce/commit/888fe88e644d94621d54a268dbaafc7ff5467c93) - Fix bug where product urls ending with a suffix would not be redirected ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
|
|
18
|
+
|
|
19
|
+
- [#1915](https://github.com/graphcommerce-org/graphcommerce/pull/1915) [`f4a8c3881`](https://github.com/graphcommerce-org/graphcommerce/commit/f4a8c388183e17c52e7f66536c5448749f494d7f) - Moved the injection of the links to plugins ([@paales](https://github.com/paales))
|
|
20
|
+
|
|
21
|
+
## 6.2.0-canary.98
|
|
22
|
+
|
|
23
|
+
## 6.2.0-canary.97
|
|
24
|
+
|
|
25
|
+
## 6.2.0-canary.96
|
|
26
|
+
|
|
27
|
+
## 6.2.0-canary.95
|
|
28
|
+
|
|
29
|
+
## 6.2.0-canary.94
|
|
30
|
+
|
|
31
|
+
## 6.2.0-canary.93
|
|
32
|
+
|
|
33
|
+
## 6.2.0-canary.92
|
|
34
|
+
|
|
35
|
+
## 6.2.0-canary.91
|
|
36
|
+
|
|
37
|
+
## 6.2.0-canary.90
|
|
38
|
+
|
|
39
|
+
## 6.2.0-canary.89
|
|
40
|
+
|
|
41
|
+
## 6.2.0-canary.88
|
|
42
|
+
|
|
43
|
+
## 6.2.0-canary.87
|
|
44
|
+
|
|
45
|
+
## 6.2.0-canary.86
|
|
46
|
+
|
|
47
|
+
## 6.2.0-canary.85
|
|
48
|
+
|
|
49
|
+
## 6.2.0-canary.84
|
|
50
|
+
|
|
51
|
+
## 6.2.0-canary.83
|
|
52
|
+
|
|
53
|
+
## 6.2.0-canary.82
|
|
54
|
+
|
|
55
|
+
## 6.2.0-canary.81
|
|
56
|
+
|
|
57
|
+
## 6.2.0-canary.80
|
|
58
|
+
|
|
59
|
+
## 6.2.0-canary.79
|
|
60
|
+
|
|
61
|
+
## 6.2.0-canary.78
|
|
62
|
+
|
|
63
|
+
## 6.2.0-canary.77
|
|
64
|
+
|
|
65
|
+
## 6.2.0-canary.76
|
|
66
|
+
|
|
67
|
+
## 6.2.0-canary.75
|
|
68
|
+
|
|
69
|
+
## 6.2.0-canary.74
|
|
70
|
+
|
|
71
|
+
## 6.2.0-canary.73
|
|
72
|
+
|
|
73
|
+
## 6.2.0-canary.72
|
|
74
|
+
|
|
75
|
+
## 6.2.0-canary.71
|
|
76
|
+
|
|
77
|
+
## 6.2.0-canary.70
|
|
78
|
+
|
|
79
|
+
## 6.2.0-canary.69
|
|
80
|
+
|
|
81
|
+
## 6.2.0-canary.68
|
|
82
|
+
|
|
83
|
+
## 6.2.0-canary.67
|
|
84
|
+
|
|
85
|
+
## 6.2.0-canary.66
|
|
86
|
+
|
|
87
|
+
## 6.2.0-canary.65
|
|
88
|
+
|
|
89
|
+
## 6.2.0-canary.64
|
|
90
|
+
|
|
91
|
+
## 6.2.0-canary.63
|
|
92
|
+
|
|
93
|
+
## 6.2.0-canary.62
|
|
94
|
+
|
|
95
|
+
## 6.2.0-canary.61
|
|
96
|
+
|
|
97
|
+
## 6.2.0-canary.60
|
|
98
|
+
|
|
99
|
+
## 6.2.0-canary.59
|
|
100
|
+
|
|
101
|
+
## 6.2.0-canary.58
|
|
102
|
+
|
|
103
|
+
## 6.2.0-canary.57
|
|
104
|
+
|
|
105
|
+
## 6.2.0-canary.56
|
|
106
|
+
|
|
107
|
+
## 6.2.0-canary.55
|
|
108
|
+
|
|
109
|
+
### Patch Changes
|
|
110
|
+
|
|
111
|
+
- [#1967](https://github.com/graphcommerce-org/graphcommerce/pull/1967) [`888fe88e6`](https://github.com/graphcommerce-org/graphcommerce/commit/888fe88e644d94621d54a268dbaafc7ff5467c93) - Fix bug where product urls ending with a suffix would not be redirected ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
|
|
112
|
+
|
|
113
|
+
## 6.2.0-canary.54
|
|
114
|
+
|
|
115
|
+
## 6.2.0-canary.53
|
|
116
|
+
|
|
117
|
+
## 6.2.0-canary.52
|
|
118
|
+
|
|
119
|
+
## 6.2.0-canary.51
|
|
120
|
+
|
|
121
|
+
## 6.2.0-canary.50
|
|
122
|
+
|
|
123
|
+
### Minor Changes
|
|
124
|
+
|
|
125
|
+
- [`e55d8c390`](https://github.com/graphcommerce-org/graphcommerce/commit/e55d8c390d90b4bb7bab11c6a99027ac72bd7e3e) - Created a new sidebar layout system, can be configured with productFiltersLayout in the graphcommerce.config.js ([@paales](https://github.com/paales))
|
|
126
|
+
|
|
127
|
+
## 6.2.0-canary.49
|
|
128
|
+
|
|
129
|
+
## 6.2.0-canary.48
|
|
130
|
+
|
|
131
|
+
### Minor Changes
|
|
132
|
+
|
|
133
|
+
- [#1961](https://github.com/graphcommerce-org/graphcommerce/pull/1961) [`4a759c662`](https://github.com/graphcommerce-org/graphcommerce/commit/4a759c66215eaa69edc342b898e05e8f92c3ba9a) - Add Open Graph meta tags to all pages ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
|
|
134
|
+
|
|
135
|
+
## 6.2.0-canary.47
|
|
136
|
+
|
|
137
|
+
## 6.2.0-canary.46
|
|
138
|
+
|
|
139
|
+
## 6.2.0-canary.45
|
|
140
|
+
|
|
141
|
+
## 6.2.0-canary.44
|
|
142
|
+
|
|
143
|
+
## 6.2.0-canary.43
|
|
144
|
+
|
|
145
|
+
## 6.2.0-canary.42
|
|
146
|
+
|
|
147
|
+
## 6.2.0-canary.41
|
|
148
|
+
|
|
149
|
+
## 6.2.0-canary.40
|
|
150
|
+
|
|
151
|
+
## 6.2.0-canary.39
|
|
152
|
+
|
|
153
|
+
## 6.2.0-canary.38
|
|
154
|
+
|
|
155
|
+
## 6.2.0-canary.37
|
|
156
|
+
|
|
157
|
+
## 6.2.0-canary.36
|
|
158
|
+
|
|
159
|
+
## 6.2.0-canary.35
|
|
160
|
+
|
|
161
|
+
## 6.2.0-canary.34
|
|
162
|
+
|
|
163
|
+
## 6.2.0-canary.33
|
|
164
|
+
|
|
165
|
+
## 6.2.0-canary.32
|
|
166
|
+
|
|
167
|
+
## 6.2.0-canary.31
|
|
168
|
+
|
|
169
|
+
## 6.2.0-canary.30
|
|
170
|
+
|
|
171
|
+
## 6.2.0-canary.29
|
|
172
|
+
|
|
173
|
+
## 6.2.0-canary.28
|
|
174
|
+
|
|
175
|
+
## 6.2.0-canary.27
|
|
176
|
+
|
|
177
|
+
## 6.2.0-canary.26
|
|
178
|
+
|
|
179
|
+
## 6.2.0-canary.25
|
|
180
|
+
|
|
181
|
+
## 6.2.0-canary.24
|
|
182
|
+
|
|
183
|
+
## 6.2.0-canary.23
|
|
184
|
+
|
|
185
|
+
## 6.2.0-canary.22
|
|
186
|
+
|
|
187
|
+
## 6.2.0-canary.21
|
|
4
188
|
|
|
5
189
|
## 6.2.0-canary.20
|
|
6
190
|
|
package/PageMeta.tsx
CHANGED
|
@@ -5,10 +5,7 @@ import {
|
|
|
5
5
|
} from '@graphcommerce/next-ui'
|
|
6
6
|
import { StoreConfigDocument } from './StoreConfig.gql'
|
|
7
7
|
|
|
8
|
-
type PageMetaProps =
|
|
9
|
-
NextPageMetaProps,
|
|
10
|
-
'title' | 'metaDescription' | 'metaRobots' | 'children'
|
|
11
|
-
> & {
|
|
8
|
+
type PageMetaProps = Omit<NextPageMetaProps, 'canonical'> & {
|
|
12
9
|
canonical?: string
|
|
13
10
|
}
|
|
14
11
|
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@graphcommerce/magento-store",
|
|
3
3
|
"homepage": "https://www.graphcommerce.org/",
|
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce",
|
|
5
|
-
"version": "7.0.0
|
|
5
|
+
"version": "7.0.0",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
8
8
|
"eslintConfig": {
|
|
@@ -12,19 +12,20 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@graphcommerce/eslint-config-pwa": "7.0.0
|
|
16
|
-
"@graphcommerce/prettier-config-pwa": "7.0.0
|
|
17
|
-
"@graphcommerce/typescript-config-pwa": "7.0.0
|
|
15
|
+
"@graphcommerce/eslint-config-pwa": "7.0.0",
|
|
16
|
+
"@graphcommerce/prettier-config-pwa": "7.0.0",
|
|
17
|
+
"@graphcommerce/typescript-config-pwa": "7.0.0"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@graphcommerce/graphql": "7.0.0
|
|
21
|
-
"@graphcommerce/graphql-mesh": "7.0.0
|
|
22
|
-
"@graphcommerce/image": "7.0.0
|
|
23
|
-
"@graphcommerce/next-ui": "7.0.0
|
|
20
|
+
"@graphcommerce/graphql": "7.0.0",
|
|
21
|
+
"@graphcommerce/graphql-mesh": "7.0.0",
|
|
22
|
+
"@graphcommerce/image": "7.0.0",
|
|
23
|
+
"@graphcommerce/next-ui": "7.0.0"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
|
-
"@lingui/react": "^
|
|
27
|
-
"@lingui/core": "^
|
|
26
|
+
"@lingui/react": "^4.2.1",
|
|
27
|
+
"@lingui/core": "^4.2.1",
|
|
28
|
+
"@lingui/macro": "^4.2.1",
|
|
28
29
|
"@mui/material": "^5.10.16",
|
|
29
30
|
"next": "^13.2.0",
|
|
30
31
|
"react": "^18.2.0",
|
|
@@ -5,10 +5,9 @@ import { createStoreLink } from '../link/createStoreLink'
|
|
|
5
5
|
export const func = 'graphqlConfig'
|
|
6
6
|
export const exported = '@graphcommerce/graphql/config'
|
|
7
7
|
|
|
8
|
-
const magentoStoreGraphqlConfig: MethodPlugin<typeof graphqlConfig> = (prev, config) =>
|
|
9
|
-
prev(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
})
|
|
8
|
+
const magentoStoreGraphqlConfig: MethodPlugin<typeof graphqlConfig> = (prev, config) => {
|
|
9
|
+
const results = prev(config)
|
|
10
|
+
return { ...results, links: [...results.links, createStoreLink(config.storefront.locale)] }
|
|
11
|
+
}
|
|
13
12
|
|
|
14
13
|
export const plugin = magentoStoreGraphqlConfig
|
|
@@ -9,7 +9,7 @@ import { nonNullable, isTypename } from '@graphcommerce/next-ui'
|
|
|
9
9
|
import { Redirect } from 'next'
|
|
10
10
|
import { StoreConfigQuery } from '../StoreConfig.gql'
|
|
11
11
|
import { defaultLocale } from '../localeToStore'
|
|
12
|
-
import { HandleRedirectDocument } from './HandleRedirect.gql'
|
|
12
|
+
import { HandleRedirectDocument, HandleRedirectQuery } from './HandleRedirect.gql'
|
|
13
13
|
|
|
14
14
|
export type RedirectOr404Return = Promise<
|
|
15
15
|
| { redirect: Redirect; revalidate?: number | boolean }
|
|
@@ -18,6 +18,7 @@ export type RedirectOr404Return = Promise<
|
|
|
18
18
|
|
|
19
19
|
const notFound = (from: string, reason: string) => {
|
|
20
20
|
flushMeasurePerf()
|
|
21
|
+
// eslint-disable-next-line no-console
|
|
21
22
|
console.log(`[redirectOrNotFound: /${from}] ${reason}`)
|
|
22
23
|
return { notFound: true, revalidate: 60 * 20 } as const
|
|
23
24
|
}
|
|
@@ -77,8 +78,16 @@ export async function redirectOrNotFound(
|
|
|
77
78
|
).data,
|
|
78
79
|
)
|
|
79
80
|
|
|
80
|
-
const
|
|
81
|
+
const routeDataArray = (await Promise.all(routePromises)).filter(nonNullable)
|
|
81
82
|
|
|
83
|
+
const routeData: HandleRedirectQuery = Object.assign(
|
|
84
|
+
{},
|
|
85
|
+
...routeDataArray.map((result) => {
|
|
86
|
+
if (!result.route) delete result.route
|
|
87
|
+
if (!result.products) delete result.products
|
|
88
|
+
return result
|
|
89
|
+
}),
|
|
90
|
+
)
|
|
82
91
|
if (!routeData?.route)
|
|
83
92
|
return notFound(
|
|
84
93
|
from,
|
|
@@ -124,6 +133,7 @@ export async function redirectOrNotFound(
|
|
|
124
133
|
if (e instanceof Error) {
|
|
125
134
|
return notFound(from, `Error while redirecting: ${e.message}`)
|
|
126
135
|
}
|
|
136
|
+
// eslint-disable-next-line no-console
|
|
127
137
|
console.log(e)
|
|
128
138
|
return notFound(from, `Error while redirecting`)
|
|
129
139
|
}
|