Socket
Socket
Sign inDemoInstall

@fastify/websocket

Package Overview
Dependencies
3
Maintainers
20
Versions
20
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 10.0.1 to 11.0.0-pre.fv5.1

24

package.json
{
"name": "@fastify/websocket",
"version": "10.0.1",
"version": "11.0.0-pre.fv5.1",
"description": "basic websocket support for fastify",

@@ -29,17 +29,17 @@ "main": "index.js",

"devDependencies": {
"@fastify/pre-commit": "^2.0.2",
"@fastify/pre-commit": "^2.1.0",
"@fastify/type-provider-typebox": "^4.0.0",
"@types/node": "^20.1.0",
"@types/ws": "^8.2.2",
"fastify": "^4.25.0",
"@types/node": "^20.11.28",
"@types/ws": "^8.5.10",
"fastify": "^4.26.2",
"fastify-tsconfig": "^2.0.0",
"split2": "^4.1.0",
"standard": "^17.0.0",
"tap": "^16.0.0",
"tsd": "^0.30.1"
"split2": "^4.2.0",
"standard": "^17.1.0",
"tap": "^18.7.1",
"tsd": "^0.31.0"
},
"dependencies": {
"duplexify": "^4.1.2",
"fastify-plugin": "^4.0.0",
"ws": "^8.0.0"
"duplexify": "^4.1.3",
"fastify-plugin": "^4.5.1",
"ws": "^8.16.0"
},

@@ -46,0 +46,0 @@ "publishConfig": {

@@ -36,3 +36,7 @@ 'use strict'

const ws = new WebSocket('ws://localhost:' + fastify.server.address().port)
t.teardown(() => ws.close())
t.teardown(() => {
if (ws.readyState) {
ws.close()
}
})

@@ -98,3 +102,7 @@ const chunkPromise = once(ws, 'message')

const ws = new WebSocket('ws://localhost:' + fastify.server.address().port)
t.teardown(() => ws.close())
t.teardown(() => {
if (ws.readyState) {
ws.close()
}
})

@@ -105,2 +113,4 @@ await p

test('Should run custom errorHandler on error inside websocket handler', async (t) => {
t.plan(1)
const fastify = Fastify()

@@ -131,4 +141,9 @@ t.teardown(() => fastify.close())

const ws = new WebSocket('ws://localhost:' + fastify.server.address().port)
t.teardown(() => ws.close())
t.teardown(() => {
if (ws.readyState) {
ws.close()
}
})
await p

@@ -138,2 +153,4 @@ })

test('Should run custom errorHandler on error inside async websocket handler', async (t) => {
t.plan(1)
const fastify = Fastify()

@@ -164,3 +181,7 @@ t.teardown(() => fastify.close())

const ws = new WebSocket('ws://localhost:' + fastify.server.address().port)
t.teardown(() => ws.close())
t.teardown(() => {
if (ws.readyState) {
ws.close()
}
})

@@ -197,3 +218,7 @@ await p

await once(ws, 'open')
t.teardown(() => ws.close())
t.teardown(() => {
if (ws.readyState) {
ws.close()
}
})

@@ -238,3 +263,7 @@ ws.send('hello')

await once(ws, 'open')
t.teardown(() => ws.close())
t.teardown(() => {
if (ws.readyState) {
ws.close()
}
})

@@ -280,3 +309,7 @@ ws.send('hello')

await once(ws, 'open')
t.teardown(() => ws.close())
t.teardown(() => {
if (ws.readyState) {
ws.close()
}
})

@@ -342,3 +375,7 @@ ws.send('hello')

const ws = new WebSocket('ws://localhost:' + fastify.server.address().port)
t.teardown(() => ws.close())
t.teardown(() => {
if (ws.readyState) {
ws.close()
}
})

@@ -345,0 +382,0 @@ const chunkPromise = once(ws, 'message')

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc