Skip to content

Releases: clockworklabs/spacetimedb-typescript-sdk

@clockworklabs/[email protected]

04 Mar 19:40
dcb253d
Compare
Choose a tag to compare

Changelog

1.0.0-rc1.0

Major Changes

Minor Changes

Patch Changes

0.12.1

Patch Changes

0.12.0

Minor Changes

Patch Changes

0.8.0 (2023-12-11)

Bug Fixes

  • Properly use BigInt for any numbers bigger than 32 bits
  • Fix generating primary key names to be camel case

Features

  • Added ability to start multiple SpacetimeDB clients. New clients will have a separate ClientDB

  • Changed the return type of functions returning table records - now they are arras instead of iterators

  • Reducer callbacks have args passed in separately, which makes it easier to know what types they are
    For example a reducer taking a single string argument will have a callback signature like (reducerEvent: ReducerEvent, name: string)
    instead of (reducerEvent: ReducerEvent, args: any[])

  • We now require explicitly registering any tables or reducers with SpacetimeDBClient.registerReducers() and SpacetimeDBClient.registerTables().
    This also allows to register child classes, which in turn allows to use customized table classes. We will add more info
    on how to do it in the future. This makes it also harder to run into weird issues. If you only import a reducer, but not use
    it to set any callbacks, Node.js will filter out the import. If you then subscribe to a table SpacetimeDBClient will be unable
    to find the reducer. To ensure this is not happening people were adding a console.log statement listing and used classes to
    stop Node.js from filtering out any imports, like console.log(SayHelloReducer). Now with the reducer call it's more explicit

  • In this release we have also moved some methods from generated types into the SDK, which should result in a smaller footprint from
    generated classes

  • Generated sum types are now easier to use. For sum types without any values you can use their type name as value, for example given an
    enum in Rust:

    enum UserRole {
        Admin,
        Moderator,
        User,
        Other(String)
    }

    you can now use types itself as values. For example given a reducer for setting a role you could now do the following in TypeScript:

    SetRoleReducer.call(UserRole.Admin);
    SetRoleReducer.call(UserRole.Other('another role'));

@clockworklabs/[email protected]

28 Feb 22:48
1d0ad5d
Compare
Choose a tag to compare

Changelog

1.0.0-rc1.0

Major Changes

Minor Changes

Patch Changes

0.12.1

Patch Changes

0.12.0

Minor Changes

Patch Changes

0.8.0 (2023-12-11)

Bug Fixes

  • Properly use BigInt for any numbers bigger than 32 bits
  • Fix generating primary key names to be camel case

Features

  • Added ability to start multiple SpacetimeDB clients. New clients will have a separate ClientDB

  • Changed the return type of functions returning table records - now they are arras instead of iterators

  • Reducer callbacks have args passed in separately, which makes it easier to know what types they are
    For example a reducer taking a single string argument will have a callback signature like (reducerEvent: ReducerEvent, name: string)
    instead of (reducerEvent: ReducerEvent, args: any[])

  • We now require explicitly registering any tables or reducers with SpacetimeDBClient.registerReducers() and SpacetimeDBClient.registerTables().
    This also allows to register child classes, which in turn allows to use customized table classes. We will add more info
    on how to do it in the future. This makes it also harder to run into weird issues. If you only import a reducer, but not use
    it to set any callbacks, Node.js will filter out the import. If you then subscribe to a table SpacetimeDBClient will be unable
    to find the reducer. To ensure this is not happening people were adding a console.log statement listing and used classes to
    stop Node.js from filtering out any imports, like console.log(SayHelloReducer). Now with the reducer call it's more explicit

  • In this release we have also moved some methods from generated types into the SDK, which should result in a smaller footprint from
    generated classes

  • Generated sum types are now easier to use. For sum types without any values you can use their type name as value, for example given an
    enum in Rust:

    enum UserRole {
        Admin,
        Moderator,
        User,
        Other(String)
    }

    you can now use types itself as values. For example given a reducer for setting a role you could now do the following in TypeScript:

    SetRoleReducer.call(UserRole.Admin);
    SetRoleReducer.call(UserRole.Other('another role'));

@clockworklabs/[email protected]

19 Feb 19:12
f16185d
Compare
Choose a tag to compare

Changelog

1.0.0-rc1.0

Major Changes

Minor Changes

Patch Changes

0.12.1

Patch Changes

0.12.0

Minor Changes

Patch Changes

0.8.0 (2023-12-11)

Bug Fixes

  • Properly use BigInt for any numbers bigger than 32 bits
  • Fix generating primary key names to be camel case

Features

  • Added ability to start multiple SpacetimeDB clients. New clients will have a separate ClientDB

  • Changed the return type of functions returning table records - now they are arras instead of iterators

  • Reducer callbacks have args passed in separately, which makes it easier to know what types they are
    For example a reducer taking a single string argument will have a callback signature like (reducerEvent: ReducerEvent, name: string)
    instead of (reducerEvent: ReducerEvent, args: any[])

  • We now require explicitly registering any tables or reducers with SpacetimeDBClient.registerReducers() and SpacetimeDBClient.registerTables().
    This also allows to register child classes, which in turn allows to use customized table classes. We will add more info
    on how to do it in the future. This makes it also harder to run into weird issues. If you only import a reducer, but not use
    it to set any callbacks, Node.js will filter out the import. If you then subscribe to a table SpacetimeDBClient will be unable
    to find the reducer. To ensure this is not happening people were adding a console.log statement listing and used classes to
    stop Node.js from filtering out any imports, like console.log(SayHelloReducer). Now with the reducer call it's more explicit

  • In this release we have also moved some methods from generated types into the SDK, which should result in a smaller footprint from
    generated classes

  • Generated sum types are now easier to use. For sum types without any values you can use their type name as value, for example given an
    enum in Rust:

    enum UserRole {
        Admin,
        Moderator,
        User,
        Other(String)
    }

    you can now use types itself as values. For example given a reducer for setting a role you could now do the following in TypeScript:

    SetRoleReducer.call(UserRole.Admin);
    SetRoleReducer.call(UserRole.Other('another role'));

@clockworklabs/[email protected]

06 Nov 20:48
93dea53
Compare
Choose a tag to compare
Pre-release

Major Changes

Minor Changes

Patch Changes

@clockworklabs/[email protected]

08 Oct 18:10
3bc40e3
Compare
Choose a tag to compare

Patch Changes

@clockworklabs/[email protected]

04 Oct 05:53
cfa9211
Compare
Choose a tag to compare

Minor Changes

Patch Changes