mirror of
https://github.com/Mintplex-Labs/express-ws.git
synced 2026-06-30 20:38:03 -04:00
@@ -1,5 +1,4 @@
|
||||
node_modules/
|
||||
lib/
|
||||
*.sw[po]
|
||||
yarn.lock
|
||||
package-lock.json
|
||||
|
||||
@@ -105,7 +105,4 @@ In most cases, you won't need this at all.
|
||||
|
||||
## Development
|
||||
|
||||
This module is written in ES6, and uses Babel for compilation. What this means in practice:
|
||||
|
||||
* The source code lives in the `src/` directory.
|
||||
* After changing this code, make sure to run `npm run build` to compile it.
|
||||
This module is written in ES6 and uses ESM.
|
||||
|
||||
@@ -1 +1,4 @@
|
||||
module.exports = require("./lib").default;
|
||||
/* eslint-disable-next-line no-underscore-dangle */
|
||||
const _require = require('esm')(module);
|
||||
|
||||
module.exports = _require('./src/index').default;
|
||||
|
||||
+6
-7
@@ -1,11 +1,10 @@
|
||||
{
|
||||
"name": "express-ws",
|
||||
"version": "4.0.0",
|
||||
"version": "5.0.0",
|
||||
"description": "WebSocket endpoints for Express applications",
|
||||
"main": "index.js",
|
||||
"main": "index",
|
||||
"module": "src/index",
|
||||
"scripts": {
|
||||
"prepublish": "npm run build",
|
||||
"build": "babel src/ -d lib/",
|
||||
"lint": "eslint src/"
|
||||
},
|
||||
"author": "Henning Morud <henning@morud.org>",
|
||||
@@ -15,10 +14,12 @@
|
||||
"Andrew Phillips <theasp@gmail.com>",
|
||||
"Nicholas Schell <nschell@gmail.com>",
|
||||
"Max Truxa <dev@maxtruxa.com>",
|
||||
"Kræn Hansen <mail@kraenhansen.dk>"
|
||||
"Kræn Hansen <mail@kraenhansen.dk>",
|
||||
"Alexis Tyler <xo@wvvw.me>"
|
||||
],
|
||||
"license": "BSD-2-Clause",
|
||||
"dependencies": {
|
||||
"esm": "^3.0.84",
|
||||
"ws": "^6.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
@@ -44,8 +45,6 @@
|
||||
},
|
||||
"homepage": "https://github.com/HenningM/express-ws",
|
||||
"devDependencies": {
|
||||
"babel-cli": "^6.26.0",
|
||||
"babel-preset-es2015": "^6.5.0",
|
||||
"eslint": "^4.19.0",
|
||||
"eslint-config-airbnb": "^14.1.0",
|
||||
"eslint-plugin-import": "^2.12.0",
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ export default function expressWs(app, httpServer, options = {}) {
|
||||
dummyResponse.writeHead = function writeHead(statusCode) {
|
||||
if (statusCode > 200) {
|
||||
/* Something in the middleware chain signalled an error. */
|
||||
dummyResponse._header = '';
|
||||
dummyResponse._header = ''; // eslint-disable-line no-underscore-dangle
|
||||
socket.close();
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user