Skip to content

[Drift] AbstractPowerSyncDatabase replaced by type alias in JS SDK v2 (powersync-js #993) #514

@benitav

Description

@benitav

What's changing: The JS SDK v2 pre-release restructures AbstractPowerSyncDatabase from an exported class into a type alias for the new CommonPowerSyncDatabase interface in @powersync/common. Implementation details move to the non-user-facing @powersync/shared-internals package. AbstractPowerSyncDatabase is preserved as a type alias for backward compatibility, so existing import and type-annotation patterns continue to compile in v2.

High priority — existing docs are now inaccurate or incomplete

  • React Native and Expo SDK Reference (https://docs.powersync.com/client-sdks/reference/react-native-and-expo) — currently links to https://powersync-ja.github.io/powersync-js/react-native-sdk/classes/AbstractPowerSyncDatabase#connect. Because AbstractPowerSyncDatabase is no longer a class in v2, the classes/AbstractPowerSyncDatabase TypeDoc URL will not exist when v2 API docs are published.
  • JavaScript Web SDK Reference (https://docs.powersync.com/client-sdks/reference/javascript-web) — links to https://powersync-ja.github.io/powersync-js/web-sdk/classes/AbstractPowerSyncDatabase#connect (same issue).
  • Capacitor SDK Reference (https://docs.powersync.com/client-sdks/reference/capacitor) — links to https://powersync-ja.github.io/powersync-js/web-sdk/classes/AbstractPowerSyncDatabase#connect (same issue).
  • Usage Examples (https://docs.powersync.com/client-sdks/usage-examples) — two links to classes/AbstractPowerSyncDatabase#waitforfirstsync (react-native-sdk and web-sdk variants), both subject to the same dead-link risk.

For reviewer consideration — may be worth documenting
Several pages import AbstractPowerSyncDatabase by name in TypeScript code examples (setup guide, Next.js guide, Supabase connector performance, React Native and Expo reference). Since the type alias is preserved, these imports still compile in v2 without modification. Whether to update those examples to use CommonPowerSyncDatabase — which is the new primary interface — is a docs judgment call.

Source PR: powersync-ja/powersync-js#993 — merged to the v2 pre-release branch on 2026-06-17.

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions