🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
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

to
4.2.0

13

CHANGELOG.md

@@ -0,1 +1,14 @@

# [4.2.0](https://github.com/socketio/socket.io/compare/4.1.3...4.2.0) (2021-08-30)
### Bug Fixes
* **typings:** allow async listener in typed events ([ccfd8ca](https://github.com/socketio/socket.io/commit/ccfd8caba6d38b7ba6c5114bd8179346ed07671c))
### Features
* ignore the query string when serving client JavaScript ([#4024](https://github.com/socketio/socket.io/issues/4024)) ([24fee27](https://github.com/socketio/socket.io/commit/24fee27ba36485308f8e995879c10931532c814e))
## [4.1.3](https://github.com/socketio/socket.io/compare/4.1.2...4.1.3) (2021-07-10)

@@ -2,0 +15,0 @@

18

dist/index.js

@@ -44,3 +44,3 @@ "use strict";

const typed_events_1 = require("./typed-events");
const debug = debug_1.default("socket.io:server");
const debug = (0, debug_1.default)("socket.io:server");
const clientVersion = require("../package.json").version;

@@ -120,3 +120,3 @@ const dotMapRegex = /\.map/;

escapedPath +
"/socket\\.io(\\.min|\\.msgpack\\.min)?\\.js(\\.map)?$");
"/socket\\.io(\\.min|\\.msgpack\\.min)?\\.js(\\.map)?(?:\\?|$)");
return this;

@@ -232,3 +232,3 @@ }

serve(req, res) {
const filename = req.url.replace(this._path, "");
const filename = req.url.replace(this._path, "").replace(/\?.*$/, "");
const isMap = dotMapRegex.test(filename);

@@ -262,3 +262,3 @@ const type = isMap ? "map" : "source";

static sendFile(filename, req, res) {
const readStream = fs_1.createReadStream(path.join(__dirname, "../client-dist/", filename));
const readStream = (0, fs_1.createReadStream)(path.join(__dirname, "../client-dist/", filename));
const encoding = accepts(req).encodings(["br", "gzip", "deflate"]);

@@ -273,16 +273,16 @@ const onError = (err) => {

res.writeHead(200, { "content-encoding": "br" });
readStream.pipe(zlib_1.createBrotliCompress()).pipe(res);
stream_1.pipeline(readStream, zlib_1.createBrotliCompress(), res, onError);
readStream.pipe((0, zlib_1.createBrotliCompress)()).pipe(res);
(0, stream_1.pipeline)(readStream, (0, zlib_1.createBrotliCompress)(), res, onError);
break;
case "gzip":
res.writeHead(200, { "content-encoding": "gzip" });
stream_1.pipeline(readStream, zlib_1.createGzip(), res, onError);
(0, stream_1.pipeline)(readStream, (0, zlib_1.createGzip)(), res, onError);
break;
case "deflate":
res.writeHead(200, { "content-encoding": "deflate" });
stream_1.pipeline(readStream, zlib_1.createDeflate(), res, onError);
(0, stream_1.pipeline)(readStream, (0, zlib_1.createDeflate)(), res, onError);
break;
default:
res.writeHead(200);
stream_1.pipeline(readStream, res, onError);
(0, stream_1.pipeline)(readStream, res, onError);
}

@@ -289,0 +289,0 @@ }

@@ -11,3 +11,3 @@ "use strict";

const broadcast_operator_1 = require("./broadcast-operator");
const debug = debug_1.default("socket.io:namespace");
const debug = (0, debug_1.default)("socket.io:namespace");
exports.RESERVED_EVENTS = new Set(["connect", "connection", "new_namespace"]);

@@ -14,0 +14,0 @@ class Namespace extends typed_events_1.StrictEventEmitter {

@@ -13,3 +13,3 @@ "use strict";

const broadcast_operator_1 = require("./broadcast-operator");
const debug = debug_1.default("socket.io:socket");
const debug = (0, debug_1.default)("socket.io:socket");
exports.RESERVED_EVENTS = new Set([

@@ -16,0 +16,0 @@ "connect",

@@ -38,3 +38,3 @@ /// <reference types="node" />

*/
declare type FallbackToUntypedListener<T> = [T] extends [never] ? (...args: any[]) => void : T;
declare type FallbackToUntypedListener<T> = [T] extends [never] ? (...args: any[]) => void | Promise<void> : T;
/**

@@ -41,0 +41,0 @@ * Interface for classes that aren't `EventEmitter`s, but still expose a

{
"name": "socket.io",
"version": "4.1.3",
"version": "4.2.0",
"description": "node.js realtime framework server",

@@ -48,14 +48,14 @@ "keywords": [

"dependencies": {
"@types/cookie": "^0.4.0",
"@types/cors": "^2.8.10",
"@types/cookie": "^0.4.1",
"@types/cors": "^2.8.12",
"@types/node": ">=10.0.0",
"accepts": "~1.3.4",
"base64id": "~2.0.0",
"debug": "~4.3.1",
"engine.io": "~5.1.1",
"socket.io-adapter": "~2.3.1",
"debug": "~4.3.2",
"engine.io": "~5.2.0",
"socket.io-adapter": "~2.3.2",
"socket.io-parser": "~4.0.4"
},
"devDependencies": {
"@types/mocha": "^8.2.2",
"@types/mocha": "^9.0.0",
"expect.js": "0.3.1",

@@ -66,9 +66,9 @@ "mocha": "^3.5.3",

"rimraf": "^3.0.2",
"socket.io-client": "4.1.3",
"socket.io-client": "4.2.0",
"socket.io-client-v2": "npm:socket.io-client@^2.4.0",
"superagent": "^6.1.0",
"supertest": "^6.1.3",
"ts-node": "^10.0.0",
"supertest": "^6.1.6",
"ts-node": "^10.2.1",
"tsd": "^0.17.0",
"typescript": "^4.3.5"
"typescript": "^4.4.2"
},

@@ -75,0 +75,0 @@ "contributors": [

# socket.io
[![Run on Repl.it](https://repl.it/badge/github/socketio/socket.io)](https://repl.it/github/socketio/socket.io)
[![Run on Repl.it](https://repl.it/badge/github/socketio/socket.io)](https://replit.com/@socketio/socketio-minimal-example)
[![Backers on Open Collective](https://opencollective.com/socketio/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/socketio/sponsors/badge.svg)](#sponsors)

@@ -4,0 +4,0 @@ [![Build Status](https://github.com/socketio/socket.io/workflows/CI/badge.svg)](https://github.com/socketio/socket.io/actions)

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

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 not supported yet

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

Sorry, the diff of this file is not supported yet