diff --git a/.travis.yml b/.travis.yml index b16d7f9..c2ebc89 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,3 @@ language: node_js node_js: - - "6" \ No newline at end of file + - "10.5" diff --git a/History.md b/History.md index 0a9727b..810aa44 100644 --- a/History.md +++ b/History.md @@ -1,3 +1,8 @@ +2.0.0-alpha.1 / 2018-07-16 +================== + + * use experimental worker_threads to run tasks + 1.6.1 / 2018-06-20 ================== @@ -14,7 +19,7 @@ ================== * message-pack streaming (@noam-almog) - + 1.4.0 / 2017-05-29 ================== @@ -25,12 +30,12 @@ * Minor performance fix: getting rid of array destructuring as it prevents code runtime optimization in current v8 - + 1.3.0 / 2017-01-23 ================== * Workers do not accept work when they are in process of booting up (@mheiniger) - + 1.2.1 / 2016-12-19 ================== @@ -46,7 +51,7 @@ ================== * Added useCompression option - + 1.0.0 / 2016-11-01 ================== diff --git a/Readme.md b/Readme.md index 939d767..2c0511c 100644 --- a/Readme.md +++ b/Readme.md @@ -4,16 +4,18 @@ # worker-nodes - A node.js library to run cpu-intensive tasks in a separate processes and to not block the event loop. +*THIS IS AN EXPERIMENTAL BRANCH, IT USES [worker_threads](https://nodejs.org/api/worker_threads.html) WHICH IS NOT STABLE YET* + + A node.js library to run cpu-intensive tasks in a separate thread and to not block the event loop. ## Installation ```bash -$ npm install worker-nodes +$ npm install worker-nodes@next ``` - Node.js greater than 6.6.0 highly recommended. + Node.js greater than 10.5.0 is *required* # API Reference @@ -206,18 +208,18 @@ Example results: ```bash results for 100 executions -name time: total [ms] time usr [ms] time sys [ms] worker usr [ms] worker sys [ms] mem rss [MB] worker rss [MB] errors ------------------- ---------------- ------------- ------------- --------------- --------------- ------------ --------------- ------ -no-workers 150 239 42 0 0 98 0 0 -worker-nodes@1.2.0 1521 646 528 641 367 272 119 0 -workerpool@2.1.0 12055 7356 5726 896 212 731 74 0 -worker-farm@1.3.1 12124 6711 5501 1577 446 689 74 0 -process-pool@0.3.4 12348 6866 5474 1696 458 698 76 0 -worker-pool@3.0.2 14029 7633 5604 2285 649 769 104 0 - -os : Darwin / 15.5.0 / x64 -cpu : Intel(R) Core(TM) i7-4578U CPU @ 3.00GHz × 4 -node : 6.9.1 / v8: 5.1.281.84 +name time: total [ms] time usr [ms] time sys [ms] worker usr [ms] worker sys [ms] mem rss [MB] worker rss [MB] errors +------------------ ---------------- ------------- ------------- --------------- --------------- ------------ --------------- ------ +no-workers 162 250 38 0 0 101 0 0 +worker-nodes@next 458 573 186 571 185 210 207 0 +worker-nodes@1.6.1 1503 670 395 991 337 292 87 0 +workerpool@2.3.0 1684 1511 688 292 82 155 49 0 +worker-farm@1.6.0 2508 1435 511 1247 368 104 59 0 +process-pool@0.3.4 2571 1537 517 1333 376 105 61 0 +worker-pool@3.0.2 15939 15984 5632 1946 546 86 79 0 + + os : Darwin / 17.5.0 / x64 + cpu : Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz × 8 ``` ## See also diff --git a/benchmark/package-lock.json b/benchmark/package-lock.json new file mode 100644 index 0000000..464e256 --- /dev/null +++ b/benchmark/package-lock.json @@ -0,0 +1,186 @@ +{ + "requires": true, + "lockfileVersion": 1, + "dependencies": { + "amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=" + }, + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "bluebird": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", + "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==", + "dev": true + }, + "clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", + "dev": true, + "optional": true + }, + "defaults": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", + "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", + "dev": true, + "optional": true, + "requires": { + "clone": "^1.0.2" + } + }, + "easy-table": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/easy-table/-/easy-table-1.1.1.tgz", + "integrity": "sha512-C9Lvm0WFcn2RgxbMnTbXZenMIWcBtkzMr+dWqq/JsVoGFSVUVlPqeOa5LP5kM0I3zoOazFpckOEb2/0LDFfToQ==", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0", + "wcwidth": ">=1.0.1" + } + }, + "errno": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", + "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", + "requires": { + "prr": "~1.0.1" + } + }, + "event-lite": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/event-lite/-/event-lite-0.1.1.tgz", + "integrity": "sha1-R88IqNN9C2lM23s7F7UfqsZXYIY=" + }, + "ieee754": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz", + "integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==" + }, + "int64-buffer": { + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/int64-buffer/-/int64-buffer-0.1.10.tgz", + "integrity": "sha1-J3siiofZWtd30HwTgyAiQGpHNCM=" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "lodash": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz", + "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=" + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "msgpack-lite": { + "version": "0.1.26", + "resolved": "https://registry.npmjs.org/msgpack-lite/-/msgpack-lite-0.1.26.tgz", + "integrity": "sha1-3TxQsm8FnyXn7e42REGDWOKprYk=", + "requires": { + "event-lite": "^0.1.1", + "ieee754": "^1.1.8", + "int64-buffer": "^0.1.9", + "isarray": "^1.0.0" + } + }, + "node-worker-pool": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/node-worker-pool/-/node-worker-pool-3.0.2.tgz", + "integrity": "sha1-IQZTLJGhgnnj2aQRe1oqbaGgjpw=" + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "process-pool": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/process-pool/-/process-pool-0.3.4.tgz", + "integrity": "sha1-EuWCcUhzYt4xQsMZ72gOKRTnMtU=", + "requires": { + "bluebird": "^2.9.14", + "lodash": "^3.3.1", + "rewire": "^2.1.3", + "source-map": "^0.4.0" + }, + "dependencies": { + "bluebird": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.11.0.tgz", + "integrity": "sha1-U0uQM8AiyVecVro7Plpcqvu2UOE=" + } + } + }, + "prr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=" + }, + "rewire": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/rewire/-/rewire-2.5.2.tgz", + "integrity": "sha1-ZCfee3/u+n02QBUH62SlOFvFjcc=" + }, + "source-map": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "requires": { + "amdefine": ">=0.0.4" + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=", + "dev": true, + "optional": true, + "requires": { + "defaults": "^1.0.3" + } + }, + "worker-farm": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.6.0.tgz", + "integrity": "sha512-6w+3tHbM87WnSWnENBUvA2pxJPLhQUg5LKwUQHq3r+XPhIM+Gh2R5ycbwPCyuGbNg+lPgdcnQUhuC02kJCvffQ==", + "requires": { + "errno": "~0.1.7" + } + }, + "worker-nodes": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/worker-nodes/-/worker-nodes-1.6.1.tgz", + "integrity": "sha512-2+vvAoOLTNeun9XhnsxTSNH+N3y+gTS7dLtM0shZymavL08y5ShKxemdOpqbbZg1V6apKj+xiO5dWw/Rue4Arg==", + "requires": { + "msgpack-lite": "^0.1.26" + } + }, + "workerpool": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-2.3.0.tgz", + "integrity": "sha512-JP5DpviEV84zDmz13QnD4FfRjZBjnTOYY2O4pGgxtlqLh47WOzQFHm8o17TE5OSfcDoKC6vHSrN4yPju93DW0Q==", + "requires": { + "object-assign": "4.1.1" + } + } + } +} diff --git a/benchmark/package.json b/benchmark/package.json index ed42d22..f85b35f 100644 --- a/benchmark/package.json +++ b/benchmark/package.json @@ -14,6 +14,6 @@ }, "scripts": { "pretest": "mkdir -p fixtures; cd fixtures; base64 /dev/urandom | head -c 1048576 > output.dat; base64 /dev/urandom | head -c 524288 > input.dat;", - "test": "node reporter.js --repeats 100 ./html-renderer/*" + "test": "node --experimental-worker reporter.js --repeats 100 ./html-renderer/*" } } diff --git a/lib/util/queue.js b/lib/util/queue.js index 8515712..44f3470 100644 --- a/lib/util/queue.js +++ b/lib/util/queue.js @@ -38,6 +38,10 @@ class Queue { return this.storage.forEach(predicate); } + map(predicate) { + return this.storage.map(predicate); + } + filter(predicate) { return this.storage.filter(predicate); } diff --git a/lib/worker/child-loader.js b/lib/worker/child-loader.js index 762f799..491e9eb 100644 --- a/lib/worker/child-loader.js +++ b/lib/worker/child-loader.js @@ -1,22 +1,18 @@ -const net = require('net'); +const { parentPort } = require('worker_threads'); const { Request, Response } = require('./message'); -const Transport = require('./transport'); let $module; -let $cmdTransport = process; -let $dataTransport; function setupModule({ modulePath }) { // load target module $module = require(modulePath); - // setup data transport channel - $dataTransport = new Transport(new net.Socket({ fd: 3 })); - $dataTransport.on('message', handleCall); + // setup data channel + parentPort.on('message', handleCall); // report readiness - $cmdTransport.send('ready'); + parentPort.postMessage('ready'); } function handleCall(requestData) { @@ -33,7 +29,7 @@ function handleCall(requestData) { }) .then(result => { response.setResult(result); - $dataTransport.send(response); + parentPort.postMessage(response); }) .catch(err => { const error = { @@ -45,15 +41,15 @@ function handleCall(requestData) { Object.keys(err).forEach(key => error[key] = err[key]); response.error = error; - $dataTransport.send(response); + parentPort.postMessage(response); }); } -$cmdTransport.on('message', function ({ cmd = 'call', data }) { +parentPort.on('message', function ({ cmd = 'call', data }) { switch (cmd) { case 'start': return setupModule(data); case 'exit': return process.exit(0); } -}); \ No newline at end of file +}); diff --git a/lib/worker/process.js b/lib/worker/process.js index 76b156a..3540246 100644 --- a/lib/worker/process.js +++ b/lib/worker/process.js @@ -1,66 +1,41 @@ -const childProcess = require('child_process'); +const worker = require('worker_threads'); const EventEmitter = require('events'); -const Transport = require('./transport'); - -const execArgsProcessor = { - debugOptionPattern: /^(--inspect(?:-brk)?|--debug|--debug-(brk|port))(=\d+)?$/, - offset: 1, - - map(execArgv) { - let debugPort = 0; - return execArgv.map(option => { - const debugOption = option.match(this.debugOptionPattern); - if (!debugOption) return option; - if (debugPort === 0) debugPort = process.debugPort + this.offset++; - return debugOption[1] + '=' + debugPort; - }); - } -}; - class WorkerProcess extends EventEmitter { constructor(modulePath, { stopTimeout }) { super(); - const child = childProcess.fork(require.resolve('./child-loader'), { - env: process.env, - cwd: process.cwd(), - execArgv: execArgsProcessor.map(process.execArgv), - stdio: [0, 1, 2, 'pipe', 'ipc'] - }); + const child = new worker.Worker(require.resolve('./child-loader')); + + child.once('message', msg => { + // report readiness on a first message received from the child + // process (as it means that the child has loaded all the stuff + // into a memory and is ready to handle the calls) + this.emit('ready'); + this.startDate = new Date(); - const transport = new Transport(child.stdio[3]); - transport.on('message', message => this.emit('message', message)); + child.on('message', message => { + this.emit('message', message); + }); + }); this.child = child; - this.dataTransport = transport; this.stopTimeout = stopTimeout; child.on('error', error => console.error(error)); // this instance is not usable from this moment, so forward the exit event - child.once('exit', code => this.emit('exit', code)); - - // report readiness on a first message received from the child - // process (as it means that the child has loaded all the stuff - // into a memory and is ready to handle the calls) - child.once('message', () => this.emit('ready')); + child.on('exit', code => this.emit('exit', code)); // pass all the information needed to spin up the child process - child.send({ cmd: 'start', data: { modulePath } }); + child.postMessage({ cmd: 'start', data: { modulePath } }); } /** * Stops the worker process. It results in a trigger of an 'exit' event. */ exit() { - // watchdog the stop progress and force the - // child to exit if it all takes too long - const timer = setTimeout(() => this.child.kill('SIGKILL'), this.stopTimeout); - this.child.once('exit', () => clearTimeout(timer)); - - // politely ask the child to stop - this.child.send({ cmd: 'exit' }); + this.child.postMessage({ cmd: 'exit' }); } /** @@ -70,7 +45,7 @@ class WorkerProcess extends EventEmitter { * @param {Request} request */ handle(request) { - this.dataTransport.send(request); + this.child.postMessage(request); } } diff --git a/lib/worker/transport.js b/lib/worker/transport.js deleted file mode 100644 index b04548e..0000000 --- a/lib/worker/transport.js +++ /dev/null @@ -1,62 +0,0 @@ -const EventEmitter = require('events'); -const msgpack = require("msgpack-lite"); - -const BUFFER_INITIAL_SIZE = 1024 * 1024; // 1MB -const BUFFER_GROW_RATIO = 1.5; - -class Transport extends EventEmitter { - constructor(pipe) { - super(); - - let buffer = Buffer.alloc(BUFFER_INITIAL_SIZE); - let bufferPointer = 0; - - this.pipe = pipe; - - const processChunk = dataChunk => { - // extend the buffer to ensure that it is - // large enough to store the incoming chunk - while (bufferPointer + dataChunk.byteLength > buffer.byteLength) { - const newBuffer = Buffer.alloc(buffer.byteLength * BUFFER_GROW_RATIO); - buffer.copy(newBuffer); - buffer = newBuffer; - } - - bufferPointer += dataChunk.copy(buffer, bufferPointer); - checkBuffer(); - }; - - const checkBuffer = () => { - const headerLength = Uint32Array.BYTES_PER_ELEMENT; - const bodyLength = new Uint32Array(buffer.buffer, 0, 1)[0]; - const totalMsgLength = headerLength + bodyLength; - - if (bufferPointer > headerLength && bufferPointer >= totalMsgLength) { - const message = msgpack.decode(buffer.slice(headerLength, headerLength + bodyLength)); - - this.emit('message', message); - - // copy remaining chunk to the start of the buffer and reset pointers - buffer.copy(buffer, 0, totalMsgLength, bufferPointer); - bufferPointer = bufferPointer - totalMsgLength; - - if (bufferPointer >= headerLength) { - checkBuffer(); - } - } - }; - - pipe.on('error', console.error); - pipe.on('data', processChunk); - } - - send(message) { - const serializedMessage = msgpack.encode(message); - const header = new Uint32Array([ serializedMessage.byteLength ]); - - this.pipe.write(Buffer.from(header.buffer)); - this.pipe.write(serializedMessage); - } -} - -module.exports = Transport; \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..72cfddf --- /dev/null +++ b/package-lock.json @@ -0,0 +1,1127 @@ +{ + "name": "worker-nodes", + "version": "2.0.0-alpha.1", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "acorn": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", + "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", + "dev": true + }, + "acorn-jsx": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz", + "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", + "dev": true, + "requires": { + "acorn": "^3.0.4" + } + }, + "amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", + "dev": true + }, + "ansi-escape-sequences": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-escape-sequences/-/ansi-escape-sequences-3.0.0.tgz", + "integrity": "sha1-HBg5S2r5t2/5pjUJ+kl2af0s5T4=", + "dev": true, + "requires": { + "array-back": "^1.0.3" + } + }, + "app-usage-stats": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/app-usage-stats/-/app-usage-stats-0.4.1.tgz", + "integrity": "sha1-l+ubibVnj6LdyXk7EphijMIYQp8=", + "dev": true, + "requires": { + "array-back": "^1.0.4", + "core-js": "^2.4.1", + "feature-detect-es6": "^1.3.1", + "home-path": "^1.0.3", + "test-value": "^2.1.0", + "usage-stats": "^0.8.2" + } + }, + "array-back": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-1.0.4.tgz", + "integrity": "sha1-ZEun8JX3/898Q7Xw3DnTwfA8Bjs=", + "dev": true, + "requires": { + "typical": "^2.6.0" + } + }, + "assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true + }, + "async": { + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", + "integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E=", + "dev": true, + "optional": true + }, + "babel-polyfill": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.26.0.tgz", + "integrity": "sha1-N5k3q8Z9eJWXCtxiHyhM2WbPIVM=", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "core-js": "^2.5.0", + "regenerator-runtime": "^0.10.5" + } + }, + "babel-runtime": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", + "dev": true, + "requires": { + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" + }, + "dependencies": { + "regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", + "dev": true + } + } + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "bluebird": { + "version": "3.4.7", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.4.7.tgz", + "integrity": "sha1-9y12C+Cbf3bQjtj66Ysomo0F+rM=", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "browser-stdout": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.0.tgz", + "integrity": "sha1-81HTKWnTL6XXpVZxVCY9korjvR8=", + "dev": true + }, + "cache-point": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/cache-point/-/cache-point-0.3.4.tgz", + "integrity": "sha1-FS21Asa7I7WqP2Y+Iw1d6OxOTz8=", + "dev": true, + "requires": { + "array-back": "^1.0.3", + "core-js": "^2.4.1", + "feature-detect-es6": "^1.3.1", + "fs-then-native": "^1.0.2", + "mkdirp": "~0.5.1" + } + }, + "catharsis": { + "version": "0.8.9", + "resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.8.9.tgz", + "integrity": "sha1-mMyJDKZS3S7w5ws3klMQ/56Q/Is=", + "dev": true, + "requires": { + "underscore-contrib": "~0.3.0" + } + }, + "chai": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-3.5.0.tgz", + "integrity": "sha1-TQJjewZ/6Vi9v906QOxW/vc3Mkc=", + "dev": true, + "requires": { + "assertion-error": "^1.0.1", + "deep-eql": "^0.1.3", + "type-detect": "^1.0.0" + } + }, + "cli-commands": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/cli-commands/-/cli-commands-0.1.0.tgz", + "integrity": "sha1-xXysxAa7z57iFkZgcWHtQy71oFo=", + "dev": true, + "requires": { + "ansi-escape-sequences": "^3.0.0", + "command-line-args": "^3.0.1", + "command-line-commands": "^1.0.4", + "command-line-usage": "^3.0.5" + } + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "dev": true + }, + "co-mocha": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/co-mocha/-/co-mocha-1.2.2.tgz", + "integrity": "sha512-ocdJRn3sxonOqpdjSU2VwTwWzjTSoatzsTqCWiC3eGvJFNs8ZNMlZwfgYolQCdfddMz4muiZl99KIV9gKoNvxg==", + "dev": true, + "requires": { + "co": "^4.0.0", + "is-generator": "^1.0.1" + } + }, + "collect-all": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/collect-all/-/collect-all-1.0.3.tgz", + "integrity": "sha512-0y0rBgoX8IzIjBAUnO73SEtSb4Mhk3IoceWJq5zZSxb9mWORhWH8xLYo4EDSOE1jRBk1LhmfjqWFFt10h/+MEA==", + "dev": true, + "requires": { + "stream-connect": "^1.0.2", + "stream-via": "^1.0.4" + } + }, + "command-line-args": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-3.0.5.tgz", + "integrity": "sha1-W9StReeYPlwTRJGOQCgO4mk8WsA=", + "dev": true, + "requires": { + "array-back": "^1.0.4", + "feature-detect-es6": "^1.3.1", + "find-replace": "^1.0.2", + "typical": "^2.6.0" + } + }, + "command-line-commands": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/command-line-commands/-/command-line-commands-1.0.4.tgz", + "integrity": "sha1-A0+bFntRiK+9z2su+7FQ/IRCwys=", + "dev": true, + "requires": { + "array-back": "^1.0.3", + "feature-detect-es6": "^1.3.1" + } + }, + "command-line-tool": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/command-line-tool/-/command-line-tool-0.6.4.tgz", + "integrity": "sha1-TBHjcvPkElSGHD/mtTjTx6WxRPM=", + "dev": true, + "requires": { + "ansi-escape-sequences": "^3.0.0", + "array-back": "^1.0.3", + "command-line-args": "^3.0.1", + "command-line-usage": "^3.0.3", + "feature-detect-es6": "^1.3.1", + "typical": "^2.6.0" + } + }, + "command-line-usage": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/command-line-usage/-/command-line-usage-3.0.8.tgz", + "integrity": "sha1-tqIJeMGzg0d/XBGlKUKLiAv+D00=", + "dev": true, + "requires": { + "ansi-escape-sequences": "^3.0.0", + "array-back": "^1.0.3", + "feature-detect-es6": "^1.3.1", + "table-layout": "^0.3.0", + "typical": "^2.6.0" + } + }, + "commander": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz", + "integrity": "sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q=", + "dev": true, + "requires": { + "graceful-readlink": ">= 1.0.0" + } + }, + "common-sequence": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/common-sequence/-/common-sequence-1.0.2.tgz", + "integrity": "sha1-MOB/P49vf5s97oVPILLTnu4Ibeg=", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "config-master": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/config-master/-/config-master-2.0.4.tgz", + "integrity": "sha1-50lQXF0/lG8vrTx23+cfymiXUdw=", + "dev": true, + "requires": { + "babel-polyfill": "^6.13.0", + "feature-detect-es6": "^1.3.1", + "walk-back": "^2.0.1" + } + }, + "core-js": { + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", + "dev": true + }, + "debug": { + "version": "2.6.8", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", + "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-eql": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-0.1.3.tgz", + "integrity": "sha1-71WKyrjeJSBs1xOQbXTlaTDrafI=", + "dev": true, + "requires": { + "type-detect": "0.1.1" + }, + "dependencies": { + "type-detect": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-0.1.1.tgz", + "integrity": "sha1-C6XsKohWQORw6k6FBZcZANrFiCI=", + "dev": true + } + } + }, + "deep-extend": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz", + "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=", + "dev": true + }, + "defer-promise": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/defer-promise/-/defer-promise-1.0.1.tgz", + "integrity": "sha1-HKb/7dvO8XFd16riXHYW+a4iky8=", + "dev": true + }, + "diff": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.2.0.tgz", + "integrity": "sha1-yc45Okt8vQsFinJck98pkCeGj/k=", + "dev": true + }, + "dmd": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/dmd/-/dmd-2.1.2.tgz", + "integrity": "sha1-dL6N5tbqeNBLEUF9bGvy8dM+xoY=", + "dev": true, + "requires": { + "array-back": "^1.0.3", + "cache-point": "^0.3.4", + "common-sequence": "^1.0.2", + "core-js": "^2.4.1", + "file-set": "^1.1.1", + "handlebars": "3.0.3", + "marked": "^0.3.6", + "object-get": "^2.1.0", + "reduce-flatten": "^1.0.1", + "reduce-unique": "^1.0.0", + "reduce-without": "^1.0.1", + "test-value": "^2.1.0", + "walk-back": "^2.0.1" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "espree": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/espree/-/espree-3.1.7.tgz", + "integrity": "sha1-/V3ux2qXpRIKnNOnyxF3oJI7EdI=", + "dev": true, + "requires": { + "acorn": "^3.3.0", + "acorn-jsx": "^3.0.0" + } + }, + "feature-detect-es6": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/feature-detect-es6/-/feature-detect-es6-1.4.1.tgz", + "integrity": "sha512-iMxKpKdIBgcWiBPtz2qnEsNjCE2dBQvDyUqgrXLJboiaHwJa+2vDIZ8XbgNZGh1Rx1PUfZmI7uhG6Z4iQYWVjg==", + "dev": true, + "requires": { + "array-back": "^1.0.4" + } + }, + "file-set": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/file-set/-/file-set-1.1.1.tgz", + "integrity": "sha1-0+xwwIDsjxjyBLod4QZ4DJBWkms=", + "dev": true, + "requires": { + "array-back": "^1.0.3", + "glob": "^7.1.0" + } + }, + "find-replace": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-1.0.3.tgz", + "integrity": "sha1-uI5zZNLZyVlVnziMZmcNYTBEH6A=", + "dev": true, + "requires": { + "array-back": "^1.0.4", + "test-value": "^2.1.0" + } + }, + "formatio": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/formatio/-/formatio-1.1.1.tgz", + "integrity": "sha1-XtPM1jZVEJc4NGXZlhmRAOhhYek=", + "dev": true, + "requires": { + "samsam": "~1.1" + } + }, + "fs-then-native": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/fs-then-native/-/fs-then-native-1.0.2.tgz", + "integrity": "sha1-rI04B8nxu9Enlgf7Io4Ktkm7Qf4=", + "dev": true, + "requires": { + "feature-detect-es6": "^1.3.1" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true, + "optional": true + }, + "graceful-readlink": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", + "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=", + "dev": true + }, + "growl": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.9.2.tgz", + "integrity": "sha1-Dqd0NxXbjY3ixe3hd14bRayFwC8=", + "dev": true + }, + "handlebars": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-3.0.3.tgz", + "integrity": "sha1-DgllGi8Ps8lJFgWDcQ1VH5Lm0q0=", + "dev": true, + "requires": { + "optimist": "^0.6.1", + "source-map": "^0.1.40", + "uglify-js": "~2.3" + } + }, + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "he": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", + "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", + "dev": true + }, + "home-path": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/home-path/-/home-path-1.0.6.tgz", + "integrity": "sha512-wo+yjrdAtoXt43Vy92a+0IPCYViiyLAHyp0QVS4xL/tfvVz5sXIW1ubLZk3nhVkD92fQpUMKX+fzMjr5F489vw==", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "is-generator": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-generator/-/is-generator-1.0.3.tgz", + "integrity": "sha1-wUwhBX7TbjKNuANHlmxpP4hjifM=", + "dev": true + }, + "is-running": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-running/-/is-running-2.1.0.tgz", + "integrity": "sha1-MKc/9cw4VOT8JUkICen1q/jeCeA=", + "dev": true + }, + "js2xmlparser": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-1.0.0.tgz", + "integrity": "sha1-WhcPLo1kds5FQF4EgjJCUTeC/jA=", + "dev": true + }, + "jsdoc-75lb": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/jsdoc-75lb/-/jsdoc-75lb-3.6.0.tgz", + "integrity": "sha1-qAcRlSi0AJzLyrSbdSL2P+xs0L0=", + "dev": true, + "requires": { + "bluebird": "~3.4.6", + "catharsis": "~0.8.8", + "escape-string-regexp": "~1.0.5", + "espree": "~3.1.7", + "js2xmlparser": "~1.0.0", + "klaw": "~1.3.0", + "marked": "~0.3.6", + "mkdirp": "~0.5.1", + "requizzle": "~0.2.1", + "strip-json-comments": "~2.0.1", + "taffydb": "2.6.2", + "underscore": "~1.8.3" + } + }, + "jsdoc-api": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/jsdoc-api/-/jsdoc-api-2.0.6.tgz", + "integrity": "sha1-l4/69zvms+32l5nTWZzHaVuCumU=", + "dev": true, + "requires": { + "array-back": "^1.0.3", + "cache-point": "~0.3.4", + "collect-all": "^1.0.2", + "core-js": "^2.4.1", + "feature-detect-es6": "^1.3.1", + "file-set": "^1.1.1", + "fs-then-native": "^1.0.2", + "jsdoc-75lb": "^3.6.0", + "object-to-spawn-args": "^1.1.0", + "temp-path": "^1.0.0", + "walk-back": "^2.0.1" + } + }, + "jsdoc-parse": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/jsdoc-parse/-/jsdoc-parse-2.0.5.tgz", + "integrity": "sha1-bUFj6Gk/YFSrQd1M/GQyYJWPFHc=", + "dev": true, + "requires": { + "array-back": "^1.0.3", + "core-js": "^2.4.1", + "feature-detect-es6": "^1.3.1", + "lodash.omit": "^4.5.0", + "lodash.pick": "^4.4.0", + "reduce-extract": "^1.0.0", + "sort-array": "^1.1.1", + "test-value": "^2.1.0" + } + }, + "jsdoc-to-markdown": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/jsdoc-to-markdown/-/jsdoc-to-markdown-2.0.1.tgz", + "integrity": "sha1-l+tNcWp3ZPdZWib80zh8hct6uiU=", + "dev": true, + "requires": { + "array-back": "^1.0.3", + "command-line-tool": "^0.6.4", + "config-master": "^2.0.4", + "core-js": "^2.4.1", + "dmd": "^2.1.2", + "feature-detect-es6": "^1.3.1", + "jsdoc-api": "^2.0.5", + "jsdoc-parse": "^2.0.5", + "jsdoc2md-stats": "^1.0.3", + "walk-back": "^2.0.1" + } + }, + "jsdoc2md-stats": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/jsdoc2md-stats/-/jsdoc2md-stats-1.0.6.tgz", + "integrity": "sha1-3A4AKuu9D7rlEjU0+Scyr7xlH78=", + "dev": true, + "requires": { + "app-usage-stats": "^0.4.0", + "feature-detect-es6": "^1.3.1" + } + }, + "json3": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/json3/-/json3-3.3.2.tgz", + "integrity": "sha1-PAQ0dD35Pi9cQq7nsZvLSDV19OE=", + "dev": true + }, + "klaw": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", + "integrity": "sha1-QIhDO0azsbolnXh4XY6W9zugJDk=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.9" + } + }, + "lodash._baseassign": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz", + "integrity": "sha1-jDigmVAPIVrQnlnxci/QxSv+Ck4=", + "dev": true, + "requires": { + "lodash._basecopy": "^3.0.0", + "lodash.keys": "^3.0.0" + } + }, + "lodash._basecopy": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz", + "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=", + "dev": true + }, + "lodash._basecreate": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash._basecreate/-/lodash._basecreate-3.0.3.tgz", + "integrity": "sha1-G8ZhYU2qf8MRt9A78WgGoCE8+CE=", + "dev": true + }, + "lodash._getnative": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", + "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=", + "dev": true + }, + "lodash._isiterateecall": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz", + "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=", + "dev": true + }, + "lodash.create": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lodash.create/-/lodash.create-3.1.1.tgz", + "integrity": "sha1-1/KEnw29p+BGgruM1yqwIkYd6+c=", + "dev": true, + "requires": { + "lodash._baseassign": "^3.0.0", + "lodash._basecreate": "^3.0.0", + "lodash._isiterateecall": "^3.0.0" + } + }, + "lodash.isarguments": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", + "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=", + "dev": true + }, + "lodash.isarray": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", + "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=", + "dev": true + }, + "lodash.keys": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", + "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", + "dev": true, + "requires": { + "lodash._getnative": "^3.0.0", + "lodash.isarguments": "^3.0.0", + "lodash.isarray": "^3.0.0" + } + }, + "lodash.omit": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.omit/-/lodash.omit-4.5.0.tgz", + "integrity": "sha1-brGa5aHuHdnfC5aeZs4Lf6MLXmA=", + "dev": true + }, + "lodash.pick": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz", + "integrity": "sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM=", + "dev": true + }, + "lodash.uniq": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", + "dev": true + }, + "lolex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-1.3.2.tgz", + "integrity": "sha1-fD2mL/yzDw9agKJWbKJORdigHzE=", + "dev": true + }, + "marked": { + "version": "0.3.19", + "resolved": "https://registry.npmjs.org/marked/-/marked-0.3.19.tgz", + "integrity": "sha512-ea2eGWOqNxPcXv8dyERdSr/6FmzvWwzjMxpfGB/sbMccXoct+xY+YukPD+QTUZwyvK7BZwcr4m21WBOW41pAkg==", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "mkdirp2": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp2/-/mkdirp2-1.0.4.tgz", + "integrity": "sha512-Q2PKB4ZR4UPtjLl76JfzlgSCUZhSV1AXQgAZa1qt5RiaALFjP/CDrGvFBrOz7Ck6McPcwMAxTsJvWOUjOU8XMw==", + "dev": true + }, + "mocha": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-3.5.3.tgz", + "integrity": "sha512-/6na001MJWEtYxHOV1WLfsmR4YIynkUEhBwzsb+fk2qmQ3iqsi258l/Q2MWHJMImAcNpZ8DEdYAK72NHoIQ9Eg==", + "dev": true, + "requires": { + "browser-stdout": "1.3.0", + "commander": "2.9.0", + "debug": "2.6.8", + "diff": "3.2.0", + "escape-string-regexp": "1.0.5", + "glob": "7.1.1", + "growl": "1.9.2", + "he": "1.1.1", + "json3": "3.3.2", + "lodash.create": "3.1.1", + "mkdirp": "0.5.1", + "supports-color": "3.1.2" + }, + "dependencies": { + "glob": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.1.tgz", + "integrity": "sha1-gFIR3wT6rxxjo2ADBs31reULLsg=", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.2", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "object-get": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/object-get/-/object-get-2.1.0.tgz", + "integrity": "sha1-ciu9tgA576R8rTxtws5RqFwCxa4=", + "dev": true + }, + "object-to-spawn-args": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-to-spawn-args/-/object-to-spawn-args-1.1.1.tgz", + "integrity": "sha1-d9qIJ/Bz0BHJ4bFz+JV4FHAkZ4U=", + "dev": true + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "optimist": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "dev": true, + "requires": { + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "reduce-extract": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/reduce-extract/-/reduce-extract-1.0.0.tgz", + "integrity": "sha1-Z/I4W+2mUGG19fQxJmLosIDKFSU=", + "dev": true, + "requires": { + "test-value": "^1.0.1" + }, + "dependencies": { + "test-value": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/test-value/-/test-value-1.1.0.tgz", + "integrity": "sha1-oJE29y7AQ9J8iTcHwrFZv6196T8=", + "dev": true, + "requires": { + "array-back": "^1.0.2", + "typical": "^2.4.2" + } + } + } + }, + "reduce-flatten": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/reduce-flatten/-/reduce-flatten-1.0.1.tgz", + "integrity": "sha1-JYx479FT3fk8tWEjf2EYTzaW4yc=", + "dev": true + }, + "reduce-unique": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/reduce-unique/-/reduce-unique-1.0.0.tgz", + "integrity": "sha1-flhrz4ek4ytter2Cd/rWzeyfSAM=", + "dev": true + }, + "reduce-without": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/reduce-without/-/reduce-without-1.0.1.tgz", + "integrity": "sha1-aK0OrRGFXJo31OglbBW7+Hly/Iw=", + "dev": true, + "requires": { + "test-value": "^2.0.0" + } + }, + "regenerator-runtime": { + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz", + "integrity": "sha1-M2w+/BIgrc7dosn6tntaeVWjNlg=", + "dev": true + }, + "req-then": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/req-then/-/req-then-0.5.1.tgz", + "integrity": "sha1-McbgtW9N3SrNbeC6G86ne2B5398=", + "dev": true, + "requires": { + "array-back": "^1.0.3", + "defer-promise": "^1.0.0", + "feature-detect-es6": "^1.3.1", + "lodash.pick": "^4.4.0", + "typical": "^2.6.0" + } + }, + "requizzle": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/requizzle/-/requizzle-0.2.1.tgz", + "integrity": "sha1-aUPDUwxNmn5G8c3dUcFY/GcM294=", + "dev": true, + "requires": { + "underscore": "~1.6.0" + }, + "dependencies": { + "underscore": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz", + "integrity": "sha1-izixDKze9jM3uLJOT/htRa6lKag=", + "dev": true + } + } + }, + "samsam": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/samsam/-/samsam-1.1.2.tgz", + "integrity": "sha1-vsEf3IOp/aBjQBIQ5AF2wwJNFWc=", + "dev": true + }, + "sinon": { + "version": "1.17.7", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-1.17.7.tgz", + "integrity": "sha1-RUKk9JugxFwF6y6d2dID4rjv4L8=", + "dev": true, + "requires": { + "formatio": "1.1.1", + "lolex": "1.3.2", + "samsam": "1.1.2", + "util": ">=0.10.3 <1" + } + }, + "sort-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sort-array/-/sort-array-1.1.2.tgz", + "integrity": "sha1-uImGBTwBcKf53mPxiknsecJMPmQ=", + "dev": true, + "requires": { + "array-back": "^1.0.4", + "object-get": "^2.1.0", + "typical": "^2.6.0" + } + }, + "source-map": { + "version": "0.1.43", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", + "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", + "dev": true, + "requires": { + "amdefine": ">=0.0.4" + } + }, + "stream-connect": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/stream-connect/-/stream-connect-1.0.2.tgz", + "integrity": "sha1-GLyB8u2zW4tdmoAJIAqYUxRCipc=", + "dev": true, + "requires": { + "array-back": "^1.0.2" + } + }, + "stream-via": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/stream-via/-/stream-via-1.0.4.tgz", + "integrity": "sha512-DBp0lSvX5G9KGRDTkR/R+a29H+Wk2xItOF+MpZLLNDWbEV9tGPnqLPxHEYjmiz8xGtJHRIqmI+hCjmNzqoA4nQ==", + "dev": true + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + }, + "supports-color": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.1.2.tgz", + "integrity": "sha1-cqJiiU2dQIuVbKBf83su2KbiotU=", + "dev": true, + "requires": { + "has-flag": "^1.0.0" + } + }, + "table-layout": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-0.3.0.tgz", + "integrity": "sha1-buINxIPbNxs+XIf3BO0vfHmdLJo=", + "dev": true, + "requires": { + "array-back": "^1.0.3", + "core-js": "^2.4.1", + "deep-extend": "~0.4.1", + "feature-detect-es6": "^1.3.1", + "typical": "^2.6.0", + "wordwrapjs": "^2.0.0-0" + } + }, + "taffydb": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/taffydb/-/taffydb-2.6.2.tgz", + "integrity": "sha1-fLy2S1oUG2ou/CxdLGe04VCyomg=", + "dev": true + }, + "temp-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/temp-path/-/temp-path-1.0.0.tgz", + "integrity": "sha1-JLFUOXOrRCiW2a02fdnL2/r+kYs=", + "dev": true + }, + "test-value": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/test-value/-/test-value-2.1.0.tgz", + "integrity": "sha1-Edpv9nDzRxpztiXKTz/c97t0gpE=", + "dev": true, + "requires": { + "array-back": "^1.0.3", + "typical": "^2.6.0" + } + }, + "type-detect": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-1.0.0.tgz", + "integrity": "sha1-diIXzAbbJY7EiQihKY6LlRIejqI=", + "dev": true + }, + "typical": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/typical/-/typical-2.6.1.tgz", + "integrity": "sha1-XAgOXWYcu+OCWdLnCjxyU+hziB0=", + "dev": true + }, + "uglify-js": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.3.6.tgz", + "integrity": "sha1-+gmEdwtCi3qbKoBY9GNV0U/vIRo=", + "dev": true, + "optional": true, + "requires": { + "async": "~0.2.6", + "optimist": "~0.3.5", + "source-map": "~0.1.7" + }, + "dependencies": { + "optimist": { + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.3.7.tgz", + "integrity": "sha1-yQlBrVnkJzMokjB00s8ufLxuwNk=", + "dev": true, + "optional": true, + "requires": { + "wordwrap": "~0.0.2" + } + } + } + }, + "underscore": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", + "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=", + "dev": true + }, + "underscore-contrib": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/underscore-contrib/-/underscore-contrib-0.3.0.tgz", + "integrity": "sha1-ZltmwkeD+PorGMn4y7Dix9SMJsc=", + "dev": true, + "requires": { + "underscore": "1.6.0" + }, + "dependencies": { + "underscore": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz", + "integrity": "sha1-izixDKze9jM3uLJOT/htRa6lKag=", + "dev": true + } + } + }, + "usage-stats": { + "version": "0.8.6", + "resolved": "https://registry.npmjs.org/usage-stats/-/usage-stats-0.8.6.tgz", + "integrity": "sha512-QS1r7a1h5g1jo6KulvVGV+eQM+Jfj87AjJBfr1iaIJYz+N7+Qh7ezaVFCulwBGd8T1EidRiSYphG17gra2y0kg==", + "dev": true, + "requires": { + "array-back": "^1.0.4", + "cli-commands": "0.1.0", + "core-js": "^2.4.1", + "feature-detect-es6": "^1.3.1", + "home-path": "^1.0.5", + "mkdirp2": "^1.0.3", + "req-then": "0.5.1", + "typical": "^2.6.1", + "uuid": "^3.0.1" + } + }, + "util": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/util/-/util-0.11.0.tgz", + "integrity": "sha512-5n12uMzKCjvB2HPFHnbQSjaqAa98L5iIXmHrZCLavuZVe0qe/SJGbDGWlpaHk5lnBkWRDO+dRu1/PgmUYKPPTw==", + "dev": true, + "requires": { + "inherits": "2.0.3" + } + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "dev": true + }, + "walk-back": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/walk-back/-/walk-back-2.0.1.tgz", + "integrity": "sha1-VU4qnYdPrEeoywBr9EwvDEmYoKQ=", + "dev": true + }, + "wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", + "dev": true + }, + "wordwrapjs": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/wordwrapjs/-/wordwrapjs-2.0.0.tgz", + "integrity": "sha1-q1X2leYRjak4WP3XDAU9HF4BrCA=", + "dev": true, + "requires": { + "array-back": "^1.0.3", + "feature-detect-es6": "^1.3.1", + "reduce-flatten": "^1.0.1", + "typical": "^2.6.0" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + } + } +} diff --git a/package.json b/package.json index bd49edf..3475c5d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "worker-nodes", - "version": "1.6.1", + "version": "2.0.0-alpha.1", "description": "A library to run cpu-intensive tasks without blocking the event loop.", "keywords": [ "workers", @@ -18,11 +18,11 @@ "homepage": "https://github.com/allegro/node-worker-nodes", "main": "./lib/index.js", "engines": { - "node": ">=6.6.0" + "node": ">=10.5.0" }, "scripts": { "docs": "jsdoc2md -l off -t docs-src/Readme.hbs lib/*.js > Readme.md; echo", - "test": "mocha --trace-warnings -r tests/utils/setup.js {lib,tests}/**/*.spec.js", + "test": "node --experimental-worker node_modules/.bin/_mocha --trace-warnings -r tests/utils/setup.js {lib,tests}/**/*.spec.js", "benchmark": "cd benchmark; npm install; npm test;" }, "contributors": [ @@ -38,8 +38,5 @@ "mocha": "^3.4.2", "sinon": "^1.17.6" }, - "dependencies": { - "msgpack-lite": "^0.1.26" - }, "types": "./index.d.ts" } diff --git a/tests/e2e.spec.js b/tests/e2e.spec.js index 407872e..8a49271 100644 --- a/tests/e2e.spec.js +++ b/tests/e2e.spec.js @@ -131,7 +131,7 @@ describe('worker nodes', function () { result.should.be.eql('hello!'); }); - it('should *not* use the same process as the caller does', function* () { + it('should use the same process as the caller does', function* () { // given const workerNodes = givenWorkerPoolWith('process-info'); @@ -139,7 +139,7 @@ describe('worker nodes', function () { const result = yield workerNodes.call.getPid(); // then - result.should.be.a('number').that.not.eql(process.pid); + result.should.be.a('number').that.eql(process.pid); }); it('should allow limit the number of workers active in a given time', function* () { @@ -158,10 +158,10 @@ describe('worker nodes', function () { const workerNodes = givenWorkerPoolWith('process-info', { maxWorkers: 1, workerEndurance: 2 }); // when - const results = yield (10).times.call(workerNodes.call.getPid).and.waitForAllResults(); + yield (10).times.call(workerNodes.call.noop).and.waitForAllResults(); // then - unique(results).should.have.lengthOf(5); + workerNodes.workersQueue.forEach(worker => worker.tasksStarted.should.be.at.most(2)); }); it('should distribute the work evenly among available workers', function* () { @@ -172,7 +172,7 @@ describe('worker nodes', function () { const results = yield (10).times.call(workerNodes.call.getPid).and.waitForAllResults(); // then - unique(results).should.have.lengthOf(10); + workerNodes.workersQueue.forEach(worker => worker.tasksStarted.should.eql(1)); }); describe('auto-start', function () { @@ -183,10 +183,15 @@ describe('worker nodes', function () { // when const callTime = Date.now(); - const workerStartTime = yield workerNodes.call.getStartTime(); + yield workerNodes.call.noop(); // then - workerStartTime.should.be.at.least(callTime); + workerNodes.workersQueue.forEach(worker => { + const startDate = worker.process.startDate; + if (startDate) { + startDate.should.be.at.least(callTime); + } + }); }); it('should result in spawn of the workers before the first call if active', function* () { @@ -224,16 +229,16 @@ describe('worker nodes', function () { taskMaxRetries: Infinity }); - const firstWorkerPid = yield workerNodes.call.getPid(); - const secondWorkerPid = yield workerNodes.call.getPid(); + yield (4).times.call(workerNodes.call.getPid).and.waitForAllResults(); // when - process.kill(firstWorkerPid, 'SIGKILL'); - const results = yield (4).times.call(workerNodes.call.getPid).and.waitForAllResults(); + workerNodes.workersQueue.storage[0].process.exit(); + yield (4).times.call(workerNodes.call.getPid).and.waitForAllResults(); + + const results = workerNodes.workersQueue.filter(worker => worker.isProcessAlive); // then unique(results).should.have.lengthOf(1); - results.forEach(pid => pid.should.eql(secondWorkerPid)); }); }); @@ -264,7 +269,8 @@ describe('worker nodes', function () { const callStartTime = Date.now(); // when - const results = yield (4).times.call(workerNodes.call.getStartTime).and.waitForAllResults(); + yield (4).times.call(workerNodes.call.noop).and.waitForAllResults(); + const results = workerNodes.workersQueue.map(worker => worker.process.startDate); // then results.should.have.lengthOf(4); @@ -281,12 +287,13 @@ describe('worker nodes', function () { }); // when - const results1 = yield workerNodes.call.getPid(); - const results2 = yield workerNodes.call.getPid(); - const results3 = yield workerNodes.call.getPid(); + yield workerNodes.call.getPid(); + yield workerNodes.call.getPid(); + yield workerNodes.call.getPid(); + const result = workerNodes.workersQueue.map(worker => worker.tasksStarted); // then - unique([ results1, results2, results3 ]).should.have.lengthOf(3); + result.should.deep.equal([1, 1, 1]); }); it('should cause maximum utilization of the existing workers if calls are sequential', function* () { @@ -315,10 +322,10 @@ describe('worker nodes', function () { }); // when - const results = yield (4).times.call(workerNodes.call.getStartTime).and.waitForAllResults(); + yield (4).times.call(workerNodes.call.noop).and.waitForAllResults(); // then - unique(results).should.have.lengthOf(3); + workerNodes.workersQueue.storage.should.have.lengthOf(3); }); }); @@ -380,15 +387,16 @@ describe('worker nodes', function () { const workerNodes = yield givenStartedWorkerPoolWith('async-tasks', {taskTimeout: 250, maxWorkers: 1}); // when - const workerPid = yield workerNodes.call.getPid(); yield workerNodes.call.task500ms().catch(error => error); yield wait(20); // give the process a time to shutdown // then - isRunning(workerPid).should.be.eql(false); + workerNodes.workersQueue.storage.should.have.lengthOf(0); }); it('should result with rejection of all the calls that the worker was processing at the moment', function* () { + //note: (non deterministic test) this test fails sometimes + // given const workerNodes = yield givenStartedWorkerPoolWith('async-tasks', { autoStart: true, @@ -417,13 +425,15 @@ describe('worker nodes', function () { }); // when - const pidBefore = yield workerNodes.call.getPid(); + yield workerNodes.call.noop(); + const idBefore = workerNodes.workersQueue.storage[0].id; const callResult = yield workerNodes.call.task500ms().catch(error => error); - const pidAfter = yield workerNodes.call.getPid(); + yield workerNodes.call.noop(); + const idAfter = workerNodes.workersQueue.storage[0].id; // then callResult.should.be.an.instanceOf(errors.TimeoutError); - pidBefore.should.be.a('number').that.is.not.eql(pidAfter); + idBefore.should.be.a('number').that.is.not.eql(idAfter); }); }); @@ -521,15 +531,14 @@ describe('worker nodes', function () { it('should kill worker that got stuck in an infinite loop', function* () { // given + this.timeout(1500); const workerNodes = givenWorkerPoolWith('harmful-module', { taskTimeout: 500, maxWorkers: 1 }); // when - const pid = yield workerNodes.call.getPid(); - yield workerNodes.call.infiniteLoop().catch(error => error); - yield wait(250); // give the process a time to shutdown + const result = yield workerNodes.call.infiniteLoop().catch(error => error); // then - isRunning(pid).should.be.eql(false); + result.should.be.an.instanceOf(errors.TimeoutError); }); describe('failure recovery', function () { @@ -579,15 +588,14 @@ describe('worker nodes', function () { const results = yield (10).times.call(workerNodes.call.exitRandomly).and.waitForAllResults(); // then - results.length.should.be.at.least(10); - unique(results).length.should.be.at.least(3); + results.length.should.be.equal(10); }); }); describe('raw data passing', function () { - it('should allow to receive a raw buffer from the worker', function* () { + it('should allow to receive a Uint8Array from the worker', function* () { // given const workerNodes = givenWorkerPoolWith('buffer-ready-module'); @@ -596,11 +604,11 @@ describe('worker nodes', function () { const decoded = require('zlib').inflateSync(result).toString(); // then - result.should.be.an.instanceOf(Buffer); + result.should.be.an.instanceOf(Uint8Array); decoded.should.be.eql('hello my friend!!!'); }); - it('should allow to receive a raw buffer as an object property', function* () { + it('should allow to receive a Uint8Array as an object property', function* () { // given const workerNodes = givenWorkerPoolWith('buffer-ready-module'); @@ -609,16 +617,16 @@ describe('worker nodes', function () { // then result.info.should.be.a('string').that.eql('deflate'); - result.data.should.be.an.instanceOf(Buffer); + result.data.should.be.an.instanceOf(Uint8Array); require('zlib').inflateSync(result.data).toString().should.be.eql('hello my friend!!!'); }); - it('should allow to send a raw buffer to the worker', function* () { + it('should allow to send a Uint8Array to the worker', function* () { // given const workerNodes = givenWorkerPoolWith('buffer-ready-module'); // when - const result = yield workerNodes.call.isBuffer(Buffer.from('foobar')); + const result = yield workerNodes.call.isUint8Array(Buffer.from('foobar')); // then result.should.be.eql(true); diff --git a/tests/fixtures/async-tasks.js b/tests/fixtures/async-tasks.js index c67e262..3a07b2b 100644 --- a/tests/fixtures/async-tasks.js +++ b/tests/fixtures/async-tasks.js @@ -3,6 +3,7 @@ const returnTrue = () => true; module.exports = { getPid: () => process.pid, + noop: () => {}, task100ms: () => wait(100).then(returnTrue), task500ms: () => wait(500).then(returnTrue) diff --git a/tests/fixtures/buffer-ready-module.js b/tests/fixtures/buffer-ready-module.js index c0db1e2..e5f4f24 100644 --- a/tests/fixtures/buffer-ready-module.js +++ b/tests/fixtures/buffer-ready-module.js @@ -3,6 +3,6 @@ const zlib = require('zlib'); module.exports = { getDeflated: (msg = 'Hello!') => zlib.deflateSync(msg), getDeflatedInProperty: (msg = 'Hello!') => ({ info: 'deflate', data: zlib.deflateSync(msg) }), - isBuffer: arg => Buffer.isBuffer(arg), + isUint8Array: arg => arg instanceof Uint8Array, sliceInHalf: buffer => buffer.slice(0, Math.floor(buffer.length / 2)) }; \ No newline at end of file diff --git a/tests/fixtures/process-info.js b/tests/fixtures/process-info.js index 2c1782b..d7ee050 100644 --- a/tests/fixtures/process-info.js +++ b/tests/fixtures/process-info.js @@ -2,5 +2,6 @@ const processStartTime = Date.now() - process.uptime() * 1000; module.exports = { getPid: () => process.pid, - getStartTime: () => processStartTime + getStartTime: () => processStartTime, + noop: () => {} }; \ No newline at end of file diff --git a/yarn.lock b/yarn.lock deleted file mode 100644 index 0c48f6b..0000000 --- a/yarn.lock +++ /dev/null @@ -1,802 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -acorn-jsx@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" - dependencies: - acorn "^3.0.4" - -acorn@^3.0.4, acorn@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" - -amdefine@>=0.0.4: - version "1.0.1" - resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" - -ansi-escape-sequences@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ansi-escape-sequences/-/ansi-escape-sequences-3.0.0.tgz#1c18394b6af9b76ff9a63509fa497669fd2ce53e" - dependencies: - array-back "^1.0.3" - -app-usage-stats@^0.3.6: - version "0.3.6" - resolved "https://registry.yarnpkg.com/app-usage-stats/-/app-usage-stats-0.3.6.tgz#2043edefd270e57c6c5d16f5bb63a958eb510801" - dependencies: - array-back "^1.0.3" - core-js "^2.4.1" - feature-detect-es6 "^1.3.1" - home-path "^1.0.3" - test-value "^2.1.0" - usage-stats "^0.7.0" - -array-back@^1.0.2, array-back@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/array-back/-/array-back-1.0.3.tgz#f1128a5cf1b91c80bed4a218f8c5b635c8b10663" - dependencies: - typical "^2.4.2" - -assertion-error@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.0.2.tgz#13ca515d86206da0bac66e834dd397d87581094c" - -async@~0.2.6: - version "0.2.10" - resolved "https://registry.yarnpkg.com/async/-/async-0.2.10.tgz#b6bbe0b0674b9d719708ca38de8c237cb526c3d1" - -babel-polyfill@^6.13.0: - version "6.16.0" - resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.16.0.tgz#2d45021df87e26a374b6d4d1a9c65964d17f2422" - dependencies: - babel-runtime "^6.9.1" - core-js "^2.4.0" - regenerator-runtime "^0.9.5" - -babel-runtime@^6.9.1: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.18.0.tgz#0f4177ffd98492ef13b9f823e9994a02584c9078" - dependencies: - core-js "^2.4.0" - regenerator-runtime "^0.9.5" - -balanced-match@^0.4.1: - version "0.4.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" - -bluebird@~3.4.6: - version "3.4.6" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.4.6.tgz#01da8d821d87813d158967e743d5fe6c62cf8c0f" - -brace-expansion@^1.0.0: - version "1.1.6" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.6.tgz#7197d7eaa9b87e648390ea61fc66c84427420df9" - dependencies: - balanced-match "^0.4.1" - concat-map "0.0.1" - -browser-stdout@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.0.tgz#f351d32969d32fa5d7a5567154263d928ae3bd1f" - -cache-point@^0.3.4, cache-point@~0.3.4: - version "0.3.4" - resolved "https://registry.yarnpkg.com/cache-point/-/cache-point-0.3.4.tgz#152db502c6bb23b5aa3f663e230d5de8ec4e4f3f" - dependencies: - array-back "^1.0.3" - core-js "^2.4.1" - feature-detect-es6 "^1.3.1" - fs-then-native "^1.0.2" - mkdirp "~0.5.1" - -catharsis@~0.8.8: - version "0.8.8" - resolved "https://registry.yarnpkg.com/catharsis/-/catharsis-0.8.8.tgz#693479f43aac549d806bd73e924cd0d944951a06" - dependencies: - underscore-contrib "~0.3.0" - -chai@^3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/chai/-/chai-3.5.0.tgz#4d02637b067fe958bdbfdd3a40ec56fef7373247" - dependencies: - assertion-error "^1.0.1" - deep-eql "^0.1.3" - type-detect "^1.0.0" - -co-mocha@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/co-mocha/-/co-mocha-1.1.3.tgz#49bb9c85bcd17e3250f8b84b875dc76668bc41dc" - dependencies: - co "^4.0.0" - is-generator "^1.0.1" - -co@^4.0.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" - -collect-all@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/collect-all/-/collect-all-1.0.2.tgz#39450f1e7aa6086570a006bce93ccf1218a77ea1" - dependencies: - stream-connect "^1.0.2" - stream-via "^1.0.3" - -collect-json@^1.0.8: - version "1.0.8" - resolved "https://registry.yarnpkg.com/collect-json/-/collect-json-1.0.8.tgz#aa2fa52b4d1d9444ce690f07a1e3617ab74bb827" - dependencies: - collect-all "^1.0.2" - stream-connect "^1.0.2" - stream-via "^1.0.3" - -command-line-args@^3.0.1: - version "3.0.2" - resolved "https://registry.yarnpkg.com/command-line-args/-/command-line-args-3.0.2.tgz#eb4e203f936c10a20b5143667bdeaf08c933638f" - dependencies: - array-back "^1.0.3" - core-js "^2.4.1" - feature-detect-es6 "^1.3.1" - find-replace "^1.0.2" - typical "^2.6.0" - -command-line-commands@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/command-line-commands/-/command-line-commands-1.0.4.tgz#034f9b167b5188afbdcf6b2efbb150fc8442c32b" - dependencies: - array-back "^1.0.3" - feature-detect-es6 "^1.3.1" - -command-line-tool@^0.6.4, command-line-tool@~0.6.4: - version "0.6.4" - resolved "https://registry.yarnpkg.com/command-line-tool/-/command-line-tool-0.6.4.tgz#4c11e372f3e41254861c3fe6b538d3c7a5b144f3" - dependencies: - ansi-escape-sequences "^3.0.0" - array-back "^1.0.3" - command-line-args "^3.0.1" - command-line-usage "^3.0.3" - feature-detect-es6 "^1.3.1" - typical "^2.6.0" - -command-line-usage@^3.0.3: - version "3.0.7" - resolved "https://registry.yarnpkg.com/command-line-usage/-/command-line-usage-3.0.7.tgz#ebec67c69e5470a5b7b7699fe34c34cbd5252ee6" - dependencies: - ansi-escape-sequences "^3.0.0" - array-back "^1.0.3" - feature-detect-es6 "^1.3.1" - table-layout "~0.2.3" - typical "^2.6.0" - -commander@2.9.0: - version "2.9.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" - dependencies: - graceful-readlink ">= 1.0.0" - -common-sequence@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/common-sequence/-/common-sequence-1.0.2.tgz#30e07f3f8f6f7f9b3dee854f20b2d39eee086de8" - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - -config-master@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/config-master/-/config-master-2.0.4.tgz#e749505c5d3f946f2fad3c76dfe71fca689751dc" - dependencies: - babel-polyfill "^6.13.0" - feature-detect-es6 "^1.3.1" - walk-back "^2.0.1" - -core-js@^2.4.0, core-js@^2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.4.1.tgz#4de911e667b0eae9124e34254b53aea6fc618d3e" - -debug@2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" - dependencies: - ms "0.7.1" - -deep-eql@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-0.1.3.tgz#ef558acab8de25206cd713906d74e56930eb69f2" - dependencies: - type-detect "0.1.1" - -deep-extend@~0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.1.tgz#efe4113d08085f4e6f9687759810f807469e2253" - -defer-promise@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/defer-promise/-/defer-promise-1.0.0.tgz#43c94a8a3e1e2699a114ea86a18fa9d5f83bca85" - -diff@1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-1.4.0.tgz#7f28d2eb9ee7b15a97efd89ce63dcfdaa3ccbabf" - -dmd@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/dmd/-/dmd-2.1.2.tgz#74be8de6d6ea78d04b11417d6c6bf2f1d33ec686" - dependencies: - array-back "^1.0.3" - cache-point "^0.3.4" - common-sequence "^1.0.2" - core-js "^2.4.1" - file-set "^1.1.1" - handlebars "3.0.3" - marked "^0.3.6" - object-get "^2.1.0" - reduce-flatten "^1.0.1" - reduce-unique "^1.0.0" - reduce-without "^1.0.1" - test-value "^2.1.0" - walk-back "^2.0.1" - -escape-string-regexp@1.0.5, escape-string-regexp@~1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - -espree@~3.1.7: - version "3.1.7" - resolved "https://registry.yarnpkg.com/espree/-/espree-3.1.7.tgz#fd5deec76a97a5120a9cd3a7cb1177a0923b11d2" - dependencies: - acorn "^3.3.0" - acorn-jsx "^3.0.0" - -event-lite@^0.1.1: - version "0.1.1" - resolved "https://registry.npmjs.org/event-lite/-/event-lite-0.1.1.tgz#47cf08a8d37d0b694cdb7b3b17b51faac6576086" - -feature-detect-es6@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/feature-detect-es6/-/feature-detect-es6-1.3.1.tgz#f888736af9cb0c91f55663bfa4762eb96ee7047f" - dependencies: - array-back "^1.0.3" - -file-set@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/file-set/-/file-set-1.1.1.tgz#d3ec70c080ec8f18f204ba1de106780c9056926b" - dependencies: - array-back "^1.0.3" - glob "^7.1.0" - -find-replace@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/find-replace/-/find-replace-1.0.2.tgz#a2d6ce740d15f0d92b1b26763e2ce9c0e361fd98" - dependencies: - array-back "^1.0.2" - test-value "^2.0.0" - -formatio@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/formatio/-/formatio-1.1.1.tgz#5ed3ccd636551097383465d996199100e86161e9" - dependencies: - samsam "~1.1" - -fs-then-native@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/fs-then-native/-/fs-then-native-1.0.2.tgz#ac8d3807c9f1bbd1279607fb228e0ab649bb41fe" - dependencies: - feature-detect-es6 "^1.3.1" - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - -glob@7.0.5: - version "7.0.5" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.0.5.tgz#b4202a69099bbb4d292a7c1b95b6682b67ebdc95" - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.2" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@^7.1.0: - version "7.1.1" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.2" - once "^1.3.0" - path-is-absolute "^1.0.0" - -graceful-fs@^4.1.9: - version "4.1.10" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.10.tgz#f2d720c22092f743228775c75e3612632501f131" - -"graceful-readlink@>= 1.0.0": - version "1.0.1" - resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" - -growl@1.9.2: - version "1.9.2" - resolved "https://registry.yarnpkg.com/growl/-/growl-1.9.2.tgz#0ea7743715db8d8de2c5ede1775e1b45ac85c02f" - -handlebars@3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-3.0.3.tgz#0e09651a2f0fb3c949160583710d551f92e6d2ad" - dependencies: - optimist "^0.6.1" - source-map "^0.1.40" - optionalDependencies: - uglify-js "~2.3" - -has-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" - -home-path@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/home-path/-/home-path-1.0.3.tgz#9ece59fec3f032e6d10b5434fee264df4c2de32f" - -ieee754@^1.1.8: - version "1.1.8" - resolved "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4" - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - -inherits@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" - -int64-buffer@^0.1.9: - version "0.1.9" - resolved "https://registry.npmjs.org/int64-buffer/-/int64-buffer-0.1.9.tgz#9e039da043b24f78b196b283e04653ef5e990f61" - -is-generator@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/is-generator/-/is-generator-1.0.3.tgz#c14c21057ed36e328db80347966c693f886389f3" - -is-running@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-running/-/is-running-2.1.0.tgz#30a73ff5cc3854e4fc25490809e9f5abf8de09e0" - -isarray@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - -js2xmlparser@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/js2xmlparser/-/js2xmlparser-1.0.0.tgz#5a170f2e8d6476ce45405e04823242513782fe30" - -jsdoc-75lb@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/jsdoc-75lb/-/jsdoc-75lb-3.6.0.tgz#a807119528b4009ccbcab49b7522f63fec6cd0bd" - dependencies: - bluebird "~3.4.6" - catharsis "~0.8.8" - escape-string-regexp "~1.0.5" - espree "~3.1.7" - js2xmlparser "~1.0.0" - klaw "~1.3.0" - marked "~0.3.6" - mkdirp "~0.5.1" - requizzle "~0.2.1" - strip-json-comments "~2.0.1" - taffydb "2.6.2" - underscore "~1.8.3" - -jsdoc-api@^2.0.5: - version "2.0.6" - resolved "https://registry.yarnpkg.com/jsdoc-api/-/jsdoc-api-2.0.6.tgz#978ffaf73be6b3edf69799d3599cc7695b82ba65" - dependencies: - array-back "^1.0.3" - cache-point "~0.3.4" - collect-all "^1.0.2" - core-js "^2.4.1" - feature-detect-es6 "^1.3.1" - file-set "^1.1.1" - fs-then-native "^1.0.2" - jsdoc-75lb "^3.6.0" - object-to-spawn-args "^1.1.0" - temp-path "^1.0.0" - walk-back "^2.0.1" - -jsdoc-parse@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/jsdoc-parse/-/jsdoc-parse-2.0.5.tgz#6d4163e8693f6054ab41dd4cfc643260958f1477" - dependencies: - array-back "^1.0.3" - core-js "^2.4.1" - feature-detect-es6 "^1.3.1" - lodash.omit "^4.5.0" - lodash.pick "^4.4.0" - reduce-extract "^1.0.0" - sort-array "^1.1.1" - test-value "^2.1.0" - -jsdoc-to-markdown@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/jsdoc-to-markdown/-/jsdoc-to-markdown-2.0.1.tgz#97eb4d716a7764f7595a26fcd3387c85cb7aba25" - dependencies: - array-back "^1.0.3" - command-line-tool "^0.6.4" - config-master "^2.0.4" - core-js "^2.4.1" - dmd "^2.1.2" - feature-detect-es6 "^1.3.1" - jsdoc-api "^2.0.5" - jsdoc-parse "^2.0.5" - jsdoc2md-stats "^1.0.3" - walk-back "^2.0.1" - -jsdoc2md-stats@^1.0.3: - version "1.0.5" - resolved "https://registry.yarnpkg.com/jsdoc2md-stats/-/jsdoc2md-stats-1.0.5.tgz#633e364d7b1c410608f6545bb3158ac90f0593e8" - dependencies: - app-usage-stats "^0.3.6" - feature-detect-es6 "^1.3.1" - -json3@3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1" - -klaw@~1.3.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" - optionalDependencies: - graceful-fs "^4.1.9" - -lodash._baseassign@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz#8c38a099500f215ad09e59f1722fd0c52bfe0a4e" - dependencies: - lodash._basecopy "^3.0.0" - lodash.keys "^3.0.0" - -lodash._basecopy@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36" - -lodash._basecreate@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/lodash._basecreate/-/lodash._basecreate-3.0.3.tgz#1bc661614daa7fc311b7d03bf16806a0213cf821" - -lodash._getnative@^3.0.0: - version "3.9.1" - resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" - -lodash._isiterateecall@^3.0.0: - version "3.0.9" - resolved "https://registry.yarnpkg.com/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz#5203ad7ba425fae842460e696db9cf3e6aac057c" - -lodash.create@3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/lodash.create/-/lodash.create-3.1.1.tgz#d7f2849f0dbda7e04682bb8cd72ab022461debe7" - dependencies: - lodash._baseassign "^3.0.0" - lodash._basecreate "^3.0.0" - lodash._isiterateecall "^3.0.0" - -lodash.isarguments@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" - -lodash.isarray@^3.0.0: - version "3.0.4" - resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55" - -lodash.keys@^3.0.0: - version "3.1.2" - resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a" - dependencies: - lodash._getnative "^3.0.0" - lodash.isarguments "^3.0.0" - lodash.isarray "^3.0.0" - -lodash.omit@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.omit/-/lodash.omit-4.5.0.tgz#6eb19ae5a1ee1dd9df0b969e66ce0b7fa30b5e60" - -lodash.pick@^4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3" - -lodash.uniq@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" - -lolex@1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/lolex/-/lolex-1.3.2.tgz#7c3da62ffcb30f0f5a80a2566ca24e45d8a01f31" - -marked@^0.3.6, marked@~0.3.6: - version "0.3.6" - resolved "https://registry.yarnpkg.com/marked/-/marked-0.3.6.tgz#b2c6c618fccece4ef86c4fc6cb8a7cbf5aeda8d7" - -minimatch@^3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" - dependencies: - brace-expansion "^1.0.0" - -minimist@0.0.8, minimist@~0.0.1: - version "0.0.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" - -mkdirp@0.5.1, mkdirp@^0.5.1, mkdirp@~0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" - dependencies: - minimist "0.0.8" - -mocha@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-3.1.2.tgz#51f93b432bf7e1b175ffc22883ccd0be32dba6b5" - dependencies: - browser-stdout "1.3.0" - commander "2.9.0" - debug "2.2.0" - diff "1.4.0" - escape-string-regexp "1.0.5" - glob "7.0.5" - growl "1.9.2" - json3 "3.3.2" - lodash.create "3.1.1" - mkdirp "0.5.1" - supports-color "3.1.2" - -ms@0.7.1: - version "0.7.1" - resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" - -msgpack-lite@^0.1.26: - version "0.1.26" - resolved "https://registry.npmjs.org/msgpack-lite/-/msgpack-lite-0.1.26.tgz#dd3c50b26f059f25e7edee3644418358e2a9ad89" - dependencies: - event-lite "^0.1.1" - ieee754 "^1.1.8" - int64-buffer "^0.1.9" - isarray "^1.0.0" - -node-uuid@^1.4.7: - version "1.4.7" - resolved "https://registry.yarnpkg.com/node-uuid/-/node-uuid-1.4.7.tgz#6da5a17668c4b3dd59623bda11cf7fa4c1f60a6f" - -object-get@^2.0.4, object-get@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/object-get/-/object-get-2.1.0.tgz#722bbdb60039efa47cad3c6dc2ce51a85c02c5ae" - -object-to-spawn-args@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/object-to-spawn-args/-/object-to-spawn-args-1.1.0.tgz#031a200e37db2c3dfc9b98074a0d69a5be253c1c" - -once@^1.3.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - dependencies: - wrappy "1" - -optimist@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" - dependencies: - minimist "~0.0.1" - wordwrap "~0.0.2" - -optimist@~0.3.5: - version "0.3.7" - resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.3.7.tgz#c90941ad59e4273328923074d2cf2e7cbc6ec0d9" - dependencies: - wordwrap "~0.0.2" - -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - -reduce-extract@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/reduce-extract/-/reduce-extract-1.0.0.tgz#67f2385beda65061b5f5f4312662e8b080ca1525" - dependencies: - test-value "^1.0.1" - -reduce-flatten@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/reduce-flatten/-/reduce-flatten-1.0.1.tgz#258c78efd153ddf93cb561237f61184f3696e327" - -reduce-unique@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/reduce-unique/-/reduce-unique-1.0.0.tgz#7e586bcf87a4e32b6d7abd8277fad6cdec9f4803" - -reduce-without@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/reduce-without/-/reduce-without-1.0.1.tgz#68ad0ead11855c9a37d4e8256c15bbf87972fc8c" - dependencies: - test-value "^2.0.0" - -regenerator-runtime@^0.9.5: - version "0.9.6" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.9.6.tgz#d33eb95d0d2001a4be39659707c51b0cb71ce029" - -req-then@~0.5.0: - version "0.5.1" - resolved "https://registry.yarnpkg.com/req-then/-/req-then-0.5.1.tgz#31c6e0b56f4ddd2acd6de0ba1bcea77b6079dfdf" - dependencies: - array-back "^1.0.3" - defer-promise "^1.0.0" - feature-detect-es6 "^1.3.1" - lodash.pick "^4.4.0" - typical "^2.6.0" - -requizzle@~0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/requizzle/-/requizzle-0.2.1.tgz#6943c3530c4d9a7e46f1cddd51c158fc670cdbde" - dependencies: - underscore "~1.6.0" - -samsam@1.1.2, samsam@~1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/samsam/-/samsam-1.1.2.tgz#bec11fdc83a9fda063401210e40176c3024d1567" - -sinon@^1.17.6: - version "1.17.6" - resolved "https://registry.yarnpkg.com/sinon/-/sinon-1.17.6.tgz#a43116db59577c8296356afee13fafc2332e58e1" - dependencies: - formatio "1.1.1" - lolex "1.3.2" - samsam "1.1.2" - util ">=0.10.3 <1" - -sort-array@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/sort-array/-/sort-array-1.1.1.tgz#9032f6f0be284eecb12af98a3db02612828a66d1" - dependencies: - array-back "^1.0.3" - object-get "^2.0.4" - typical "^2.4.2" - -source-map@^0.1.40, source-map@~0.1.7: - version "0.1.43" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.1.43.tgz#c24bc146ca517c1471f5dacbe2571b2b7f9e3346" - dependencies: - amdefine ">=0.0.4" - -stream-connect@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/stream-connect/-/stream-connect-1.0.2.tgz#18bc81f2edb35b8b5d9a8009200a985314428a97" - dependencies: - array-back "^1.0.2" - -stream-via@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/stream-via/-/stream-via-1.0.3.tgz#cebd32a5a59d74b3b68e3404942e867184ad4ac9" - -strip-json-comments@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - -supports-color@3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.1.2.tgz#72a262894d9d408b956ca05ff37b2ed8a6e2a2d5" - dependencies: - has-flag "^1.0.0" - -table-layout@~0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/table-layout/-/table-layout-0.2.3.tgz#ae778bc0df623a7b6b4edbf7f89b1c1672a63a20" - dependencies: - ansi-escape-sequences "^3.0.0" - array-back "^1.0.3" - collect-json "^1.0.8" - command-line-tool "~0.6.4" - core-js "^2.4.1" - deep-extend "~0.4.1" - feature-detect-es6 "^1.3.1" - typical "^2.6.0" - wordwrapjs "^1.2.1" - -taffydb@2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/taffydb/-/taffydb-2.6.2.tgz#7cbcb64b5a141b6a2efc2c5d2c67b4e150b2a268" - -temp-path@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/temp-path/-/temp-path-1.0.0.tgz#24b1543973ab442896d9ad367dd9cbdbfafe918b" - -test-value@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/test-value/-/test-value-1.1.0.tgz#a09136f72ec043d27c893707c2b159bfad7de93f" - dependencies: - array-back "^1.0.2" - typical "^2.4.2" - -test-value@^2.0.0, test-value@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/test-value/-/test-value-2.1.0.tgz#11da6ff670f3471a73b625ca4f3fdcf7bb748291" - dependencies: - array-back "^1.0.3" - typical "^2.6.0" - -type-detect@0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-0.1.1.tgz#0ba5ec2a885640e470ea4e8505971900dac58822" - -type-detect@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-1.0.0.tgz#762217cc06db258ec48908a1298e8b95121e8ea2" - -typical@^2.4.2, typical@^2.5.0, typical@^2.6.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/typical/-/typical-2.6.0.tgz#89d51554ab139848a65bcc2c8772f8fb450c40ed" - -uglify-js@~2.3: - version "2.3.6" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.3.6.tgz#fa0984770b428b7a9b2a8058f46355d14fef211a" - dependencies: - async "~0.2.6" - optimist "~0.3.5" - source-map "~0.1.7" - -underscore-contrib@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/underscore-contrib/-/underscore-contrib-0.3.0.tgz#665b66c24783f8fa2b18c9f8cbb0e2c7d48c26c7" - dependencies: - underscore "1.6.0" - -underscore@1.6.0, underscore@~1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.6.0.tgz#8b38b10cacdef63337b8b24e4ff86d45aea529a8" - -underscore@~1.8.3: - version "1.8.3" - resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.8.3.tgz#4f3fb53b106e6097fcf9cb4109f2a5e9bdfa5022" - -usage-stats@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/usage-stats/-/usage-stats-0.7.0.tgz#f0ed0d17f7684257a0beff37b5cdc1f78daa3b7d" - dependencies: - array-back "^1.0.3" - command-line-args "^3.0.1" - command-line-commands "^1.0.4" - command-line-usage "^3.0.3" - core-js "^2.4.1" - feature-detect-es6 "^1.3.1" - home-path "^1.0.3" - mkdirp "^0.5.1" - node-uuid "^1.4.7" - req-then "~0.5.0" - typical "^2.6.0" - -"util@>=0.10.3 <1": - version "0.10.3" - resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" - dependencies: - inherits "2.0.1" - -walk-back@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/walk-back/-/walk-back-2.0.1.tgz#554e2a9d874fac47a8cb006bf44c2f0c4998a0a4" - -wordwrap@~0.0.2: - version "0.0.3" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" - -wordwrapjs@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/wordwrapjs/-/wordwrapjs-1.2.1.tgz#754a5ea0664cfbff50540dc32d67bda3289fc34b" - dependencies: - array-back "^1.0.3" - typical "^2.5.0" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"