@graphcommerce/magento-customer 6.0.2-canary.14 → 6.0.2-canary.16

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,13 @@
1
1
  # Change Log
2
2
 
3
+ ## 6.0.2-canary.16
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1896](https://github.com/graphcommerce-org/graphcommerce/pull/1896) [`4f846293f`](https://github.com/graphcommerce-org/graphcommerce/commit/4f846293f3b020dc7bae885fe4ccd1cbd0cb10d7) - When a customer would log in the current guest information would be lost ([@paales](https://github.com/paales))
8
+
9
+ ## 6.0.2-canary.15
10
+
3
11
  ## 6.0.2-canary.14
4
12
 
5
13
  ## 6.0.2-canary.13
@@ -19,10 +19,13 @@ export function SignInForm(props: SignInFormProps) {
19
19
  {
20
20
  defaultValues: { email },
21
21
  onBeforeSubmit: async (values) => {
22
- const oldEmail = client.cache.readQuery({ query: CustomerDocument })
23
- if (oldEmail?.customer?.email !== email) {
24
- await client.resetStore()
25
- }
22
+ const oldEmail = client.cache.readQuery({ query: CustomerDocument })?.customer?.email
23
+
24
+ /**
25
+ * We are logging in because the session expired, but we're logging in with a different
26
+ * email address, we need to reset the store.
27
+ */
28
+ if (oldEmail && oldEmail !== email) await client.resetStore()
26
29
  return { ...values, email }
27
30
  },
28
31
  },
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": "6.0.2-canary.14",
5
+ "version": "6.0.2-canary.16",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -12,20 +12,20 @@
12
12
  }
13
13
  },
14
14
  "devDependencies": {
15
- "@graphcommerce/eslint-config-pwa": "6.0.2-canary.14",
16
- "@graphcommerce/prettier-config-pwa": "6.0.2-canary.14",
17
- "@graphcommerce/typescript-config-pwa": "6.0.2-canary.14"
15
+ "@graphcommerce/eslint-config-pwa": "6.0.2-canary.16",
16
+ "@graphcommerce/prettier-config-pwa": "6.0.2-canary.16",
17
+ "@graphcommerce/typescript-config-pwa": "6.0.2-canary.16"
18
18
  },
19
19
  "dependencies": {
20
- "@graphcommerce/ecommerce-ui": "6.0.2-canary.14",
21
- "@graphcommerce/framer-utils": "6.0.2-canary.14",
22
- "@graphcommerce/graphql": "6.0.2-canary.14",
23
- "@graphcommerce/graphql-mesh": "6.0.2-canary.14",
24
- "@graphcommerce/image": "6.0.2-canary.14",
25
- "@graphcommerce/magento-graphql": "6.0.2-canary.14",
26
- "@graphcommerce/magento-store": "6.0.2-canary.14",
27
- "@graphcommerce/next-ui": "6.0.2-canary.14",
28
- "@graphcommerce/react-hook-form": "6.0.2-canary.14"
20
+ "@graphcommerce/ecommerce-ui": "6.0.2-canary.16",
21
+ "@graphcommerce/framer-utils": "6.0.2-canary.16",
22
+ "@graphcommerce/graphql": "6.0.2-canary.16",
23
+ "@graphcommerce/graphql-mesh": "6.0.2-canary.16",
24
+ "@graphcommerce/image": "6.0.2-canary.16",
25
+ "@graphcommerce/magento-graphql": "6.0.2-canary.16",
26
+ "@graphcommerce/magento-store": "6.0.2-canary.16",
27
+ "@graphcommerce/next-ui": "6.0.2-canary.16",
28
+ "@graphcommerce/react-hook-form": "6.0.2-canary.16"
29
29
  },
30
30
  "peerDependencies": {
31
31
  "@lingui/react": "^3.13.2",