Skip to content

Commit d71b000

Browse files
authored
chore!: remove unused deps, convert to ES2015 class (#1633)
BREAKING CHANGE: when creating an `MqttClient` instance `new` is now required
1 parent 3348814 commit d71b000

14 files changed

+1801
-2104
lines changed

.github/workflows/mqttjs-test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ jobs:
4444
DEBUG: "mqttjs"
4545

4646
- name: Test Browser
47+
if: matrix.node-version == '20.x'
48+
# only run on latest node version, no reason to run on all
4749
timeout-minutes: 2
4850
run: |
4951
npm run browser-build

bin/pub.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
'use strict'
44

55
const mqtt = require('../')
6-
const pump = require('pump')
6+
const { pipeline, Writable } = require('readable-stream')
77
const path = require('path')
88
const fs = require('fs')
99
const concat = require('concat-stream')
10-
const Writable = require('readable-stream').Writable
1110
const helpMe = require('help-me')({
1211
dir: path.join(__dirname, '..', 'doc')
1312
})
@@ -40,7 +39,7 @@ function multisend (args) {
4039
}
4140

4241
client.on('connect', function () {
43-
pump(process.stdin, split2(), sender, function (err) {
42+
pipeline(process.stdin, split2(), sender, function (err) {
4443
client.end()
4544
if (err) {
4645
throw err

0 commit comments

Comments
 (0)