Releases: pocketbase/js-sdk
v0.9.1 Release
- Normalized
Record.expand
items toRecord|Array<Record>
instances.
v0.9.0 Release
- Added
pb.health.check()
that checks the health status of the API service (available in PocketBase v0.10.0)
v0.8.4 Release
v0.8.3 Release
- Renamed the declaration file extension from
.d.ts
to.d.mts
to prevent type resolution issues [#92].
v0.8.2 Release
-
Allowed catching the initial realtime connect error as part of the subscribe() Promise resolution.
-
Implemented custom realtime retry mechanism for better control and more consistent behavior across different platforms.
v0.8.1 Release
This release contains only documentation fixes:
- Fixed code comment typos.
- Added note about
loadFromCookie
that you may need to callauthRefresh
to validate the loaded cookie state server-side. - Updated the SSR examples to show the
authRefresh
call. For the examples theauthRefresh
call is not required but it is there to remind users that it needs to be called if you want to do permission checks in a node env (eg. SSR) and rely on thepb.authStore.isValid
checks.
v0.8.0 Release
This is a stable v0.8.0 release and works only with the latest PocketBase v0.8+ API.
There are no breaking changes if you've previously already migrated to v0.8.0-rc of the JS SDK.
If you are using v0.7.x, please check the changelog for details how to migrate.
v0.8.0-rc4 Release
- Skip unnecessary realtime topic(s) submission when all listeners are removed
v0.8.0-rc3 Release
-
Fixed realtime subscriptions registration when attaching multiple times to the same topic
-
Added the following TS type exports:
RecordAuthResponse AuthProviderInfo AuthMethodsList RecordSubscription OnStoreChangeFunc UnsubscribeFunc
v0.8.0-rc2 Release
Refactored the realtime handler per #pocketbase-954 to allow registering multiple subscriptions to the same topic.
The collection realtime handler api now is:
// subscribe:
pb.collection("foo").subscribe("*", (e) => {});
pb.collection("foo").subscribe("YOUR_RECORD_ID", (e) => {});
// unsubscribe:
pb.collection("foo").unsubscribe("YOUR_RECORD_ID"); // remove every "YOUR_RECORD_ID" subscription
pb.collection("foo").unsubscribe("*"); // remove every "*" topic subscription
pb.collection("foo").unsubscribe(); // remove every subscription in foo
Additionally, subscribe()
now return UnsubscribeFunc
that could be used to unsubscribe only from a single subscription listener.
The realtime handlers from v0.8.0-rc1 are soft-deprecated and will still work but there will be a console warning to replace them with their newer equivalent.