@koolbase/react-native 11.2.0 → 11.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +52 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,58 @@ adheres to [Semantic Versioning][semver].
|
|
|
7
7
|
[kac]: https://keepachangelog.com/en/1.1.0/
|
|
8
8
|
[semver]: https://semver.org/
|
|
9
9
|
|
|
10
|
+
## 11.3.0
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- **Thirty error codes the API emits were not mapped**, so they arrived as
|
|
15
|
+
generic errors and an app's `instanceof` branch silently never ran. The
|
|
16
|
+
worst of them is `revision_mismatch`: the server attaches the current
|
|
17
|
+
record and both revisions to that 409 specifically so a conflict can be
|
|
18
|
+
resolved without a second fetch, and no app could reach any of it.
|
|
19
|
+
`KoolbaseRevisionMismatchError` now carries `expectedRevision`,
|
|
20
|
+
`currentRevision` and `current` as typed fields.
|
|
21
|
+
|
|
22
|
+
Also now catchable: `plan_limit_reached` (as `KoolbasePlanLimitError`,
|
|
23
|
+
shared across database, storage and functions, carrying resource, limit
|
|
24
|
+
and plan), `insufficient_scope`, `idempotency_key_reused` /
|
|
25
|
+
`idempotency_conflict`, `batch_failed`, `duplicate_values`,
|
|
26
|
+
`identity_not_found`, `provider_identity_already_linked`,
|
|
27
|
+
`vector_field_exists`, `field_not_auto_embed`, `invalid_embedding_config`,
|
|
28
|
+
`provider_not_configured`, `provider_invalid`, `upload_url_failed`,
|
|
29
|
+
`slug_taken`, `invitation_invalid`, `project_invalid`, `invalid_body`,
|
|
30
|
+
`no_changes`, the four seed codes, and the generic conflict codes.
|
|
31
|
+
|
|
32
|
+
- **Two mappings were for codes the API does not emit.** `session_expired`
|
|
33
|
+
and `token_revoked` were handled as though the server sent them; it sends
|
|
34
|
+
`invalid_refresh_token`, which already maps to `SessionExpiredError`.
|
|
35
|
+
Removed, along with three message-substring guesses at revocation.
|
|
36
|
+
`TokenRevokedError` stays as a class: explicit revocation is worth
|
|
37
|
+
distinguishing from expiry, but only once the server can establish it —
|
|
38
|
+
a generic 401 cannot, and the SDK must not infer it.
|
|
39
|
+
|
|
40
|
+
- **`restoreSession` no longer clears the stored session on
|
|
41
|
+
`InvalidCredentialsError`.** It means "these credentials are wrong", which
|
|
42
|
+
during a restore points at the project key or the request rather than the
|
|
43
|
+
user's session — and deleting the refresh token on that reading signs
|
|
44
|
+
someone out with no way back. Only a refused refresh clears it now.
|
|
45
|
+
|
|
46
|
+
- **Errors report the code the server sent.**
|
|
47
|
+
`KoolbaseIdempotencyKeyReusedError` hardcoded one code while serving two.
|
|
48
|
+
|
|
49
|
+
### Why these were missing
|
|
50
|
+
|
|
51
|
+
The API wrote error codes through four different helpers, so no single search
|
|
52
|
+
found them all, and the comparison against what these SDKs map took four grep
|
|
53
|
+
patterns and still missed several. The API now declares every code as a
|
|
54
|
+
constant in one file, with a test that fails the build on a literal — so the
|
|
55
|
+
comparison is exact. That is how these thirty were found, and three codes
|
|
56
|
+
nobody had written down anywhere.
|
|
57
|
+
|
|
58
|
+
Every surface here has a test asserting each code maps to its own class and
|
|
59
|
+
reports its own code, so the next one added to the API without a case here
|
|
60
|
+
fails the build rather than a user's upload.
|
|
61
|
+
|
|
10
62
|
## 11.2.0
|
|
11
63
|
|
|
12
64
|
### Fixed
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koolbase/react-native",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.3.0",
|
|
4
4
|
"description": "React Native SDK for Koolbase \u2014 auth, database, storage, realtime, feature flags, and functions in one package.",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"types": "./dist/esm/index.d.ts",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"url": "https://github.com/koolbase/koolbase-react-native"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@koolbase/core": "11.
|
|
27
|
+
"@koolbase/core": "11.3.0"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"@react-native-async-storage/async-storage": "^3.0.2",
|