Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mqtt

Package Overview
Dependencies
Maintainers
7
Versions
203
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mqtt - npm Package Compare versions

Comparing version 5.2.0 to 5.2.1

14

package.json
{
"name": "mqtt",
"description": "A library for the MQTT protocol",
"version": "5.2.0",
"version": "5.2.1",
"contributors": [

@@ -24,2 +24,3 @@ "Adam Rudd <adamvrr@gmail.com>",

"main": "./build/mqtt.js",
"module": "./dist/mqtt.esm.js",
"bin": {

@@ -39,3 +40,9 @@ "mqtt_pub": "./build/bin/pub.js",

"exports": {
".": "./build/mqtt.js",
".": {
"browser": {
"import": "./dist/mqtt.esm.js",
"default": "./dist/mqtt.js"
},
"default": "./build/mqtt.js"
},
"./package.json": "./package.json",

@@ -100,3 +107,3 @@ "./*.map": "./build/*.js.map",

"browser": {
"./mqtt.js": "./build/mqtt.js",
"./mqtt.js": "./dist/mqtt.js",
"fs": false,

@@ -116,2 +123,3 @@ "tls": false,

"minimist": "^1.2.8",
"mqtt": "^5.2.0",
"mqtt-packet": "^9.0.0",

@@ -118,0 +126,0 @@ "number-allocator": "^1.0.14",

@@ -804,2 +804,4 @@ # ![mqtt.js](https://raw.githubusercontent.com/mqttjs/MQTT.js/137ee0e3940c1f01049a30248c70f24dc6e6f829/MQTT.js.png)

<a name="browser"></a>
<a name="webpack"></a>
<a name="vite"></a>

@@ -816,5 +818,13 @@ ## Browser

In order to import them use one of the following:
Starting from MQTT.js > 5.2.0 you can import mqtt in your code like this:
```js
import mqtt from 'mqtt'
```
This will be automatically handled by your bundler.
Otherwise you can choose to use a specific bundle like:
```js
import * as mqtt from 'mqtt/dist/mqtt'

@@ -835,26 +845,2 @@ import * as mqtt from 'mqtt/dist/mqtt.min'

<a name="webpack"></a>
### Webpack
If you are using webpack simply import MQTT.js in one of the following ways:
```js
import * as mqtt from 'mqtt/dist/mqtt'
import * as mqtt from 'mqtt/dist/mqtt.min'
import mqtt from 'mqtt/dist/mqtt.esm'
```
<a name="vite"></a>
### Vite
If you are using vite simply import MQTT.js like this:
```js
import * as mqtt from 'mqtt/dist/mqtt'
import * as mqtt from 'mqtt/dist/mqtt.min'
import mqtt from 'mqtt/dist/mqtt.esm'
```
<a name="qos"></a>

@@ -861,0 +847,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc