upgrade to esm from @std/esm
parent
d22e3ad785
commit
10acb39693
|
@ -1,3 +1,4 @@
|
|||
/node_modules/
|
||||
/coverage/
|
||||
/syncd/
|
||||
*.lock
|
||||
|
|
23
package.json
23
package.json
|
@ -1,16 +1,16 @@
|
|||
{
|
||||
"name": "@uci/i2c-bus",
|
||||
"version": "0.1.2",
|
||||
"version": "0.1.5",
|
||||
"description": "I2c Bus Classes for Communication to I2C bus via socket or direct call",
|
||||
"main": "src/bus-packet.mjs",
|
||||
"main": "src/bus-packet",
|
||||
"scripts": {
|
||||
"irelay": "node --require @std/esm examples/ipc-relay",
|
||||
"iscan": "node --require @std/esm examples/ipc-scan || true",
|
||||
"tscan": "node --require @std/esm examples/tcp-scan || true",
|
||||
"bus": "node --require @std/esm examples/bus",
|
||||
"busl": "DEBUG=true node --require @std/esm examples/bus",
|
||||
"test": "mocha -r @std/esm test/*.test.mjs",
|
||||
"testw": "mocha -r @std/esm test/*.test.mjs --watch --recurse --watch-extensions mjs",
|
||||
"irelay": "node --require esm examples/ipc-relay",
|
||||
"iscan": "node --require esm examples/ipc-scan || true",
|
||||
"tscan": "node --require esm examples/tcp-scan || true",
|
||||
"bus": "node --require esm examples/bus",
|
||||
"busl": "DEBUG=true node --require esm examples/bus",
|
||||
"test": "mocha -r esm test/*.test.js",
|
||||
"testw": "mocha -r esm test/*.test.js --watch --recurse",
|
||||
"testci": "istanbul cover ./node_modules/.bin/_mocha test/ --report lcovonly -- -R spec --recursive && codecov || true"
|
||||
},
|
||||
"author": "David Kebler",
|
||||
|
@ -29,21 +29,20 @@
|
|||
"url": "https://github.com/uCOMmandIt/i2c/issues"
|
||||
},
|
||||
"homepage": "https://github.com/uCOMmandIt/i2c#readme",
|
||||
"@std/esm": "cjs",
|
||||
"optionalDependencies": {
|
||||
"i2c-bus": "^1.x"
|
||||
},
|
||||
"dependencies": {
|
||||
"@uci/base": "^0.1.0",
|
||||
"@uci/logger": "0.0.1",
|
||||
"@uci/logger": "^0.0.2",
|
||||
"better-try-catch": "^0.6.2",
|
||||
"pify": "^3.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@std/esm": "^0.18.0",
|
||||
"chai": "^3.5.0",
|
||||
"chai-as-promised": "^6.0.0",
|
||||
"codecov": "^1.0.1",
|
||||
"esm": "^3.0.21",
|
||||
"istanbul": "^0.4.5",
|
||||
"mocha": "^3.2.0",
|
||||
"nodemon": "^1.14.12"
|
||||
|
|
|
@ -6,18 +6,10 @@ import Base from '@uci/base'
|
|||
|
||||
import logger from '@uci/logger'
|
||||
let log = {}
|
||||
const LOG_OPTS = {
|
||||
repo:'uci-i2c-bus',
|
||||
npm:'@uci/i2c-bus',
|
||||
file:'src/bus-packet.mjs',
|
||||
class:'Bus',
|
||||
id:this.id,
|
||||
instance_created:new Date().getTime()
|
||||
}
|
||||
|
||||
export default class Bus extends Base {
|
||||
constructor(opts) {
|
||||
log = logger.child(LOG_OPTS)
|
||||
log = logger({name:'i2c-bus',id:opts.id,file:'src/bus-packet.js',class:'Bus'})
|
||||
if (opts.path) opts.ns ={path:opts.path}
|
||||
if(!opts.ns) opts.ns = {path:'i2c-bus'}
|
||||
opts.sockets = (opts.sockets ? (opts.sockets+',') : '') + 'ns#s>n'
|
Loading…
Reference in New Issue