@graphcommerce/googlerecaptcha 2.0.3 → 2.0.4

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,94 +1,78 @@
1
1
  # Change Log
2
2
 
3
+ ## 2.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1307](https://github.com/ho-nl/m2-pwa/pull/1307) [`bd10506d3`](https://github.com/ho-nl/m2-pwa/commit/bd10506d32fdbc91d01dadc29a12ebd1e0943655) Thanks [@paales](https://github.com/paales)! - All default exports are now named exports internally and all `index.tsx` are renamed to the component name.
8
+
9
+ * [#1307](https://github.com/ho-nl/m2-pwa/pull/1307) [`27cb1f2d8`](https://github.com/ho-nl/m2-pwa/commit/27cb1f2d8dbfb8f1b301ce56fb6a2b6c1fc6a5ef) Thanks [@paales](https://github.com/paales)! - upgrade dependencies
10
+
11
+ * Updated dependencies [[`bd10506d3`](https://github.com/ho-nl/m2-pwa/commit/bd10506d32fdbc91d01dadc29a12ebd1e0943655), [`27cb1f2d8`](https://github.com/ho-nl/m2-pwa/commit/27cb1f2d8dbfb8f1b301ce56fb6a2b6c1fc6a5ef)]:
12
+ - @graphcommerce/graphql@3.0.4
13
+
3
14
  ## 2.0.3
4
15
 
5
16
  ### Patch Changes
6
17
 
7
- - [`973ff8645`](https://github.com/ho-nl/m2-pwa/commit/973ff86452a70ade9f4db13fdda6e963d7220e96)
8
- Thanks [@paales](https://github.com/paales)! - made packages public
18
+ - [`973ff8645`](https://github.com/ho-nl/m2-pwa/commit/973ff86452a70ade9f4db13fdda6e963d7220e96) Thanks [@paales](https://github.com/paales)! - made packages public
9
19
 
10
- - Updated dependencies
11
- [[`973ff8645`](https://github.com/ho-nl/m2-pwa/commit/973ff86452a70ade9f4db13fdda6e963d7220e96)]:
20
+ - Updated dependencies [[`973ff8645`](https://github.com/ho-nl/m2-pwa/commit/973ff86452a70ade9f4db13fdda6e963d7220e96)]:
12
21
  - @graphcommerce/graphql@3.0.3
13
22
 
14
23
  ## 2.0.2
15
24
 
16
25
  ### Patch Changes
17
26
 
18
- - [#1276](https://github.com/ho-nl/m2-pwa/pull/1276)
19
- [`ce09388e0`](https://github.com/ho-nl/m2-pwa/commit/ce09388e0d7ef33aee660612340f6fbae15ceec2)
20
- Thanks [@paales](https://github.com/paales)! - We've moved lots of internal packages from
21
- `dependencies` to `peerDependencies`. The result of this is that there will be significantly less
22
- duplicate packages in the node_modules folders.
23
-
24
- * [#1276](https://github.com/ho-nl/m2-pwa/pull/1276)
25
- [`52a45bba4`](https://github.com/ho-nl/m2-pwa/commit/52a45bba4dc6dd6df3c81f5023df7d23ed8a534d)
26
- Thanks [@paales](https://github.com/paales)! - Upgraded to
27
- [NextJS 12.1](https://nextjs.org/blog/next-12-1)! This is just for compatibility, but we'll be
28
- implementing
29
- [On-demand Incremental Static Regeneration](https://nextjs.org/blog/next-12-1#on-demand-incremental-static-regeneration-beta)
30
- soon.
31
-
32
- This will greatly reduce the requirement to rebuid stuff and we'll add a management UI on the
33
- frontend to be able to revalidate pages manually.
34
-
35
- * Updated dependencies
36
- [[`ce09388e0`](https://github.com/ho-nl/m2-pwa/commit/ce09388e0d7ef33aee660612340f6fbae15ceec2),
37
- [`52a45bba4`](https://github.com/ho-nl/m2-pwa/commit/52a45bba4dc6dd6df3c81f5023df7d23ed8a534d)]:
27
+ - [#1276](https://github.com/ho-nl/m2-pwa/pull/1276) [`ce09388e0`](https://github.com/ho-nl/m2-pwa/commit/ce09388e0d7ef33aee660612340f6fbae15ceec2) Thanks [@paales](https://github.com/paales)! - We've moved lots of internal packages from `dependencies` to `peerDependencies`. The result of this is that there will be significantly less duplicate packages in the node_modules folders.
28
+
29
+ * [#1276](https://github.com/ho-nl/m2-pwa/pull/1276) [`52a45bba4`](https://github.com/ho-nl/m2-pwa/commit/52a45bba4dc6dd6df3c81f5023df7d23ed8a534d) Thanks [@paales](https://github.com/paales)! - Upgraded to [NextJS 12.1](https://nextjs.org/blog/next-12-1)! This is just for compatibility, but we'll be implementing [On-demand Incremental Static Regeneration](https://nextjs.org/blog/next-12-1#on-demand-incremental-static-regeneration-beta) soon.
30
+
31
+ This will greatly reduce the requirement to rebuid stuff and we'll add a management UI on the frontend to be able to revalidate pages manually.
32
+
33
+ * Updated dependencies [[`ce09388e0`](https://github.com/ho-nl/m2-pwa/commit/ce09388e0d7ef33aee660612340f6fbae15ceec2), [`52a45bba4`](https://github.com/ho-nl/m2-pwa/commit/52a45bba4dc6dd6df3c81f5023df7d23ed8a534d)]:
38
34
  - @graphcommerce/graphql@3.0.2
39
35
 
40
36
  ## 2.0.1
41
37
 
42
38
  ### Patch Changes
43
39
 
44
- - [`0cbaa878b`](https://github.com/ho-nl/m2-pwa/commit/0cbaa878b8a844d5abbeb1797b625a33130e6514)
45
- Thanks [@paales](https://github.com/paales)! - Added homepage and repository package.json files,
46
- so that the packages link to back to the website and repository
47
- - Updated dependencies
48
- [[`0cbaa878b`](https://github.com/ho-nl/m2-pwa/commit/0cbaa878b8a844d5abbeb1797b625a33130e6514)]:
40
+ - [`0cbaa878b`](https://github.com/ho-nl/m2-pwa/commit/0cbaa878b8a844d5abbeb1797b625a33130e6514) Thanks [@paales](https://github.com/paales)! - Added homepage and repository package.json files, so that the packages link to back to the website and repository
41
+ - Updated dependencies [[`0cbaa878b`](https://github.com/ho-nl/m2-pwa/commit/0cbaa878b8a844d5abbeb1797b625a33130e6514)]:
49
42
  - @graphcommerce/graphql@3.0.1
50
43
 
51
44
  ## 2.0.0
52
45
 
53
46
  ### Major Changes
54
47
 
55
- - [#1258](https://github.com/ho-nl/m2-pwa/pull/1258)
56
- [`ad36382a4`](https://github.com/ho-nl/m2-pwa/commit/ad36382a4d55d83d9e47b7eb6a02671a2a631a05)
57
- Thanks [@paales](https://github.com/paales)! - Upgraded to Material UI 5
48
+ - [#1258](https://github.com/ho-nl/m2-pwa/pull/1258) [`ad36382a4`](https://github.com/ho-nl/m2-pwa/commit/ad36382a4d55d83d9e47b7eb6a02671a2a631a05) Thanks [@paales](https://github.com/paales)! - Upgraded to Material UI 5
58
49
 
59
50
  ### Patch Changes
60
51
 
61
- - Updated dependencies
62
- [[`ad36382a4`](https://github.com/ho-nl/m2-pwa/commit/ad36382a4d55d83d9e47b7eb6a02671a2a631a05)]:
52
+ - Updated dependencies [[`ad36382a4`](https://github.com/ho-nl/m2-pwa/commit/ad36382a4d55d83d9e47b7eb6a02671a2a631a05)]:
63
53
  - @graphcommerce/graphql@3.0.0
64
54
 
65
- All notable changes to this project will be documented in this file. See
66
- [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55
+ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
67
56
 
68
57
  ## [1.1.8](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/googlerecaptcha@1.1.7...@graphcommerce/googlerecaptcha@1.1.8) (2021-12-20)
69
58
 
70
59
  ### Bug Fixes
71
60
 
72
- - make sure we're not loading gogole properties when keys are not given
73
- ([8636715](https://github.com/ho-nl/m2-pwa/commit/8636715d61985e0919208ffb64354c3ebb43ed01))
61
+ - make sure we're not loading gogole properties when keys are not given ([8636715](https://github.com/ho-nl/m2-pwa/commit/8636715d61985e0919208ffb64354c3ebb43ed01))
74
62
 
75
63
  ## [1.1.2](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/googlerecaptcha@1.1.1...@graphcommerce/googlerecaptcha@1.1.2) (2021-11-12)
76
64
 
77
65
  ### Bug Fixes
78
66
 
79
- - remove fragment
80
- ([3d8a964](https://github.com/ho-nl/m2-pwa/commit/3d8a964f3009f04b3ba09d54272a31b592e7a052))
81
- - remove hiding recaptcha from themeProvider, add to component
82
- ([6a49f77](https://github.com/ho-nl/m2-pwa/commit/6a49f77ef9fd22ea66e7acd1322c65ac6426fd3b))
67
+ - remove fragment ([3d8a964](https://github.com/ho-nl/m2-pwa/commit/3d8a964f3009f04b3ba09d54272a31b592e7a052))
68
+ - remove hiding recaptcha from themeProvider, add to component ([6a49f77](https://github.com/ho-nl/m2-pwa/commit/6a49f77ef9fd22ea66e7acd1322c65ac6426fd3b))
83
69
 
84
70
  # 1.1.0 (2021-11-03)
85
71
 
86
72
  ### Bug Fixes
87
73
 
88
- - make sure we're not throwing a warning on the production env.
89
- ([7ee4499](https://github.com/ho-nl/m2-pwa/commit/7ee449959509a13e684c19e2ff707e378d6b5c35))
74
+ - make sure we're not throwing a warning on the production env. ([7ee4499](https://github.com/ho-nl/m2-pwa/commit/7ee449959509a13e684c19e2ff707e378d6b5c35))
90
75
 
91
76
  ### Features
92
77
 
93
- - google recaptcha v3 integration
94
- ([a9fcc16](https://github.com/ho-nl/m2-pwa/commit/a9fcc16f93951e61378c99a2e183e2d754da1d50))
78
+ - google recaptcha v3 integration ([a9fcc16](https://github.com/ho-nl/m2-pwa/commit/a9fcc16f93951e61378c99a2e183e2d754da1d50))
@@ -1,7 +1,7 @@
1
1
  import Script from 'next/script'
2
2
  import React from 'react'
3
3
 
4
- export default function GoogleRecaptchaV3Script() {
4
+ export function GoogleRecaptchaV3Script() {
5
5
  const siteKey = process.env.NEXT_PUBLIC_GOOGLE_RECAPTCHA_V3_SITE_KEY
6
6
 
7
7
  if (process.env.NODE_ENV !== 'production' && !siteKey)
package/index.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { default as GoogleRecaptchaV3Script } from './components/GoogleRecaptchaV3Script'
1
+ export * from './components/GoogleRecaptchaV3Script'
2
2
  export * from './link/recaptchaLink'
@@ -11,7 +11,9 @@ export const recaptchaLink = setContext(async (operation, context) => {
11
11
  const recaptchaKey = process.env.NEXT_PUBLIC_GOOGLE_RECAPTCHA_V3_SITE_KEY
12
12
  if (!recaptchaKey || !globalThis.grecaptcha || !isMutation(operation)) return context
13
13
 
14
- await new Promise<void>(globalThis.grecaptcha?.ready)
14
+ await new Promise<void>((resolve) => {
15
+ globalThis.grecaptcha?.ready(resolve)
16
+ })
15
17
 
16
18
  const token = await globalThis.grecaptcha.execute(recaptchaKey, { action: 'submit' })
17
19
 
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/googlerecaptcha",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "2.0.3",
5
+ "version": "2.0.4",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -12,14 +12,14 @@
12
12
  }
13
13
  },
14
14
  "devDependencies": {
15
- "@graphcommerce/eslint-config-pwa": "^4.0.3",
16
- "@graphcommerce/prettier-config-pwa": "^4.0.2",
15
+ "@graphcommerce/eslint-config-pwa": "^4.0.5",
16
+ "@graphcommerce/prettier-config-pwa": "^4.0.3",
17
17
  "@graphcommerce/typescript-config-pwa": "^4.0.2",
18
- "@playwright/test": "^1.19.1",
18
+ "@playwright/test": "^1.19.2",
19
19
  "@types/grecaptcha": "^3.0.3"
20
20
  },
21
21
  "dependencies": {
22
- "@graphcommerce/graphql": "^3.0.3"
22
+ "@graphcommerce/graphql": "^3.0.4"
23
23
  },
24
24
  "peerDependencies": {
25
25
  "next": "^12.0.10",