Skip to content

Commit bca4ce2

Browse files
authored
fix(deps): bump stream-chat to 10.0.0-rc.28 (#3369)
Ticket: https://linear.app/stream/issue/REACT-1483 ### Goal Bump `stream-chat` to `10.0.0-rc.28`, the current `rc` tag, across the root package and every example workspace. ### Implementation details - Peer dependency raised to `^10.0.0-rc.28`; the dev dependency and the `ai-chatbot`, `cookbook`, `tutorial` and `vite` examples are pinned to `10.0.0-rc.28`, so the lockfile resolves a single copy. - rc.28 nests composer custom data (`customDataManager.setMessageData()`) under `message.custom` instead of spreading it onto the message. Nothing in `src/` read it at the top level; the two `MessageInput` submit assertions now expect `{ custom: … }`. - rc.28 types `message.delivered`'s `last_delivered_at` as unix nanoseconds (`TimestampNS`) and no longer parses an RFC3339 string. `src/mock-builders/event/messageDelivered.ts` now sends nanoseconds; the vite example's event template already did. - Integrators who read custom composer data at the top level of a sent message will see it under `message.custom` after upgrading `stream-chat`. Verified: `yarn test` (3314 passed), `tsc -p tsconfig.lib.json --noEmit` clean, lint-staged clean. The four affected tests pass on rc.25 at `master` and failed on rc.28 before the test updates. ### UI Changes None. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Updates** * Updated the Stream Chat package version used by the examples and main package to a newer prerelease. * **Bug Fixes** * Mock delivered-message events now provide delivery timestamps in the expected timestamp format. * **Tests** * Updated message-composer test expectations for custom message data nested under `custom`. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent c22f3f8 commit bca4ce2

8 files changed

Lines changed: 27 additions & 28 deletions

File tree

‎examples/ai-chatbot/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"next": "^16.2.4",
1919
"react": "^19.2.6",
2020
"react-dom": "^19.2.6",
21-
"stream-chat": "10.0.0-rc.25",
21+
"stream-chat": "10.0.0-rc.28",
2222
"stream-chat-react": "workspace:^"
2323
},
2424
"devDependencies": {

‎examples/cookbook/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"react": "^19.2.6",
2020
"react-dom": "^19.2.6",
2121
"react-leaflet": "^5.0.0",
22-
"stream-chat": "10.0.0-rc.25",
22+
"stream-chat": "10.0.0-rc.28",
2323
"stream-chat-react": "workspace:^"
2424
},
2525
"devDependencies": {

‎examples/tutorial/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"emoji-mart": "^5.6.0",
1717
"react": "^19.2.6",
1818
"react-dom": "^19.2.6",
19-
"stream-chat": "10.0.0-rc.25",
19+
"stream-chat": "10.0.0-rc.28",
2020
"stream-chat-react": "workspace:^"
2121
},
2222
"devDependencies": {

‎examples/vite/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"modern-normalize": "^3.0.1",
1919
"react": "^19.2.6",
2020
"react-dom": "^19.2.6",
21-
"stream-chat": "10.0.0-rc.25",
21+
"stream-chat": "10.0.0-rc.28",
2222
"stream-chat-react": "workspace:^"
2323
},
2424
"devDependencies": {

‎package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@
144144
"modern-normalize": "^3.0.1",
145145
"react": "^19.0.0 || ^18.0.0 || ^17.0.0",
146146
"react-dom": "^19.0.0 || ^18.0.0 || ^17.0.0",
147-
"stream-chat": "^10.0.0-rc.25"
147+
"stream-chat": "^10.0.0-rc.28"
148148
},
149149
"peerDependenciesMeta": {
150150
"@breezystack/lamejs": {
@@ -210,7 +210,7 @@
210210
"react-dom": "^19.2.6",
211211
"sass": "^1.100.0",
212212
"semantic-release": "^25.0.3",
213-
"stream-chat": "10.0.0-rc.25",
213+
"stream-chat": "10.0.0-rc.28",
214214
"typescript": "^6.0.3",
215215
"typescript-eslint": "^8.59.4",
216216
"vite": "^8.1.3",

‎src/components/MessageComposer/__tests__/MessageInput.test.tsx‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,7 +1075,7 @@ describe(`MessageInputFlat`, () => {
10751075
await waitFor(() => {
10761076
expect(sendMessageMock).toHaveBeenCalledWith(
10771077
customChannel,
1078-
expect.objectContaining(customMessageData),
1078+
expect.objectContaining({ custom: customMessageData }),
10791079
{},
10801080
);
10811081
});
@@ -1103,11 +1103,12 @@ describe(`MessageInputFlat`, () => {
11031103

11041104
await act(() => submit());
11051105

1106-
// The custom handler receives the composed message (text + custom data) and the send options.
1106+
// The custom handler receives the composed message (text + custom data, nested under `custom`)
1107+
// and the send options.
11071108
await waitFor(() =>
11081109
expect(sendMessageMock).toHaveBeenCalledWith(
11091110
customChannel,
1110-
expect.objectContaining({ text: messageText, ...customMessageData }),
1111+
expect.objectContaining({ custom: customMessageData, text: messageText }),
11111112
{},
11121113
),
11131114
);

‎src/mock-builders/event/messageDelivered.ts‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,9 @@ type MessageDeliveredEvent = {
1515
channel_member_count: number;
1616
channel_type: string;
1717
cid: string;
18-
// `created_at` is unix nanoseconds like other wire timestamps, but the spec declares
19-
// `last_delivered_at` as a plain string, so it arrives as RFC3339.
2018
created_at: TimestampNS;
2119
custom: CustomEventData;
22-
last_delivered_at: string;
20+
last_delivered_at: TimestampNS;
2321
last_delivered_message_id: string;
2422
user: UserResponse;
2523
};
@@ -35,7 +33,7 @@ export const makeMessageDeliveredEvent = (
3533
cid: 'messaging:test',
3634
created_at: convertDateToTimestamp('2025-09-16T13:25:57.996011272Z'),
3735
custom: {},
38-
last_delivered_at: '2025-09-16T13:25:57Z',
36+
last_delivered_at: convertDateToTimestamp('2025-09-16T13:25:57Z'),
3937
last_delivered_message_id: 'aefbf38a-0e02-4ba6-a480-e595c37ec78a',
4038
type: 'message.delivered',
4139
user: {
@@ -74,7 +72,7 @@ export const dispatchMessageDeliveredEvent = ({
7472
channel_type: channel.type,
7573
cid: channel.cid,
7674
created_at: convertDateToTimestamp(),
77-
last_delivered_at: deliveredAt,
75+
last_delivered_at: convertDateToTimestamp(deliveredAt),
7876
last_delivered_message_id: lastDeliveredMessageId,
7977
user,
8078
}),

‎yarn.lock‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2160,14 +2160,14 @@ __metadata:
21602160
languageName: node
21612161
linkType: hard
21622162

2163-
"@stream-io/logger@npm:^2.0.0":
2163+
"@stream-io/logger@npm:^2.1.0":
21642164
version: 2.1.0
21652165
resolution: "@stream-io/logger@npm:2.1.0"
21662166
checksum: 10c0/0a09c9420b8bbec7a3007bf02acccaf7c0792b18d76eb791198e2a20890f1244b42788c3cc99d6ab52a591f49fde80dd6b2236e194f95f03b36fce5d0aa71dc3
21672167
languageName: node
21682168
linkType: hard
21692169

2170-
"@stream-io/state-store@npm:^1.1.6, @stream-io/state-store@npm:^1.2.0":
2170+
"@stream-io/state-store@npm:^1.2.0":
21712171
version: 1.2.0
21722172
resolution: "@stream-io/state-store@npm:1.2.0"
21732173
peerDependencies:
@@ -2197,7 +2197,7 @@ __metadata:
21972197
react: "npm:^19.2.6"
21982198
react-dom: "npm:^19.2.6"
21992199
sass: "npm:^1.100.0"
2200-
stream-chat: "npm:10.0.0-rc.25"
2200+
stream-chat: "npm:10.0.0-rc.28"
22012201
stream-chat-react: "workspace:^"
22022202
typescript: "npm:^6.0.3"
22032203
languageName: unknown
@@ -2219,7 +2219,7 @@ __metadata:
22192219
react: "npm:^19.2.6"
22202220
react-dom: "npm:^19.2.6"
22212221
react-leaflet: "npm:^5.0.0"
2222-
stream-chat: "npm:10.0.0-rc.25"
2222+
stream-chat: "npm:10.0.0-rc.28"
22232223
stream-chat-react: "workspace:^"
22242224
typescript: "npm:^6.0.3"
22252225
vite: "npm:^8.1.3"
@@ -2237,7 +2237,7 @@ __metadata:
22372237
emoji-mart: "npm:^5.6.0"
22382238
react: "npm:^19.2.6"
22392239
react-dom: "npm:^19.2.6"
2240-
stream-chat: "npm:10.0.0-rc.25"
2240+
stream-chat: "npm:10.0.0-rc.28"
22412241
stream-chat-react: "workspace:^"
22422242
typescript: "npm:^6.0.3"
22432243
vite: "npm:^8.1.3"
@@ -2265,7 +2265,7 @@ __metadata:
22652265
react: "npm:^19.2.6"
22662266
react-dom: "npm:^19.2.6"
22672267
sass: "npm:^1.100.0"
2268-
stream-chat: "npm:10.0.0-rc.25"
2268+
stream-chat: "npm:10.0.0-rc.28"
22692269
stream-chat-react: "workspace:^"
22702270
typescript: "npm:^6.0.3"
22712271
vite: "npm:^8.1.3"
@@ -10340,7 +10340,7 @@ __metadata:
1034010340
remark-parse: "npm:^11.0.0"
1034110341
sass: "npm:^1.100.0"
1034210342
semantic-release: "npm:^25.0.3"
10343-
stream-chat: "npm:10.0.0-rc.25"
10343+
stream-chat: "npm:10.0.0-rc.28"
1034410344
typescript: "npm:^6.0.3"
1034510345
typescript-eslint: "npm:^8.59.4"
1034610346
unified: "npm:^11.0.5"
@@ -10358,7 +10358,7 @@ __metadata:
1035810358
modern-normalize: ^3.0.1
1035910359
react: ^19.0.0 || ^18.0.0 || ^17.0.0
1036010360
react-dom: ^19.0.0 || ^18.0.0 || ^17.0.0
10361-
stream-chat: ^10.0.0-rc.25
10361+
stream-chat: ^10.0.0-rc.28
1036210362
dependenciesMeta:
1036310363
"@parcel/watcher":
1036410364
built: true
@@ -10382,20 +10382,20 @@ __metadata:
1038210382
languageName: unknown
1038310383
linkType: soft
1038410384

10385-
"stream-chat@npm:10.0.0-rc.25":
10386-
version: 10.0.0-rc.25
10387-
resolution: "stream-chat@npm:10.0.0-rc.25"
10385+
"stream-chat@npm:10.0.0-rc.28":
10386+
version: 10.0.0-rc.28
10387+
resolution: "stream-chat@npm:10.0.0-rc.28"
1038810388
dependencies:
10389-
"@stream-io/logger": "npm:^2.0.0"
10390-
"@stream-io/state-store": "npm:^1.1.6"
10389+
"@stream-io/logger": "npm:^2.1.0"
10390+
"@stream-io/state-store": "npm:^1.2.0"
1039110391
axios: "npm:^1.19.0"
1039210392
linkifyjs: "npm:^4.3.3"
1039310393
dependenciesMeta:
1039410394
esbuild:
1039510395
built: true
1039610396
husky:
1039710397
built: true
10398-
checksum: 10c0/cb8a316988d73c00347c9a98047246ac05cbedcba28560afaa6358b6e022b84350a51bb80a73bf3376ff68a91fffe2d203414831b342200cde831972ea027d11
10398+
checksum: 10c0/0132ae268d1b228eeb8b70a08b03eff77e955f8a2215fcf7804fa4df8dd7c032adc3a356d934cbf883fd4835f823612ec9d53ccf3948c494023ae5d636341f01
1039910399
languageName: node
1040010400
linkType: hard
1040110401

0 commit comments

Comments
 (0)