Skip to content

Feature request: worker-less mode or test mock for @powersync/node #791

@mikecfisher

Description

@mikecfisher

Hi team, I'm using PowerSync with TanStack DB in a Next.js app and run my tests with Bun.

The problem: @powersync/node uses comlink + worker_threads internally, and Bun's worker_threads implementation has serialization bugs that cause TypeError: Unserializable return value when trying to initialize a PowerSync database.

Bun's worker support is still experimental (tracked in oven-sh/bun#15964) and there's no workaround on their side in the near term.

What would help:

  1. A worker-less mode for @powersync/node - even if slower, it would let us run integration tests
  2. Or a lightweight test mock that implements AbstractPowerSyncDatabase using synchronous SQLite (like bun:sqlite or better-sqlite3 without workers)

I want to test our TanStack DB collections end-to-end without needing to spin up Vitest separately just for PowerSync tests. Happy to help if you point me in the right direction.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions