socket.io-adapter
Advanced tools
Comparing version 0.5.0 to 1.0.0
1.0.0 / 2017-02-16 | ||
=================== | ||
* [feat] Remove the socket.io-parser dependency (#47) | ||
* [refactor] Remove useless self var (#45) | ||
The major bump is due to #45, which is only compatible with socket.io > 2.0. | ||
0.5.0 / 2016-11-20 | ||
@@ -3,0 +11,0 @@ ================== |
14
index.js
@@ -7,3 +7,2 @@ | ||
var Emitter = require('events').EventEmitter; | ||
var parser = require('socket.io-parser'); | ||
@@ -27,3 +26,3 @@ /** | ||
this.sids = {}; | ||
this.encoder = new parser.Encoder(); | ||
this.encoder = nsp.server.encoder; | ||
} | ||
@@ -169,3 +168,2 @@ | ||
var ids = {}; | ||
var self = this; | ||
var sids = []; | ||
@@ -176,3 +174,3 @@ var socket; | ||
for (var i = 0; i < rooms.length; i++) { | ||
var room = self.rooms[rooms[i]]; | ||
var room = this.rooms[rooms[i]]; | ||
if (!room) continue; | ||
@@ -183,3 +181,3 @@ var sockets = room.sockets; | ||
if (ids[id]) continue; | ||
socket = self.nsp.connected[id]; | ||
socket = this.nsp.connected[id]; | ||
if (socket) { | ||
@@ -193,5 +191,5 @@ sids.push(id); | ||
} else { | ||
for (var id in self.sids) { | ||
if (self.sids.hasOwnProperty(id)) { | ||
socket = self.nsp.connected[id]; | ||
for (var id in this.sids) { | ||
if (this.sids.hasOwnProperty(id)) { | ||
socket = this.nsp.connected[id]; | ||
if (socket) sids.push(id); | ||
@@ -198,0 +196,0 @@ } |
{ | ||
"name": "socket.io-adapter", | ||
"version": "0.5.0", | ||
"version": "1.0.0", | ||
"license": "MIT", | ||
@@ -11,5 +11,4 @@ "repository": { | ||
"dependencies": { | ||
"debug": "2.3.3", | ||
"socket.io-parser": "2.3.1" | ||
"debug": "2.3.3" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
7923
1
1
0
215
- Removedsocket.io-parser@2.3.1
- Removedcomponent-emitter@1.1.2(transitive)
- Removeddebug@2.2.0(transitive)
- Removedisarray@0.0.1(transitive)
- Removedjson3@3.3.2(transitive)
- Removedms@0.7.1(transitive)
- Removedsocket.io-parser@2.3.1(transitive)