@graphcommerce/next-ui 8.0.0-canary.76 → 8.0.0-canary.78
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 +14 -0
- package/PageMeta/PageMeta.tsx +19 -12
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 8.0.0-canary.78
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#2135](https://github.com/graphcommerce-org/graphcommerce/pull/2135) [`7b017f5`](https://github.com/graphcommerce-org/graphcommerce/commit/7b017f58ba3be587d20a7f52c84b2907d52fe201) - Fix incorrect canonical URLs when i18n domain routing is used
|
|
8
|
+
([@hnsr](https://github.com/hnsr))
|
|
9
|
+
|
|
10
|
+
## 8.0.0-canary.77
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [`e33660f`](https://github.com/graphcommerce-org/graphcommerce/commit/e33660f172466dcfa0ab7262cee612d9a3e47776) - a11y improvements (see https://github.com/graphcommerce-org/graphcommerce/issues/1995 for more info)
|
|
15
|
+
([@FrankHarland](https://github.com/FrankHarland))
|
|
16
|
+
|
|
3
17
|
## 8.0.0-canary.76
|
|
4
18
|
|
|
5
19
|
## 8.0.0-canary.75
|
package/PageMeta/PageMeta.tsx
CHANGED
|
@@ -60,18 +60,25 @@ export function canonicalize(router: PartialNextRouter, incoming?: Canonical) {
|
|
|
60
60
|
const curLocale = router.locale
|
|
61
61
|
|
|
62
62
|
// Copied from here https://github.com/vercel/next.js/blob/213c42f446874d29d07fa2cca6e6b11fc9c3b711/packages/next/client/link.tsx#L512
|
|
63
|
-
const localeDomain =
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
63
|
+
const localeDomain = getDomainLocale(
|
|
64
|
+
as,
|
|
65
|
+
curLocale,
|
|
66
|
+
router && router.locales,
|
|
67
|
+
router.domainLocales,
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
if (localeDomain) {
|
|
71
|
+
canonical = localeDomain
|
|
72
|
+
} else {
|
|
73
|
+
href = addBasePath(addLocale(as, curLocale, router.defaultLocale))
|
|
74
|
+
|
|
75
|
+
let siteUrl =
|
|
76
|
+
storefrontConfig(router.locale)?.canonicalBaseUrl ||
|
|
77
|
+
import.meta.graphCommerce.canonicalBaseUrl
|
|
78
|
+
if (siteUrl.endsWith('/')) siteUrl = siteUrl.slice(0, -1)
|
|
79
|
+
|
|
80
|
+
canonical = `${siteUrl}${href}`
|
|
81
|
+
}
|
|
75
82
|
}
|
|
76
83
|
|
|
77
84
|
if (!canonical.startsWith('http')) {
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@graphcommerce/next-ui",
|
|
3
3
|
"homepage": "https://www.graphcommerce.org/",
|
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce",
|
|
5
|
-
"version": "8.0.0-canary.
|
|
5
|
+
"version": "8.0.0-canary.78",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
8
8
|
"eslintConfig": {
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
"typescript": "5.3.3"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
|
-
"@graphcommerce/eslint-config-pwa": "^8.0.0-canary.
|
|
30
|
-
"@graphcommerce/framer-next-pages": "^8.0.0-canary.
|
|
31
|
-
"@graphcommerce/framer-scroller": "^8.0.0-canary.
|
|
32
|
-
"@graphcommerce/framer-utils": "^8.0.0-canary.
|
|
33
|
-
"@graphcommerce/image": "^8.0.0-canary.
|
|
34
|
-
"@graphcommerce/prettier-config-pwa": "^8.0.0-canary.
|
|
35
|
-
"@graphcommerce/typescript-config-pwa": "^8.0.0-canary.
|
|
29
|
+
"@graphcommerce/eslint-config-pwa": "^8.0.0-canary.78",
|
|
30
|
+
"@graphcommerce/framer-next-pages": "^8.0.0-canary.78",
|
|
31
|
+
"@graphcommerce/framer-scroller": "^8.0.0-canary.78",
|
|
32
|
+
"@graphcommerce/framer-utils": "^8.0.0-canary.78",
|
|
33
|
+
"@graphcommerce/image": "^8.0.0-canary.78",
|
|
34
|
+
"@graphcommerce/prettier-config-pwa": "^8.0.0-canary.78",
|
|
35
|
+
"@graphcommerce/typescript-config-pwa": "^8.0.0-canary.78",
|
|
36
36
|
"@lingui/core": "^4.2.1",
|
|
37
37
|
"@lingui/macro": "^4.2.1",
|
|
38
38
|
"@lingui/react": "^4.2.1",
|