Comparing version 7.3.0 to 7.3.1
'use strict'; | ||
module.exports = function() { | ||
module.exports = function () { | ||
throw new Error( | ||
@@ -5,0 +5,0 @@ 'ws does not work in the browser. Browser clients must use the native ' + |
@@ -71,2 +71,3 @@ 'use strict'; | ||
* @param {Function} cb Callback | ||
* @private | ||
*/ | ||
@@ -73,0 +74,0 @@ _write(chunk, encoding, cb) { |
@@ -177,3 +177,3 @@ 'use strict'; | ||
* | ||
* @param {*} data The message to send | ||
* @param {Buffer} data The message to send | ||
* @param {Boolean} mask Specifies whether or not to mask `data` | ||
@@ -222,3 +222,3 @@ * @param {Boolean} readOnly Specifies whether `data` can be modified | ||
* | ||
* @param {*} data The message to send | ||
* @param {Buffer} data The message to send | ||
* @param {Boolean} mask Specifies whether or not to mask `data` | ||
@@ -323,2 +323,3 @@ * @param {Boolean} readOnly Specifies whether `data` can be modified | ||
this._bufferedBytes += data.length; | ||
this._deflating = true; | ||
@@ -342,2 +343,3 @@ perMessageDeflate.compress(data, options.fin, (_, buf) => { | ||
this._bufferedBytes -= data.length; | ||
this._deflating = false; | ||
@@ -344,0 +346,0 @@ options.readOnly = false; |
@@ -92,3 +92,3 @@ 'use strict'; | ||
duplex._destroy = function(err, callback) { | ||
duplex._destroy = function (err, callback) { | ||
if (ws.readyState === ws.CLOSED) { | ||
@@ -114,3 +114,3 @@ callback(err); | ||
duplex._final = function(callback) { | ||
duplex._final = function (callback) { | ||
if (ws.readyState === ws.CONNECTING) { | ||
@@ -143,3 +143,3 @@ ws.once('open', function open() { | ||
duplex._read = function() { | ||
duplex._read = function () { | ||
if (ws.readyState === ws.OPEN && !resumeOnReceiverDrain) { | ||
@@ -151,3 +151,3 @@ resumeOnReceiverDrain = true; | ||
duplex._write = function(chunk, encoding, callback) { | ||
duplex._write = function (chunk, encoding, callback) { | ||
if (ws.readyState === ws.CONNECTING) { | ||
@@ -154,0 +154,0 @@ ws.once('open', function open() { |
@@ -119,6 +119,3 @@ 'use strict'; | ||
// | ||
// `socket.bufferSize` is `undefined` if the socket is closed. | ||
// | ||
return (this._socket.bufferSize || 0) + this._sender._bufferedBytes; | ||
return this._socket._writableState.length + this._sender._bufferedBytes; | ||
} | ||
@@ -125,0 +122,0 @@ |
{ | ||
"name": "ws", | ||
"version": "7.3.0", | ||
"version": "7.3.1", | ||
"description": "Simple to use, blazing fast and thoroughly tested websocket client and server for Node.js", | ||
@@ -29,4 +29,4 @@ "keywords": [ | ||
"scripts": { | ||
"test": "npm run lint && nyc --reporter=html --reporter=text mocha --throw-deprecation test/*.test.js", | ||
"integration": "npm run lint && mocha --throw-deprecation test/*.integration.js", | ||
"test": "nyc --reporter=html --reporter=text mocha --throw-deprecation test/*.test.js", | ||
"integration": "mocha --throw-deprecation test/*.integration.js", | ||
"lint": "eslint --ignore-path .gitignore . && prettier --check --ignore-path .gitignore \"**/*.{json,md,yaml,yml}\"" | ||
@@ -50,3 +50,3 @@ }, | ||
"coveralls": "^3.0.3", | ||
"eslint": "^6.0.0", | ||
"eslint": "^7.2.0", | ||
"eslint-config-prettier": "^6.0.0", | ||
@@ -56,11 +56,5 @@ "eslint-plugin-prettier": "^3.0.1", | ||
"nyc": "^15.0.0", | ||
"prettier": "^1.17.0", | ||
"prettier": "^2.0.5", | ||
"utf-8-validate": "^5.0.2" | ||
}, | ||
"greenkeeper": { | ||
"commitMessages": { | ||
"dependencyUpdate": "[pkg] Update ${dependency} to version ${version}", | ||
"devDependencyUpdate": "[pkg] Update ${dependency} to version ${version}" | ||
} | ||
} | ||
} |
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
109692