DATE:
AUTHOR:
PowerSync Product Team
React Native SDK

PowerSync SDK for React Native: v1.15.1

DATE:
AUTHOR: PowerSync Product Team

We are pleased to announce the release of version 1.15.1 of the PowerSync React Native Client SDK.

See the full changelog below.

Have any questions or feedback? Chat with us and the PowerSync community on Discord.

Changelog

v1.15.1

  • [FIXED] Updated powersync-sqlite-core to v0.3.6 which fixes an issue with remove operations resulting in dangling rows in some cases. See the PR for more details.

v1.15.0

  • [ADDED] refreshSchema() which will cause all connections to be aware of a schema change.

v1.14.4

  • [IMPROVED] getCrudBatch to use a default limit of 100 CRUD entries.

v1.14.3

  • Updated dependencies.

v1.14.2

  • Updated dependencies.

v1.14.1

  • [FIXED] A bundling issue with @journeyapps/react-native-quick-sqlite when using @powersync/op-sqlite.

v1.14.0

  • [IMPROVED] Updated powersync-sqlite-core to v0.3.0, which significantly improves the performance of incremental sync (see details).

v1.12.3

  • [IMPROVED] Deprecated the rawTableNames option in SQLWatchOptions. All tables specified in the tables option will now be watched, including PowerSync tables with prefixes.

v1.12.2

  • [FIXED] An issue where sequentially mutating the same row multiple times could cause the CRUD upload queue monitoring to think CRUD operations have not been processed correctly by the BackendConnector uploadData method. See details in this PR.

v1.12.1

  • [ADDED] React Native Web support. Learn more here.

v1.12.0

Note: Some features in this version require journeyapps/powersync-service v0.5.0 or later when self-hosting.

This version updates powersync-sqlite-core to version 0.2.1 and introduces:

  • [ADDED] Custom User-Agent header and client_id parameter to sync requests.

  • [ADDED] Emit update notifications for watch queries on disconnectAndClear().

  • [IMPROVED] Sync optimizations for MOVE and REMOVE operations. See details in this PR.

  • [IMPROVED]SyncStatus.lastSyncedAt now returns a persisted timestamp of the last synced at time (previously it reset after a restart).

  • [IMPROVED] Validate that the powersync-sqlite-core version number is in a compatible range of ^0.2.0.

  • [IMPROVED] Always cast target_op (write checkpoints) to ensure it's an integer.

  • [IMPROVED] Implemented custom Prefab building to support bundling libs from react-native-quick-sqlite.

Additionally:

  • [IMPROVED] Merge Table and TableV2 definitions but kept TableV2 to avoid making this a breaking change. Find details in this PR.

  • [IMPROVED] Updated crypto.js vendor file to include fast-base64-decode dependency instead of bundling it.

  • [FIXED] Flipper debug tool warning still showing if an HTTP request rejected due to an error. See the PR.

v1.11.0

  • [IMPROVED] WebSocket streaming is now the default connection method. HTTP streaming can still be specified if desired.

  • [IMPROVED] Added basic validations for required options in PowerSyncDatabase constructor (useful for JavaScript).

  • [INTERNAL] Updated the internals of deleteBucket to use a simpler action.

v1.10.0

  • [IMPROVED] Added a warning if connector uploadData functions don't process CRUD items completely [PR].

v1.9.0

  • [IMPROVED] Polyfills are now pre-bundled into the SDK itself.

v1.8.1

  • [IMPROVED] Transactions that are reporting on failed rollback exceptions are now silenced when they are safe to ignore.

v1.8.0

v1.7.2

v1.7.1

  • Updated dependencies.

v1.7.0

v1.6.1

  • [IMPROVED] Added @powersync/common as a dependency again.

v1.6.0

  • [IMPROVED] The import and usage of the BSON library.

  • [IMPROVED] Added @powersync/common as a peer dependency to prevent version mismatch issues.

v1.5.1

  • Updated dependencies.

v1.5.0

  • [ADDED] Support for WebSocket sync stream connections. Learn more here.

  • [IMPROVED] Removed the react-native-get-random-values dependency.

  • Updated dependencies:

    • [IMPROVED] Removed the uuid dependency.

v1.4.6

  • Updated dependencies:

    • [FIXED] hasSynced to also change when there is no data on app load.

v1.4.5

  • Updated dependencies:

    • [IMPROVED] Allow compilable queries to be used as hook arguments so that queries from an ORM can be used.

    • [IMPROVED] Deprecate usePowerSyncQuery and usePowerSyncWatchedQuery in favor of useQuery and useStatus.

    • [FIXED]disconnectAndClear() not clearing ps_untyped records.

    • [FIXED] Incorrect type of Schema.tables.

v1.4.4

  • Updated dependencies:

    • [FIXED] A race condition where table change notifications would trigger before a commit had completed.

v1.4.3

  • [IMRPOVED] Renamed the package from @journeyapps/powersync- to @powersync/. The @journeyapps/powersync-sdk-react-native package is deprecated and the renamed package is published here: https://www.npmjs.com/package/@powersync/react-native

  • Updated dependencies:

    • [FIXED] Default onError callback for watch() and onChange() that used an unbounded member.

v1.4.2

  • Updated dependencies

v1.4.1

  • Updated dependencies:

    • [ADDED]hasSynced property to SyncStatus. This value is managed in AbstractPowerSyncDatabase, and becomes true after the first sync has completed.

    • [ADDED] waitForFirstSync method to allow users to await on the state change of hasSynced to true.

    • [FIXED] Resolving tables for watch() before handling any results, eliminating a potential race condition between initial results and updates.

    • [FIXED] Also handled a potential uncaught exception.

v1.4.0

  • Updated dependencies:

    • [ADDED] Added executeBatch method. This allows a SQL statement with multiple parameters to be executed in a single transaction, improving performance and consistency.

    • [FIXED] A potential unhandled exception when aborting a stream fetch request for the /sync/stream endpoint.

v1.3.3

  • Updated dependencies:

    • [IMPROVED] Introduced overloaded versions of the watch and onChange methods to support a callback approach to handle results and errors alongside the existing AsyncGenerator mechanism.

    • [IMPROVED] No longer using the AsyncGenerator version of the watch method for the usePowerSyncWatchedQuery hook, using the new callback version instead.

v1.3.2

  • Updated dependencies:

    • [FIXED] A regression where watched queries would update for table changes in external (not in query) tables.

v1.3.1

  • Updated dependencies:

    • [FIXED] An issue where sync stream exceptions would not close previous streaming connections.

    • [IMPROVED] Reduced JS bundle size.

v1.3.0

  • Updated dependencies:

    • [ADDED] dispose methods for sync stream clients and better closing of clients.

    • [FIXED] PowerSyncBackendConnector.fetchCredentials type to allow returning null.

    • [IMPROVED] Internally moved crud upload watching to SqliteBucketStorageAdapter.

v1.2.2

  • Updated dependencies:

    • [ADDED] equals method on CrudEntry class to better align comparison operations with JavaScript.

    • [IMPROVED] AbstractPowerSyncDatabase.getCrudBatch now use a getAll instead of using database.execute.

    • [FIXED] Minor bugs in BucketStorage adapter.

    • [FIXED] Removed object-hash package as a dependency as this caused issues with Next.js 14.1.0.

v1.2.1

  • [FIXED] An issue where the SDK would fail to reconnect after disconnecting when using disconnectAndClear.

  • Updated dependencies:

    • [FIXED] Missing transactionId value in the response of getNextCrudTransaction.

v1.2.0

  • [ADDED] Global locks for syncing connections. Added a warning when creating multiple PowerSync instances.

  • [IMPROVED] Bumped powersync-sqlite-core to v0.1.6. Dependent projects should:

    • Upgrade to @journeyapps/react-native-quick-sqlite@1.1.1

    • run pod repo update && pod update in the ios folder for updates to reflect.

  • Updated dependencies:

    • [ADDED] viewName option to Schema Table definitions. This allows for overriding a table's view name, which allows having separate tables for a synced mode and a local-only mode, and moving data between the two.

    • [IMPROVED] Table change updates to be throttled on the trailing edge. This prevents unnecessary query on both the leading and rising edge.

v1.1.0

  • [FIXED] Watched queries from updating before writes have been committed on the write connection.

  • Updated dependencies:

    • [IMPROVED] Added the ability to receive batched table updates from DB adapters.

v1.0.1

  • Updated dependencies:

    • [IMPROVED] Connector CRUD uploads will now be triggered whenever an internal CRUD operation change is triggered.

    • [IMPROVED] CRUD upload debouncing will now rather use a throttled approach - executing multiple continuous write/CRUD operations will now trigger a connector upload at most (every) 1 second (by default).

v1.0.0

  • Stable release.

v0.1.0

  • [ADDED] Support for concurrent reads and writes (one write and multiple reads). Concurrent connections help ensure that an app's UI isn't blocked when writes are being processed.

  • [ADDED] Logging functionality to assist with debugging.

    • Added display for exceptions that occur during streaming operations from the PowerSync Service.

    • Added a note to the docs for configuring debug log levels.

    • Added warnings if the required Polyfills are not correctly configured.

  • [IMPROVED] More frequent updates of sync status connectivity.

  • [IMPROVED] Updated dependencies.

Powered by LaunchNotes