Skip to content

Mark dispose as Deprecated - #683

Merged
stevensJourney merged 2 commits into
mainfrom
deprecate-dispose
Aug 4, 2025
Merged

Mark dispose as Deprecated#683
stevensJourney merged 2 commits into
mainfrom
deprecate-dispose

Conversation

@stevensJourney

Copy link
Copy Markdown
Collaborator

Overview

The AbstractPowerSyncDatabase currently extends BaseObserver which exposes a public dispose method. There aren't many use cases for calling this method directly. Its public visibility can cause confusion.

This PR marks the dispose method as deprecated in order to avoid said confusion.

@changeset-bot

changeset-bot Bot commented Aug 4, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: b2cfe35

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 8 packages
Name Type
@powersync/common Patch
@powersync/adapter-sql-js Patch
@powersync/node Patch
@powersync/op-sqlite Patch
@powersync/react-native Patch
@powersync/tanstack-react-query Patch
@powersync/web Patch
@powersync/diagnostics-app Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@stevensJourney
stevensJourney requested a review from Copilot August 4, 2025 06:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR deprecates the dispose method in AbstractPowerSyncDatabase to reduce confusion about its usage, directing users to use the close method instead.

  • Adds a @deprecated JSDoc annotation to the dispose method with guidance to use close instead
  • Updates changeset documentation to reflect the deprecation

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
packages/common/src/client/AbstractPowerSyncDatabase.ts Overrides the inherited dispose method with deprecation annotation and documentation
.changeset/healthy-grapes-sit.md Documents the deprecation change for release notes

Comment thread .changeset/healthy-grapes-sit.md Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@stevensJourney
stevensJourney marked this pull request as ready for review August 4, 2025 07:59
@stevensJourney
stevensJourney merged commit 7609155 into main Aug 4, 2025
12 of 15 checks passed
@stevensJourney
stevensJourney deleted the deprecate-dispose branch August 4, 2025 07:59
whygee-dev pushed a commit to whygee-dev/powersync-js that referenced this pull request Oct 18, 2025
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants