Repository navigation
feat: React Native SDK update for version 2.0.0 - #122
ChiragAgg5k wants to merge 2 commits into
Conversation
馃數 Tier A 路 Mergeable after minor fixes
This update targets Appwrite 2.4 and publishes the React Native SDK as version 2.0.0, adding analytics, passkey, OAuth2, and membership API updates. It also adds response-model defaults and new passkey and analytics examples. 4 of 39 changed files were too large to include in full.
Note Not approving while a bug finding is open: Preserve response toString when cloning models
Fix with agent prompt### Issue 1
src/client.ts:83
**Preserve response toString when cloning models**
`Client.call` attaches a non-enumerable JSON `toString` to parsed responses, but this spread drops it whenever a response passes through `applyDefaults`. As a result, affected API results now stringify as `[object Object]` instead of JSON; preserving the custom method on the cloned root would avoid this compatibility regression.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.馃搨 Walkthrough 路 5
Reviewed |
| if (Array.isArray(value)) { | ||
| return value; | ||
| } | ||
| const result: Record<string, unknown> = { ...model.defaults, ...value }; |
There was a problem hiding this comment.
Preserve response toString when cloning models
Client.call attaches a non-enumerable JSON toString to parsed responses, but this spread drops it whenever a response passes through applyDefaults. As a result, affected API results now stringify as [object Object] instead of JSON; preserving the custom method on the cloned root would avoid this compatibility regression.
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/client.ts
Line: 83
Comment:
**Preserve response toString when cloning models**
`Client.call` attaches a non-enumerable JSON `toString` to parsed responses, but this spread drops it whenever a response passes through `applyDefaults`. As a result, affected API results now stringify as `[object Object]` instead of JSON; preserving the custom method on the cloned root would avoid this compatibility regression.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.馃煛 Minor 路 bug 路 Reply if this doesn't apply.
|
Superseded: replaced by a passkeys-only minor release. |
This PR contains updates to the React Native SDK for version 2.0.0.