From e958052acdbcc40b43ae394eabca5ce2da3b15ca Mon Sep 17 00:00:00 2001 From: Atinux Date: Fri, 20 Oct 2017 17:32:46 +0200 Subject: [PATCH] minor: Remove module & init calls with context as this --- lib/acl.js | 8 +- lib/conf.js | 20 +- lib/http.js | 7 +- lib/index.js | 24 +- lib/init.js | 11 +- lib/routes.js | 9 +- package-lock.json | 798 +--------------------------------------------- package.json | 2 +- 8 files changed, 46 insertions(+), 833 deletions(-) diff --git a/lib/acl.js b/lib/acl.js index f266648..bac7f7f 100644 --- a/lib/acl.js +++ b/lib/acl.js @@ -2,13 +2,13 @@ const { join } = require('path') const glob = require('glob-promise') -module.exports = async function (srcDir) { +module.exports = async function (srcDir, { conf, log }) { // Add mono modules (conf.mono.modules) to aclFiles - this.conf.mono.modules.forEach(({ name, path }) => { + conf.mono.modules.forEach(({ name, path }) => { path = join(path, 'acl.js') try { require(path) - this.log.debug(`ACL loaded from ${name} module`) + log.debug(`ACL loaded from ${name} module`) } catch (err) { // Do nothing } @@ -26,6 +26,6 @@ module.exports = async function (srcDir) { // name is like users/users.init.js const path = join(srcDir, name) require(path) - this.log.debug(`ACL loaded from ${name}`) + log.debug(`ACL loaded from ${name}`) }) } diff --git a/lib/conf.js b/lib/conf.js index 31f05b0..afd7938 100644 --- a/lib/conf.js +++ b/lib/conf.js @@ -10,7 +10,7 @@ function customizer(objValue, srcValue) { if (isObject(objValue) || isObject(srcValue)) return mergeWith(objValue, srcValue, customizer) } -function defaultOptions(conf) { +function defaultOptions(conf, { appDir, dir }) { conf.mono = conf.mono || {} // Modules options @@ -19,10 +19,10 @@ function defaultOptions(conf) { let name // If path is not an absolute path but a node module if (['.', '/'].indexOf(path[0]) === -1) { - path = join(this.appDir, 'node_modules', path) + path = join(appDir, 'node_modules', path) } // If relative path, make it absolute from dir - if (path[0] === '.') path = join(this.dir, path) + if (path[0] === '.') path = join(dir, path) // Make sure path ends by / if (path.slice(-1) !== '/') path += '/' // If the package.json is present @@ -52,10 +52,10 @@ function defaultOptions(conf) { return conf } -module.exports = function (dir) { +module.exports = function (dir, { log, pkg, appDir }) { // Environement const env = process.env.NODE_ENV || 'development' - this.log.debug(`Environment: ${env}`) + log.debug(`Environment: ${env}`) // Conf path const confPath = process.env.MONO_CONF_PATH || join(dir, 'conf') @@ -87,24 +87,24 @@ module.exports = function (dir) { // Ignore for local.js file if (filename === 'local') return // Log an error for others - return this.log.warn(`Could not load config file: conf/${filename}.js`) + return log.warn(`Could not load config file: conf/${filename}.js`) } // Load its source - this.log.debug(`Loading conf/${filename}.js configuration`) + log.debug(`Loading conf/${filename}.js configuration`) sources.push(source) }) // Add env, name & version to the returned config sources.push({ env, - name: this.pkg.name, - version: this.pkg.version + name: pkg.name, + version: pkg.version }) // Merged sources with conf const conf = mergeWith.apply(null, [...sources, customizer]) // Return conf - return defaultOptions.call({ appDir: this.appDir, dir }, conf) + return defaultOptions(conf, { appDir, dir }) } diff --git a/lib/http.js b/lib/http.js index bcf96a5..9ac3dd4 100644 --- a/lib/http.js +++ b/lib/http.js @@ -6,7 +6,8 @@ const morgan = require('morgan') const helmet = require('helmet') const bodyParser = require('body-parser') -module.exports = async function (httpOptions) { +module.exports = async function ({ conf, log }) { + const httpOptions = conf.mono.http // Default options const port = httpOptions.port = parseInt(process.env.PORT, 10) || httpOptions.port || 8000 httpOptions.logLevel = (typeof httpOptions.logLevel !== 'undefined' ? httpOptions.logLevel : 'dev') @@ -35,7 +36,7 @@ module.exports = async function (httpOptions) { const onListening = () => { const { address, port } = server.address() const host = (['0.0.0.0', '127.0.0.1'].includes(address) ? 'localhost' : address) - this.log.debug('Server running on ' + chalk.underline(`http://${host}:${port}`)) + log.debug('Server running on ' + chalk.underline(`http://${host}:${port}`)) } // Listen method const listen = () => { @@ -56,7 +57,7 @@ module.exports = async function (httpOptions) { if (httpOptions.bodyParser.json !== false) app.use(bodyParser.json(httpOptions.bodyParser.json)) // Logger middleware if (typeof httpOptions.logLevel === 'string') { - app.use(morgan(httpOptions.logLevel, { stream: this.log.stream })) + app.use(morgan(httpOptions.logLevel, { stream: log.stream })) } // Return app & server return { app, server, listen } diff --git a/lib/index.js b/lib/index.js index 1c31de1..9b83e6c 100644 --- a/lib/index.js +++ b/lib/index.js @@ -30,7 +30,10 @@ try { throw new Error(`[mono] Could not find package.json in application directory ${appDir}`) } -async function bootMonoModules(modules) { +async function bootMonoModules(context) { + const { conf, log } = context + const modules = conf.mono.modules + // Boot each modules in series for (const { name, path } of modules) { let module @@ -44,8 +47,8 @@ async function bootMonoModules(modules) { if (typeof module !== 'function') return // Load module and log it - this.log.debug(`Boot ${name} module`) - await module.call(this) + log.debug(`Boot ${name} module`) + await module(Object.assign({}, context, { log: log.module(name) })) } } @@ -61,36 +64,37 @@ module.exports = async function (dir) { process.on('unhandledRejection', handleThrow) // Load configuration - const conf = module.exports.conf = loadConf.call({ log: module.exports.log, pkg, appDir }, dir) + const conf = module.exports.conf = loadConf(dir, { log: module.exports.log, pkg, appDir }) // Load logs const log = module.exports.log = new MonoLog(conf.name, conf.mono.log) log.profile('Startup') // Create HTTP server - const { app, server, listen } = await httpServer.call({ log }, conf.mono.http) + const { app, server, listen } = await httpServer({ conf, log }) + const context = { log, conf, app, server } // Boot mono modules - await bootMonoModules.call({ log, conf, appDir, server }, conf.mono.modules) + await bootMonoModules(context) // Add JWT middleware (add req.generateJWT & req.loadSession) initJWT(conf.mono.jwt) // Init every modules - await initModules.call({ log, conf, appDir, pkg }, srcDir, { app, server }) + await initModules(srcDir, context) // Load ACL - await loadACL.call({ log, conf, appDir, pkg }, srcDir) + await loadACL(srcDir, context) // Load routes - await loadRoutes.call({ log, conf, appDir }, srcDir, app) + await loadRoutes(srcDir, context) // Make the server listen if (!conf.mono.http.preventListen) await listen() log.profile('Startup') // Return app & server - return { conf, app, server } + return context } module.exports.log = new MonoLog(pkg.name || 'mono') diff --git a/lib/init.js b/lib/init.js index a855792..5ffc18a 100644 --- a/lib/init.js +++ b/lib/init.js @@ -2,11 +2,12 @@ const { join } = require('path') const glob = require('glob-promise') -module.exports = async function (srcDir, { app, server }) { +module.exports = async function (srcDir, context) { + const { conf, log } = context let initFiles = [] // Add mono modules (conf.mono.modules) to initFiles - this.conf.mono.modules.forEach(({ name, path }) => { + conf.mono.modules.forEach(({ name, path }) => { path = join(path, 'init.js') try { require(path) @@ -34,9 +35,9 @@ module.exports = async function (srcDir, { app, server }) { const initPromises = initFiles.map(async ({ isModule, name, path}) => { // If mono module if (isModule) { - this.log.debug(`Init ${name} module`) + log.debug(`Init ${name} module`) } else { - this.log.debug(`Init ${name}`) + log.debug(`Init ${name}`) } // Require module @@ -44,7 +45,7 @@ module.exports = async function (srcDir, { app, server }) { // Load module and wait for it to be initialized if (typeof module === 'function') { - await module.call(this, { app, server, conf: this.conf, log: this.log.module(name) }) + await module(Object.assign({}, context, { log: log.module(name) })) } }) diff --git a/lib/routes.js b/lib/routes.js index a29d02e..3a10600 100644 --- a/lib/routes.js +++ b/lib/routes.js @@ -20,14 +20,13 @@ validate.options({ allowUnknownCookies: true }) -module.exports = async function (srcDir, app) { - const log = this.log +module.exports = async function (srcDir, { conf, log, app }) { let routes = [] let routeFiles = [] // Send back its name for discovery app.get('/_', (req, res) => { - res.status(200).send(this.conf.name) + res.status(200).send(conf.name) }) // Monitoring route @@ -36,7 +35,7 @@ module.exports = async function (srcDir, app) { }) app.get('/_version', (req, res) => { - res.status(200).send(this.conf.version) + res.status(200).send(conf.version) }) // List all routes @@ -45,7 +44,7 @@ module.exports = async function (srcDir, app) { }) // Add mono modules (conf.mono.modules) to routeFiles - this.conf.mono.modules.forEach(({ name, path }) => { + conf.mono.modules.forEach(({ name, path }) => { path = join(path, 'routes.js') try { require(path) diff --git a/package-lock.json b/package-lock.json index 519b1ae..a8ec485 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1397,7 +1397,6 @@ "requires": { "anymatch": "1.3.2", "async-each": "1.0.1", - "fsevents": "1.1.2", "glob-parent": "2.0.0", "inherits": "2.0.3", "is-binary-path": "1.0.1", @@ -2685,791 +2684,6 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, - "fsevents": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.2.tgz", - "integrity": "sha512-Sn44E5wQW4bTHXvQmvSHwqbuiXtduD6Rrjm2ZtUEGbyrig+nUH3t/QD4M4/ZXViY556TBpRgZkHLDx3JxPwxiw==", - "optional": true, - "requires": { - "nan": "2.7.0", - "node-pre-gyp": "0.6.36" - }, - "dependencies": { - "abbrev": { - "version": "1.1.0", - "bundled": true, - "optional": true - }, - "ajv": { - "version": "4.11.8", - "bundled": true, - "optional": true, - "requires": { - "co": "4.6.0", - "json-stable-stringify": "1.0.1" - } - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true - }, - "aproba": { - "version": "1.1.1", - "bundled": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.4", - "bundled": true, - "optional": true, - "requires": { - "delegates": "1.0.0", - "readable-stream": "2.2.9" - } - }, - "asn1": { - "version": "0.2.3", - "bundled": true, - "optional": true - }, - "assert-plus": { - "version": "0.2.0", - "bundled": true, - "optional": true - }, - "asynckit": { - "version": "0.4.0", - "bundled": true, - "optional": true - }, - "aws-sign2": { - "version": "0.6.0", - "bundled": true, - "optional": true - }, - "aws4": { - "version": "1.6.0", - "bundled": true, - "optional": true - }, - "balanced-match": { - "version": "0.4.2", - "bundled": true - }, - "bcrypt-pbkdf": { - "version": "1.0.1", - "bundled": true, - "optional": true, - "requires": { - "tweetnacl": "0.14.5" - } - }, - "block-stream": { - "version": "0.0.9", - "bundled": true, - "requires": { - "inherits": "2.0.3" - } - }, - "boom": { - "version": "2.10.1", - "bundled": true, - "requires": { - "hoek": "2.16.3" - } - }, - "brace-expansion": { - "version": "1.1.7", - "bundled": true, - "requires": { - "balanced-match": "0.4.2", - "concat-map": "0.0.1" - } - }, - "buffer-shims": { - "version": "1.0.0", - "bundled": true - }, - "caseless": { - "version": "0.12.0", - "bundled": true, - "optional": true - }, - "co": { - "version": "4.6.0", - "bundled": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true - }, - "combined-stream": { - "version": "1.0.5", - "bundled": true, - "requires": { - "delayed-stream": "1.0.0" - } - }, - "concat-map": { - "version": "0.0.1", - "bundled": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true - }, - "cryptiles": { - "version": "2.0.5", - "bundled": true, - "optional": true, - "requires": { - "boom": "2.10.1" - } - }, - "dashdash": { - "version": "1.14.1", - "bundled": true, - "optional": true, - "requires": { - "assert-plus": "1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "optional": true - } - } - }, - "debug": { - "version": "2.6.8", - "bundled": true, - "optional": true, - "requires": { - "ms": "2.0.0" - } - }, - "deep-extend": { - "version": "0.4.2", - "bundled": true, - "optional": true - }, - "delayed-stream": { - "version": "1.0.0", - "bundled": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "optional": true - }, - "ecc-jsbn": { - "version": "0.1.1", - "bundled": true, - "optional": true, - "requires": { - "jsbn": "0.1.1" - } - }, - "extend": { - "version": "3.0.1", - "bundled": true, - "optional": true - }, - "extsprintf": { - "version": "1.0.2", - "bundled": true - }, - "forever-agent": { - "version": "0.6.1", - "bundled": true, - "optional": true - }, - "form-data": { - "version": "2.1.4", - "bundled": true, - "optional": true, - "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.5", - "mime-types": "2.1.15" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true - }, - "fstream": { - "version": "1.0.11", - "bundled": true, - "requires": { - "graceful-fs": "4.1.11", - "inherits": "2.0.3", - "mkdirp": "0.5.1", - "rimraf": "2.6.1" - } - }, - "fstream-ignore": { - "version": "1.0.5", - "bundled": true, - "optional": true, - "requires": { - "fstream": "1.0.11", - "inherits": "2.0.3", - "minimatch": "3.0.4" - } - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "optional": true, - "requires": { - "aproba": "1.1.1", - "console-control-strings": "1.1.0", - "has-unicode": "2.0.1", - "object-assign": "4.1.1", - "signal-exit": "3.0.2", - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wide-align": "1.1.2" - } - }, - "getpass": { - "version": "0.1.7", - "bundled": true, - "optional": true, - "requires": { - "assert-plus": "1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "optional": true - } - } - }, - "glob": { - "version": "7.1.2", - "bundled": true, - "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" - } - }, - "graceful-fs": { - "version": "4.1.11", - "bundled": true - }, - "har-schema": { - "version": "1.0.5", - "bundled": true, - "optional": true - }, - "har-validator": { - "version": "4.2.1", - "bundled": true, - "optional": true, - "requires": { - "ajv": "4.11.8", - "har-schema": "1.0.5" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "optional": true - }, - "hawk": { - "version": "3.1.3", - "bundled": true, - "optional": true, - "requires": { - "boom": "2.10.1", - "cryptiles": "2.0.5", - "hoek": "2.16.3", - "sntp": "1.0.9" - } - }, - "hoek": { - "version": "2.16.3", - "bundled": true - }, - "http-signature": { - "version": "1.1.1", - "bundled": true, - "optional": true, - "requires": { - "assert-plus": "0.2.0", - "jsprim": "1.4.0", - "sshpk": "1.13.0" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true - }, - "ini": { - "version": "1.3.4", - "bundled": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "requires": { - "number-is-nan": "1.0.1" - } - }, - "is-typedarray": { - "version": "1.0.0", - "bundled": true, - "optional": true - }, - "isarray": { - "version": "1.0.0", - "bundled": true - }, - "isstream": { - "version": "0.1.2", - "bundled": true, - "optional": true - }, - "jodid25519": { - "version": "1.0.2", - "bundled": true, - "optional": true, - "requires": { - "jsbn": "0.1.1" - } - }, - "jsbn": { - "version": "0.1.1", - "bundled": true, - "optional": true - }, - "json-schema": { - "version": "0.2.3", - "bundled": true, - "optional": true - }, - "json-stable-stringify": { - "version": "1.0.1", - "bundled": true, - "optional": true, - "requires": { - "jsonify": "0.0.0" - } - }, - "json-stringify-safe": { - "version": "5.0.1", - "bundled": true, - "optional": true - }, - "jsonify": { - "version": "0.0.0", - "bundled": true, - "optional": true - }, - "jsprim": { - "version": "1.4.0", - "bundled": true, - "optional": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.0.2", - "json-schema": "0.2.3", - "verror": "1.3.6" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "optional": true - } - } - }, - "mime-db": { - "version": "1.27.0", - "bundled": true - }, - "mime-types": { - "version": "2.1.15", - "bundled": true, - "requires": { - "mime-db": "1.27.0" - } - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "requires": { - "brace-expansion": "1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "bundled": true, - "optional": true - }, - "node-pre-gyp": { - "version": "0.6.36", - "bundled": true, - "optional": true, - "requires": { - "mkdirp": "0.5.1", - "nopt": "4.0.1", - "npmlog": "4.1.0", - "rc": "1.2.1", - "request": "2.81.0", - "rimraf": "2.6.1", - "semver": "5.3.0", - "tar": "2.2.1", - "tar-pack": "3.4.0" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "optional": true, - "requires": { - "abbrev": "1.1.0", - "osenv": "0.1.4" - } - }, - "npmlog": { - "version": "4.1.0", - "bundled": true, - "optional": true, - "requires": { - "are-we-there-yet": "1.1.4", - "console-control-strings": "1.1.0", - "gauge": "2.7.4", - "set-blocking": "2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true - }, - "oauth-sign": { - "version": "0.8.2", - "bundled": true, - "optional": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "requires": { - "wrappy": "1.0.2" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "optional": true - }, - "osenv": { - "version": "0.1.4", - "bundled": true, - "optional": true, - "requires": { - "os-homedir": "1.0.2", - "os-tmpdir": "1.0.2" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true - }, - "performance-now": { - "version": "0.2.0", - "bundled": true, - "optional": true - }, - "process-nextick-args": { - "version": "1.0.7", - "bundled": true - }, - "punycode": { - "version": "1.4.1", - "bundled": true, - "optional": true - }, - "qs": { - "version": "6.4.0", - "bundled": true, - "optional": true - }, - "rc": { - "version": "1.2.1", - "bundled": true, - "optional": true, - "requires": { - "deep-extend": "0.4.2", - "ini": "1.3.4", - "minimist": "1.2.0", - "strip-json-comments": "2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "optional": true - } - } - }, - "readable-stream": { - "version": "2.2.9", - "bundled": true, - "requires": { - "buffer-shims": "1.0.0", - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "1.0.7", - "string_decoder": "1.0.1", - "util-deprecate": "1.0.2" - } - }, - "request": { - "version": "2.81.0", - "bundled": true, - "optional": true, - "requires": { - "aws-sign2": "0.6.0", - "aws4": "1.6.0", - "caseless": "0.12.0", - "combined-stream": "1.0.5", - "extend": "3.0.1", - "forever-agent": "0.6.1", - "form-data": "2.1.4", - "har-validator": "4.2.1", - "hawk": "3.1.3", - "http-signature": "1.1.1", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.15", - "oauth-sign": "0.8.2", - "performance-now": "0.2.0", - "qs": "6.4.0", - "safe-buffer": "5.0.1", - "stringstream": "0.0.5", - "tough-cookie": "2.3.2", - "tunnel-agent": "0.6.0", - "uuid": "3.0.1" - } - }, - "rimraf": { - "version": "2.6.1", - "bundled": true, - "requires": { - "glob": "7.1.2" - } - }, - "safe-buffer": { - "version": "5.0.1", - "bundled": true - }, - "semver": { - "version": "5.3.0", - "bundled": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "optional": true - }, - "sntp": { - "version": "1.0.9", - "bundled": true, - "optional": true, - "requires": { - "hoek": "2.16.3" - } - }, - "sshpk": { - "version": "1.13.0", - "bundled": true, - "optional": true, - "requires": { - "asn1": "0.2.3", - "assert-plus": "1.0.0", - "bcrypt-pbkdf": "1.0.1", - "dashdash": "1.14.1", - "ecc-jsbn": "0.1.1", - "getpass": "0.1.7", - "jodid25519": "1.0.2", - "jsbn": "0.1.1", - "tweetnacl": "0.14.5" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "optional": true - } - } - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" - } - }, - "string_decoder": { - "version": "1.0.1", - "bundled": true, - "requires": { - "safe-buffer": "5.0.1" - } - }, - "stringstream": { - "version": "0.0.5", - "bundled": true, - "optional": true - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "requires": { - "ansi-regex": "2.1.1" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "optional": true - }, - "tar": { - "version": "2.2.1", - "bundled": true, - "requires": { - "block-stream": "0.0.9", - "fstream": "1.0.11", - "inherits": "2.0.3" - } - }, - "tar-pack": { - "version": "3.4.0", - "bundled": true, - "optional": true, - "requires": { - "debug": "2.6.8", - "fstream": "1.0.11", - "fstream-ignore": "1.0.5", - "once": "1.4.0", - "readable-stream": "2.2.9", - "rimraf": "2.6.1", - "tar": "2.2.1", - "uid-number": "0.0.6" - } - }, - "tough-cookie": { - "version": "2.3.2", - "bundled": true, - "optional": true, - "requires": { - "punycode": "1.4.1" - } - }, - "tunnel-agent": { - "version": "0.6.0", - "bundled": true, - "optional": true, - "requires": { - "safe-buffer": "5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "bundled": true, - "optional": true - }, - "uid-number": { - "version": "0.0.6", - "bundled": true, - "optional": true - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true - }, - "uuid": { - "version": "3.0.1", - "bundled": true, - "optional": true - }, - "verror": { - "version": "1.3.6", - "bundled": true, - "optional": true, - "requires": { - "extsprintf": "1.0.2" - } - }, - "wide-align": { - "version": "1.1.2", - "bundled": true, - "optional": true, - "requires": { - "string-width": "1.0.2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true - } - } - }, "function-name-support": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/function-name-support/-/function-name-support-0.2.0.tgz", @@ -5055,9 +4269,9 @@ "integrity": "sha1-4rbN65zhn5kxelNyLz2/XfXqqrI=" }, "mono-test-utils": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mono-test-utils/-/mono-test-utils-1.0.4.tgz", - "integrity": "sha512-wef6/3MOwKZeo3IWycIwBwX23S//o7hX+fut21ZtkN23y/MFup9eDtRnXpLsFiaRoZwTeWZR2uvM/nGnVUTZjQ==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mono-test-utils/-/mono-test-utils-1.2.0.tgz", + "integrity": "sha512-6/YSNeQ3i5JePYHzTaafgpoA/udpjOHL5wOuQgwjTtdNqxIBiCwsJonhr0/Aob0KTwuKRZ6+AEH44/HUwkeEIA==", "dev": true, "requires": { "request": "2.83.0", @@ -5247,12 +4461,6 @@ "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", "dev": true }, - "nan": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.7.0.tgz", - "integrity": "sha1-2Vv3IeyHfgjbJ27T/G63j5CDrUY=", - "optional": true - }, "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", diff --git a/package.json b/package.json index 0fe9fa9..d77acd0 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "ava": "^0.22.0", "codecov": "^2.3.1", "eslint": "^4.9.0", - "mono-test-utils": "^1.0.4", + "mono-test-utils": "^1.2.0", "nyc": "^11.2.1" }, "keywords": [