Skip to content

Releases: pocketbase/js-sdk

v0.9.1 Release

24 Dec 19:56
Compare
Choose a tag to compare
  • Normalized Record.expand items to Record|Array<Record> instances.

v0.9.0 Release

16 Dec 15:36
Compare
Choose a tag to compare
  • Added pb.health.check() that checks the health status of the API service (available in PocketBase v0.10.0)

v0.8.4 Release

12 Dec 06:56
Compare
Choose a tag to compare
  • Added type declarations for the action query parameters (#102; thanks @sewera).
    BaseQueryParams
    ListQueryParams
    RecordQueryParams
    RecordListQueryParams
    LogStatsQueryParams
    FileQueryParams

v0.8.3 Release

06 Dec 13:48
Compare
Choose a tag to compare
  • Renamed the declaration file extension from .d.ts to .d.mts to prevent type resolution issues [#92].

v0.8.2 Release

01 Dec 18:06
Compare
Choose a tag to compare
  • 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

25 Nov 17:54
Compare
Choose a tag to compare

This release contains only documentation fixes:

  • Fixed code comment typos.
  • Added note about loadFromCookie that you may need to call authRefresh to validate the loaded cookie state server-side.
  • Updated the SSR examples to show the authRefresh call. For the examples the authRefresh 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 the pb.authStore.isValid checks.

v0.8.0 Release

18 Nov 23:19
Compare
Choose a tag to compare

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

18 Nov 17:23
Compare
Choose a tag to compare
v0.8.0-rc4 Release Pre-release
Pre-release
  • Skip unnecessary realtime topic(s) submission when all listeners are removed

v0.8.0-rc3 Release

12 Nov 19:56
Compare
Choose a tag to compare
v0.8.0-rc3 Release Pre-release
Pre-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

07 Nov 18:15
Compare
Choose a tag to compare
v0.8.0-rc2 Release Pre-release
Pre-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.