Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Change log

## 0.24.0
## 0.23.2

* Added Query.contains, Query.containsAny, and Query.containsAll for enhanced filtering capabilities.
* Fix very large double values (for example 1.7976931348623157e+308) from being expanded into giant integer literals

## 0.23.1

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "react-native-appwrite",
"homepage": "https://appwrite.io/support",
"description": "Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API",
"version": "0.24.0",
"version": "0.23.2",
"license": "BSD-3-Clause",
"main": "dist/cjs/sdk.js",
"exports": {
Expand Down
9 changes: 7 additions & 2 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ const JSONbigSerializer = JSONbigModule({ useNativeBigInt: true });

const MAX_SAFE = BigInt(Number.MAX_SAFE_INTEGER);
const MIN_SAFE = BigInt(Number.MIN_SAFE_INTEGER);
const MAX_INT64 = BigInt('9223372036854775807');
const MIN_INT64 = BigInt('-9223372036854775808');

function isBigNumber(value: any): boolean {
return value !== null
Expand All @@ -26,7 +28,10 @@ function reviver(_key: string, value: any): any {
if (bi >= MIN_SAFE && bi <= MAX_SAFE) {
return Number(str);
}
return bi;
if (bi >= MIN_INT64 && bi <= MAX_INT64) {
return bi;
}
return value.toNumber();
}
return value.toNumber();
}
Expand Down Expand Up @@ -153,7 +158,7 @@ class Client {
'x-sdk-name': 'React Native',
'x-sdk-platform': 'client',
'x-sdk-language': 'reactnative',
'x-sdk-version': '0.24.0',
'x-sdk-version': '0.23.2',
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Version downgrade

'X-Appwrite-Response-Format': '1.8.0',
};

Expand Down