Skip to content

v8.0.0

Latest

Choose a tag to compare

@github-actions github-actions released this 16 Apr 03:28
· 8 commits to master since this release
v8.0.0
c06a80c

   🚨 Breaking Changes

  • Message property restructuring — Flat properties on message classes are now grouped into nested objects. Old names are kept as @deprecated getters 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, and RoomstateMessage.

  • ESM-only — CommonJS output removed. Package is now ESM-only (dist/index.mjs). No more .cjs entry, 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+ requiredengines: ">=22". Node 20 is EOL very soon, did not see the point, and i wanted to use the built-in WebSocket.

  • Dropped simple-websocket and non-secure WS connections — WebSocket transport now uses Node's built-in WHATWG WebSocket (v22+). Non-secure ws:// connections removed; only wss:// is supported. You can still attempt to connect via url to ws://, but Twitch says they reject it.

  • IDId in camel case naming — All *ID properties renamed to *Id (e.g. messageIDmessageId, threadIDthreadId, connectionIDconnectionId). Usernotice event params like recipientIDrecipientId. Old names are kept as @deprecated.

  • Dropped split2 and duplexify — Replaced with node:readline createInterface for IRC line splitting, and a simpler Duplex implementation for the WebSocket transport.

  • Userstate/Roomstate trackers always includedclient.roomStateTracker and client.userStateTracker are now always present (readonly, non-optional). The canSpamFast utility no longer accepts undefined for the tracker.

  • Build system: rollup → tsdownrollup.config.js deleted. Build now uses tsdown --unbundle.

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub