@graphcommerce/magento-cart-items 8.1.0-canary.50 → 8.1.0-canary.53

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
+ ## 8.1.0-canary.53
4
+
5
+ ## 8.1.0-canary.52
6
+
7
+ ## 8.1.0-canary.51
8
+
9
+ ### Minor Changes
10
+
11
+ - [#2322](https://github.com/graphcommerce-org/graphcommerce/pull/2322) [`4d08a2b`](https://github.com/graphcommerce-org/graphcommerce/commit/4d08a2bd8c1919bd85b18e8e856775d18fb67e00) - Rename configurable_customizable back to customizable_options
12
+ ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
13
+
3
14
  ## 8.1.0-canary.50
4
15
 
5
16
  ## 8.1.0-canary.49
@@ -6,14 +6,11 @@ import { SelectedCustomizableOptionFragment } from './SelectedCustomizableOption
6
6
 
7
7
  type SelectedCustomizableOptionProps = CartItemFragment & {
8
8
  customizable_options?: (SelectedCustomizableOptionFragment | null | undefined)[] | null
9
- configurable_customizable?: (SelectedCustomizableOptionFragment | null | undefined)[] | null
10
9
  }
11
10
 
12
11
  export function SelectedCustomizableOptions(props: SelectedCustomizableOptionProps) {
13
- const { customizable_options, product, configurable_customizable } = props
14
- const options = customizable_options
15
- ? filterNonNullableKeys(customizable_options, [])
16
- : filterNonNullableKeys(configurable_customizable, [])
12
+ const { customizable_options, product } = props
13
+ const options = filterNonNullableKeys(customizable_options, [])
17
14
 
18
15
  if (!options.length) return null
19
16
 
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/magento-cart-items",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "8.1.0-canary.50",
5
+ "version": "8.1.0-canary.53",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -12,18 +12,18 @@
12
12
  }
13
13
  },
14
14
  "peerDependencies": {
15
- "@graphcommerce/eslint-config-pwa": "^8.1.0-canary.50",
16
- "@graphcommerce/framer-next-pages": "^8.1.0-canary.50",
17
- "@graphcommerce/graphql": "^8.1.0-canary.50",
18
- "@graphcommerce/image": "^8.1.0-canary.50",
19
- "@graphcommerce/magento-cart": "^8.1.0-canary.50",
20
- "@graphcommerce/magento-customer": "^8.1.0-canary.50",
21
- "@graphcommerce/magento-product": "^8.1.0-canary.50",
22
- "@graphcommerce/magento-store": "^8.1.0-canary.50",
23
- "@graphcommerce/next-ui": "^8.1.0-canary.50",
24
- "@graphcommerce/prettier-config-pwa": "^8.1.0-canary.50",
25
- "@graphcommerce/react-hook-form": "^8.1.0-canary.50",
26
- "@graphcommerce/typescript-config-pwa": "^8.1.0-canary.50",
15
+ "@graphcommerce/eslint-config-pwa": "^8.1.0-canary.53",
16
+ "@graphcommerce/framer-next-pages": "^8.1.0-canary.53",
17
+ "@graphcommerce/graphql": "^8.1.0-canary.53",
18
+ "@graphcommerce/image": "^8.1.0-canary.53",
19
+ "@graphcommerce/magento-cart": "^8.1.0-canary.53",
20
+ "@graphcommerce/magento-customer": "^8.1.0-canary.53",
21
+ "@graphcommerce/magento-product": "^8.1.0-canary.53",
22
+ "@graphcommerce/magento-store": "^8.1.0-canary.53",
23
+ "@graphcommerce/next-ui": "^8.1.0-canary.53",
24
+ "@graphcommerce/prettier-config-pwa": "^8.1.0-canary.53",
25
+ "@graphcommerce/react-hook-form": "^8.1.0-canary.53",
26
+ "@graphcommerce/typescript-config-pwa": "^8.1.0-canary.53",
27
27
  "@lingui/core": "^4.2.1",
28
28
  "@lingui/macro": "^4.2.1",
29
29
  "@lingui/react": "^4.2.1",
@@ -34,11 +34,7 @@ export function cartItemToCartItemInput(
34
34
  entered_options: [],
35
35
  }
36
36
 
37
- const cartItemCustomizableOptions = filterNonNullableKeys(
38
- isTypename(cartItem, ['ConfigurableCartItem'])
39
- ? cartItem.configurable_customizable
40
- : cartItem.customizable_options,
41
- )
37
+ const cartItemCustomizableOptions = filterNonNullableKeys(cartItem.customizable_options ?? {})
42
38
 
43
39
  if (cartItemCustomizableOptions.length > 0) {
44
40
  product.options?.filter(nonNullable).forEach((productOption) => {
@@ -88,7 +84,7 @@ export function cartItemToCartItemInput(
88
84
  }
89
85
 
90
86
  if (isTypename(cartItem, ['BundleCartItem']) && isTypename(product, ['BundleProduct'])) {
91
- filterNonNullableKeys(product.items).forEach((productBundleItem, i) => {
87
+ filterNonNullableKeys(product.items).forEach((productBundleItem) => {
92
88
  const cartItemBundleOption = cartItem.bundle_options.find(
93
89
  (option) => option?.uid === productBundleItem?.uid,
94
90
  )