Compare commits
5 Commits
14e34a4672
...
ed23aff757
Author | SHA1 | Date |
---|---|---|
|
ed23aff757 | |
|
a756d2235b | |
|
237bff1b82 | |
|
abb260632f | |
|
63a9dff2b9 |
|
@ -1,5 +1,11 @@
|
|||
# @hono/node-ws
|
||||
|
||||
## 1.1.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1138](https://github.com/honojs/middleware/pull/1138) [`237bff1b82f2c0adfcd015dc97538b36cfb5d418`](https://github.com/honojs/middleware/commit/237bff1b82f2c0adfcd015dc97538b36cfb5d418) Thanks [@leia-uwu](https://github.com/leia-uwu)! - Fix missing code and reason on `CloseEvent`
|
||||
|
||||
## 1.1.1
|
||||
|
||||
### Patch Changes
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@hono/node-ws",
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.2",
|
||||
"description": "WebSocket helper for Node.js",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
|
|
|
@ -170,18 +170,21 @@ describe('WebSocket helper', () => {
|
|||
})
|
||||
|
||||
it('CloseEvent should be executed without crash', async () => {
|
||||
const testCode = 3001
|
||||
const testReason = 'Test!'
|
||||
app.get(
|
||||
'/',
|
||||
upgradeWebSocket(() => ({
|
||||
onClose() {
|
||||
// doing some stuff here
|
||||
onClose(event) {
|
||||
expect(event.code).toBe(testCode)
|
||||
expect(event.reason).toBe(testReason)
|
||||
},
|
||||
}))
|
||||
)
|
||||
|
||||
const ws = new WebSocket('ws://localhost:3030/')
|
||||
await new Promise<void>((resolve) => ws.on('open', resolve))
|
||||
ws.close()
|
||||
ws.close(testCode, testReason)
|
||||
})
|
||||
|
||||
it('Should be able to send and receive binary content with good length', async () => {
|
||||
|
|
|
@ -126,8 +126,8 @@ export const createNodeWebSocket = (init: NodeWebSocketInit): NodeWebSocket => {
|
|||
)
|
||||
}
|
||||
})
|
||||
ws.on('close', () => {
|
||||
events.onClose?.(new CloseEvent('close'), ctx)
|
||||
ws.on('close', (code, reason) => {
|
||||
events.onClose?.(new CloseEvent('close', { code, reason: reason.toString() }), ctx)
|
||||
})
|
||||
ws.on('error', (error) => {
|
||||
events.onError?.(
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
# @hono/zod-openapi
|
||||
|
||||
## 0.19.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1127](https://github.com/honojs/middleware/pull/1127) [`63a9dff2b925a09e8597f327f954f332c3b59b14`](https://github.com/honojs/middleware/commit/63a9dff2b925a09e8597f327f954f332c3b59b14) Thanks [@sigmachirality](https://github.com/sigmachirality)! - chore: lock zod-to-openapi to `^7.3.0` to fix `z.custom`
|
||||
|
||||
## 0.19.4
|
||||
|
||||
### Patch Changes
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@hono/zod-openapi",
|
||||
"version": "0.19.4",
|
||||
"version": "0.19.5",
|
||||
"description": "A wrapper class of Hono which supports OpenAPI.",
|
||||
"type": "module",
|
||||
"module": "dist/index.js",
|
||||
|
@ -52,7 +52,7 @@
|
|||
"zod": "^3.22.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@asteasolutions/zod-to-openapi": "^7.1.0",
|
||||
"@asteasolutions/zod-to-openapi": "^7.3.0",
|
||||
"@hono/zod-validator": "workspace:^"
|
||||
},
|
||||
"engines": {
|
||||
|
|
|
@ -99,7 +99,7 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@asteasolutions/zod-to-openapi@npm:^7.1.0":
|
||||
"@asteasolutions/zod-to-openapi@npm:^7.3.0":
|
||||
version: 7.3.0
|
||||
resolution: "@asteasolutions/zod-to-openapi@npm:7.3.0"
|
||||
dependencies:
|
||||
|
@ -2363,7 +2363,7 @@ __metadata:
|
|||
resolution: "@hono/zod-openapi@workspace:packages/zod-openapi"
|
||||
dependencies:
|
||||
"@arethetypeswrong/cli": "npm:^0.17.4"
|
||||
"@asteasolutions/zod-to-openapi": "npm:^7.1.0"
|
||||
"@asteasolutions/zod-to-openapi": "npm:^7.3.0"
|
||||
"@hono/zod-validator": "workspace:^"
|
||||
publint: "npm:^0.3.9"
|
||||
tsup: "npm:^8.4.0"
|
||||
|
|
Loading…
Reference in New Issue