Skip to content

feat: support mediaType in watched attachments#975

Open
VIVAAN-DHAWAN wants to merge 1 commit into
powersync-ja:mainfrom
VIVAAN-DHAWAN:codex/watch-attachments-mediatype-922
Open

feat: support mediaType in watched attachments#975
VIVAAN-DHAWAN wants to merge 1 commit into
powersync-ja:mainfrom
VIVAAN-DHAWAN:codex/watch-attachments-mediatype-922

Conversation

@VIVAAN-DHAWAN
Copy link
Copy Markdown
Contributor

Closes #922

Summary

  • Add optional mediaType to WatchedAttachmentItem for filename and fileExtension variants.
  • Preserve watched mediaType when creating QUEUED_DOWNLOAD attachment records.
  • Document the new field and add a changeset for @powersync/common.

Verification

  • Reproduced the bug with the new regression: mediaType was null before the fix.
  • pnpm --filter @powersync/common build
  • pnpm --filter @powersync/node build
  • pnpm exec vitest run packages/node/tests/attachments.test.ts
  • pnpm exec prettier --check .changeset/fuzzy-cameras-sip.md packages/common/src/attachments/AttachmentQueue.ts packages/common/src/attachments/WatchedAttachmentItem.ts packages/node/tests/attachments.test.ts
  • git diff --check

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 24, 2026

🦋 Changeset detected

Latest commit: eacc0ce

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

This PR includes changesets to release 7 packages
Name Type
@powersync/common 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

Copy link
Copy Markdown
Contributor

@Chriztiaan Chriztiaan left a comment

Choose a reason for hiding this comment

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

Happy with the changes. Just update the changeset entry's level please.

@@ -0,0 +1,5 @@
---
'@powersync/common': patch
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.

This change affects the public API surface of WatchedAttachmentItem (even though non-breaking). I think this should be a minor change instead.

@Chriztiaan Chriztiaan added the Product Visibility This requires documentation changes and or announcing. label May 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Product Visibility This requires documentation changes and or announcing.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

watchAttachments: support mediaType in WatchedAttachmentItem

2 participants