Socket
Socket
Sign inDemoInstall

@feathersjs/transport-commons

Package Overview
Dependencies
Maintainers
4
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@feathersjs/transport-commons - npm Package Compare versions

Comparing version 4.0.2 to 4.1.0

7

CHANGELOG.md
# Change Log
## [v4.0.2](https://github.com/feathersjs/transport-commons/tree/v4.0.2) (2018-06-12)
[Full Changelog](https://github.com/feathersjs/transport-commons/compare/v4.0.1...v4.0.2)
**Merged pull requests:**
- Fix looking up invalid path names through sockets [\#76](https://github.com/feathersjs/transport-commons/pull/76) ([daffl](https://github.com/daffl))
## [v4.0.1](https://github.com/feathersjs/transport-commons/tree/v4.0.1) (2018-05-30)

@@ -4,0 +11,0 @@ [Full Changelog](https://github.com/feathersjs/transport-commons/compare/v4.0.0...v4.0.1)

10

lib/channels/channel/base.js

@@ -1,3 +0,7 @@

class Channel {
const { EventEmitter } = require('events');
class Channel extends EventEmitter {
constructor (connections = [], data = null) {
super();
this.connections = connections;

@@ -24,2 +28,6 @@ this.data = data;

if (this.length === 0) {
this.emit('empty');
}
return this;

@@ -26,0 +34,0 @@ }

@@ -27,3 +27,3 @@ const debug = require('debug')('@feathersjs/transport-commons:channels/mixins');

if (names.length === 1) {
const name = names[0];
const [ name ] = names;

@@ -34,4 +34,14 @@ if (Array.isArray(name)) {

return this[CHANNELS][name] ||
(this[CHANNELS][name] = new Channel());
if (!this[CHANNELS][name]) {
const channel = new Channel();
channel.once('empty', () => {
channel.removeAllListeners();
delete this[CHANNELS][name];
});
this[CHANNELS][name] = channel;
}
return this[CHANNELS][name];
}

@@ -38,0 +48,0 @@

2

package.json
{
"name": "@feathersjs/transport-commons",
"description": "Shared functionality for websocket providers",
"version": "4.0.2",
"version": "4.1.0",
"homepage": "https://github.com/feathersjs/transport-commons",

@@ -6,0 +6,0 @@ "main": "lib/",

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