mqtt 4.3.5 → 4.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/doc/help.txt CHANGED
File without changes
package/doc/publish.txt CHANGED
File without changes
package/doc/subscribe.txt CHANGED
File without changes
package/lib/client.js CHANGED
File without changes
@@ -1,5 +1,6 @@
1
1
  'use strict'
2
2
 
3
+ const { Buffer } = require('buffer')
3
4
  const Transform = require('readable-stream').Transform
4
5
  const duplexify = require('duplexify')
5
6
 
File without changes
File without changes
File without changes
package/lib/connect/ws.js CHANGED
@@ -1,5 +1,6 @@
1
1
  'use strict'
2
2
 
3
+ const { Buffer } = require('buffer')
3
4
  const WS = require('ws')
4
5
  const debug = require('debug')('mqttjs:ws')
5
6
  const duplexify = require('duplexify')
package/lib/connect/wx.js CHANGED
@@ -1,5 +1,6 @@
1
1
  'use strict'
2
2
 
3
+ const { Buffer } = require('buffer')
3
4
  const Transform = require('readable-stream').Transform
4
5
  const duplexify = require('duplexify')
5
6
 
File without changes
package/lib/store.js CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
package/mqtt.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mqtt",
3
3
  "description": "A library for the MQTT protocol",
4
- "version": "4.3.5",
4
+ "version": "4.3.6",
5
5
  "contributors": [
6
6
  "Adam Rudd <adamvrr@gmail.com>",
7
7
  "Matteo Collina <matteo.collina@gmail.com> (https://github.com/mcollina)",
@@ -22,21 +22,20 @@
22
22
  "main": "mqtt.js",
23
23
  "types": "types/index.d.ts",
24
24
  "scripts": {
25
- "test": "node_modules/.bin/nyc --reporter=lcov --reporter=text ./node_modules/mocha/bin/_mocha --exit",
26
25
  "pretest": "standard | snazzy",
27
- "tslint": "tslint types/**/*.d.ts",
28
26
  "typescript-compile-test": "tsc -p test/typescript/tsconfig.json",
29
- "typescript-compile-execute": "node test/typescript/*.js",
30
- "typescript-test": "npm run typescript-compile-test && npm run typescript-compile-execute",
27
+ "typescript-compile-execute": "node test/typescript/broker-connect-subscribe-and-publish.js",
31
28
  "browser-build": "rimraf dist/ && mkdirp dist/ && browserify mqtt.js --standalone mqtt > dist/mqtt.js && uglifyjs dist/mqtt.js --compress --mangle --output dist/mqtt.min.js",
32
29
  "prepare": "npm run browser-build",
33
- "browser-test": "airtap --server test/browser/server.js --local --open test/browser/test.js",
34
- "sauce-test": "airtap --server test/browser/server.js -- test/browser/test.js",
35
- "ci": "npm run tslint && npm run typescript-compile-test && npm run test && codecov"
30
+ "unit-test:node": "node_modules/.bin/nyc --reporter=lcov --reporter=text ./node_modules/mocha/bin/_mocha --exit",
31
+ "unit-test:browser": "airtap --server test/browser/server.js test/browser/test.js",
32
+ "test:node": "npm run unit-test:node && codecov",
33
+ "test:browser": "npm run browser-build && npm run unit-test:browser",
34
+ "test:typescript": "npm run typescript-compile-test && npm run typescript-compile-execute",
35
+ "test": "npm run test:node && npm run test:typescript"
36
36
  },
37
37
  "pre-commit": [
38
- "pretest",
39
- "tslint"
38
+ "pretest"
40
39
  ],
41
40
  "bin": {
42
41
  "mqtt_pub": "./bin/pub.js",
@@ -82,16 +81,18 @@
82
81
  },
83
82
  "devDependencies": {
84
83
  "@types/node": "^10.0.0",
84
+ "@types/tape": "^4.13.2",
85
85
  "@types/ws": "^7.4.7",
86
- "aedes": "^0.42.5",
86
+ "aedes": "^0.46.2",
87
87
  "airtap": "^4.0.4",
88
88
  "browserify": "^16.5.0",
89
89
  "chai": "^4.2.0",
90
+ "chokidar": "^3.5.3",
90
91
  "codecov": "^3.0.4",
91
92
  "end-of-stream": "^1.4.1",
92
93
  "global": "^4.3.2",
93
94
  "mkdirp": "^0.5.1",
94
- "mocha": "^9.1.3",
95
+ "mocha": "^9.2.0",
95
96
  "mqtt-connection": "^4.0.0",
96
97
  "nyc": "^15.0.1",
97
98
  "pre-commit": "^1.2.2",
@@ -100,23 +101,13 @@
100
101
  "sinon": "^9.0.0",
101
102
  "snazzy": "^9.0.0",
102
103
  "standard": "^16.0.4",
103
- "tslint": "^5.11.0",
104
- "tslint-config-standard": "^8.0.1",
105
- "typescript": "^3.2.2",
104
+ "tape": "^5.5.2",
105
+ "typescript": "^4.5.5",
106
106
  "uglify-es": "^3.3.9"
107
107
  },
108
108
  "standard": {
109
109
  "env": [
110
110
  "mocha"
111
- ],
112
- "globals": [
113
- "expect",
114
- "test",
115
- "describe",
116
- "it",
117
- "beforeEach",
118
- "beforeAll",
119
- "afterAll"
120
111
  ]
121
112
  }
122
113
  }
package/types/index.d.ts CHANGED
File without changes
File without changes
File without changes
@@ -1,10 +1,19 @@
1
1
  import { IClientOptions, MqttClient } from '../client'
2
+
2
3
  /**
3
4
  * connect - connect to an MQTT broker.
4
5
  *
5
- * @param {String} [brokerUrl] - url of the broker, optional
6
6
  * @param {Object} opts - see MqttClient#constructor
7
7
  */
8
- declare function connect (brokerUrl?: string | any, opts?: IClientOptions): MqttClient
8
+ declare function connect (opts: IClientOptions): MqttClient
9
+
10
+ /**
11
+ * connect - connect to an MQTT broker.
12
+ *
13
+ * @param {String} brokerUrl - url of the broker
14
+ * @param {Object} opts - see MqttClient#constructor
15
+ */
16
+ declare function connect (brokerUrl: string, opts?: IClientOptions): MqttClient
17
+
9
18
  export { connect }
10
19
  export { MqttClient }
File without changes
File without changes
File without changes
File without changes
File without changes