Skip to content

Commit d6e8355

Browse files
authored
Merge branch 'main' into dependabot/npm_and_yarn/babel/runtime-7.27.0
2 parents b25f378 + 1eb17d0 commit d6e8355

38 files changed

+282
-130
lines changed

.eslintrc.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,13 @@ module.exports = {
4747
'@typescript-eslint/naming-convention': 'off',
4848
'@typescript-eslint/dot-notation': 'off',
4949
'@typescript-eslint/no-use-before-define': 'off',
50+
'@typescript-eslint/consistent-type-imports': [
51+
'error',
52+
{
53+
'prefer': 'type-imports',
54+
'fixStyle': 'inline-type-imports',
55+
'disallowTypeAnnotations': true
56+
}
57+
]
5058
}
5159
}

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,33 @@
11

22

3+
# [5.13.0](https://github.com/mqttjs/MQTT.js/compare/v5.12.1...v5.13.0) (2025-05-09)
4+
5+
6+
### Features
7+
8+
* add `subscribeBatchSize` option to split subscribe packets for AWS IoT Core ([#1995](https://github.com/mqttjs/MQTT.js/issues/1995)) ([6b719c8](https://github.com/mqttjs/MQTT.js/commit/6b719c8cd11397bb13f06c36b3fa5a3840befacb))
9+
10+
## [5.12.1](https://github.com/mqttjs/MQTT.js/compare/v5.12.0...v5.12.1) (2025-05-06)
11+
12+
13+
### Bug Fixes
14+
15+
* add `@typescript-eslint/consistent-type-imports` rule and normalised all imports ([640cd3b](https://github.com/mqttjs/MQTT.js/commit/640cd3b9bd7d9a7d8ef59fa3fdd57a3a1c3ba345))
16+
17+
# [5.12.0](https://github.com/mqttjs/MQTT.js/compare/v5.11.1...v5.12.0) (2025-04-28)
18+
19+
20+
### Features
21+
22+
* **exports:** add react-native entry point to package.json ([#1988](https://github.com/mqttjs/MQTT.js/issues/1988)) ([622d3d8](https://github.com/mqttjs/MQTT.js/commit/622d3d8e7d8149bbb2ee03a01254e0ab9bf42e6c))
23+
24+
## [5.11.1](https://github.com/mqttjs/MQTT.js/compare/v5.11.0...v5.11.1) (2025-04-23)
25+
26+
27+
### Bug Fixes
28+
29+
* **deps:** removed unused 'reinterval' dependency and move two @type/ dependencies to devDependencies. ([bb8c694](https://github.com/mqttjs/MQTT.js/commit/bb8c6947edc4d85d77f13f8c06df7a979a270a7f))
30+
331
# [5.11.0](https://github.com/mqttjs/MQTT.js/compare/v5.10.4...v5.11.0) (2025-04-10)
432

533

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,8 @@ The arguments are:
475475
For ws/wss protocols only. Can be used to implement a custom websocket subprotocol or implementation.
476476
- `resubscribe` : if connection is broken and reconnects,
477477
subscribed topics are automatically subscribed again (default `true`)
478+
- `subscribeBatchSize` : optional `number`
479+
Maximum number of topics per SUBSCRIBE packet. When the number of topics to subscribe exceeds this value, the client will automatically split them into multiple SUBSCRIBE packets of this size.
478480
- `messageIdProvider`: custom messageId provider. when `new UniqueMessageIdProvider()` is set, then non conflict messageId is provided.
479481
- `log`: custom log function. Default uses [debug](https://www.npmjs.com/package/debug) package.
480482
- `manualConnect`: prevents the constructor to call `connect`. In this case after the `mqtt.connect` is called you should call `client.connect` manually.

package-lock.json

Lines changed: 24 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "mqtt",
33
"description": "A library for the MQTT protocol",
4-
"version": "5.11.0",
4+
"version": "5.13.0",
55
"contributors": [
66
"Adam Rudd <[email protected]>",
77
"Matteo Collina <[email protected]> (https://github.com/mcollina)",
@@ -37,6 +37,7 @@
3737
],
3838
"exports": {
3939
".": {
40+
"react-native": "./dist/mqtt.esm.js",
4041
"browser": {
4142
"import": "./dist/mqtt.esm.js",
4243
"default": "./dist/mqtt.min.js"
@@ -111,8 +112,6 @@
111112
"net": false
112113
},
113114
"dependencies": {
114-
"@types/readable-stream": "^4.0.18",
115-
"@types/ws": "^8.5.14",
116115
"commist": "^3.2.0",
117116
"concat-stream": "^2.0.0",
118117
"debug": "^4.4.0",
@@ -122,7 +121,6 @@
122121
"mqtt-packet": "^9.0.2",
123122
"number-allocator": "^1.0.14",
124123
"readable-stream": "^4.7.0",
125-
"reinterval": "^1.1.0",
126124
"rfdc": "^1.4.1",
127125
"socks": "^2.8.3",
128126
"split2": "^4.2.0",
@@ -134,8 +132,10 @@
134132
"@release-it/conventional-changelog": "^7.0.2",
135133
"@types/chai": "^4.3.20",
136134
"@types/node": "^20.17.16",
135+
"@types/readable-stream": "^4.0.18",
137136
"@types/sinon": "^17.0.3",
138137
"@types/tape": "^5.8.1",
138+
"@types/ws": "^8.18.1",
139139
"@typescript-eslint/eslint-plugin": "^6.21.0",
140140
"@typescript-eslint/parser": "^6.21.0",
141141
"@web/test-runner": "^0.19.0",

src/bin/pub.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ import fs from 'fs'
66
import concat from 'concat-stream'
77
import help from 'help-me'
88

9-
import minimist, { ParsedArgs } from 'minimist'
9+
import minimist, { type ParsedArgs } from 'minimist'
1010
import split2 from 'split2'
1111
import { connect } from '../mqtt'
12-
import { IClientOptions, IClientPublishOptions } from 'src/lib/client'
12+
import { type IClientOptions, type IClientPublishOptions } from 'src/lib/client'
1313
import { pipeline } from 'stream'
1414

1515
const helpMe = help({

src/bin/sub.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import fs from 'fs'
55
import minimist from 'minimist'
66
import help from 'help-me'
77
import { connect } from '../mqtt'
8-
import { IClientOptions } from 'src/lib/client'
8+
import { type IClientOptions } from 'src/lib/client'
99

1010
const helpMe = help({
1111
dir: path.join(__dirname, '../../', 'help'),

src/lib/BufferedDuplex.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { Duplex, Transform } from 'readable-stream'
1+
import { Duplex, type Transform } from 'readable-stream'
22
import { Buffer } from 'buffer'
3-
import { IClientOptions } from './client'
3+
import { type IClientOptions } from './client'
44

55
/**
66
* Utils writev function for browser, ensure to write Buffers to socket (convert strings).

0 commit comments

Comments
 (0)