Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change log

## 0.24.1

* Fix very large double values (for example 1.7976931348623157e+308) from being expanded into giant integer literals.
Comment on lines +3 to +5
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Changelog version header doesn't match the release version.

The entry is labelled ## 0.24.1, but every other artefact in this PR (package.json, src/client.ts SDK header) targets version 0.23.2. With an existing ## 0.24.0 entry already in the file, this also creates a confusing ordering where two 0.24.x entries sit above a 0.23.1 entry while the actual package version is 0.23.2.

The heading should be changed to match the actual release:

📝 Proposed fix
-## 0.24.1
+## 0.23.2
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
## 0.24.1
* Fix very large double values (for example 1.7976931348623157e+308) from being expanded into giant integer literals.
## 0.23.2
* Fix very large double values (for example 1.7976931348623157e+308) from being expanded into giant integer literals.
🧰 Tools
🪛 LanguageTool

[style] ~5-~5: As an alternative to the over-used intensifier ‘very’, consider replacing this phrase.
Context: # Change log ## 0.24.1 * Fix very large double values (for example 1.7976931348...

(EN_WEAK_ADJECTIVE)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@CHANGELOG.md` around lines 3 - 5, Update the changelog header that currently
reads "## 0.24.1" to match the actual package release version ("0.23.2") so the
entry aligns with package.json and SDK headers; locate the header string "##
0.24.1" in CHANGELOG.md and replace it with "## 0.23.2" to correct ordering and
version consistency.


## 0.24.0

* Added Query.contains, Query.containsAny, and Query.containsAll for enhanced filtering capabilities.
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.24.1",
"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.24.1',
'X-Appwrite-Response-Format': '1.8.0',
};

Expand Down