Skip to content

Commit 1f25781

Browse files
author
Luke
authored
2.4/1.2 Release (#128)
1 parent a15fd5f commit 1f25781

File tree

4 files changed

+15
-3
lines changed

4 files changed

+15
-3
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,21 @@ The format is based on [keep a changelog](http://keepachangelog.com/) and this p
55

66
### Unreleased
77

8+
### Added
9+
- Added more details comments and documentation on objects and methods.
10+
811
### Changed
912
- 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.
13+
- Changed `StreamData.stream_presence` to `StreamData.sender`. This field should be populated correctly now.
14+
- Changed `MatchData.presences` to a singular `MatchData.presence`. This presence represents the sender. This field should be populated correctly now.
15+
- Match and party data payloads are now serialized as protobuf when using the protobuf adapter.
16+
- 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.
17+
- 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.
18+
- Also due to this change, `MatchData` and `PartyData` have their `data` fields typed as a `Uint8Array`. This breaks
19+
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.
1020

21+
### Fixed
22+
- Fixed an issue with our base64 dependency in React Native.
1123

1224
### [2.3.0]
1325

packages/nakama-js-protobuf/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@heroiclabs/nakama-js-protobuf",
3-
"version": "1.1.0",
3+
"version": "1.2.0",
44
"description": "Websocket adapter adding protocol buffer support to the Nakama Javascript client.",
55
"main": "dist/nakama-js-protobuf.cjs.js",
66
"module": "dist/nakama-js-protobuf.esm.mjs",

packages/nakama-js-test/socket-match.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ describe('Match Tests', () => {
188188
}, customid1, customid2, customid3, JSON.stringify(outerPayload), adapter);
189189

190190
expect(matchDataString).not.toBeNull();
191-
expect(JSON.parse(matchDataString).toEqual(outerPayload));
191+
expect(JSON.parse(matchDataString)).toEqual(outerPayload);
192192
});
193193

194194
it.each(adapters)('should join a match, then do not send data to excluded presences', async (adapter) => {

packages/nakama-js/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@heroiclabs/nakama-js",
3-
"version": "2.3.0",
3+
"version": "2.4.0",
44
"scripts": {
55
"build": "node build.js",
66
"docs": "typedoc index.ts --gaID UA-89839802-1 --out ../../docs"

0 commit comments

Comments
 (0)