@graphcommerce/magento-cart-payment-method 3.3.5 → 3.4.2

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,42 @@
1
1
  # Change Log
2
2
 
3
+ ## 3.4.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`18054c441`](https://github.com/graphcommerce-org/graphcommerce/commit/18054c441962ba750bed3acc39ab46c8d3a341ce), [`c5c539c44`](https://github.com/graphcommerce-org/graphcommerce/commit/c5c539c44eeac524cd62ce649e132d2e00333794), [`6f69bc54c`](https://github.com/graphcommerce-org/graphcommerce/commit/6f69bc54c6e0224452817c532ae58d9c332b61ea), [`21886d6fa`](https://github.com/graphcommerce-org/graphcommerce/commit/21886d6fa64a48d9e932bfaf8d138c9b13c36e43), [`b4936e961`](https://github.com/graphcommerce-org/graphcommerce/commit/b4936e96175fe80717895822e245274db05638bd)]:
8
+ - @graphcommerce/graphql@3.4.1
9
+ - @graphcommerce/next-ui@4.13.1
10
+ - @graphcommerce/framer-scroller@2.1.23
11
+ - @graphcommerce/magento-cart@4.5.2
12
+ - @graphcommerce/magento-store@4.2.17
13
+
14
+ ## 3.4.1
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies [[`8d8fda262`](https://github.com/graphcommerce-org/graphcommerce/commit/8d8fda2623e561cb43441110c67ffa34b692668a), [`d41cff721`](https://github.com/graphcommerce-org/graphcommerce/commit/d41cff7211230561ceeb7786cf75790efd6377cd), [`cefa7b365`](https://github.com/graphcommerce-org/graphcommerce/commit/cefa7b3652b55108d2178927e3c5d98a111cf373), [`584b683a2`](https://github.com/graphcommerce-org/graphcommerce/commit/584b683a2aedcdf5067644c8dcc0e63a5b9e894c)]:
19
+ - @graphcommerce/next-ui@4.13.0
20
+ - @graphcommerce/magento-store@4.2.16
21
+ - @graphcommerce/framer-scroller@2.1.22
22
+ - @graphcommerce/magento-cart@4.5.1
23
+
24
+ ## 3.4.0
25
+
26
+ ### Minor Changes
27
+
28
+ - [#1544](https://github.com/graphcommerce-org/graphcommerce/pull/1544) [`5f927ebdc`](https://github.com/graphcommerce-org/graphcommerce/commit/5f927ebdc6f0331833e02b96e4f169bfe475ac6b) Thanks [@mikekeehnen](https://github.com/mikekeehnen)! - Fixed hydration errors on account, cart and wishlist
29
+
30
+ ### Patch Changes
31
+
32
+ - Updated dependencies [[`5f927ebdc`](https://github.com/graphcommerce-org/graphcommerce/commit/5f927ebdc6f0331833e02b96e4f169bfe475ac6b), [`c87a28e7d`](https://github.com/graphcommerce-org/graphcommerce/commit/c87a28e7dad87bffd0bd125ad5fdca65aaa389cc), [`c756f42e5`](https://github.com/graphcommerce-org/graphcommerce/commit/c756f42e503761a497e4a5a7a02d02141df231c3)]:
33
+ - @graphcommerce/graphql@3.4.0
34
+ - @graphcommerce/magento-cart@4.5.0
35
+ - @graphcommerce/react-hook-form@3.3.0
36
+ - @graphcommerce/next-ui@4.12.0
37
+ - @graphcommerce/magento-store@4.2.15
38
+ - @graphcommerce/framer-scroller@2.1.21
39
+
3
40
  ## 3.3.5
4
41
 
5
42
  ### Patch Changes
@@ -13,18 +13,18 @@ export function PaymentMethodPlaceOrderNoop(props: PaymentPlaceOrderProps) {
13
13
  const { step, code } = props
14
14
  const clearCurrentCartId = useClearCurrentCartId()
15
15
 
16
- const cartId = useCurrentCartId()
16
+ const { currentCartId } = useCurrentCartId()
17
17
  const form = useFormGqlMutationCart(PaymentMethodPlaceOrderNoopDocument)
18
18
 
19
19
  const { handleSubmit, data, error } = form
20
20
  const { push } = useRouter()
21
21
 
22
22
  useEffect(() => {
23
- if (!data?.placeOrder?.order || error || !cartId) return
23
+ if (!data?.placeOrder?.order || error || !currentCartId) return
24
24
  clearCurrentCartId()
25
25
  // eslint-disable-next-line @typescript-eslint/no-floating-promises
26
- push({ pathname: '/checkout/success', query: { cart_id: cartId } })
27
- }, [cartId, clearCurrentCartId, data?.placeOrder?.order, error, push])
26
+ push({ pathname: '/checkout/success', query: { cart_id: currentCartId } })
27
+ }, [clearCurrentCartId, currentCartId, data?.placeOrder?.order, error, push])
28
28
 
29
29
  const submit = handleSubmit(() => {})
30
30
 
@@ -15,7 +15,7 @@ export type CartLockState = {
15
15
  * Todo: Block all operations on the cart while the cart is being blocked.
16
16
  */
17
17
  export function useCartLock<E extends CartLockState>() {
18
- const currentCartId = useCurrentCartId()
18
+ const { currentCartId } = useCurrentCartId()
19
19
  const [justLocked, setJustLocked] = useState(false)
20
20
  const [queryState, setRouterQuery] = useUrlQuery<E>()
21
21
 
@@ -26,7 +26,7 @@ export function useCartLock<E extends CartLockState>() {
26
26
  locked: '1',
27
27
  cart_id: currentCartId,
28
28
  ...params,
29
- } as E)
29
+ } as unknown as E)
30
30
  }
31
31
 
32
32
  const unlock = (params: Omit<E, 'locked' | 'cart_id' | 'method'>) => {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/magento-cart-payment-method",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "3.3.5",
5
+ "version": "3.4.2",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -12,21 +12,21 @@
12
12
  }
13
13
  },
14
14
  "devDependencies": {
15
- "@graphcommerce/eslint-config-pwa": "^4.1.8",
15
+ "@graphcommerce/eslint-config-pwa": "^4.1.9",
16
16
  "@graphcommerce/prettier-config-pwa": "^4.0.6",
17
- "@graphcommerce/typescript-config-pwa": "^4.0.3",
18
- "@graphcommerce/magento-cart-shipping-address": "3.2.4",
17
+ "@graphcommerce/typescript-config-pwa": "^4.0.4",
18
+ "@graphcommerce/magento-cart-shipping-address": "3.2.7",
19
19
  "@playwright/test": "^1.21.1",
20
20
  "type-fest": "^2.12.2"
21
21
  },
22
22
  "dependencies": {
23
- "@graphcommerce/framer-scroller": "2.1.20",
24
- "@graphcommerce/graphql": "3.3.0",
23
+ "@graphcommerce/framer-scroller": "2.1.23",
24
+ "@graphcommerce/graphql": "3.4.1",
25
25
  "@graphcommerce/image": "3.1.7",
26
- "@graphcommerce/magento-cart": "4.4.8",
27
- "@graphcommerce/magento-store": "4.2.14",
28
- "@graphcommerce/next-ui": "4.11.2",
29
- "@graphcommerce/react-hook-form": "3.2.2"
26
+ "@graphcommerce/magento-cart": "4.5.2",
27
+ "@graphcommerce/magento-store": "4.2.17",
28
+ "@graphcommerce/next-ui": "4.13.1",
29
+ "@graphcommerce/react-hook-form": "3.3.0"
30
30
  },
31
31
  "peerDependencies": {
32
32
  "@lingui/react": "^3.13.2",