Nakama Js Versions Save

JavaScript client for Nakama server written in TypeScript.

v2.7.1

7 months ago

Fixed

  • Regenerated nakama-js and nakama-js-protobuf distribution files to match v2.7.0

v2.7.0

7 months ago

Added

  • Satori: Added ability to schedule, update and delete outgoing messages for Live Events.
  • Satori: Added ability to add custom and default properties for a user at the point of authentication.
  • Satori: Add 'recompute' param to Satori's update-properties.
  • Satori: Added ability to delete identity.
  • Nakama: Added ability to create match by name.

Changed

  • Nakama: Improves how outgoing messages are logged in verbose mode.
  • Nakama: Updated signature for Authenticate Game Center.

Fixed

  • Nakama: Fixed typings distribution location for protobuf-js.
  • Nakama: Fixed how newer bundlers (such as those used by ViteJs) discover Nakama's type definitions.
  • Satori: Return live event ID when getting all live events.

v2.6.1

1 year ago

Added

  • You can now pass a onheartbeattimeout to the socket which will be called directly when a heartbeat timeout occurs. It will also still call ondisconnect once the socket is closed (which can take a few seconds for some browsers).

Fixed

  • Fixed a NodeJS compatibility issue by no longer depending on XMLHttpRequest.

v2.6.0

1 year ago

Added

  • The socket will now automatically heartbeat with the server from within nakama-js. If the server doesn't reply after a heartbeat timeout has elapsed, ondisconnect will be called. This should resolve issues with the socket detecting lack of internet connectivity in Chrome. You can configure the heartbeat tiemout with setHeartbeatTimeoutMs(ms : number) : void.

  • You can now pass a connectTimeoutMs to the socket connect call in order to set a connect timeout.

  • You can now pass a sendTimeoutMs to the socket constructor to detect timeouts for socket calls that expect a response.

The connect, send, and heartbeat timeouts are set to sensible default values.

Fixed

  • Fixed dispatching of onpartyclose.

v2.5.3

1 year ago

Fixed

  • Nakama and Satori ESM module files now correctly end in the .mjs extension.

v2.5.2

1 year ago

v2.5.1

1 year ago

Added

  • Added Satori client package (satori-js)

Changed

  • Remove Yarn in favour of NPM and updates dependencies to support Node 18 LTS

2.4.1

1 year ago

Fixed

This release is a republish of 2.4.0 but with the cjs distribution provided.

v2.4.0

1 year ago

Added

  • Added more details comments and documentation on objects and methods.

Changed

  • Changed data structure used to pass session variables to authentication methods. The old structure used was a Map<string, string>. We now use the Record<string, string> for serialization support.
  • Changed StreamData.stream_presence to StreamData.sender. This field should be populated correctly now.
  • Changed MatchData.presences to a singular MatchData.presence. This presence represents the sender. This field should be populated correctly now.
  • Match and party data payloads are now serialized as protobuf when using the protobuf adapter.
    • Because of this change, sendMatchState and sendPartyData can now receive bytes as input. If bytes are sent using the default text adapter, they are base64 encoded to a string.
      • These functions can no longer receive data payloads of type any. Any object previously passed in must be serialized to a string or bytes. This change is enforced at compile time.
    • Also due to this change, MatchData and PartyData have their data fields typed as a Uint8Array. This breaks backwards compatibility. Users who send a string as their match or party data will need to use a utility such as TextDecoder to deserialize the string. This change is enforced at compile time.

Fixed

  • Fixed an issue with our base64 dependency in React Native.

v2.3.0

2 years ago

Changed

  • Changed parameter list optionals and sequencing in rpcHttpKey.

    • The signature is now listed as follows: rpcHttpKey(httpKey: string, id: string, input?: object);
  • Renamed ApiOverrideOperator to ApiOperator.

  • Query params are now formatted with snake case rather than camel case internally by client.

Fixed

  • Fixed 401 Unauthorized Responses from the server in response to rpcHttpKey.