🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

aedes-cached-persistence

Package Overview
Dependencies
Maintainers
0
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aedes-cached-persistence - npm Package Compare versions

Comparing version

to
10.0.0

eslint.config.js

2

abstract.js

@@ -1,5 +0,3 @@

'use strict'
const parent = require('aedes-persistence/abstract')
module.exports = parent

@@ -5,3 +5,3 @@ const QlobberSub = require('qlobber/aedes/qlobber-sub')

const parallel = require('fastparallel')
const { EventEmitter } = require('events')
const { EventEmitter } = require('node:events')
const QlobberOpts = {

@@ -158,4 +158,4 @@ wildcard_one: '+',

if (err || !subs) { return cb(err, client) }
subs = subs.map(subToTopic)
this.removeSubscriptions(client, subs, cb)
const newSubs = subs.map(subToTopic)
this.removeSubscriptions(client, newSubs, cb)
})

@@ -213,3 +213,3 @@ }

function getKey (clientId, isSub, topic) {
return clientId + '-' + (isSub ? 'sub_' : 'unsub_') + (topic || '')
return `${clientId}-${isSub ? 'sub_' : 'unsub_'}${topic || ''}`
}

@@ -216,0 +216,0 @@

{
"name": "aedes-cached-persistence",
"version": "9.0.0",
"description": "Abstract class to write an Aedes persistence with in-process caching of subscriptions",
"main": "index.js",
"types": "types/index.d.ts",
"scripts": {
"lint": "npm run lint:standard",
"lint:standard": "standard --verbose | snazzy",
"unit": "tape test.js | faucet",
"test": "npm run lint && npm run unit && tsd",
"test:types": "tsd",
"coverage": "nyc --reporter=lcov tape test.js",
"test:ci": "npm run lint && npm run coverage",
"license-checker": "license-checker --production --onlyAllow='MIT;ISC;BSD-3-Clause;BSD-2-Clause'",
"release": "read -p 'GITHUB_TOKEN: ' GITHUB_TOKEN && export GITHUB_TOKEN=$GITHUB_TOKEN && release-it --disable-metrics"
},
"release-it": {
"github": {
"release": true
},
"git": {
"tagName": "v${version}"
},
"hooks": {
"before:init": [
"npm run test"
]
},
"npm": {
"publish": true
}
},
"pre-commit": [
"test"
],
"engines": {
"node": ">=14"
},
"repository": {
"type": "git",
"url": "git+https://github.com/moscajs/aedes-cached-persistence.git"
},
"keywords": [
"aedes",
"persistence",
"cache",
"in-memory"
],
"author": "Matteo Collina <hello@matteocollina.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/moscajs/aedes-cached-persistence/issues"
},
"homepage": "https://github.com/moscajs/aedes-cached-persistence#readme",
"devDependencies": {
"aedes": "^0.46.3",
"concat-stream": "^2.0.0",
"faucet": "0.0.1",
"license-checker": "^25.0.1",
"mqemitter": "^4.5.0",
"nyc": "^15.1.0",
"pump": "^3.0.0",
"release-it": "^15.0.0",
"snazzy": "^9.0.0",
"standard": "^17.0.0",
"tape": "^5.2.1",
"through2": "^4.0.2",
"tsd": "^0.20.0"
},
"dependencies": {
"aedes-persistence": "^9.1.2",
"fastparallel": "^2.4.1",
"multistream": "^4.1.0",
"qlobber": "^7.0.0"
}
"name": "aedes-cached-persistence",
"version": "10.0.0",
"description": "Abstract class to write an Aedes persistence with in-process caching of subscriptions",
"main": "index.js",
"types": "types/index.d.ts",
"scripts": {
"lint": "eslint",
"lint:fix": "eslint --fix",
"unit": "node --test test.js",
"test": "npm run lint && npm run unit && tsd",
"test:typescript": "tsd",
"coverage": "nyc --reporter=lcov node --test test.js",
"test:ci": "npm run lint && npm run coverage && npm run test:typescript",
"license-checker": "license-checker --production --onlyAllow='MIT;ISC;BSD-3-Clause;BSD-2-Clause'",
"release": "read -p 'GITHUB_TOKEN: ' GITHUB_TOKEN && export GITHUB_TOKEN=$GITHUB_TOKEN && release-it --disable-metrics"
},
"release-it": {
"github": {
"release": true
},
"git": {
"tagName": "v${version}"
},
"hooks": {
"before:init": [
"npm run test"
]
},
"npm": {
"publish": true
}
},
"pre-commit": [
"test"
],
"engines": {
"node": ">=20"
},
"repository": {
"type": "git",
"url": "git+https://github.com/moscajs/aedes-cached-persistence.git"
},
"keywords": [
"aedes",
"persistence",
"cache",
"in-memory"
],
"author": "Matteo Collina <hello@matteocollina.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/moscajs/aedes-cached-persistence/issues"
},
"homepage": "https://github.com/moscajs/aedes-cached-persistence#readme",
"devDependencies": {
"aedes": "^0.51.3",
"eslint": "^9.21.0",
"license-checker": "^25.0.1",
"neostandard": "^0.12.1",
"nyc": "^17.1.0",
"release-it": "^18.1.2",
"tsd": "^0.31.2"
},
"dependencies": {
"aedes-persistence": "^10.0.0",
"fastparallel": "^2.4.1",
"multistream": "^4.1.0",
"qlobber": "^8.0.1"
}
}
# aedes-cached-persistence
![](https://github.com/moscajs/aedes-cached-persistence/workflows/ci.yml/badge.svg)
[![Dependencies Status](https://david-dm.org/moscajs/aedes-cached-persistence/status.svg)](https://david-dm.org/moscajs/aedes-cached-persistence)
[![devDependencies Status](https://david-dm.org/moscajs/aedes-cached-persistence/dev-status.svg)](https://david-dm.org/moscajs/aedes-cached-persistence?type=dev)
<br/>

@@ -6,0 +4,0 @@ [![Known Vulnerabilities](https://snyk.io/test/github/moscajs/aedes-cached-persistence/badge.svg)](https://snyk.io/test/github/moscajs/aedes-cached-persistence)

@@ -1,2 +0,2 @@

const test = require('tape').test
const test = require('node:test')
const CachedPersistence = require('./')

@@ -19,5 +19,5 @@ const Memory = require('aedes-persistence')

'getWill', 'streamWill', 'getClientList', 'destroy']
methods.forEach((key) => {
for (const key of methods) {
this[key] = this.backend[key].bind(this.backend)
})
}
// putWill is a special because it needs this.broker.id

@@ -24,0 +24,0 @@ this.putWill = (client, packet, cb) => {

@@ -8,4 +8,4 @@ import type { Client } from 'aedes';

} from 'aedes-persistence';
import type { EventEmitter } from 'events';
import type { Readable } from 'stream';
import type { EventEmitter } from 'node:events';
import type { Readable } from 'node:stream';

@@ -12,0 +12,0 @@ export type { Packet } from 'aedes-persistence';

@@ -7,3 +7,3 @@ import type { Client } from 'aedes';

import { expectType } from 'tsd';
import aedesCachedPersistence, { AedesCachedPersistence, Packet } from '.';
import aedesCachedPersistence, { type AedesCachedPersistence, type Packet } from '.';

@@ -10,0 +10,0 @@ expectType<AedesCachedPersistence>(aedesCachedPersistence());

Sorry, the diff of this file is not supported yet