🚨 Breaking Changes
- Message property restructuring — Flat properties on message classes are now grouped into nested objects. Old names are kept as
@deprecatedgetters for migration:
| Old | New |
|---|---|
msg.senderUsername |
msg.sender.login |
msg.senderUserID |
msg.sender.id |
msg.badges, msg.color, msg.displayName, etc. |
msg.sender.* |
msg.messageText |
msg.content |
msg.messageID |
msg.id |
msg.channelID |
msg.channel.id |
msg.channelName |
msg.channel.login |
msg.serverTimestamp |
msg.timestamp |
msg.replyParentMsgBody, msg.replyParentMessageID, etc. |
msg.replyParent.* |
msg.targetUsername (clearchat/clearmsg) |
msg.target.login |
msg.sourceID, msg.sourceBadges, etc. |
msg.source.* (SharedChatSource) |
msg.extractUserState() |
msg.sender directly |
-
This affects
PrivmsgMessage,UsernoticeMessage,WhisperMessage,ClearchatMessage,ClearmsgMessage,NoticeMessage, andRoomstateMessage. -
ESM-only — CommonJS output removed. Package is now ESM-only (
dist/index.mjs). No more.cjsentry, no declaration maps, source files no longer shipped in the package. Node v21+ can import ESM, you should not have issues. -
Removed
IgnoreUnhandledPromiseRejectionsMixin— The mixin is deleted. Unhandled rejections are no longer silently swallowed. -
Node.js v22+ required —
engines: ">=22". Node 20 is EOL very soon, did not see the point, and i wanted to use the built-in WebSocket. -
Dropped
simple-websocketand non-secure WS connections — WebSocket transport now uses Node's built-in WHATWGWebSocket(v22+). Non-securews://connections removed; onlywss://is supported. You can still attempt to connect via url tows://, but Twitch says they reject it. -
ID→Idin camel case naming — All*IDproperties renamed to*Id(e.g.messageID→messageId,threadID→threadId,connectionID→connectionId). Usernotice event params likerecipientID→recipientId. Old names are kept as@deprecated. -
Dropped
split2andduplexify— Replaced withnode:readlinecreateInterfacefor IRC line splitting, and a simplerDupleximplementation for the WebSocket transport. -
Userstate/Roomstate trackers always included —
client.roomStateTrackerandclient.userStateTrackerare now always present (readonly, non-optional). ThecanSpamFastutility no longer acceptsundefinedfor the tracker. -
Build system: rollup → tsdown —
rollup.config.jsdeleted. Build now usestsdown --unbundle.
🚀 Features
- Move build to tsdown - by @mastondzn (8703d)
- Drop dependency on
split2,duplexify- by @mastondzn (67344) - Add
chat.collectMessageshelper - by @mastondzn (fdd9c)
🐞 Bug Fixes
- Use stricter typescript plugin
includefield - by @mastondzn (61445) - Readline interface throws unhandled errors - by @mastondzn (37f67)