What's changing: The JavaScript SDK v2 pre-release refactors database open and sync option types: factory objects previously passed via the database constructor key must now use a factory key; the flags constructor field and WebSQLFlags type are removed (options redistributed across database, broadcastLogs, and other top-level keys); WASQLiteOpenFactory takes a restructured options object; and the default sync connection method changes from WebSocket to HTTP.
High priority — existing docs are now inaccurate or incomplete
-
JavaScript Web SDK Reference (https://docs.powersync.com/client-sdks/reference/javascript-web) — The "SQLite Virtual File Systems" section contains three code examples (OPFSCoopSyncVFS, AccessHandlePoolVFS, OPFSWriteAheadVFS) using database: new WASQLiteOpenFactory({...}); in v2, a factory object must be passed via the factory key, not database. The OPFSCoopSyncVFS example additionally sets flags: { enableMultiTabs: ... } inside the WASQLiteOpenFactory constructor, which is also removed. The "Using PowerSyncDatabase Flags" section documents the flags: { enableMultiTabs, broadcastLogs, disableSSRWarning, ssrMode, useWebWorker } constructor option and the resolveWebPowerSyncFlags / WebPowerSyncFlags types — the flags field is removed in v2 and these options are distributed across other keys. The "Connection Methods" section states "1. WebSocket (Default)" and "By default, the PowerSyncDatabase.connect() method uses WebSocket" — in v2 the default changes to HTTP.
-
Next.js SDK (https://docs.powersync.com/client-sdks/frameworks/next-js) — The database initialization example uses database: new WASQLiteOpenFactory({...}) and flags: { disableSSRWarning: true } on the constructor. Both patterns are removed in v2.
-
Capacitor SDK Reference (https://docs.powersync.com/client-sdks/reference/capacitor) — The initialization example uses database: isWeb ? new WASQLiteOpenFactory({ dbFilename: "mydb.sqlite" }) : new CapacitorSQLiteOpenFactory(...). Passing a factory object as the database value is removed in v2.
-
Troubleshooting (https://docs.powersync.com/debugging/troubleshooting) — A VFS configuration snippet uses database: new WASQLiteOpenFactory({ dbFilename: 'exampleVFS.db', ... }), which is wrong for v2.
For reviewer consideration — may be worth documenting
client-sdks/frameworks/react-native-web-support.mdx — Verified to use WASQLiteOpenFactory in code examples; the exact constructor call pattern (database: factory vs. factory: factory) was not confirmed. If it passes the factory via the database key, it is also affected.
client-sdks/reference/react-native-and-expo.mdx — The "Connection Methods" section also states "WebSocket (Default)" and includes "Not needed when using websockets, which is the default since @powersync/react-native@1.11.0". Whether the React Native package inherits the connection method default change is unclear since @powersync/react-native is not in the PR changeset.
Source PR: powersync-ja/powersync-js#987 — merged to the v2 pre-release branch on 2026-06-12. This change has not shipped in a stable release.
Filed automatically by Claude Code (claude-sonnet-4-6). A human must verify the scope, prepare the docs PR, and publish it only once this update has been released.
What's changing: The JavaScript SDK v2 pre-release refactors database open and sync option types: factory objects previously passed via the
databaseconstructor key must now use afactorykey; theflagsconstructor field andWebSQLFlagstype are removed (options redistributed acrossdatabase,broadcastLogs, and other top-level keys);WASQLiteOpenFactorytakes a restructured options object; and the default sync connection method changes from WebSocket to HTTP.High priority — existing docs are now inaccurate or incomplete
JavaScript Web SDK Reference (
https://docs.powersync.com/client-sdks/reference/javascript-web) — The "SQLite Virtual File Systems" section contains three code examples (OPFSCoopSyncVFS, AccessHandlePoolVFS, OPFSWriteAheadVFS) usingdatabase: new WASQLiteOpenFactory({...}); in v2, a factory object must be passed via thefactorykey, notdatabase. The OPFSCoopSyncVFS example additionally setsflags: { enableMultiTabs: ... }inside theWASQLiteOpenFactoryconstructor, which is also removed. The "Using PowerSyncDatabase Flags" section documents theflags: { enableMultiTabs, broadcastLogs, disableSSRWarning, ssrMode, useWebWorker }constructor option and theresolveWebPowerSyncFlags/WebPowerSyncFlagstypes — theflagsfield is removed in v2 and these options are distributed across other keys. The "Connection Methods" section states "1. WebSocket (Default)" and "By default, thePowerSyncDatabase.connect()method uses WebSocket" — in v2 the default changes to HTTP.Next.js SDK (
https://docs.powersync.com/client-sdks/frameworks/next-js) — The database initialization example usesdatabase: new WASQLiteOpenFactory({...})andflags: { disableSSRWarning: true }on the constructor. Both patterns are removed in v2.Capacitor SDK Reference (
https://docs.powersync.com/client-sdks/reference/capacitor) — The initialization example usesdatabase: isWeb ? new WASQLiteOpenFactory({ dbFilename: "mydb.sqlite" }) : new CapacitorSQLiteOpenFactory(...). Passing a factory object as thedatabasevalue is removed in v2.Troubleshooting (
https://docs.powersync.com/debugging/troubleshooting) — A VFS configuration snippet usesdatabase: new WASQLiteOpenFactory({ dbFilename: 'exampleVFS.db', ... }), which is wrong for v2.For reviewer consideration — may be worth documenting
client-sdks/frameworks/react-native-web-support.mdx— Verified to useWASQLiteOpenFactoryin code examples; the exact constructor call pattern (database: factoryvs.factory: factory) was not confirmed. If it passes the factory via thedatabasekey, it is also affected.client-sdks/reference/react-native-and-expo.mdx— The "Connection Methods" section also states "WebSocket (Default)" and includes "Not needed when using websockets, which is the default since@powersync/react-native@1.11.0". Whether the React Native package inherits the connection method default change is unclear since@powersync/react-nativeis not in the PR changeset.Source PR: powersync-ja/powersync-js#987 — merged to the
v2pre-release branch on 2026-06-12. This change has not shipped in a stable release.Filed automatically by Claude Code (
claude-sonnet-4-6). A human must verify the scope, prepare the docs PR, and publish it only once this update has been released.