@graphcommerce/magento-store 6.2.0-canary.9 → 6.2.0-canary.91

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,181 @@
1
1
  # Change Log
2
2
 
3
+ ## 6.2.0-canary.91
4
+
5
+ ## 6.2.0-canary.90
6
+
7
+ ## 6.2.0-canary.89
8
+
9
+ ## 6.2.0-canary.88
10
+
11
+ ## 6.2.0-canary.87
12
+
13
+ ## 6.2.0-canary.86
14
+
15
+ ## 6.2.0-canary.85
16
+
17
+ ## 6.2.0-canary.84
18
+
19
+ ## 6.2.0-canary.83
20
+
21
+ ## 6.2.0-canary.82
22
+
23
+ ## 6.2.0-canary.81
24
+
25
+ ## 6.2.0-canary.80
26
+
27
+ ## 6.2.0-canary.79
28
+
29
+ ## 6.2.0-canary.78
30
+
31
+ ## 6.2.0-canary.77
32
+
33
+ ## 6.2.0-canary.76
34
+
35
+ ## 6.2.0-canary.75
36
+
37
+ ## 6.2.0-canary.74
38
+
39
+ ## 6.2.0-canary.73
40
+
41
+ ## 6.2.0-canary.72
42
+
43
+ ## 6.2.0-canary.71
44
+
45
+ ## 6.2.0-canary.70
46
+
47
+ ## 6.2.0-canary.69
48
+
49
+ ## 6.2.0-canary.68
50
+
51
+ ## 6.2.0-canary.67
52
+
53
+ ## 6.2.0-canary.66
54
+
55
+ ## 6.2.0-canary.65
56
+
57
+ ## 6.2.0-canary.64
58
+
59
+ ## 6.2.0-canary.63
60
+
61
+ ## 6.2.0-canary.62
62
+
63
+ ## 6.2.0-canary.61
64
+
65
+ ## 6.2.0-canary.60
66
+
67
+ ## 6.2.0-canary.59
68
+
69
+ ## 6.2.0-canary.58
70
+
71
+ ## 6.2.0-canary.57
72
+
73
+ ## 6.2.0-canary.56
74
+
75
+ ## 6.2.0-canary.55
76
+
77
+ ### Patch Changes
78
+
79
+ - [#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))
80
+
81
+ ## 6.2.0-canary.54
82
+
83
+ ## 6.2.0-canary.53
84
+
85
+ ## 6.2.0-canary.52
86
+
87
+ ## 6.2.0-canary.51
88
+
89
+ ## 6.2.0-canary.50
90
+
91
+ ### Minor Changes
92
+
93
+ - [`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))
94
+
95
+ ## 6.2.0-canary.49
96
+
97
+ ## 6.2.0-canary.48
98
+
99
+ ### Minor Changes
100
+
101
+ - [#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))
102
+
103
+ ## 6.2.0-canary.47
104
+
105
+ ## 6.2.0-canary.46
106
+
107
+ ## 6.2.0-canary.45
108
+
109
+ ## 6.2.0-canary.44
110
+
111
+ ## 6.2.0-canary.43
112
+
113
+ ## 6.2.0-canary.42
114
+
115
+ ## 6.2.0-canary.41
116
+
117
+ ## 6.2.0-canary.40
118
+
119
+ ## 6.2.0-canary.39
120
+
121
+ ## 6.2.0-canary.38
122
+
123
+ ## 6.2.0-canary.37
124
+
125
+ ## 6.2.0-canary.36
126
+
127
+ ## 6.2.0-canary.35
128
+
129
+ ## 6.2.0-canary.34
130
+
131
+ ## 6.2.0-canary.33
132
+
133
+ ## 6.2.0-canary.32
134
+
135
+ ## 6.2.0-canary.31
136
+
137
+ ## 6.2.0-canary.30
138
+
139
+ ## 6.2.0-canary.29
140
+
141
+ ## 6.2.0-canary.28
142
+
143
+ ## 6.2.0-canary.27
144
+
145
+ ## 6.2.0-canary.26
146
+
147
+ ## 6.2.0-canary.25
148
+
149
+ ## 6.2.0-canary.24
150
+
151
+ ## 6.2.0-canary.23
152
+
153
+ ## 6.2.0-canary.22
154
+
155
+ ## 6.2.0-canary.21
156
+
157
+ ## 6.2.0-canary.20
158
+
159
+ ## 6.2.0-canary.19
160
+
161
+ ## 6.2.0-canary.18
162
+
163
+ ## 6.2.0-canary.17
164
+
165
+ ## 6.2.0-canary.16
166
+
167
+ ## 6.2.0-canary.15
168
+
169
+ ## 6.2.0-canary.14
170
+
171
+ ## 6.2.0-canary.13
172
+
173
+ ## 6.2.0-canary.12
174
+
175
+ ## 6.2.0-canary.11
176
+
177
+ ## 6.2.0-canary.10
178
+
3
179
  ## 6.2.0-canary.9
4
180
 
5
181
  ## 6.2.0-canary.8
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 = Pick<
9
- NextPageMetaProps,
10
- 'title' | 'metaDescription' | 'metaRobots' | 'children'
11
- > & {
8
+ type PageMetaProps = Omit<NextPageMetaProps, 'canonical'> & {
12
9
  canonical?: string
13
10
  }
14
11
 
@@ -2,7 +2,6 @@
2
2
  import { extendableComponent, FlagAvatar, NextLink } from '@graphcommerce/next-ui'
3
3
  import {
4
4
  List,
5
- ListItem,
6
5
  ListItemText,
7
6
  Collapse,
8
7
  ListItemAvatar,
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": "6.2.0-canary.9",
5
+ "version": "6.2.0-canary.91",
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": "6.2.0-canary.9",
16
- "@graphcommerce/prettier-config-pwa": "6.2.0-canary.9",
17
- "@graphcommerce/typescript-config-pwa": "6.2.0-canary.9"
15
+ "@graphcommerce/eslint-config-pwa": "6.2.0-canary.91",
16
+ "@graphcommerce/prettier-config-pwa": "6.2.0-canary.91",
17
+ "@graphcommerce/typescript-config-pwa": "6.2.0-canary.91"
18
18
  },
19
19
  "dependencies": {
20
- "@graphcommerce/graphql": "6.2.0-canary.9",
21
- "@graphcommerce/graphql-mesh": "6.2.0-canary.9",
22
- "@graphcommerce/image": "6.2.0-canary.9",
23
- "@graphcommerce/next-ui": "6.2.0-canary.9"
20
+ "@graphcommerce/graphql": "6.2.0-canary.91",
21
+ "@graphcommerce/graphql-mesh": "6.2.0-canary.91",
22
+ "@graphcommerce/image": "6.2.0-canary.91",
23
+ "@graphcommerce/next-ui": "6.2.0-canary.91"
24
24
  },
25
25
  "peerDependencies": {
26
- "@lingui/react": "^3.13.2",
27
- "@lingui/core": "^3.13.2",
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
- ...config,
11
- links: [...(config.links ?? []), createStoreLink(config.storefront.locale)],
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
@@ -1,3 +1,4 @@
1
+ /* eslint-disable import/no-extraneous-dependencies */
1
2
  /* eslint-disable no-empty-pattern */
2
3
  import { ApolloClient, NormalizedCacheObject, InMemoryCache } from '@graphcommerce/graphql'
3
4
  import { test as base } from '@playwright/test'
@@ -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 routeData = (await Promise.all(routePromises)).find(nonNullable)
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
  }