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.1.4 to 5.2.0

dist/mqtt.esm.js

7

build/lib/topic-alias-send.js
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const lru_cache_1 = __importDefault(require("lru-cache"));
const lru_cache_1 = require("lru-cache");
const number_allocator_1 = require("number-allocator");

@@ -11,3 +8,3 @@ class TopicAliasSend {

if (max > 0) {
this.aliasToTopic = new lru_cache_1.default({ max });
this.aliasToTopic = new lru_cache_1.LRUCache({ max });
this.topicToAlias = {};

@@ -14,0 +11,0 @@ this.numberAllocator = new number_allocator_1.NumberAllocator(1, max);

{
"name": "mqtt",
"description": "A library for the MQTT protocol",
"version": "5.1.4",
"version": "5.2.0",
"contributors": [

@@ -56,7 +56,7 @@ "Adam Rudd <adamvrr@gmail.com>",

"build:ts": "rimraf build/ && tsc -p tsconfig.build.json",
"build:browser": "rimraf dist/ && mkdirp dist/ && browserify build/mqtt.js --standalone mqtt > dist/mqtt.js && terser dist/mqtt.js --compress --mangle --output dist/mqtt.min.js",
"build:browser": "node esbuild.js",
"build": "npm run build:ts && npm run build:browser",
"prepare": "npm run build",
"unit-test:node": "node_modules/.bin/nyc --reporter=lcov --reporter=text node -r esbuild-register test/runTests.ts",
"unit-test:browser": "airtap --server test/browser/server.js test/browser/test.js",
"unit-test:browser": "wtr",
"test:node": "npm run unit-test:node && codecov",

@@ -105,4 +105,4 @@ "test:browser": "npm run build && npm run unit-test:browser",

"dependencies": {
"@types/readable-stream": "^4.0.4",
"@types/ws": "^8.5.8",
"@types/readable-stream": "^4.0.5",
"@types/ws": "^8.5.9",
"commist": "^3.2.0",

@@ -113,5 +113,5 @@ "concat-stream": "^2.0.0",

"help-me": "^4.2.0",
"lru-cache": "^7.18.3",
"lru-cache": "^10.0.1",
"minimist": "^1.2.8",
"mqtt-packet": "^8.2.1",
"mqtt-packet": "^9.0.0",
"number-allocator": "^1.0.14",

@@ -125,13 +125,14 @@ "readable-stream": "^4.4.2",

"devDependencies": {
"@esm-bundle/chai": "^4.3.4-fix.0",
"@release-it/conventional-changelog": "^7.0.2",
"@types/chai": "^4.3.9",
"@types/duplexify": "^3.6.3",
"@types/node": "^20.8.8",
"@types/sinon": "^10.0.20",
"@types/tape": "^5.6.3",
"@typescript-eslint/eslint-plugin": "^6.9.0",
"@typescript-eslint/parser": "^6.9.0",
"airtap": "^4.0.4",
"airtap-playwright": "^1.0.1",
"browserify": "^17.0.0",
"@types/chai": "^4.3.10",
"@types/duplexify": "^3.6.4",
"@types/node": "^20.9.0",
"@types/sinon": "^17.0.1",
"@types/tape": "^5.6.4",
"@typescript-eslint/eslint-plugin": "^6.10.0",
"@typescript-eslint/parser": "^6.10.0",
"@web/test-runner": "^0.18.0",
"@web/test-runner-playwright": "^0.11.0",
"aedes-cli": "^0.8.0",
"chai": "^4.3.10",

@@ -142,4 +143,6 @@ "chokidar": "^3.5.3",

"end-of-stream": "^1.4.4",
"esbuild": "^0.19.5",
"esbuild-plugin-polyfill-node": "^0.3.0",
"esbuild-register": "^3.5.0",
"eslint": "^8.52.0",
"eslint": "^8.53.0",
"eslint-config-airbnb-base": "^15.0.0",

@@ -161,6 +164,5 @@ "eslint-config-airbnb-typescript": "^17.1.0",

"should": "^13.2.3",
"sinon": "^17.0.0",
"sinon": "^17.0.1",
"snazzy": "^9.0.0",
"tape": "^5.7.2",
"terser": "^5.22.0",
"ts-node": "^10.9.1",

@@ -167,0 +169,0 @@ "typescript": "^5.2.2"

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

MQTT.js is bundled using [browserify](http://browserify.org/). You can find the browser build in the `dist` folder.
MQTT.js is bundled using [esbuild](https://esbuild.github.io/). It is tested working with all bundlers like Webpack, Vite and React.
You can find all mqtt bundles versions in `dist` folder:
- `mqtt.js` - iife format, not minified
- `mqtt.min.js` - iife format, minified
- `mqtt.esm.js` - esm format minified
In order to import them use one of the following:
```js
import * as mqtt from 'mqtt/dist/mqtt'
import * as mqtt from 'mqtt/dist/mqtt.min'
import mqtt from 'mqtt/dist/mqtt.esm'
```

@@ -828,6 +838,8 @@

If you are using webpack simply import MQTT.js like this:
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'
```

@@ -842,3 +854,5 @@

```js
import * as mqtt from 'mqtt/dist/mqtt'
import * as mqtt from 'mqtt/dist/mqtt.min'
import mqtt from 'mqtt/dist/mqtt.esm'
```

@@ -845,0 +859,0 @@

/**
* Module dependencies
*/
import LRUCache from 'lru-cache'
import { LRUCache } from 'lru-cache'
import { NumberAllocator } from 'number-allocator'

@@ -6,0 +6,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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