graphql-ws
Advanced tools
Comparing version 4.5.1 to 4.5.2
@@ -0,1 +1,8 @@ | ||
## [4.5.2](https://github.com/enisdenjo/graphql-ws/compare/v4.5.1...v4.5.2) (2021-05-28) | ||
### Bug Fixes | ||
* **uWebSockets:** Handle premature and abrupt socket closes ([9d3ff52](https://github.com/enisdenjo/graphql-ws/commit/9d3ff52e05420847eda9d0cf8d4730cafb9bcd36)), closes [#186](https://github.com/enisdenjo/graphql-ws/issues/186) | ||
## [4.5.1](https://github.com/enisdenjo/graphql-ws/compare/v4.5.0...v4.5.1) (2021-05-18) | ||
@@ -2,0 +9,0 @@ |
@@ -63,2 +63,5 @@ "use strict"; | ||
send: async (message) => { | ||
// the socket might have been destroyed in the meantime | ||
if (!clients.has(socket)) | ||
return; | ||
if (!socket.send(message)) | ||
@@ -69,3 +72,8 @@ // if backpressure is built up wait for drain | ||
close: (code, reason) => { | ||
socket.end(code, reason); | ||
// end socket in next tick making sure the client is registered | ||
setImmediate(() => { | ||
// the socket might have been destroyed before issuing a close | ||
if (clients.has(socket)) | ||
socket.end(code, reason); | ||
}); | ||
}, | ||
@@ -72,0 +80,0 @@ onMessage: (cb) => (client.handleMessage = cb), |
{ | ||
"name": "graphql-ws", | ||
"version": "4.5.1", | ||
"version": "4.5.2", | ||
"description": "Coherent, zero-dependency, lazy, simple, GraphQL over WebSocket Protocol compliant server and client", | ||
@@ -78,5 +78,5 @@ "keywords": [ | ||
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.14.2", | ||
"@babel/plugin-proposal-object-rest-spread": "^7.14.2", | ||
"@babel/plugin-proposal-object-rest-spread": "^7.14.4", | ||
"@babel/plugin-proposal-optional-chaining": "^7.14.2", | ||
"@babel/preset-env": "^7.14.2", | ||
"@babel/preset-env": "^7.14.4", | ||
"@babel/preset-typescript": "^7.13.0", | ||
@@ -88,6 +88,6 @@ "@rollup/plugin-typescript": "^8.2.1", | ||
"@types/ws": "^7.4.4", | ||
"@typescript-eslint/eslint-plugin": "^4.24.0", | ||
"@typescript-eslint/parser": "^4.24.0", | ||
"babel-jest": "^26.6.3", | ||
"eslint": "^7.26.0", | ||
"@typescript-eslint/eslint-plugin": "^4.25.0", | ||
"@typescript-eslint/parser": "^4.25.0", | ||
"babel-jest": "^27.0.1", | ||
"eslint": "^7.27.0", | ||
"eslint-config-prettier": "^8.3.0", | ||
@@ -97,6 +97,6 @@ "eslint-plugin-prettier": "^3.4.0", | ||
"graphql": "^15.5.0", | ||
"jest": "^26.6.3", | ||
"jest": "^27.0.1", | ||
"prettier": "^2.3.0", | ||
"replacestream": "^4.0.3", | ||
"rollup": "^2.48.0", | ||
"rollup": "^2.50.3", | ||
"rollup-plugin-terser": "^7.0.2", | ||
@@ -106,7 +106,7 @@ "semantic-release": "^17.4.3", | ||
"typedoc": "^0.20.36", | ||
"typedoc-plugin-markdown": "^3.8.1", | ||
"typescript": "^4.2.4", | ||
"typedoc-plugin-markdown": "^3.8.2", | ||
"typescript": "4.2.4", | ||
"uWebSockets.js": "uNetworking/uWebSockets.js#v19.2.0", | ||
"ws": "^7.4.5" | ||
"ws": "^7.4.6" | ||
} | ||
} |
@@ -42,3 +42,3 @@ <div align="center"> | ||
subscription: { | ||
greetings: function* sayHiIn5Languages() { | ||
greetings: async function* sayHiIn5Languages() { | ||
for (const hi of ['Hi', 'Bonjour', 'Hola', 'Ciao', 'Zdravo']) { | ||
@@ -45,0 +45,0 @@ yield { greetings: hi }; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
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
245951
3307
1