Skip to content

fix(sync-rules): emit type-only imports for SyncStream in TS schema - #847

Merged
rkistner merged 5 commits into
powersync-ja:mainfrom
Tyagiquamar:fix/843-ts-schema-type-imports
Oct 21, 2026
Merged

rkistner merged 5 commits into
powersync-ja:mainfrom
Tyagiquamar:fix/843-ts-schema-type-imports

Conversation

@Tyagiquamar

Copy link
Copy Markdown
Contributor

Summary

Generated TypeScript schemas imported PowerSyncDatabase and SyncStream as value imports. With verbatimModuleSyntax or strict bundlers, that fails because SyncStream is type-only. This PR marks both as type imports in TypeScript output.

Fixes #843

Test plan

  • Updated generate_schema expectations
  • CI (sync-rules package tests)

AI Assistance

Implemented with AI assistance (Composer).

PowerSyncDatabase and SyncStream are types in generated schema files.
Mark them as type imports so verbatimModuleSyntax and bundlers accept the output.

Fixes powersync-ja#843
@changeset-bot

changeset-bot Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 1e7cae0

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

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

@CLAassistant

CLAassistant commented Oct 18, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T11:02:49.299897Z 22d05b0 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

simolus3
simolus3 previously approved these changes Oct 18, 2026
Add a startsWith assertion for configs with empty streams so generated
JS schemas omit SyncStream and PowerSyncDatabase imports.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 54d6487135

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

simolus3
simolus3 previously approved these changes Oct 20, 2026
@rkistner
rkistner merged commit 6700c71 into powersync-ja:main Oct 21, 2026
35 checks passed
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.

TypeScript schema generator imports SyncStream as a value, failing under verbatimModuleSyntax

4 participants