github clockworklabs/SpacetimeDB v2.13.0
Release v2.13.0

3 hours ago

New Features

Reusable TypeScript submodules

TypeScript modules can now use a collection of reusable submodules for common application needs. The initial packages provide cron-style and interval scheduling, retry with exponential backoff, fixed-window rate limiting, cryptographic and encoding helpers, and Resend email integration.

The packages include typed APIs, installation documentation, tests, and examples. They can be installed in projects using SpacetimeDB 2.12 or later.

(#5903, #6158, #6309)

C# module submodules and namespaces

C# modules can now compose separately built module assemblies as submodules. Assembly-level namespace declarations control how a dependency is exposed in C# and, optionally, its canonical database namespace.

Namespaced tables, indexes, views, query builders, reducers, procedures, schedules, generated clients, subscriptions, and row-level security are supported. A module assembly can be published independently or referenced as a dependency without requiring a separate library build mode.

(#5974)

SpacetimeAuth management from the CLI

The new spacetime auth command group lets Maincloud users manage a database's SpacetimeAuth configuration from the command line. It supports identity-provider configuration, project settings, and client creation, inspection, and deletion.

(#5251)

Improvements

Confirmed HTTP calls now wait for durability

Confirmed HTTP reducer calls now report success only after their transaction is durable. Procedures using confirmed reads likewise wait for transactions opened through withTx to become durable before returning, preventing subsequent confirmed work from observing state that could still be lost in a crash.

Confirmation waits have a five-second deadline. A timed-out HTTP call returns 504 Gateway Timeout with an unknown-outcome error. Callers that do not require this guarantee can continue to use confirmed=false.

(#6101, #6154)

Lower subscription memory overhead

The datastore no longer clones the full subscriber state for each transaction. It records transaction-local subscriber and timestamp changes instead, substantially reducing memory usage for databases with many subscribers while preserving subscription and view behavior.

(#6113)

Deterministic TypeScript shuffling

TypeScript modules now provide deterministic random shuffling alongside the existing deterministic random helpers, making shuffled behavior reproducible within module execution and tests.

(#6040)

More complete module unit testing

Rust module unit tests can now access declared environment values and exercise procedures that open transactions with withTx. A new guide documents module unit testing for both Rust and TypeScript.

(#6302, #6245)

Security

Updated .NET XML cryptography dependency

The C# toolchain now uses an updated System.Security.Cryptography.Xml dependency that addresses a known vulnerability in the previous package version.

(#6290)

Bug Fixes

Correct TypeScript Result types and serialization

TypeScript result builders now use the same { ok: value } | { err: value } representation as the serializer and deserializer, and error values serialize with the correct variant. Code that compiled against the previous incorrect result shape may require adjustment, but the old shape could not work correctly at runtime.

(#6148)

Fixed TypeScript procedure HTTP edge cases

TypeScript module HTTP requests and handler responses no longer split header values at commas. This fixes headers such as webhook signatures, HTTP dates, and cookies with Expires attributes. ctx.http.fetch also accepts nonstandard status codes, such as proxy-specific 5xx responses, instead of throwing while constructing the response.

(#6140)

Fixed recursive C# struct type comparison

C# BSATN code generation no longer recurses indefinitely when comparing recursive struct type definitions.

(#6303)

Fixed generated project dependency paths

New projects created from templates now correctly rewrite module unit-test dependencies that use repository-local paths during development. Generated projects can once again build outside the SpacetimeDB source tree.

(#6307)

What's Changed

  • Added reusable TypeScript cron, retry, rate-limit, crypto, and Resend submodules in #5903, #6158, and #6309
  • Added C# module submodules and namespace-aware generated APIs in #5974
  • Added the spacetime auth CLI management commands in #5251
  • Made confirmed procedure transactions and HTTP reducer calls wait for durability in #6101 and #6154
  • Reduced subscription memory overhead by replacing full subscriber-state clones with transaction-local deltas in #6113
  • Added deterministic TypeScript random shuffling in #6040
  • Fixed TypeScript Result typing and error serialization in #6148
  • Fixed comma-containing HTTP headers and unknown status codes in TypeScript ctx.http.fetch in #6140
  • Fixed Rust module tests for procedure transactions and environment values in #6302
  • Fixed infinite recursion in C# BSATN type-definition comparison in #6303
  • Fixed repository-local dependency paths in generated CLI projects in #6307
  • Updated System.Security.Cryptography.Xml to address a known vulnerability in #6290

Full public changelog: v2.12.0...release/candidate/v2.13.0

Don't miss a new SpacetimeDB release

NewReleases is sending notifications on new releases.