Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: publish new package versions (beta) #2198

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

github-actions[bot]
Copy link
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

main is currently in pre mode so this branch has prereleases rather than normal releases. If you want to exit prereleases, run changeset pre exit on main.

⚠️⚠️⚠️⚠️⚠️⚠️

Releases

@electric-sql/[email protected]

Patch Changes

@electric-sql/[email protected]

Patch Changes

  • ade15b9: Expose stream in the useShape result data. This allows React components to easily access the stream to match on.
  • Updated dependencies [ade15b9]
  • Updated dependencies [1c28aee]
  • Updated dependencies [ade15b9]
  • Updated dependencies [dd5aeab]

@electric-sql/[email protected]

Patch Changes

  • ade15b9: Expose shape.stream as public readonly property.

  • 1c28aee: Start streaming only after at least one subscriber is present.

  • ade15b9: Use "get" instead of "has" for checking searchParams

    Not all implementations of JS have the has(name, value) syntax e.g. Expo.

  • dd5aeab: This PR adds support for function-based options in the TypeScript client's params and headers. Functions can be either synchronous or asynchronous and are resolved in parallel when needed.

    const stream = new ShapeStream({
      url: 'http://localhost:3000/v1/shape',
      params: {
        table: 'items',
        userId: () => getCurrentUserId(),
        filter: async () => await getUserPreferences(),
      },
      headers: {
        Authorization: async () => `Bearer ${await getAccessToken()}`,
      },
    })

    Common Use Cases

    • Authentication tokens that need to be refreshed
    • User-specific parameters that may change
    • Dynamic filtering based on current state
    • Multi-tenant applications where context determines the request

@core/[email protected]

Patch Changes

  • 1b8dce0: Fix race condition where response comes before listener has monitored itself.
  • 71b8ab2: Add pool behaviour for the Elixir client to allow for per-client persistent connections. Add request timestamp and shape handle to replication stream messages.
  • fc1796a: Fix stalled elixir client streams by ensuring that requests are always made, even if calling process dies
  • 01c63ae: Fix race condition in elixir client when multiple simultaneous clients are streaming the same shape
  • 9f0b96a: Add generic params to client config that are appended to every request, remove database_id top-level config as it can be done via the params.

@core/[email protected]

Patch Changes

  • 8987142: Do not trap exits in Electric.Shapes.Consumer - not handled.
  • 218b7d4: fix: truncates no longer cause a stop to an incoming replication stream
  • 7caccbf: Return 202 for waiting and starting health status - accepts requests but will fail to service them.
  • d7e7c72: Introduced PublicationManager process to create and clean up publication filters.

@electric-sql/[email protected]

Patch Changes

  • dd5aeab: This PR adds support for function-based options in the TypeScript client's params and headers. Functions can be either synchronous or asynchronous and are resolved in parallel when needed.

    const stream = new ShapeStream({
      url: "http://localhost:3000/v1/shape",
      params: {
        table: "items",
        userId: () => getCurrentUserId(),
        filter: async () => await getUserPreferences(),
      },
      headers: {
        Authorization: async () => `Bearer ${await getAccessToken()}`,
      },
    })

    Common Use Cases

    • Authentication tokens that need to be refreshed
    • User-specific parameters that may change
    • Dynamic filtering based on current state
    • Multi-tenant applications where context determines the request

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.

1 participant