- DATE:
- AUTHOR:
- PowerSync Product Team
JS Web Client SDK: v1.11.0
We are pleased to announce the release of version 1.11.0 of the PowerSync JavaScript/web client SDK.
See the full changelog below.
Have any questions or feedback? Chat with us and the PowerSync community on Discord.
Changelog
v1.11.0
[IMPROVED] WA-SQLite to
@journeyapps/wa-sqlite@1.0.0
which includes internal improvements and bug-fixes from the upstream WA-SQLite.Note that WA-SQLite performed some changes to the virtual filesystem structure in this update. An automatic migration will be executed when upgrading, however no down-migration is available. Downgrading to
@journeyapps/wa-sqlite < 1.0.0
will require the IndexedDB storage to be erased (developers should be able to manually delete or rename the database).
v1.10.2
[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.10.1
[IMPROVED] Adds a check to confirm that navigator locks are present and throws an error otherwise, relevant for insecure contexts (e.g. http://127.0.0.2).
v1.10.0
[ADDED]
refreshSchema()
which will cause all connections to be aware of a schema change.
v1.9.2
[IMPROVED]
getCrudBatch
to use a default limit of 100 CRUD entries.
v1.9.1
[IMPROVED] Handle trailing forward slash in the POWERSYNC_URL environment variable.
v1.9.0
[IMPROVED] Updated
powersync-sqlite-core
to v0.3.0, which significantly improves the performance of incremental sync (see details).
v1.8.2
[IMPROVED] Deprecated the
rawTableNames
option inSQLWatchOptions
. All tables specified in thetables
option will now be watched, including PowerSync tables with prefixes.
v1.8.1
[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.8.0
[ADDED] UMD distribution to introduce
react-native-web
support (available under@powersync/web/umd
). Learn more here.[IMPROVED] DB and sync workers instantiation can now be overriden with a path or a factory method.
[IMPROVED] Removed
lodash
dependency.
v1.7.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.0 and introduces:
[ADDED] Custom
User-Agent
header andclient_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.
Additionally:
[IMPROVED] Merge
Table
andTableV2
definitions but keptTableV2
to avoid making this a breaking change. Find details in this PR.[FIXED] SSR Mode detection for DB adapters. Removed the potential for SSR Web Streaming implementations to perform syncing operations. More details in the PR.
v1.6.0
[IMPROVED] Significantly improved performance in syncing large data sets (e.g. initial syncs) by debouncing update notifications [PR].
[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.5.1
[FIXED] An issue where the shared sync manager would not discard stale credentials.
[FIXED]
hasSynced
status now resets correctly afterdisconnectAndClear
has been called.
v1.5.0
[IMPROVED] Added a warning if connector
uploadData
functions don't process CRUD items completely [PR].
v1.4.0
[IMPROVED] Polyfills are now prebundled into the SDK, requiring one less polyfill when using WebSockets.
v1.3.0
[ADDED]
debugMode
flag to log queries on the Developer Tools performance timeline [PR].
v1.2.1
[IMPROVED] Transactions that are reporting on failed rollback exceptions are now silenced when they are safe to ignore.
v1.2.0
[IMPROVED] The constructor behavior of
PowerSyncDatabase
and logic for opening the SQLite database.[DEPRECATED]
WASQLitePowerSyncDatabaseOpenFactory
v1.1.0
[ADDED] Support for client parameters to further filter data via sync rules.
v1.0.2
Updated dependencies:
[FIXED] CRUD uploads which would not retry after failing until the connection status was updated. A failed CRUD operation should not change the status to
connected: false
.
v1.0.1
Updated dependencies.
v1.0.0
This SDK is now in a stable release
Updated dependencies:
[ADDED] A mechanism for throttling watch callback executions.
v0.8.1
[FIXED] The issue where watched queries would not update after syncing upstream changes.
v0.8.0
[IMPROVED] Allow the package to be used without web workers.
v0.7.0
[IMPROVED] The import and usage of the BSON library.
v0.6.1
Updated dependencies:
[FIXED] An issue with Vite not being able to resolve Sourcemaps by introducing a
tsconfig.base
file in the root of the repo.
v0.6.0
[ADDED] Support for WebSocket sync stream connections. Learn more here.
Updated dependencies:
[IMPROVED] Removed the
uuid
dependency.
v0.5.3
Updated dependencies:
[FIXED]
hasSynced
to also change when there is no data on app load.
v0.5.2
Updated dependencies:
[IMPROVED] Allow compilable queries to be used as hook arguments so that queries from an ORM can be used.
[FIXED]
disconnectAndClear()
not clearingps_untyped
records.[FIXED] Incorrect type of
Schema.tables
.
v0.5.1
[IMRPOVED] Renamed the package from
@journeyapps/powersync-
to@powersync/
. The@journeyapps/powersync-sdk-web
package is deprecated and the renamed package is published here: https://www.npmjs.com/package/@powersync/webUpdated dependencies:
[FIXED] Default
onError
callback forwatch()
andonChange()
that used an unbounded member.
v0.5.0
Updated dependencies:
[ADDED] Support for Full-text search and enabled recursive triggers.
v0.4.1
Updated dependencies:
[ADDED]
hasSynced
property toSyncStatus
. This value is managed inAbstractPowerSyncDatabase
, and becomestrue
after the first sync has completed.[ADDED] Added
waitForFirstSync
method to allow users toawait
on the state change ofhasSynced
totrue
.[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.
v0.4.0
[ADDED] The ability to disable broadcast logging in
WebPowerSyncFlags
.[FIXED] Shared sync broadcast logger sanitization and error handling.
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.
v0.3.3
Updated dependencies:
v0.3.2
[IMPROVED] Minor code cleanup for the shared sync worker.
Updated dependencies:
[FIXED] A regression where watched queries would update for table changes in external (not in query) tables.
v0.3.1
[IMPROVED] Added some serialization checks for broadcasted logs from the shared web worker. Unserializable items will now return a warning.
[FIXED] An issue where
SyncBucketStorage
logs would not be broadcasted from the shared sync worker to individual tabs.Updated dependencies:
[FIXED] An issue where sync stream exceptions would not close previous streaming connections.
[IMPROVED] Reduced JS bundle size.
v0.3.0
[IMPROVED] Multiple tab syncing by unloading stream and sync bucket adapter functionality to shared webworker.
Updated dependencies:
[ADDED]
dispose
methods for sync stream clients and better closing of clients.[FIXED]
PowerSyncBackendConnector.fetchCredentials
type to allow returningnull
.[IMPROVED] Internally moved crud upload watching to
SqliteBucketStorageAdapter
.
v0.2.2
[FIXED] Issue on Next.js 14.1.0 where the shared sync web worker would fail to initialize.
Updated dependencies:
[ADDED]
equals
method onCrudEntry
class to better align comparison operations with JavaScript.[IMPROVED]
AbstractPowerSyncDatabase.getCrudBatch
now use agetAll
instead of usingdatabase.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.
v0.2.1
Updated dependencies:
[FIXED] Missing
transactionId
value in the response ofgetNextCrudTransaction
.
v0.2.0
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.
v0.1.3
[FIXED] Watched queries not updating due to race condition when opening multiple WA-SQLite connections due to initiating multiple PowerSync instances simultaneously.
v0.1.2
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).
[FIXED] A bug where opening multiple WA-SQLite instances to the same DB could break watched queries. This issue could arise when using multiple tabs or when opening multiple PowerSync instances for the same DB (e.g when initializing PowerSync in React strict mode under some circumstances).
v0.1.1
[ADDED] Two example projects:
demos/example-webpack - containing a minimal example demonstrating bundling with Webpack.
demos/example-vite - containing a minimal example demonstrating bundling with Vite.
[IMPROVED] Introduced a new
pnpm format
script to correctly format corresponding files with prettier.
[FIXED] Ignore directives for Vite to enable bundling the workers correctly.
v0.1.0
Initial beta release.