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

socket.io

Package Overview
Dependencies
Maintainers
2
Versions
159
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

socket.io - npm Package Compare versions

Comparing version 3.0.0-rc3 to 3.0.0-rc4

client-dist/socket.io.js

10

CHANGELOG.md

@@ -0,1 +1,11 @@

# [3.0.0-rc4](https://github.com/socketio/socket.io/compare/3.0.0-rc3...3.0.0-rc4) (2020-10-30)
### Features
* emit an Error object upon middleware error ([54bf4a4](https://github.com/socketio/socket.io/commit/54bf4a44e9e896dfb64764ee7bd4e8823eb7dc7b))
* serve msgpack bundle ([aa7574f](https://github.com/socketio/socket.io/commit/aa7574f88471aa30ae472a5cddf1000a8baa70fd))
# [3.0.0-rc3](https://github.com/socketio/socket.io/compare/3.0.0-rc2...3.0.0-rc3) (2020-10-26)

@@ -2,0 +12,0 @@

4

dist/client.js

@@ -80,3 +80,5 @@ "use strict";

nsp: name,
data: "Invalid namespace"
data: {
message: "Invalid namespace"
}
});

@@ -83,0 +85,0 @@ }

/// <reference types="node" />
import http from "http";
import { EventEmitter } from "events";
import { Namespace } from "./namespace";
import { ExtendedError, Namespace } from "./namespace";
import { Room, SocketId } from "socket.io-adapter";

@@ -289,3 +289,3 @@ import { Encoder } from "socket.io-parser";

*/
use(fn: (socket: Socket, next: (err?: Error) => void) => void): Server;
use(fn: (socket: Socket, next: (err?: ExtendedError) => void) => void): Server;
/**

@@ -292,0 +292,0 @@ * Targets a room when emitting.

@@ -107,3 +107,5 @@ "use strict";

const escapedPath = this._path.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&");
this.clientPathRegex = new RegExp("^" + escapedPath + "/socket\\.io(\\.min)?\\.js(\\.map)?$");
this.clientPathRegex = new RegExp("^" +
escapedPath +
"/socket\\.io(\\.min|\\.msgpack\\.min)?\\.js(\\.map)?$");
return this;

@@ -110,0 +112,0 @@ }

@@ -7,2 +7,5 @@ /// <reference types="node" />

import { Adapter, Room, SocketId } from "socket.io-adapter";
export interface ExtendedError extends Error {
data?: any;
}
export declare class Namespace extends EventEmitter {

@@ -15,3 +18,3 @@ readonly name: string;

/** @private */
_fns: Array<(socket: Socket, next: (err: Error) => void) => void>;
_fns: Array<(socket: Socket, next: (err: ExtendedError) => void) => void>;
/** @private */

@@ -44,3 +47,3 @@ _rooms: Set<Room>;

*/
use(fn: (socket: Socket, next: (err?: Error) => void) => void): Namespace;
use(fn: (socket: Socket, next: (err?: ExtendedError) => void) => void): Namespace;
/**

@@ -47,0 +50,0 @@ * Executes the middleware for an incoming client.

@@ -114,3 +114,6 @@ "use strict";

if (err)
return socket._error(err.message);
return socket._error({
message: err.message,
data: err.data
});
// track socket

@@ -117,0 +120,0 @@ this.sockets.set(socket.id, socket);

{
"name": "socket.io",
"version": "3.0.0-rc3",
"version": "3.0.0-rc4",
"description": "node.js realtime framework server",

@@ -16,2 +16,3 @@ "keywords": [

"dist/",
"client-dist/",
"wrapper.mjs"

@@ -57,3 +58,3 @@ ],

"prettier": "^1.19.1",
"socket.io-client": "3.0.0-rc3",
"socket.io-client": "3.0.0-rc4",
"superagent": "^3.8.2",

@@ -60,0 +61,0 @@ "supertest": "^3.0.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