From 82a3c8301458a91a0274fc029244c906550fe489 Mon Sep 17 00:00:00 2001 From: Olavo Parno Date: Wed, 8 Mar 2023 23:27:10 -0300 Subject: [PATCH 1/4] Create FUNDING.yml --- .github/FUNDING.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..a28b775 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +github: [the-bugging] From f1da271cca50b8e2c78b54cf46bcab88894e478f Mon Sep 17 00:00:00 2001 From: Quentin Luc Date: Fri, 12 Jan 2024 11:01:58 +0100 Subject: [PATCH 2/4] fix: type for identifyHotjar userId arg --- src/__tests__/index.test.ts | 14 ++++++++++++++ src/types.ts | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/__tests__/index.test.ts b/src/__tests__/index.test.ts index 3f9a330..a0094d0 100644 --- a/src/__tests__/index.test.ts +++ b/src/__tests__/index.test.ts @@ -68,6 +68,20 @@ describe('Tests useHotjar', () => { }); }); + it('should identifyHotjar for De-identified users', () => { + const { result } = renderHook(() => useHotjar()); + const identifyHotjarSpy = jest.spyOn(result.current, 'identifyHotjar'); + const { identifyHotjar } = result.current; + + identifyHotjar(null, { + ab_test: 'variant-A', + }); + + expect(identifyHotjarSpy).toHaveBeenCalledWith(null, { + ab_test: 'variant-A', + }); + }); + it('should stateChange with new relative path', () => { const { result } = renderHook(() => useHotjar()); const stateChangeSpy = jest.spyOn(result.current, 'stateChange'); diff --git a/src/types.ts b/src/types.ts index 305c118..dc67471 100644 --- a/src/types.ts +++ b/src/types.ts @@ -12,7 +12,7 @@ export interface IUseHotjar { logCallback?: (...data: unknown[]) => void ) => boolean; identifyHotjar: ( - userId: string, + userId: string | null, userInfo: TUserInfo, logCallback?: (...data: unknown[]) => void ) => boolean; From 9080c3e3489f28e433e17c4ba8a0fcf143d7638a Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Tue, 16 Jan 2024 03:50:01 +0000 Subject: [PATCH 3/4] docs: update README.md [skip ci] --- README.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index c604e99..852c7dc 100644 --- a/README.md +++ b/README.md @@ -151,16 +151,17 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d - - - - - - - + + + + + + + - + +
Olavo Parno
Olavo Parno

🤔 💻 ⚠️
Gianpietro Lavado
Gianpietro Lavado

📖
Ivan Kleshnin
Ivan Kleshnin

💻 🤔
Ajay Varghese
Ajay Varghese

💻 🤔
honicole
honicole

🔧 💻 🤔 📖
Georg Bakken Idland
Georg Bakken Idland

📖 🤔
Jason Papakostas
Jason Papakostas

🐛
Olavo Parno
Olavo Parno

🤔 💻 ⚠️
Gianpietro Lavado
Gianpietro Lavado

📖
Ivan Kleshnin
Ivan Kleshnin

💻 🤔
Ajay Varghese
Ajay Varghese

💻 🤔
honicole
honicole

🔧 💻 🤔 📖
Georg Bakken Idland
Georg Bakken Idland

📖 🤔
Jason Papakostas
Jason Papakostas

🐛
Luighi Viton-Zorrilla
Luighi Viton-Zorrilla

🐛 🚧
Luighi Viton-Zorrilla
Luighi Viton-Zorrilla

🐛 🚧
Quentin Luc
Quentin Luc

💻
From 6c290f2857676ae750f7ba47d1895c066308e1fb Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Tue, 16 Jan 2024 03:50:02 +0000 Subject: [PATCH 4/4] docs: update .all-contributorsrc [skip ci] --- .all-contributorsrc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index d41f4fc..d202369 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -89,9 +89,19 @@ "bug", "maintenance" ] + }, + { + "login": "QuentinLuc", + "name": "Quentin Luc", + "avatar_url": "https://avatars.githubusercontent.com/u/5237095?v=4", + "profile": "https://www.linkedin.com/in/quentin-luc-15161994/", + "contributions": [ + "code" + ] } ], "contributorsPerLine": 7, "skipCi": true, - "commitConvention": "angular" + "commitConvention": "angular", + "commitType": "docs" }