github clockworklabs/SpacetimeDB v1.6.0
Release v1.6.0 - TypeScript Modules (Beta)

latest release: sdks/typescript/v1.6.1
3 days ago
0_cy5S4LnOIInTBXed

TypeScript Modules (Beta)

TypeScript/JavaScript modules are finally here! We're extremely excited to announce v1.6. For the first time in several years we've added a new server module language, and it required a whole new runtime! SpacetimeDB now ships with v8.

In order to get started with TypeScript modules, follow our quickstart guide or read the module API reference. Publishing a TypeScript module is almost exactly the same as publishing a Rust or C# module. In order to get started simply run:

spacetime init --lang typescript # in the appropriate directory
spacetime publish <your-module-name> # in the directory with your package.json

The spacetime CLI tool will look for src/index.ts and automatically bundle your application and upload it to SpacetimeDB.

⚠️ BETA NOTICE: TypeScript modules are currently in beta. As a result performance is not representative of the final product. If you encounter bugs or other issues, please file a new issue here with the typescript-modules label.

Other Features

In v1.6 we are now also adding additional schema migration support, including adding columns to tables! In order to add a column, just add a column to the end of your table definition, specify a default value, and push the new module. The CLI will warn you if your new schema is compatible with existing clients, and will disconnect the appropriate clients if required by the migration. This is one more step in our journey to provide a world class schema migration experience for your apps and games.

Other improvements

  • Added a Default attribute to fields in C# modules
  • Database snapshot improvements:
    • The database snapshots at a more intelligent interval
    • Improve snapshot compression + metrics (#3296)
  • Unreal Engine
    • allow access to inherited properties from all contexts in Blueprint
    • Fixed some Unreal code generation bugs when using optional types.
    • Adding wss:// support for the Unreal SDK (#3328)
  • TypeScript SDK
    • Fixed an issue where we use table_name_camelcase instead of table_name for useTable in TypeScript
    • Fix bug where TypeScript SDK crashes when I32 is the primary key
  • Misc bugfixes:
    • Fixed an issue where Rust dependencies would automatically be rolled forward beyond the specified version
    • Fix some errors when using indexes on floating-point types
    • Reduced some spammy logs on the server side
  • Other miscellaneous performance improvements

What's Changed

New Contributors

Full Changelog: v1.5.0...v1.6.0

Don't miss a new SpacetimeDB release

NewReleases is sending notifications on new releases.