@graphcommerce/magento-cart 4.2.5 → 4.2.6

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,27 @@
1
1
  # Change Log
2
2
 
3
+ ## 4.2.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1399](https://github.com/graphcommerce-org/graphcommerce/pull/1399) [`fb277d8e1`](https://github.com/graphcommerce-org/graphcommerce/commit/fb277d8e1e3612c5e9cf890a30d19cfd1ff70542) Thanks [@paales](https://github.com/paales)! - Now using [@graphql-yoga](https://github.com/dotansimha/graphql-yoga) for GraphQL which has full support for [envelop](https://www.envelop.dev/) plugins.
8
+
9
+ * [#1399](https://github.com/graphcommerce-org/graphcommerce/pull/1399) [`fb277d8e1`](https://github.com/graphcommerce-org/graphcommerce/commit/fb277d8e1e3612c5e9cf890a30d19cfd1ff70542) Thanks [@paales](https://github.com/paales)! - Added a new @graphcommerce/cli package to generate the mesh so it can be generated _inside_ the @graphcommerce/graphql-mesh package to allow for better future extensibility.
10
+
11
+ - [#1399](https://github.com/graphcommerce-org/graphcommerce/pull/1399) [`da0ae7d02`](https://github.com/graphcommerce-org/graphcommerce/commit/da0ae7d0236e4908ba0bf0fa16656be516e841d4) Thanks [@paales](https://github.com/paales)! - Updated dependencies
12
+
13
+ - Updated dependencies [[`fb277d8e1`](https://github.com/graphcommerce-org/graphcommerce/commit/fb277d8e1e3612c5e9cf890a30d19cfd1ff70542), [`fb277d8e1`](https://github.com/graphcommerce-org/graphcommerce/commit/fb277d8e1e3612c5e9cf890a30d19cfd1ff70542), [`da0ae7d02`](https://github.com/graphcommerce-org/graphcommerce/commit/da0ae7d0236e4908ba0bf0fa16656be516e841d4)]:
14
+ - @graphcommerce/graphql@3.1.0
15
+ - @graphcommerce/magento-customer@4.2.4
16
+ - @graphcommerce/magento-graphql@3.0.7
17
+ - @graphcommerce/magento-store@4.1.7
18
+ - @graphcommerce/next-ui@4.6.1
19
+ - @graphcommerce/react-hook-form@3.1.1
20
+ - @graphcommerce/ecommerce-ui@1.0.7
21
+ - @graphcommerce/framer-next-pages@3.1.6
22
+ - @graphcommerce/framer-scroller@2.1.6
23
+ - @graphcommerce/image@3.1.5
24
+
3
25
  ## 4.2.5
4
26
 
5
27
  ### Patch Changes
@@ -1,4 +1,4 @@
1
- import { CountryCodeEnum } from '@graphcommerce/graphql'
1
+ import type { CountryCodeEnum } from '@graphcommerce/graphql-mesh'
2
2
  import { AddressMultiLine } from '@graphcommerce/magento-customer'
3
3
  import React from 'react'
4
4
  import { CartAddressFragment } from '../CartAddress/CartAddress.gql'
@@ -1,4 +1,4 @@
1
- import { CountryCodeEnum } from '@graphcommerce/graphql'
1
+ import type { CountryCodeEnum } from '@graphcommerce/graphql-mesh'
2
2
  import { AddressSingleLine } from '@graphcommerce/magento-customer'
3
3
  import React from 'react'
4
4
  import { CartAddressFragment } from '../CartAddress/CartAddress.gql'
@@ -45,6 +45,7 @@ export function CartAgreementsForm(props: CartAgreementsFormProps) {
45
45
  const { handleSubmit, formState, control } = form
46
46
 
47
47
  const submit = handleSubmit((values) => {
48
+ // eslint-disable-next-line no-console
48
49
  console.log(values)
49
50
  })
50
51
 
@@ -75,7 +76,7 @@ export function CartAgreementsForm(props: CartAgreementsFormProps) {
75
76
  }}
76
77
  render={({
77
78
  field: { onChange, value, name, ref, onBlur },
78
- fieldState: { error, invalid },
79
+ fieldState: { error },
79
80
  }) => (
80
81
  <FormControl
81
82
  error={!!formState.errors[String(agreement.agreement_id)]}
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.2.5",
5
+ "version": "4.2.6",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -12,22 +12,22 @@
12
12
  }
13
13
  },
14
14
  "devDependencies": {
15
- "@graphcommerce/eslint-config-pwa": "^4.1.4",
16
- "@graphcommerce/prettier-config-pwa": "^4.0.5",
15
+ "@graphcommerce/eslint-config-pwa": "^4.1.5",
16
+ "@graphcommerce/prettier-config-pwa": "^4.0.6",
17
17
  "@graphcommerce/typescript-config-pwa": "^4.0.2",
18
- "@playwright/test": "^1.20.1"
18
+ "@playwright/test": "^1.21.1"
19
19
  },
20
20
  "dependencies": {
21
- "@graphcommerce/ecommerce-ui": "1.0.6",
22
- "@graphcommerce/framer-next-pages": "3.1.5",
23
- "@graphcommerce/framer-scroller": "2.1.5",
24
- "@graphcommerce/graphql": "3.0.7",
25
- "@graphcommerce/image": "3.1.4",
26
- "@graphcommerce/magento-customer": "4.2.3",
27
- "@graphcommerce/magento-graphql": "3.0.6",
28
- "@graphcommerce/magento-store": "4.1.6",
29
- "@graphcommerce/next-ui": "4.6.0",
30
- "@graphcommerce/react-hook-form": "3.1.0"
21
+ "@graphcommerce/ecommerce-ui": "1.0.7",
22
+ "@graphcommerce/framer-next-pages": "3.1.6",
23
+ "@graphcommerce/framer-scroller": "2.1.6",
24
+ "@graphcommerce/graphql": "3.1.0",
25
+ "@graphcommerce/image": "3.1.5",
26
+ "@graphcommerce/magento-customer": "4.2.4",
27
+ "@graphcommerce/magento-graphql": "3.0.7",
28
+ "@graphcommerce/magento-store": "4.1.7",
29
+ "@graphcommerce/next-ui": "4.6.1",
30
+ "@graphcommerce/react-hook-form": "3.1.1"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "@lingui/macro": "^3.13.2",
@@ -9,6 +9,7 @@ export async function fillCartAgreementsForm(
9
9
  const res = (await client.query({ query: CartAgreementsDocument })).data
10
10
 
11
11
  for await (const agreement of res.checkoutAgreements ?? []) {
12
+ // eslint-disable-next-line no-continue
12
13
  if (!agreement?.agreement_id || agreement?.mode === 'AUTO') continue
13
14
 
14
15
  await page.locator(`input[name="agreement\\[${agreement.agreement_id}\\]"]`).click()
package/typePolicies.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import { ApolloCache, NormalizedCacheObject } from '@graphcommerce/graphql'
2
- import type { QueryCartArgs, ShippingCartAddress, TypedTypePolicies } from '@graphcommerce/graphql'
3
- import { CartPrices } from '@graphcommerce/graphql/generated/types'
2
+ import type { StrictTypedTypePolicies } from '@graphcommerce/graphql'
3
+ import type { CartPrices, QuerycartArgs, ShippingCartAddress } from '@graphcommerce/graphql-mesh'
4
4
  import { CartFabDocument } from './components/CartFab/CartFab.gql'
5
5
  import { CurrentCartIdDocument } from './hooks/CurrentCartId.gql'
6
6
 
7
- export const cartTypePolicies: TypedTypePolicies = {
7
+ export const cartTypePolicies: StrictTypedTypePolicies = {
8
8
  CurrentCartId: { keyFields: [] },
9
9
  CartPrices: {
10
10
  merge: (exiting, incomming, { mergeObjects }) => mergeObjects(exiting, incomming),
@@ -29,7 +29,7 @@ export const cartTypePolicies: TypedTypePolicies = {
29
29
  fields: {
30
30
  currentCartId: (_, { toReference }) => toReference({ __typename: 'CurrentCartId' }),
31
31
  cart: (_, { args, toReference }) =>
32
- toReference({ __typename: 'Cart', id: (args as QueryCartArgs)?.cart_id }),
32
+ toReference({ __typename: 'Cart', id: (args as QuerycartArgs)?.cart_id }),
33
33
  },
34
34
  },
35
35
  }