feat: React Native SDK update for version 0.23.1#87
Conversation
|
No actionable comments were generated in the recent review. 🎉 WalkthroughThis patch release (v0.23.1) updates package metadata, increments the SDK x-sdk-version header, and removes the direct bignumber.js dependency in favor of a transitive dependency. It adds a new Channel.prototype.upsert terminal action for Document|Row channels. Client parsing now uses an internal isBigNumber helper and replaces direct BigNumber references. Two enum members (GithubImagine, GoogleImagine) and corresponding JSDoc references for OAuth providers were removed. README compatibility text changed from “latest” to “1.8.x”. No exported type signatures were otherwise altered. Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/client.ts (1)
12-19: Duck-typingisBigNumberis a pragmatic solution — one minor fragility note.This correctly mirrors bignumber.js's own
isBigNumberstatic method, which checks_isBigNumber === true. The additional method checks (isInteger,toFixed,toNumber) add a useful safety net for the reviver's actual usage.Worth noting that
_isBigNumberis a semi-internal property of bignumber.js. Ifjson-bigintever upgrades to a major version of bignumber.js that changes this, the reviver would silently pass values through unconverted. The risk is low given the pinnedjson-bigintversion, but a comment documenting this coupling would help future maintainers.📝 Suggested documentation comment
+/** + * Duck-type check for bignumber.js instances produced by json-bigint. + * Avoids a direct dependency on bignumber.js to prevent bundler conflicts. + * Mirrors the _isBigNumber flag used by bignumber.js's own isBigNumber(). + */ function isBigNumber(value: any): boolean {🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/client.ts` around lines 12 - 19, Add a short comment above the isBigNumber function documenting that its detection relies on the semi-internal bignumber.js property `_isBigNumber` (plus presence of methods used by the reviver) and that if json-bigint or bignumber.js is upgraded to a major version that removes/renames `_isBigNumber` this duck-typing may silently fail to detect BigNumber instances; reference the reviver's conversion behavior and recommend revisiting the check if dependencies are bumped.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@CHANGELOG.md`:
- Around line 3-5: Update the CHANGELOG entry for 0.23.1 to include the public
API changes: note that the OAuth providers GithubImagine and GoogleImagine have
been removed (call out that this is a potentially breaking change for consumers
using those providers) and document the new terminal action "upsert" added to
Channel (e.g., Channel.upsert) as a new public API feature; make sure both items
are listed under user-facing changes so consumers are aware of migration impact.
---
Nitpick comments:
In `@src/client.ts`:
- Around line 12-19: Add a short comment above the isBigNumber function
documenting that its detection relies on the semi-internal bignumber.js property
`_isBigNumber` (plus presence of methods used by the reviver) and that if
json-bigint or bignumber.js is upgraded to a major version that removes/renames
`_isBigNumber` this duck-typing may silently fail to detect BigNumber instances;
reference the reviver's conversion behavior and recommend revisiting the check
if dependencies are bumped.
This PR contains updates to the React Native SDK for version 0.23.1.
Summary by CodeRabbit
Bug Fixes
New Features
upsertaction for realtime Channel operations.Chores
Documentation