From 5c1580f11da406cb3b37ccaeee87a901371ed32a Mon Sep 17 00:00:00 2001 From: Simon <1218015+simondaigre@users.noreply.github.com> Date: Tue, 19 Nov 2024 13:02:07 +0100 Subject: [PATCH 1/3] fix(analytics): setUserId accepts null values --- .changeset/smooth-mirrors-bow.md | 5 +++++ package-lock.json | 22 +++++++++++----------- packages/analytics/src/web.ts | 2 +- 3 files changed, 17 insertions(+), 12 deletions(-) create mode 100644 .changeset/smooth-mirrors-bow.md diff --git a/.changeset/smooth-mirrors-bow.md b/.changeset/smooth-mirrors-bow.md new file mode 100644 index 00000000..880d6bfa --- /dev/null +++ b/.changeset/smooth-mirrors-bow.md @@ -0,0 +1,5 @@ +--- +'@capacitor-firebase/analytics': minor +--- + +fix(analytics): setUserId accepts null values diff --git a/package-lock.json b/package-lock.json index a1a4ac3d..12adb565 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7945,7 +7945,7 @@ }, "packages/analytics": { "name": "@capacitor-firebase/analytics", - "version": "6.1.0", + "version": "6.2.0", "funding": [ { "type": "github", @@ -7998,7 +7998,7 @@ }, "packages/app": { "name": "@capacitor-firebase/app", - "version": "6.1.0", + "version": "6.2.0", "funding": [ { "type": "github", @@ -8039,7 +8039,7 @@ }, "packages/app-check": { "name": "@capacitor-firebase/app-check", - "version": "6.1.0", + "version": "6.2.0", "funding": [ { "type": "github", @@ -8104,7 +8104,7 @@ }, "packages/authentication": { "name": "@capacitor-firebase/authentication", - "version": "6.1.0", + "version": "6.2.0", "funding": [ { "type": "github", @@ -8157,7 +8157,7 @@ }, "packages/crashlytics": { "name": "@capacitor-firebase/crashlytics", - "version": "6.1.0", + "version": "6.2.0", "funding": [ { "type": "github", @@ -8209,7 +8209,7 @@ }, "packages/firestore": { "name": "@capacitor-firebase/firestore", - "version": "6.1.0", + "version": "6.2.0", "funding": [ { "type": "github", @@ -8262,7 +8262,7 @@ }, "packages/functions": { "name": "@capacitor-firebase/functions", - "version": "6.1.0", + "version": "6.2.0", "funding": [ { "type": "github", @@ -8315,7 +8315,7 @@ }, "packages/messaging": { "name": "@capacitor-firebase/messaging", - "version": "6.1.0", + "version": "6.2.0", "funding": [ { "type": "github", @@ -8368,7 +8368,7 @@ }, "packages/performance": { "name": "@capacitor-firebase/performance", - "version": "6.1.0", + "version": "6.2.0", "funding": [ { "type": "github", @@ -8421,7 +8421,7 @@ }, "packages/remote-config": { "name": "@capacitor-firebase/remote-config", - "version": "6.1.0", + "version": "6.2.0", "funding": [ { "type": "github", @@ -8474,7 +8474,7 @@ }, "packages/storage": { "name": "@capacitor-firebase/storage", - "version": "6.1.0", + "version": "6.2.0", "funding": [ { "type": "github", diff --git a/packages/analytics/src/web.ts b/packages/analytics/src/web.ts index f1a5c756..204af69f 100644 --- a/packages/analytics/src/web.ts +++ b/packages/analytics/src/web.ts @@ -60,7 +60,7 @@ export class FirebaseAnalyticsWeb public async setUserId(options: SetUserIdOptions): Promise { const analytics = getAnalytics(); - setUserId(analytics, options.userId || ''); + setUserId(analytics, options.userId); } public async setUserProperty(options: SetUserPropertyOptions): Promise { From 78b731763f223c20f779a616318d65136f2393d1 Mon Sep 17 00:00:00 2001 From: Simon Daigre Date: Tue, 19 Nov 2024 14:49:54 +0100 Subject: [PATCH 2/3] Add changeset --- package-lock.json | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index 12adb565..a1a4ac3d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7945,7 +7945,7 @@ }, "packages/analytics": { "name": "@capacitor-firebase/analytics", - "version": "6.2.0", + "version": "6.1.0", "funding": [ { "type": "github", @@ -7998,7 +7998,7 @@ }, "packages/app": { "name": "@capacitor-firebase/app", - "version": "6.2.0", + "version": "6.1.0", "funding": [ { "type": "github", @@ -8039,7 +8039,7 @@ }, "packages/app-check": { "name": "@capacitor-firebase/app-check", - "version": "6.2.0", + "version": "6.1.0", "funding": [ { "type": "github", @@ -8104,7 +8104,7 @@ }, "packages/authentication": { "name": "@capacitor-firebase/authentication", - "version": "6.2.0", + "version": "6.1.0", "funding": [ { "type": "github", @@ -8157,7 +8157,7 @@ }, "packages/crashlytics": { "name": "@capacitor-firebase/crashlytics", - "version": "6.2.0", + "version": "6.1.0", "funding": [ { "type": "github", @@ -8209,7 +8209,7 @@ }, "packages/firestore": { "name": "@capacitor-firebase/firestore", - "version": "6.2.0", + "version": "6.1.0", "funding": [ { "type": "github", @@ -8262,7 +8262,7 @@ }, "packages/functions": { "name": "@capacitor-firebase/functions", - "version": "6.2.0", + "version": "6.1.0", "funding": [ { "type": "github", @@ -8315,7 +8315,7 @@ }, "packages/messaging": { "name": "@capacitor-firebase/messaging", - "version": "6.2.0", + "version": "6.1.0", "funding": [ { "type": "github", @@ -8368,7 +8368,7 @@ }, "packages/performance": { "name": "@capacitor-firebase/performance", - "version": "6.2.0", + "version": "6.1.0", "funding": [ { "type": "github", @@ -8421,7 +8421,7 @@ }, "packages/remote-config": { "name": "@capacitor-firebase/remote-config", - "version": "6.2.0", + "version": "6.1.0", "funding": [ { "type": "github", @@ -8474,7 +8474,7 @@ }, "packages/storage": { "name": "@capacitor-firebase/storage", - "version": "6.2.0", + "version": "6.1.0", "funding": [ { "type": "github", From 0f02048a99204c10f367c9470bb9d710dc39deac Mon Sep 17 00:00:00 2001 From: Robin Genz Date: Tue, 19 Nov 2024 14:51:13 +0100 Subject: [PATCH 3/3] Update .changeset/smooth-mirrors-bow.md --- .changeset/smooth-mirrors-bow.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.changeset/smooth-mirrors-bow.md b/.changeset/smooth-mirrors-bow.md index 880d6bfa..504fc304 100644 --- a/.changeset/smooth-mirrors-bow.md +++ b/.changeset/smooth-mirrors-bow.md @@ -1,5 +1,5 @@ --- -'@capacitor-firebase/analytics': minor +'@capacitor-firebase/analytics': patch --- -fix(analytics): setUserId accepts null values +fix(web): `setUserId(...)` has set an empty string instead of `null`