diff --git a/.gitignore b/.gitignore index caddd9f..bd8d34e 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /syncd/ *.log /temp/ +*.lock diff --git a/examples/server.mjs b/examples/server.js similarity index 100% rename from examples/server.mjs rename to examples/server.js diff --git a/package.json b/package.json index 4f446c7..9ede516 100644 --- a/package.json +++ b/package.json @@ -1,14 +1,14 @@ { "name": "@uci/websocket", - "version": "0.1.5", + "version": "0.1.6", "description": "JSON packet host websocket server", "main": "src", "scripts": { - "testw": "mocha -r @std/esm test/*.test.mjs --watch --recurse --watch-extensions mjs", - "test": "mocha -r @std/esm --timeout 10000 test/*.test.mjs", - "testlog": "DEBUG=true mocha -r @std/esm --timeout 10000 test/*.test.mjs", + "testw": "mocha -r esm test/*.test.mjs --watch --recurse", + "test": "mocha -r 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", - "s": "DEBUG=true node -r @std/esm examples/server" + "s": "DEBUG=true node -r esm examples/server" }, "author": "David Kebler", "license": "MIT", @@ -31,12 +31,11 @@ "url": "https://github.com/uCOMmandIt/websocket/issues" }, "homepage": "https://github.com/uCOMmandIt/websocket#readme", - "@std/esm": "cjs", "devDependencies": { - "@std/esm": "^0.22.0", "chai": "^4.1.2", "chai-as-promised": "^7.1.1", "codecov": "^3.0.0", + "esm": "^3.0.21", "istanbul": "^0.4.5", "mocha": "^5.0.1", "nodemon": "^1.15.1" diff --git a/src/index.mjs b/src/index.js similarity index 100% rename from src/index.mjs rename to src/index.js diff --git a/src/socket.mjs b/src/socket.js similarity index 93% rename from src/socket.mjs rename to src/socket.js index f2e3b17..04f955d 100644 --- a/src/socket.mjs +++ b/src/socket.js @@ -17,15 +17,7 @@ export default class Socket extends WebSocket.Server { //self bindings this._listen = this._listen.bind(this) this.create = this.create.bind(this) - log = logger.child( - { - repo:'uci-websocket', - npm:'@uci/websocket', - file:'src/socket.mjs', - class:'Socket', - id:this.id, - instance_created:new Date().getTime() - }) + log = logger({file:'src/socket.js',class:'Socket',name:'websocket',id:this.id}) } // end constructor diff --git a/test/sockets/tcp-process.mjs b/test/sockets/tcp-process.js similarity index 100% rename from test/sockets/tcp-process.mjs rename to test/sockets/tcp-process.js diff --git a/test/sockets/tcpsocket-9080.mjs b/test/sockets/tcpsocket-9080.js similarity index 100% rename from test/sockets/tcpsocket-9080.mjs rename to test/sockets/tcpsocket-9080.js diff --git a/test/sockets/tcpsocket-default.mjs b/test/sockets/tcpsocket-default.js similarity index 100% rename from test/sockets/tcpsocket-default.mjs rename to test/sockets/tcpsocket-default.js diff --git a/test/sockets/usocket-default.mjs b/test/sockets/usocket-default.js similarity index 100% rename from test/sockets/usocket-default.mjs rename to test/sockets/usocket-default.js diff --git a/test/sockets/usocket.mjs b/test/sockets/usocket.js similarity index 100% rename from test/sockets/usocket.mjs rename to test/sockets/usocket.js diff --git a/test/tcp.test.mjs b/test/tcp.test.js similarity index 100% rename from test/tcp.test.mjs rename to test/tcp.test.js diff --git a/test/usocket-default.test.mjs b/test/usocket-default.test.js similarity index 100% rename from test/usocket-default.test.mjs rename to test/usocket-default.test.js diff --git a/test/usocket.test.mjs b/test/usocket.test.js similarity index 100% rename from test/usocket.test.mjs rename to test/usocket.test.js