Skip to content

Add SyncConfig superclass for sync configurations#492

Merged
simolus3 merged 6 commits intomainfrom
common-sync-def-types
Feb 9, 2026
Merged

Add SyncConfig superclass for sync configurations#492
simolus3 merged 6 commits intomainfrom
common-sync-def-types

Conversation

@simolus3
Copy link
Contributor

@simolus3 simolus3 commented Feb 9, 2026

This adds the abstract SyncConfig class which is extended by the existing SqlSyncRules and the new PrecompiledSyncConfig class. This then refactors places where SqlSyncRules have previously been used to now use the common SyncConfig class.

The idea here is that can keep SqlSyncRules unchanged, and then have a separate but compatible class representing a compiled sync plan generated by the new compiler. In the future, it will also enable bucket storage implementations to store sync plans and return a PrecompiledSyncConfig instance instead of recompiling to SqlSyncRules when a sync plan is available.

Since precompiled sync plans don't have errors, I've moved the errors field to a separate interface (SyncConfigWithErrors).
SyncConfig follows the updated terminology we want to use to describe both sync rules and sync streams going forward.

@changeset-bot
Copy link

changeset-bot bot commented Feb 9, 2026

🦋 Changeset detected

Latest commit: ef22766

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

This PR includes changesets to release 18 packages
Name Type
@powersync/service-sync-rules Minor
@powersync/service-module-postgres-storage Patch
@powersync/service-module-mongodb-storage Patch
@powersync/service-core-tests Patch
@powersync/service-module-postgres Patch
@powersync/service-module-mongodb Patch
@powersync/service-core Patch
@powersync/service-jpgwire Patch
@powersync/lib-services-framework Patch
@powersync/service-module-mssql Patch
@powersync/service-module-mysql Patch
@powersync/service-schema Patch
@powersync/service-image Patch
@powersync/service-module-core Patch
test-client Patch
@powersync/lib-service-postgres Patch
@powersync/service-rsocket-router Patch
@powersync/lib-service-mongodb 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

@simolus3 simolus3 changed the title Add BaseSyncConfig interface for sync configurations Add SyncConfig superclass for sync configurations Feb 9, 2026
Copy link
Collaborator

@stevensJourney stevensJourney left a comment

Choose a reason for hiding this comment

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

Happy from my side :)

@simolus3 simolus3 merged commit 479997b into main Feb 9, 2026
25 checks passed
@simolus3 simolus3 deleted the common-sync-def-types branch February 9, 2026 16:09
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.

2 participants

Comments