Packages

mqtt

5.16.1 · 14 Oct 2026MIT4.6M / weekRepositoryHomepagenpmAtom feed

Upgrading mqtt From 2.18.7 to 5.16.1

85 releases in betweennotes for 82

Other targets from 2.18.7Newest 2.x2.18.9
  1. 2.18.7yours
  2. 2 releases
  3. 3.0.0major
  4. 1 release
  5. 4.0.0major
  6. 9 releases
  7. 4.2.7security
  8. 4.2.8security
  9. 9 releases
  10. 5.0.0major
  11. 18 releases
  12. 5.3.5security
  13. 38 releases
  14. 5.16.0security
  15. 5.16.1target
5+
changes to make
0
advisories fixed
40+
new
105+
fixes

Counted from 82 of 85 release notes. Advisories are counted from the advisory database, in full.

Before you upgrade

Tick each one off as you go
  • Breaking5.0.0
  • Breaking5.0.0
  • Breaking5.0.0
  • Breaking5.0.0
  • Breaking5.0.0

Security

  • options is no longer mutated by a CONNACK. Code that read negotiated values back off options.properties.maximumPacketSize or options.keepalive must use the new client.serverProperties / client.keepalive getters instead.

    5.16.0
  • A refused CONNACK now always closes the socket. With reconnectOnConnackError: false (the default) the client previously sat on an open connection and kept delivering message events after telling the application the connection was refused.

    5.16.0
  • Protocol violations now drop the connection: a SUBACK reason-code count mismatch, an invalid Topic Alias, an unsolicited or out-of-spec AUTH, and a broker exceeding receiveMaximum on inbound QoS 2 (reason code 0x93). Reconnect stays armed in all cases.

    5.16.0
  • An ack that does not answer the command pending on that message id is dropped and reported via error, instead of running the wrong completion path.

    5.16.0
  • The unregistered-alias case now emits reason code 0x82 (Protocol Error) instead of 0x94.

    5.16.0
  • AUTH reason code 0 ends the exchange successfully; previously it produced an error with an empty reason string.

    5.16.0
  • properties.receiveMaximum outside 1..65535, or not an integer, is ignored and 65535 is enforced and advertised instead.

    5.16.0
  • The inbound packet-size cap now measures total wire size rather than Remaining Length, so it triggers on packets a few bytes smaller than before.

    5.16.0
  • New exports: PacketPump (src/lib/shared.ts), PendingCommand from the entry point.

    5.16.0
  • bounds-check the suback granted array against subscriptions sent (GHSA-rj8f-4655-cgg2) (#2061) (46ee23f), closes #2060

    5.16.0

Release by release

  1. 5.16.1

    14 Oct 20262 fixes
    • Fixed

      Reconnect instead of ending a client whose stream is already destroyed

    • Fixed

      Schedule browser process.nextTick with queueMicrotask (#2056) (648b79c), closes #2074

  2. 5.16.0

    Security fix16 Sep 2026
    • Security

      options is no longer mutated by a CONNACK. Code that read negotiated values back off options.properties.maximumPacketSize or options.keepalive must use the new client.serverProperties / client.keepalive getters instead.

    • Security

      A refused CONNACK now always closes the socket. With reconnectOnConnackError: false (the default) the client previously sat on an open connection and kept delivering message events after telling the application the connection was refused.

    • Security

      Protocol violations now drop the connection: a SUBACK reason-code count mismatch, an invalid Topic Alias, an unsolicited or out-of-spec AUTH, and a broker exceeding receiveMaximum on inbound QoS 2 (reason code 0x93). Reconnect stays armed in all cases.

    • Security

      An ack that does not answer the command pending on that message id is dropped and reported via error, instead of running the wrong completion path.

  3. 5.15.2

    6 Jul 20262 fixes
    • Fixed

      connect/tls: don't overwrite an explicit servername (SNI)

    • Fixed

      Support relative WebSocket URLs (#2049) (c4be563), closes #2035

  4. 5.15.1nothing new or fixed in the note

  5. 5.15.0

    2 Feb 20261 new
    • New

      Exported topic validation functions for external use (#2036) 396e02a, closes #2036

  6. 5.14.1

    4 Sep 20252 fixes
    • Fixed

      connect/ws: ensure proxy stream is writable (#2024) (fe45405), closes #1914

    • Fixed

      isWebWorkerEnv check for Deno environment

  7. 5.13.3 – 5.14.02 releases, nothing new or fixed in the notes

  8. 5.13.2

    7 Jul 20251 fix
38 other lines we could not sort, mostly version bumps
  • Create an util class BufferedDuplex to replace duplexify on ws ali and wx

    5.3.0
  • Partially fixes #876 (will keep this for another PR)

    5.3.0
  • Improve types in ws. Use window.WebSocket for Browser and ws module types for Node

    5.3.0
  • Significatly reduces bundle size by ~24% (90kB)

    5.3.0
  • Improved browser tests to subscribe to different topics to prevent false positives when running concurrently

    5.3.0
  • Migrate LruMap from collections to lru-cache.

    4.3.4
  • Removed collections.js dependency from number-allocator.

    4.3.3
  • Updated collections.js related package version.

    4.3.2
  • Update README.md

    4.3.0
  • Refined Topic Alias support. (Implement #1300)

    4.3.0

30 internal lines (docs, tests, tooling) left out.

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.