@graphcommerce/googlerecaptcha 2.0.2 → 2.0.5
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 +46 -42
- package/components/GoogleRecaptchaV3Script.tsx +1 -1
- package/index.ts +1 -1
- package/link/recaptchaLink.ts +3 -1
- package/package.json +9 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,83 +1,87 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 2.0.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1341](https://github.com/graphcommerce-org/graphcommerce/pull/1341) [`2e29c5852`](https://github.com/graphcommerce-org/graphcommerce/commit/2e29c585247d356e3027be92beb7815f2070c855) Thanks [@paales](https://github.com/paales)! - upgrade dependencies
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`2e29c5852`](https://github.com/graphcommerce-org/graphcommerce/commit/2e29c585247d356e3027be92beb7815f2070c855)]:
|
|
10
|
+
- @graphcommerce/graphql@3.0.5
|
|
11
|
+
|
|
12
|
+
## 2.0.4
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#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.
|
|
17
|
+
|
|
18
|
+
* [#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
|
|
19
|
+
|
|
20
|
+
* Updated dependencies [[`bd10506d3`](https://github.com/ho-nl/m2-pwa/commit/bd10506d32fdbc91d01dadc29a12ebd1e0943655), [`27cb1f2d8`](https://github.com/ho-nl/m2-pwa/commit/27cb1f2d8dbfb8f1b301ce56fb6a2b6c1fc6a5ef)]:
|
|
21
|
+
- @graphcommerce/graphql@3.0.4
|
|
22
|
+
|
|
23
|
+
## 2.0.3
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- [`973ff8645`](https://github.com/ho-nl/m2-pwa/commit/973ff86452a70ade9f4db13fdda6e963d7220e96) Thanks [@paales](https://github.com/paales)! - made packages public
|
|
28
|
+
|
|
29
|
+
- Updated dependencies [[`973ff8645`](https://github.com/ho-nl/m2-pwa/commit/973ff86452a70ade9f4db13fdda6e963d7220e96)]:
|
|
30
|
+
- @graphcommerce/graphql@3.0.3
|
|
31
|
+
|
|
3
32
|
## 2.0.2
|
|
4
33
|
|
|
5
34
|
### Patch Changes
|
|
6
35
|
|
|
7
|
-
- [#1276](https://github.com/ho-nl/m2-pwa/pull/1276)
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
* [
|
|
14
|
-
[`52a45bba4`](https://github.com/ho-nl/m2-pwa/commit/52a45bba4dc6dd6df3c81f5023df7d23ed8a534d)
|
|
15
|
-
Thanks [@paales](https://github.com/paales)! - Upgraded to
|
|
16
|
-
[NextJS 12.1](https://nextjs.org/blog/next-12-1)! This is just for compatibility, but we'll be
|
|
17
|
-
implementing
|
|
18
|
-
[On-demand Incremental Static Regeneration](https://nextjs.org/blog/next-12-1#on-demand-incremental-static-regeneration-beta)
|
|
19
|
-
soon.
|
|
20
|
-
|
|
21
|
-
This will greatly reduce the requirement to rebuid stuff and we'll add a management UI on the
|
|
22
|
-
frontend to be able to revalidate pages manually.
|
|
23
|
-
|
|
24
|
-
* Updated dependencies
|
|
25
|
-
[[`ce09388e0`](https://github.com/ho-nl/m2-pwa/commit/ce09388e0d7ef33aee660612340f6fbae15ceec2),
|
|
26
|
-
[`52a45bba4`](https://github.com/ho-nl/m2-pwa/commit/52a45bba4dc6dd6df3c81f5023df7d23ed8a534d)]:
|
|
36
|
+
- [#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.
|
|
37
|
+
|
|
38
|
+
* [#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.
|
|
39
|
+
|
|
40
|
+
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.
|
|
41
|
+
|
|
42
|
+
* Updated dependencies [[`ce09388e0`](https://github.com/ho-nl/m2-pwa/commit/ce09388e0d7ef33aee660612340f6fbae15ceec2), [`52a45bba4`](https://github.com/ho-nl/m2-pwa/commit/52a45bba4dc6dd6df3c81f5023df7d23ed8a534d)]:
|
|
27
43
|
- @graphcommerce/graphql@3.0.2
|
|
28
44
|
|
|
29
45
|
## 2.0.1
|
|
30
46
|
|
|
31
47
|
### Patch Changes
|
|
32
48
|
|
|
33
|
-
- [`0cbaa878b`](https://github.com/ho-nl/m2-pwa/commit/0cbaa878b8a844d5abbeb1797b625a33130e6514)
|
|
34
|
-
|
|
35
|
-
so that the packages link to back to the website and repository
|
|
36
|
-
- Updated dependencies
|
|
37
|
-
[[`0cbaa878b`](https://github.com/ho-nl/m2-pwa/commit/0cbaa878b8a844d5abbeb1797b625a33130e6514)]:
|
|
49
|
+
- [`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
|
|
50
|
+
- Updated dependencies [[`0cbaa878b`](https://github.com/ho-nl/m2-pwa/commit/0cbaa878b8a844d5abbeb1797b625a33130e6514)]:
|
|
38
51
|
- @graphcommerce/graphql@3.0.1
|
|
39
52
|
|
|
40
53
|
## 2.0.0
|
|
41
54
|
|
|
42
55
|
### Major Changes
|
|
43
56
|
|
|
44
|
-
- [#1258](https://github.com/ho-nl/m2-pwa/pull/1258)
|
|
45
|
-
[`ad36382a4`](https://github.com/ho-nl/m2-pwa/commit/ad36382a4d55d83d9e47b7eb6a02671a2a631a05)
|
|
46
|
-
Thanks [@paales](https://github.com/paales)! - Upgraded to Material UI 5
|
|
57
|
+
- [#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
|
|
47
58
|
|
|
48
59
|
### Patch Changes
|
|
49
60
|
|
|
50
|
-
- Updated dependencies
|
|
51
|
-
[[`ad36382a4`](https://github.com/ho-nl/m2-pwa/commit/ad36382a4d55d83d9e47b7eb6a02671a2a631a05)]:
|
|
61
|
+
- Updated dependencies [[`ad36382a4`](https://github.com/ho-nl/m2-pwa/commit/ad36382a4d55d83d9e47b7eb6a02671a2a631a05)]:
|
|
52
62
|
- @graphcommerce/graphql@3.0.0
|
|
53
63
|
|
|
54
|
-
All notable changes to this project will be documented in this file. See
|
|
55
|
-
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
64
|
+
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
56
65
|
|
|
57
66
|
## [1.1.8](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/googlerecaptcha@1.1.7...@graphcommerce/googlerecaptcha@1.1.8) (2021-12-20)
|
|
58
67
|
|
|
59
68
|
### Bug Fixes
|
|
60
69
|
|
|
61
|
-
- make sure we're not loading gogole properties when keys are not given
|
|
62
|
-
([8636715](https://github.com/ho-nl/m2-pwa/commit/8636715d61985e0919208ffb64354c3ebb43ed01))
|
|
70
|
+
- make sure we're not loading gogole properties when keys are not given ([8636715](https://github.com/ho-nl/m2-pwa/commit/8636715d61985e0919208ffb64354c3ebb43ed01))
|
|
63
71
|
|
|
64
72
|
## [1.1.2](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/googlerecaptcha@1.1.1...@graphcommerce/googlerecaptcha@1.1.2) (2021-11-12)
|
|
65
73
|
|
|
66
74
|
### Bug Fixes
|
|
67
75
|
|
|
68
|
-
- remove fragment
|
|
69
|
-
|
|
70
|
-
- remove hiding recaptcha from themeProvider, add to component
|
|
71
|
-
([6a49f77](https://github.com/ho-nl/m2-pwa/commit/6a49f77ef9fd22ea66e7acd1322c65ac6426fd3b))
|
|
76
|
+
- remove fragment ([3d8a964](https://github.com/ho-nl/m2-pwa/commit/3d8a964f3009f04b3ba09d54272a31b592e7a052))
|
|
77
|
+
- remove hiding recaptcha from themeProvider, add to component ([6a49f77](https://github.com/ho-nl/m2-pwa/commit/6a49f77ef9fd22ea66e7acd1322c65ac6426fd3b))
|
|
72
78
|
|
|
73
79
|
# 1.1.0 (2021-11-03)
|
|
74
80
|
|
|
75
81
|
### Bug Fixes
|
|
76
82
|
|
|
77
|
-
- make sure we're not throwing a warning on the production env.
|
|
78
|
-
([7ee4499](https://github.com/ho-nl/m2-pwa/commit/7ee449959509a13e684c19e2ff707e378d6b5c35))
|
|
83
|
+
- make sure we're not throwing a warning on the production env. ([7ee4499](https://github.com/ho-nl/m2-pwa/commit/7ee449959509a13e684c19e2ff707e378d6b5c35))
|
|
79
84
|
|
|
80
85
|
### Features
|
|
81
86
|
|
|
82
|
-
- google recaptcha v3 integration
|
|
83
|
-
([a9fcc16](https://github.com/ho-nl/m2-pwa/commit/a9fcc16f93951e61378c99a2e183e2d754da1d50))
|
|
87
|
+
- 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
|
|
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
|
|
1
|
+
export * from './components/GoogleRecaptchaV3Script'
|
|
2
2
|
export * from './link/recaptchaLink'
|
package/link/recaptchaLink.ts
CHANGED
|
@@ -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>(
|
|
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.
|
|
5
|
+
"version": "2.0.5",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
8
8
|
"eslintConfig": {
|
|
@@ -12,18 +12,19 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@graphcommerce/eslint-config-pwa": "^4.
|
|
16
|
-
"@graphcommerce/prettier-config-pwa": "^4.0.
|
|
17
|
-
"@graphcommerce/typescript-config-pwa": "^4.0.
|
|
18
|
-
"@playwright/test": "^1.19.
|
|
19
|
-
"@types/grecaptcha": "^3.0.
|
|
15
|
+
"@graphcommerce/eslint-config-pwa": "^4.1.1",
|
|
16
|
+
"@graphcommerce/prettier-config-pwa": "^4.0.3",
|
|
17
|
+
"@graphcommerce/typescript-config-pwa": "^4.0.2",
|
|
18
|
+
"@playwright/test": "^1.19.2",
|
|
19
|
+
"@types/grecaptcha": "^3.0.4"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@graphcommerce/graphql": "^3.0.
|
|
22
|
+
"@graphcommerce/graphql": "^3.0.5"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"next": "^12.0.10",
|
|
26
26
|
"react": "^17.0.2",
|
|
27
|
-
"react-dom": "^17.0.2"
|
|
27
|
+
"react-dom": "^17.0.2",
|
|
28
|
+
"@mui/material": "^5.4.1"
|
|
28
29
|
}
|
|
29
30
|
}
|