-
Notifications
You must be signed in to change notification settings - Fork 379
chore: Release 5.4.6 #1948
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
chore: Release 5.4.6 #1948
Changes from all commits
aa6f14a
383c6df
4fc6871
db7792b
43eff90
d536f62
edc026d
74dd7c1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -62,6 +62,7 @@ | |
| consentRequired: boolean; | ||
| privacyConsentGiven: boolean; | ||
| externalUserId: string | undefined; | ||
| oneSignalId: string | undefined; | ||
| pushSubscriptionId: string | undefined; | ||
| isPushEnabled: boolean; | ||
| hasNotificationPermission: boolean; | ||
|
|
@@ -115,6 +116,7 @@ | |
| const [consentRequired, setConsentRequiredState] = useState(false); | ||
| const [privacyConsentGiven, setPrivacyConsentGivenState] = useState(false); | ||
| const [externalUserId, setExternalUserId] = useState<string | undefined>(undefined); | ||
| const [oneSignalId, setOneSignalId] = useState<string | undefined>(undefined); | ||
| const [pushSubscriptionId, setPushSubscriptionId] = useState<string | undefined>(undefined); | ||
| const [isPushEnabled, setIsPushEnabled] = useState(false); | ||
| const [hasNotificationPermission, setHasNotificationPermission] = useState(false); | ||
|
|
@@ -207,6 +209,8 @@ | |
| `User changed: onesignalId=${nextOnesignalId ?? 'null'}, externalId=${event.current.externalId ?? 'null'}`, | ||
| ); | ||
|
|
||
| setOneSignalId(nextOnesignalId ?? undefined); | ||
|
|
||
| if (nextOnesignalId === null) { | ||
| return; | ||
| } | ||
|
|
@@ -280,6 +284,7 @@ | |
| setIsReady(true); | ||
|
|
||
| const initialOnesignalId = await OneSignal.User.getOnesignalId(); | ||
| setOneSignalId(initialOnesignalId ?? undefined); | ||
| if (initialOnesignalId) { | ||
| await fetchUserDataFromApi(); | ||
| } | ||
|
|
@@ -532,12 +537,13 @@ | |
|
|
||
| return { | ||
| appId, | ||
| consentRequired, | ||
| privacyConsentGiven, | ||
| externalUserId, | ||
| oneSignalId, | ||
| pushSubscriptionId, | ||
| isPushEnabled, | ||
| hasNotificationPermission, | ||
|
Check warning on line 546 in examples/demo/src/hooks/useOneSignal.ts
|
||
|
Comment on lines
540
to
546
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. π‘ The PR adds an Extended reasoning...What the bug isThis PR adds new state plumbing for an
Why this is dead codeGrepping Step-by-step proof
ImpactMinor and demo-only. The extra How to fixPick one of:
Option 1 is the safer demo cleanup; option 2 requires a product decision about whether the ID should be surfaced. |
||
| inAppMessagesPaused, | ||
| locationShared, | ||
| aliasesList, | ||
|
|
||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| { | ||
| "name": "react-native-onesignal", | ||
| "version": "5.4.5", | ||
| "version": "5.4.6", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. π£ Pre-existing: Extended reasoning...What the bug isThe demo app's Code path that triggers itIn 189: - name: Refresh demo Podfile.lock
190: if: inputs.ios_version != ''
191: run: |
...
201: pod installThis PR is a wrapper + Android-SDK-only release (only Why existing code doesn't prevent itThe gate was likely written assuming that only iOS-native version bumps require a Podfile.lock refresh, but the path-based pod entry ( Step-by-step proof
ImpactLimited but real. The pod entry is path-based, so anyone running How to fixEither (a) drop the This bug is pre_existing: the workflow gate predates this PR. Flagging because this PR is a concrete instance that further widens the divergence. |
||
| "description": "React Native OneSignal SDK", | ||
| "keywords": [ | ||
| "android", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π‘ The PR description heading reads "Update Android SDK from 5.8.1 to 5.9.1", but
android/build.gradleline 42 actually bumps the dependency tocom.onesignal:OneSignal:5.9.2. Since this PR's description becomes the public CHANGELOG / GitHub release notes for 5.4.6, the version mismatch is user-visible β please update the heading to 5.9.2 and add any release-notes bullets for changes that landed exclusively in 5.9.2.Extended reasoning...
What's wrong
The PR description in this 'chore: Release 5.4.6' PR contains a stale heading:
But
android/build.gradleline 42 actually bumps the dependency to 5.9.2:How it happened (step-by-step proof)
Looking at the recent git log on this branch:
27e71efβ Update Android SDK to 5.9.0bf03cceβ Update Android SDK to 5.9.1 β PR description was written to match this commit078d6dbβ Update Android SDK to 5.9.2 β description was never updatedThe PR description (and its bullet list of upstream Android-SDK PRs #2637β#2645) was authored when the dependency was still at 5.9.1 and was simply not refreshed when the follow-up bump to 5.9.2 landed. The bullet list covers fixes that went into 5.9.0/5.9.1, but anything that shipped exclusively in 5.9.2 (e.g. any patches landed on top of bf03cce in the Android SDK) is undocumented.
Why this matters
This is the release PR for 5.4.6, and its description is what becomes the public CHANGELOG entry / GitHub release notes once the tag is cut. Consumers reading the release notes will see an announcement that the underlying Android SDK was upgraded to 5.9.1, while the artifact they actually install pulls 5.9.2. This is a small but user-visible inconsistency: dependency-pinning tooling, security scanners, and curious users who diff the lockfile against the release notes will all see the mismatch.
How to fix
Either:
android/build.gradleback to5.9.1(the description would then match).The first option is almost certainly what's wanted β the latest commit (
078d6db) explicitly bumped the dependency to 5.9.2, so the code is correct and the description is stale. Nothing about runtime behavior is affected, so this is documentation-only (nit).