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 4.1.0 to 4.1.1

9

CHANGELOG.md

@@ -0,1 +1,10 @@

## [4.1.1](https://github.com/socketio/socket.io/compare/4.1.0...4.1.1) (2021-05-11)
### Bug Fixes
* **typings:** properly type server-side events ([b84ed1e](https://github.com/socketio/socket.io/commit/b84ed1e41c9053792caf58974c5de9395bfd509f))
* **typings:** properly type the adapter attribute ([891b187](https://github.com/socketio/socket.io/commit/891b1870e92d1ec38910f03bb839817e2d6be65a))
# [4.1.0](https://github.com/socketio/socket.io/compare/4.0.2...4.1.0) (2021-05-11)

@@ -2,0 +11,0 @@

10

dist/index.d.ts

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

}, fn: (err: Error | null, success: boolean) => void) => void;
declare type AdapterConstructor = typeof Adapter | ((nsp: Namespace) => Adapter);
interface EngineOptions {

@@ -127,3 +128,3 @@ /**

*/
adapter: any;
adapter: AdapterConstructor;
/**

@@ -140,3 +141,3 @@ * the parser to use

}
export declare class Server<ListenEvents extends EventsMap = DefaultEventsMap, EmitEvents extends EventsMap = ListenEvents, ServerSideEvents extends EventsMap = {}> extends StrictEventEmitter<ServerSideEvents, EmitEvents, ServerReservedEventsMap<ListenEvents, EmitEvents, ServerSideEvents>> {
export declare class Server<ListenEvents extends EventsMap = DefaultEventsMap, EmitEvents extends EventsMap = ListenEvents, ServerSideEvents extends EventsMap = DefaultEventsMap> extends StrictEventEmitter<ServerSideEvents, EmitEvents, ServerReservedEventsMap<ListenEvents, EmitEvents, ServerSideEvents>> {
readonly sockets: Namespace<ListenEvents, EmitEvents, ServerSideEvents>;

@@ -231,5 +232,4 @@ /**

*/
adapter(): typeof Adapter | undefined;
adapter(v: typeof Adapter): this;
adapter(v?: typeof Adapter): typeof Adapter | undefined | this;
adapter(): AdapterConstructor | undefined;
adapter(v: AdapterConstructor): this;
/**

@@ -236,0 +236,0 @@ * Attaches socket.io to a server or port.

@@ -18,3 +18,3 @@ import { Socket } from "./socket";

export declare const RESERVED_EVENTS: ReadonlySet<string | Symbol>;
export declare class Namespace<ListenEvents extends EventsMap = DefaultEventsMap, EmitEvents extends EventsMap = ListenEvents, ServerSideEvents extends EventsMap = {}> extends StrictEventEmitter<ServerSideEvents, EmitEvents, NamespaceReservedEventsMap<ListenEvents, EmitEvents, ServerSideEvents>> {
export declare class Namespace<ListenEvents extends EventsMap = DefaultEventsMap, EmitEvents extends EventsMap = ListenEvents, ServerSideEvents extends EventsMap = DefaultEventsMap> extends StrictEventEmitter<ServerSideEvents, EmitEvents, NamespaceReservedEventsMap<ListenEvents, EmitEvents, ServerSideEvents>> {
readonly name: string;

@@ -132,3 +132,3 @@ readonly sockets: Map<SocketId, Socket<ListenEvents, EmitEvents, ServerSideEvents>>;

*/
_onServerSideEmit(args: any[]): void;
_onServerSideEmit(args: [eventName: string, ...args: any[]]): void;
/**

@@ -135,0 +135,0 @@ * Gets a list of clients.

@@ -39,2 +39,3 @@ "use strict";

_initAdapter() {
// @ts-ignore
this.adapter = new (this.server.adapter())(this);

@@ -215,4 +216,3 @@ }

_onServerSideEmit(args) {
const event = args.shift();
this.emitUntyped(event, args);
super.emitUntyped.apply(this, args);
}

@@ -219,0 +219,0 @@ /**

import { Namespace } from "./namespace";
import type { Server } from "./index";
import type { EventParams, EventNames, EventsMap, DefaultEventsMap } from "./typed-events";
export declare class ParentNamespace<ListenEvents extends EventsMap = DefaultEventsMap, EmitEvents extends EventsMap = ListenEvents, ServerSideEvents extends EventsMap = {}> extends Namespace<ListenEvents, EmitEvents, ServerSideEvents> {
export declare class ParentNamespace<ListenEvents extends EventsMap = DefaultEventsMap, EmitEvents extends EventsMap = ListenEvents, ServerSideEvents extends EventsMap = DefaultEventsMap> extends Namespace<ListenEvents, EmitEvents, ServerSideEvents> {
private static count;

@@ -6,0 +6,0 @@ private children;

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

}
export declare class Socket<ListenEvents extends EventsMap = DefaultEventsMap, EmitEvents extends EventsMap = ListenEvents, ServerSideEvents extends EventsMap = {}> extends StrictEventEmitter<ListenEvents, EmitEvents, SocketReservedEventsMap> {
export declare class Socket<ListenEvents extends EventsMap = DefaultEventsMap, EmitEvents extends EventsMap = ListenEvents, ServerSideEvents extends EventsMap = DefaultEventsMap> extends StrictEventEmitter<ListenEvents, EmitEvents, SocketReservedEventsMap> {
readonly nsp: Namespace<ListenEvents, EmitEvents, ServerSideEvents>;

@@ -66,0 +66,0 @@ readonly client: Client<ListenEvents, EmitEvents, ServerSideEvents>;

{
"name": "socket.io",
"version": "4.1.0",
"version": "4.1.1",
"description": "node.js realtime framework server",

@@ -68,3 +68,3 @@ "keywords": [

"rimraf": "^3.0.2",
"socket.io-client": "4.1.0",
"socket.io-client": "4.1.1",
"socket.io-client-v2": "npm:socket.io-client@^2.4.0",

@@ -71,0 +71,0 @@ "superagent": "^6.1.0",

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

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

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

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