socket.io-parser
Advanced tools
Comparing version 4.1.0 to 4.1.1
@@ -94,3 +94,3 @@ "use strict"; | ||
*/ | ||
class Decoder extends component_emitter_1.default { | ||
class Decoder extends component_emitter_1.Emitter { | ||
constructor() { | ||
@@ -114,3 +114,3 @@ super(); | ||
if (packet.attachments === 0) { | ||
super.emit("decoded", packet); | ||
super.emitReserved("decoded", packet); | ||
} | ||
@@ -120,3 +120,3 @@ } | ||
// non-binary full packet | ||
super.emit("decoded", packet); | ||
super.emitReserved("decoded", packet); | ||
} | ||
@@ -134,3 +134,3 @@ } | ||
this.reconstructor = null; | ||
super.emit("decoded", packet); | ||
super.emitReserved("decoded", packet); | ||
} | ||
@@ -137,0 +137,0 @@ } |
@@ -1,2 +0,2 @@ | ||
import Emitter from "@socket.io/component-emitter"; | ||
import { Emitter } from "@socket.io/component-emitter"; | ||
/** | ||
@@ -46,2 +46,5 @@ * Protocol version. | ||
} | ||
interface DecoderReservedEvents { | ||
decoded: (packet: Packet) => void; | ||
} | ||
/** | ||
@@ -52,3 +55,3 @@ * A socket.io Decoder instance | ||
*/ | ||
export declare class Decoder extends Emitter { | ||
export declare class Decoder extends Emitter<{}, {}, DecoderReservedEvents> { | ||
private reconstructor; | ||
@@ -75,1 +78,2 @@ constructor(); | ||
} | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
import Emitter from "@socket.io/component-emitter"; | ||
import { Emitter } from "@socket.io/component-emitter"; | ||
import { deconstructPacket, reconstructPacket } from "./binary.js"; | ||
@@ -109,3 +109,3 @@ import { isBinary, hasBinary } from "./is-binary.js"; | ||
if (packet.attachments === 0) { | ||
super.emit("decoded", packet); | ||
super.emitReserved("decoded", packet); | ||
} | ||
@@ -115,3 +115,3 @@ } | ||
// non-binary full packet | ||
super.emit("decoded", packet); | ||
super.emitReserved("decoded", packet); | ||
} | ||
@@ -129,3 +129,3 @@ } | ||
this.reconstructor = null; | ||
super.emit("decoded", packet); | ||
super.emitReserved("decoded", packet); | ||
} | ||
@@ -132,0 +132,0 @@ } |
@@ -1,2 +0,2 @@ | ||
import Emitter from "@socket.io/component-emitter"; | ||
import { Emitter } from "@socket.io/component-emitter"; | ||
/** | ||
@@ -46,2 +46,5 @@ * Protocol version. | ||
} | ||
interface DecoderReservedEvents { | ||
decoded: (packet: Packet) => void; | ||
} | ||
/** | ||
@@ -52,3 +55,3 @@ * A socket.io Decoder instance | ||
*/ | ||
export declare class Decoder extends Emitter { | ||
export declare class Decoder extends Emitter<{}, {}, DecoderReservedEvents> { | ||
private reconstructor; | ||
@@ -75,1 +78,2 @@ constructor(); | ||
} | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
import Emitter from "@socket.io/component-emitter"; | ||
import { Emitter } from "@socket.io/component-emitter"; | ||
import { deconstructPacket, reconstructPacket } from "./binary.js"; | ||
@@ -105,3 +105,3 @@ import { isBinary, hasBinary } from "./is-binary.js"; | ||
if (packet.attachments === 0) { | ||
super.emit("decoded", packet); | ||
super.emitReserved("decoded", packet); | ||
} | ||
@@ -111,3 +111,3 @@ } | ||
// non-binary full packet | ||
super.emit("decoded", packet); | ||
super.emitReserved("decoded", packet); | ||
} | ||
@@ -125,3 +125,3 @@ } | ||
this.reconstructor = null; | ||
super.emit("decoded", packet); | ||
super.emitReserved("decoded", packet); | ||
} | ||
@@ -128,0 +128,0 @@ } |
@@ -0,1 +1,4 @@ | ||
## [4.1.1](https://github.com/socketio/socket.io-parser/compare/4.1.0...4.1.1) (2021-10-14) | ||
# [4.1.0](https://github.com/socketio/socket.io-parser/compare/4.0.4...4.1.0) (2021-10-11) | ||
@@ -2,0 +5,0 @@ |
{ | ||
"name": "socket.io-parser", | ||
"version": "4.1.0", | ||
"version": "4.1.1", | ||
"description": "socket.io protocol parser", | ||
@@ -23,3 +23,3 @@ "repository": { | ||
"dependencies": { | ||
"@socket.io/component-emitter": "~2.0.0", | ||
"@socket.io/component-emitter": "~3.0.0", | ||
"debug": "~4.3.1" | ||
@@ -26,0 +26,0 @@ }, |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
52973
1419
0
+ Added@socket.io/component-emitter@3.0.0(transitive)
- Removed@socket.io/component-emitter@2.0.0(transitive)