upgrade to esm from @std/esm

http-server
David Kebler 2018-05-16 07:25:52 -07:00
parent 4651fd4c2d
commit 8484afd335
13 changed files with 8 additions and 16 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@
/syncd/ /syncd/
*.log *.log
/temp/ /temp/
*.lock

View File

@ -1,14 +1,14 @@
{ {
"name": "@uci/websocket", "name": "@uci/websocket",
"version": "0.1.5", "version": "0.1.6",
"description": "JSON packet host websocket server", "description": "JSON packet host websocket server",
"main": "src", "main": "src",
"scripts": { "scripts": {
"testw": "mocha -r @std/esm test/*.test.mjs --watch --recurse --watch-extensions mjs", "testw": "mocha -r esm test/*.test.mjs --watch --recurse",
"test": "mocha -r @std/esm --timeout 10000 test/*.test.mjs", "test": "mocha -r esm --timeout 10000 test/*.test.mjs",
"testlog": "DEBUG=true mocha -r @std/esm --timeout 10000 test/*.test.mjs", "testlog": "DEBUG=true mocha -r esm --timeout 10000 test/*.test.mjs",
"testci": "istanbul cover ./node_modules/.bin/_mocha --report lcovonly -- -R spec --recursive && codecov || true", "testci": "istanbul cover ./node_modules/.bin/_mocha --report lcovonly -- -R spec --recursive && codecov || true",
"s": "DEBUG=true node -r @std/esm examples/server" "s": "DEBUG=true node -r esm examples/server"
}, },
"author": "David Kebler", "author": "David Kebler",
"license": "MIT", "license": "MIT",
@ -31,12 +31,11 @@
"url": "https://github.com/uCOMmandIt/websocket/issues" "url": "https://github.com/uCOMmandIt/websocket/issues"
}, },
"homepage": "https://github.com/uCOMmandIt/websocket#readme", "homepage": "https://github.com/uCOMmandIt/websocket#readme",
"@std/esm": "cjs",
"devDependencies": { "devDependencies": {
"@std/esm": "^0.22.0",
"chai": "^4.1.2", "chai": "^4.1.2",
"chai-as-promised": "^7.1.1", "chai-as-promised": "^7.1.1",
"codecov": "^3.0.0", "codecov": "^3.0.0",
"esm": "^3.0.21",
"istanbul": "^0.4.5", "istanbul": "^0.4.5",
"mocha": "^5.0.1", "mocha": "^5.0.1",
"nodemon": "^1.15.1" "nodemon": "^1.15.1"

View File

@ -17,15 +17,7 @@ export default class Socket extends WebSocket.Server {
//self bindings //self bindings
this._listen = this._listen.bind(this) this._listen = this._listen.bind(this)
this.create = this.create.bind(this) this.create = this.create.bind(this)
log = logger.child( log = logger({file:'src/socket.js',class:'Socket',name:'websocket',id:this.id})
{
repo:'uci-websocket',
npm:'@uci/websocket',
file:'src/socket.mjs',
class:'Socket',
id:this.id,
instance_created:new Date().getTime()
})
} // end constructor } // end constructor