@graphcommerce/magento-cart 4.6.2 → 4.6.5
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 +38 -0
- package/hooks/useCurrentCartId.ts +3 -3
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,43 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 4.6.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`49370878a`](https://github.com/graphcommerce-org/graphcommerce/commit/49370878a48b90a4579026a7c56c54f97840cebb), [`b6ce5548c`](https://github.com/graphcommerce-org/graphcommerce/commit/b6ce5548c66a8ca62d3aee29467045f7f07f30c8)]:
|
|
8
|
+
- @graphcommerce/graphql@3.4.4
|
|
9
|
+
- @graphcommerce/next-ui@4.17.0
|
|
10
|
+
- @graphcommerce/ecommerce-ui@1.1.8
|
|
11
|
+
- @graphcommerce/magento-customer@4.9.1
|
|
12
|
+
- @graphcommerce/magento-graphql@3.1.4
|
|
13
|
+
- @graphcommerce/magento-store@4.2.23
|
|
14
|
+
- @graphcommerce/framer-scroller@2.1.28
|
|
15
|
+
|
|
16
|
+
## 4.6.4
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies [[`02023d8d8`](https://github.com/graphcommerce-org/graphcommerce/commit/02023d8d89c8138144243edce67290bd79ff49a7), [`87a188d6f`](https://github.com/graphcommerce-org/graphcommerce/commit/87a188d6f216b7f7b9ec95afbe74f1146cb07ce4), [`3c809a3a4`](https://github.com/graphcommerce-org/graphcommerce/commit/3c809a3a438995503f6d2290d6c0bb90fbc489be), [`2c66cca15`](https://github.com/graphcommerce-org/graphcommerce/commit/2c66cca154098a09445977428983e05fe19b9510), [`199dc8599`](https://github.com/graphcommerce-org/graphcommerce/commit/199dc859989c376281243b59a59addc35138f119), [`8e3b24500`](https://github.com/graphcommerce-org/graphcommerce/commit/8e3b24500a55fa2a1fb4a3ef08c1f1990a46a0ae), [`2c66cca15`](https://github.com/graphcommerce-org/graphcommerce/commit/2c66cca154098a09445977428983e05fe19b9510), [`2c66cca15`](https://github.com/graphcommerce-org/graphcommerce/commit/2c66cca154098a09445977428983e05fe19b9510), [`1eb131766`](https://github.com/graphcommerce-org/graphcommerce/commit/1eb131766c32db6fcb0a8e83dba2c3d241658595)]:
|
|
21
|
+
- @graphcommerce/react-hook-form@3.3.2
|
|
22
|
+
- @graphcommerce/framer-scroller@2.1.27
|
|
23
|
+
- @graphcommerce/next-ui@4.16.0
|
|
24
|
+
- @graphcommerce/magento-customer@4.9.0
|
|
25
|
+
- @graphcommerce/ecommerce-ui@1.1.7
|
|
26
|
+
- @graphcommerce/magento-store@4.2.22
|
|
27
|
+
|
|
28
|
+
## 4.6.3
|
|
29
|
+
|
|
30
|
+
### Patch Changes
|
|
31
|
+
|
|
32
|
+
- [#1570](https://github.com/graphcommerce-org/graphcommerce/pull/1570) [`d92780d5c`](https://github.com/graphcommerce-org/graphcommerce/commit/d92780d5c3bb80b5a1519c087338548303e4cc2f) Thanks [@paales](https://github.com/paales)! - Always skip hydration phase by default when running useCurrentCartId / useCustomerSession
|
|
33
|
+
|
|
34
|
+
- Updated dependencies [[`a88f166f0`](https://github.com/graphcommerce-org/graphcommerce/commit/a88f166f0115c58254fe47171da51a5850658a32), [`d92780d5c`](https://github.com/graphcommerce-org/graphcommerce/commit/d92780d5c3bb80b5a1519c087338548303e4cc2f)]:
|
|
35
|
+
- @graphcommerce/next-ui@4.15.1
|
|
36
|
+
- @graphcommerce/magento-customer@4.8.3
|
|
37
|
+
- @graphcommerce/ecommerce-ui@1.1.6
|
|
38
|
+
- @graphcommerce/framer-scroller@2.1.26
|
|
39
|
+
- @graphcommerce/magento-store@4.2.21
|
|
40
|
+
|
|
3
41
|
## 4.6.2
|
|
4
42
|
|
|
5
43
|
### Patch Changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useIsomorphicLayoutEffect } from '@graphcommerce/framer-utils'
|
|
2
2
|
import { QueryHookOptions, useQuery } from '@graphcommerce/graphql'
|
|
3
|
-
import { useState } from 'react'
|
|
3
|
+
import { startTransition, useState } from 'react'
|
|
4
4
|
import { CurrentCartIdDocument, CurrentCartIdQuery } from './CurrentCartId.gql'
|
|
5
5
|
import {} from 'react-dom'
|
|
6
6
|
|
|
@@ -10,9 +10,9 @@ type UseCurrentCartIdOptions<Q, V> = QueryHookOptions<
|
|
|
10
10
|
> & { hydration?: boolean }
|
|
11
11
|
|
|
12
12
|
export function useCurrentCartId<Q, V>(options: UseCurrentCartIdOptions<Q, V> = {}) {
|
|
13
|
-
const { hydration =
|
|
13
|
+
const { hydration = false, ...queryOptions } = options
|
|
14
14
|
const [hydrating, setHydrating] = useState(!hydration)
|
|
15
|
-
useIsomorphicLayoutEffect(() => setHydrating(false), [])
|
|
15
|
+
useIsomorphicLayoutEffect(() => startTransition(() => setHydrating(false)), [])
|
|
16
16
|
const skip = options.skip !== undefined ? options.skip : hydrating
|
|
17
17
|
|
|
18
18
|
const { data, ...queryResults } = useQuery(CurrentCartIdDocument, { ...queryOptions, skip })
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@graphcommerce/magento-cart",
|
|
3
3
|
"homepage": "https://www.graphcommerce.org/",
|
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce",
|
|
5
|
-
"version": "4.6.
|
|
5
|
+
"version": "4.6.5",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
8
8
|
"eslintConfig": {
|
|
@@ -18,17 +18,17 @@
|
|
|
18
18
|
"@playwright/test": "^1.21.1"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@graphcommerce/ecommerce-ui": "1.1.
|
|
21
|
+
"@graphcommerce/ecommerce-ui": "1.1.8",
|
|
22
22
|
"@graphcommerce/framer-utils": "3.1.4",
|
|
23
23
|
"@graphcommerce/framer-next-pages": "3.2.4",
|
|
24
|
-
"@graphcommerce/framer-scroller": "2.1.
|
|
25
|
-
"@graphcommerce/graphql": "3.4.
|
|
24
|
+
"@graphcommerce/framer-scroller": "2.1.28",
|
|
25
|
+
"@graphcommerce/graphql": "3.4.4",
|
|
26
26
|
"@graphcommerce/image": "3.1.7",
|
|
27
|
-
"@graphcommerce/magento-customer": "4.
|
|
28
|
-
"@graphcommerce/magento-graphql": "3.1.
|
|
29
|
-
"@graphcommerce/magento-store": "4.2.
|
|
30
|
-
"@graphcommerce/next-ui": "4.
|
|
31
|
-
"@graphcommerce/react-hook-form": "3.3.
|
|
27
|
+
"@graphcommerce/magento-customer": "4.9.1",
|
|
28
|
+
"@graphcommerce/magento-graphql": "3.1.4",
|
|
29
|
+
"@graphcommerce/magento-store": "4.2.23",
|
|
30
|
+
"@graphcommerce/next-ui": "4.17.0",
|
|
31
|
+
"@graphcommerce/react-hook-form": "3.3.2"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"@lingui/react": "^3.13.2",
|