@graphcommerce/magento-customer 4.8.2 → 4.8.3

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,16 @@
1
1
  # Change Log
2
2
 
3
+ ## 4.8.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#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
8
+
9
+ - Updated dependencies [[`a88f166f0`](https://github.com/graphcommerce-org/graphcommerce/commit/a88f166f0115c58254fe47171da51a5850658a32)]:
10
+ - @graphcommerce/next-ui@4.15.1
11
+ - @graphcommerce/ecommerce-ui@1.1.6
12
+ - @graphcommerce/magento-store@4.2.21
13
+
3
14
  ## 4.8.2
4
15
 
5
16
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  import { useIsomorphicLayoutEffect } from '@graphcommerce/framer-utils'
2
2
  import { useQuery } from '@graphcommerce/graphql'
3
- import { useState } from 'react'
3
+ import { startTransition, useState } from 'react'
4
4
  import { CustomerTokenDocument, CustomerTokenQuery } from './CustomerToken.gql'
5
5
 
6
6
  export type UseCustomerSessionOptions = { hydration?: boolean }
@@ -15,9 +15,9 @@ export type UseCustomerSessionReturn =
15
15
  export function useCustomerSession(
16
16
  options: UseCustomerSessionOptions = {},
17
17
  ): UseCustomerSessionReturn {
18
- const { hydration = true } = options
18
+ const { hydration = false } = options
19
19
  const [hydrating, setHydrating] = useState(!hydration)
20
- useIsomorphicLayoutEffect(() => setHydrating(false), [])
20
+ useIsomorphicLayoutEffect(() => startTransition(() => setHydrating(false)), [])
21
21
  const skip = hydrating
22
22
 
23
23
  const { called, data } = useQuery(CustomerTokenDocument, { skip })
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/magento-customer",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "4.8.2",
5
+ "version": "4.8.3",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -19,14 +19,14 @@
19
19
  "type-fest": "^2.12.2"
20
20
  },
21
21
  "dependencies": {
22
- "@graphcommerce/ecommerce-ui": "1.1.5",
22
+ "@graphcommerce/ecommerce-ui": "1.1.6",
23
23
  "@graphcommerce/framer-utils": "3.1.4",
24
24
  "@graphcommerce/graphql": "3.4.3",
25
25
  "@graphcommerce/graphql-mesh": "4.1.6",
26
26
  "@graphcommerce/image": "3.1.7",
27
27
  "@graphcommerce/magento-graphql": "3.1.3",
28
- "@graphcommerce/magento-store": "4.2.20",
29
- "@graphcommerce/next-ui": "4.15.0",
28
+ "@graphcommerce/magento-store": "4.2.21",
29
+ "@graphcommerce/next-ui": "4.15.1",
30
30
  "@graphcommerce/react-hook-form": "3.3.1"
31
31
  },
32
32
  "peerDependencies": {