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

@fastify/websocket

Package Overview
Dependencies
Maintainers
18
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fastify/websocket - npm Package Compare versions

Comparing version 6.0.0 to 6.0.1

4

index.js

@@ -96,3 +96,3 @@ 'use strict'

fastify.addHook('onResponse', (request, reply, error, done) => {
fastify.addHook('onResponse', (request, reply, done) => {
if (request.ws) {

@@ -216,3 +216,3 @@ request.raw[kWs].destroy()

fastify: '>= 3.11.0',
name: 'fastify-websocket'
name: '@fastify/websocket'
})
{
"name": "@fastify/websocket",
"version": "6.0.0",
"version": "6.0.1",
"description": "basic websocket support for fastify",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -8,2 +8,3 @@ 'use strict'

const WebSocket = require('ws')
const split = require('split2')

@@ -339,4 +340,5 @@ test('Should run onRequest, preValidation, preHandler hooks', t => {

test('Should not hijack reply for an WS request to a WS route that gets sent a normal HTTP response in a hook', t => {
t.plan(2)
const fastify = Fastify()
t.plan(6)
const stream = split(JSON.parse)
const fastify = Fastify({ logger: { stream } })

@@ -353,2 +355,6 @@ fastify.register(fastifyWebsocket)

stream.on('data', (chunk) => {
t.ok(chunk.level < 50)
})
fastify.listen({ port: 0 }, err => {

@@ -355,0 +361,0 @@ t.error(err)

Sorry, the diff of this file is not supported yet

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