@graphcommerce/googlerecaptcha 1.1.9 → 2.0.2
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 +56 -12
- package/README.md +1 -1
- package/components/GoogleRecaptchaV3Script.tsx +7 -19
- package/link/recaptchaLink.ts +1 -2
- package/package.json +12 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,39 +1,83 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
3
|
+
## 2.0.2
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
### Patch Changes
|
|
7
6
|
|
|
7
|
+
- [#1276](https://github.com/ho-nl/m2-pwa/pull/1276)
|
|
8
|
+
[`ce09388e0`](https://github.com/ho-nl/m2-pwa/commit/ce09388e0d7ef33aee660612340f6fbae15ceec2)
|
|
9
|
+
Thanks [@paales](https://github.com/paales)! - We've moved lots of internal packages from
|
|
10
|
+
`dependencies` to `peerDependencies`. The result of this is that there will be significantly less
|
|
11
|
+
duplicate packages in the node_modules folders.
|
|
8
12
|
|
|
9
|
-
|
|
13
|
+
* [#1276](https://github.com/ho-nl/m2-pwa/pull/1276)
|
|
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.
|
|
10
20
|
|
|
11
|
-
|
|
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.
|
|
12
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)]:
|
|
27
|
+
- @graphcommerce/graphql@3.0.2
|
|
13
28
|
|
|
29
|
+
## 2.0.1
|
|
14
30
|
|
|
31
|
+
### Patch Changes
|
|
15
32
|
|
|
33
|
+
- [`0cbaa878b`](https://github.com/ho-nl/m2-pwa/commit/0cbaa878b8a844d5abbeb1797b625a33130e6514)
|
|
34
|
+
Thanks [@paales](https://github.com/paales)! - Added homepage and repository package.json files,
|
|
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)]:
|
|
38
|
+
- @graphcommerce/graphql@3.0.1
|
|
16
39
|
|
|
17
|
-
##
|
|
40
|
+
## 2.0.0
|
|
18
41
|
|
|
42
|
+
### Major Changes
|
|
19
43
|
|
|
20
|
-
|
|
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
|
|
21
47
|
|
|
22
|
-
|
|
23
|
-
* remove hiding recaptcha from themeProvider, add to component ([6a49f77](https://github.com/ho-nl/m2-pwa/commit/6a49f77ef9fd22ea66e7acd1322c65ac6426fd3b))
|
|
48
|
+
### Patch Changes
|
|
24
49
|
|
|
50
|
+
- Updated dependencies
|
|
51
|
+
[[`ad36382a4`](https://github.com/ho-nl/m2-pwa/commit/ad36382a4d55d83d9e47b7eb6a02671a2a631a05)]:
|
|
52
|
+
- @graphcommerce/graphql@3.0.0
|
|
25
53
|
|
|
54
|
+
All notable changes to this project will be documented in this file. See
|
|
55
|
+
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
26
56
|
|
|
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)
|
|
27
58
|
|
|
59
|
+
### Bug Fixes
|
|
28
60
|
|
|
29
|
-
|
|
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))
|
|
30
63
|
|
|
64
|
+
## [1.1.2](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/googlerecaptcha@1.1.1...@graphcommerce/googlerecaptcha@1.1.2) (2021-11-12)
|
|
31
65
|
|
|
32
66
|
### Bug Fixes
|
|
33
67
|
|
|
34
|
-
|
|
68
|
+
- remove fragment
|
|
69
|
+
([3d8a964](https://github.com/ho-nl/m2-pwa/commit/3d8a964f3009f04b3ba09d54272a31b592e7a052))
|
|
70
|
+
- remove hiding recaptcha from themeProvider, add to component
|
|
71
|
+
([6a49f77](https://github.com/ho-nl/m2-pwa/commit/6a49f77ef9fd22ea66e7acd1322c65ac6426fd3b))
|
|
72
|
+
|
|
73
|
+
# 1.1.0 (2021-11-03)
|
|
74
|
+
|
|
75
|
+
### Bug Fixes
|
|
35
76
|
|
|
77
|
+
- make sure we're not throwing a warning on the production env.
|
|
78
|
+
([7ee4499](https://github.com/ho-nl/m2-pwa/commit/7ee449959509a13e684c19e2ff707e378d6b5c35))
|
|
36
79
|
|
|
37
80
|
### Features
|
|
38
81
|
|
|
39
|
-
|
|
82
|
+
- google recaptcha v3 integration
|
|
83
|
+
([a9fcc16](https://github.com/ho-nl/m2-pwa/commit/a9fcc16f93951e61378c99a2e183e2d754da1d50))
|
package/README.md
CHANGED
|
@@ -11,4 +11,4 @@ This package makes it easy to add Google Recaptcha v3 to GraphCommerce
|
|
|
11
11
|
3. Add `recaptchaLink` to your Apollo Client.
|
|
12
12
|
[example](../../examples/magento-graphcms/lib/createApolloClient.ts)
|
|
13
13
|
4. Add `X-Recaptcha` header to your `.meshrc.yml`.
|
|
14
|
-
[example](../../examples/magento-graphcms
|
|
14
|
+
[example](../../examples/magento-graphcms/.meshrc.yml)
|
|
@@ -1,23 +1,8 @@
|
|
|
1
|
-
import { makeStyles } from '@material-ui/core'
|
|
2
1
|
import Script from 'next/script'
|
|
3
2
|
import React from 'react'
|
|
4
3
|
|
|
5
|
-
const useStyles = makeStyles(
|
|
6
|
-
{
|
|
7
|
-
'@global': {
|
|
8
|
-
body: {
|
|
9
|
-
'& .grecaptcha-badge': {
|
|
10
|
-
visibility: 'hidden', // https://developers.google.com/recaptcha/docs/faq
|
|
11
|
-
},
|
|
12
|
-
},
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
{ name: 'IconBlock' },
|
|
16
|
-
)
|
|
17
|
-
|
|
18
4
|
export default function GoogleRecaptchaV3Script() {
|
|
19
5
|
const siteKey = process.env.NEXT_PUBLIC_GOOGLE_RECAPTCHA_V3_SITE_KEY
|
|
20
|
-
useStyles()
|
|
21
6
|
|
|
22
7
|
if (process.env.NODE_ENV !== 'production' && !siteKey)
|
|
23
8
|
console.warn(
|
|
@@ -27,9 +12,12 @@ export default function GoogleRecaptchaV3Script() {
|
|
|
27
12
|
if (!siteKey) return null
|
|
28
13
|
|
|
29
14
|
return (
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
15
|
+
<>
|
|
16
|
+
<Script
|
|
17
|
+
strategy='lazyOnload'
|
|
18
|
+
src={`https://www.google.com/recaptcha/api.js?render=${siteKey}`}
|
|
19
|
+
/>
|
|
20
|
+
<style>{`.grecaptcha-badge': { visibility: 'hidden' }`}</style>
|
|
21
|
+
</>
|
|
34
22
|
)
|
|
35
23
|
}
|
package/link/recaptchaLink.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphcommerce/googlerecaptcha",
|
|
3
|
-
"
|
|
3
|
+
"homepage": "https://www.graphcommerce.org/",
|
|
4
|
+
"repository": "github:graphcommerce-org/graphcommerce",
|
|
5
|
+
"version": "2.0.2",
|
|
4
6
|
"sideEffects": false,
|
|
5
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
6
|
-
"browserslist": [
|
|
7
|
-
"extends @graphcommerce/browserslist-config-pwa"
|
|
8
|
-
],
|
|
9
8
|
"eslintConfig": {
|
|
10
9
|
"extends": "@graphcommerce/eslint-config-pwa",
|
|
11
10
|
"parserOptions": {
|
|
@@ -13,19 +12,18 @@
|
|
|
13
12
|
}
|
|
14
13
|
},
|
|
15
14
|
"devDependencies": {
|
|
16
|
-
"@graphcommerce/
|
|
17
|
-
"@graphcommerce/
|
|
18
|
-
"@graphcommerce/
|
|
19
|
-
"@
|
|
20
|
-
"@playwright/test": "^1.17.1",
|
|
15
|
+
"@graphcommerce/eslint-config-pwa": "^4.0.2",
|
|
16
|
+
"@graphcommerce/prettier-config-pwa": "^4.0.1",
|
|
17
|
+
"@graphcommerce/typescript-config-pwa": "^4.0.1",
|
|
18
|
+
"@playwright/test": "^1.19.1",
|
|
21
19
|
"@types/grecaptcha": "^3.0.3"
|
|
22
20
|
},
|
|
23
21
|
"dependencies": {
|
|
24
|
-
"@
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
"@graphcommerce/graphql": "^3.0.2"
|
|
23
|
+
},
|
|
24
|
+
"peerDependencies": {
|
|
25
|
+
"next": "^12.0.10",
|
|
27
26
|
"react": "^17.0.2",
|
|
28
27
|
"react-dom": "^17.0.2"
|
|
29
|
-
}
|
|
30
|
-
"gitHead": "bc5423d7547f8685db4cd8fc6d8f7a2a51ebed05"
|
|
28
|
+
}
|
|
31
29
|
}
|