From be0d583671405d2ee968e91f3496be0b8839d249 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Berthommier?= Date: Wed, 2 May 2018 00:01:19 +0200 Subject: [PATCH 01/24] open hooks workflow to custom methods --- .gitignore | 3 +++ lib/hooks.js | 2 +- test/hooks/hooks.test.js | 42 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index d552964c75..bd0e142052 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,6 @@ node_modules # Users Environment Variables .lock-wscript + +# IDEs +.idea diff --git a/lib/hooks.js b/lib/hooks.js index d2de15ad1e..792df443be 100644 --- a/lib/hooks.js +++ b/lib/hooks.js @@ -15,7 +15,7 @@ const hookMixin = exports.hookMixin = function hookMixin (service) { } const app = this; - const methods = app.methods; + const methods = app.methods.concat(service.methods || []); const mixin = {}; // Add .hooks method and properties to the service diff --git a/test/hooks/hooks.test.js b/test/hooks/hooks.test.js index afeb1b3224..0f5646c35c 100644 --- a/test/hooks/hooks.test.js +++ b/test/hooks/hooks.test.js @@ -242,4 +242,46 @@ describe('hooks basics', () => { }); }); }); + + it('can register hooks on a custom method', () => { + const app = feathers().use('/dummy', { + methods: ['custom'], + converters: { + custom: ([ id, data, params = {} ]) => ({ id, data, params }) + }, + get () { + return Promise.reject(new Error('Something went wrong')); + }, + custom (id, data, params) { + console.log([id, data, params]); + return Promise.resolve([id, data, params]); + } + }); + + app.service('dummy').hooks({ + before: { + all (context) { + context.test = ['all::before']; + }, + custom (context) { + context.test.push('custom::before'); + } + }, + after: { + all (context) { + context.test.push('all::after'); + }, + custom (context) { + context.test.push('custom::after'); + } + } + }); + + const args = [1, { test: 'ok' }, { provider: 'rest' }]; + + return app.service('dummy').custom(...args, true).then(hook => { + assert.deepEqual(hook.result, args); + assert.deepEqual(hook.test, ['all::before', 'custom::before', 'all::after', 'custom::after']); + }); + }); }); From 8071caeb2496ef123e71f4bc6a9d2efcc80071cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Berthommier?= Date: Wed, 2 May 2018 00:18:23 +0200 Subject: [PATCH 02/24] remove console.log --- test/hooks/hooks.test.js | 1 - 1 file changed, 1 deletion(-) diff --git a/test/hooks/hooks.test.js b/test/hooks/hooks.test.js index 0f5646c35c..51da4ec451 100644 --- a/test/hooks/hooks.test.js +++ b/test/hooks/hooks.test.js @@ -253,7 +253,6 @@ describe('hooks basics', () => { return Promise.reject(new Error('Something went wrong')); }, custom (id, data, params) { - console.log([id, data, params]); return Promise.resolve([id, data, params]); } }); From 8f62215ce147c54083d070a07742212b0ad74856 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Berthommier?= Date: Wed, 2 May 2018 00:20:35 +0200 Subject: [PATCH 03/24] remove useless line --- test/hooks/hooks.test.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/hooks/hooks.test.js b/test/hooks/hooks.test.js index 51da4ec451..65940f40f8 100644 --- a/test/hooks/hooks.test.js +++ b/test/hooks/hooks.test.js @@ -249,9 +249,7 @@ describe('hooks basics', () => { converters: { custom: ([ id, data, params = {} ]) => ({ id, data, params }) }, - get () { - return Promise.reject(new Error('Something went wrong')); - }, + get () {}, custom (id, data, params) { return Promise.resolve([id, data, params]); } From 8bad3a3c97a8aae53202f20bfece4b4bcefea869 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Berthommier?= Date: Sat, 5 May 2018 03:35:44 +0200 Subject: [PATCH 04/24] new service 'methods' shape --- lib/hooks.js | 14 +++++++++++--- test/hooks/hooks.test.js | 5 ++--- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/lib/hooks.js b/lib/hooks.js index 792df443be..18825b9c1a 100644 --- a/lib/hooks.js +++ b/lib/hooks.js @@ -15,7 +15,8 @@ const hookMixin = exports.hookMixin = function hookMixin (service) { } const app = this; - const methods = app.methods.concat(service.methods || []); + const serviceMethods = service.methods || {}; + const methods = app.methods.concat(Object.keys(serviceMethods)); const mixin = {}; // Add .hooks method and properties to the service @@ -38,11 +39,18 @@ const hookMixin = exports.hookMixin = function hookMixin (service) { // A reference to the original method const _super = service._super.bind(service); // Create the hook object that gets passed through - const hookObject = createHookObject(method, args, { + const hookData = { type: 'before', // initial hook object type service, app - }); + }; + + if (serviceMethods[method]) { + hookData.arguments = serviceMethods[method]; + } + + const hookObject = createHookObject(method, args, hookData); + // A hook that validates the arguments and will always be the very first const validateHook = context => { validateArguments(method, args); diff --git a/test/hooks/hooks.test.js b/test/hooks/hooks.test.js index 65940f40f8..a8c1a6fa2d 100644 --- a/test/hooks/hooks.test.js +++ b/test/hooks/hooks.test.js @@ -245,9 +245,8 @@ describe('hooks basics', () => { it('can register hooks on a custom method', () => { const app = feathers().use('/dummy', { - methods: ['custom'], - converters: { - custom: ([ id, data, params = {} ]) => ({ id, data, params }) + methods: { + custom: ['id', 'data', 'params'] }, get () {}, custom (id, data, params) { From 214cbe9c59b456c903c9c015e0b71b4ee1a34c53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Berthommier?= Date: Wed, 23 May 2018 23:36:25 +0200 Subject: [PATCH 05/24] pick arguments in validateHook for custom methods --- lib/hooks.js | 14 +- package-lock.json | 948 +++++++++++++++++++++++----------------------- 2 files changed, 484 insertions(+), 478 deletions(-) diff --git a/lib/hooks.js b/lib/hooks.js index 18825b9c1a..591418b047 100644 --- a/lib/hooks.js +++ b/lib/hooks.js @@ -45,14 +45,20 @@ const hookMixin = exports.hookMixin = function hookMixin (service) { app }; - if (serviceMethods[method]) { - hookData.arguments = serviceMethods[method]; - } - const hookObject = createHookObject(method, args, hookData); // A hook that validates the arguments and will always be the very first const validateHook = context => { + const methodArgsList = serviceMethods[method]; + if (methodArgsList) { + const argsObject = args.reduce( + (result, value, index) => Object.assign(result, { [methodArgsList[index]]: value }), + {} + ); + + Object.assign(context, argsObject); + } + validateArguments(method, args); return context; diff --git a/package-lock.json b/package-lock.json index 64c03b314c..ba2fdd8353 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,7 +27,7 @@ "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", "dev": true, "requires": { - "acorn": "3.3.0" + "acorn": "^3.0.4" }, "dependencies": { "acorn": { @@ -44,7 +44,7 @@ "integrity": "sha512-VE6QoEdaugY86BohRtfGmTDabxdU5sCKOkbcPA6PXKJsRzEi/7A3RCTxJal1ft/4qSfPht5/iQLhMh/wzSkkNw==", "dev": true, "requires": { - "es6-promisify": "5.0.0" + "es6-promisify": "^5.0.0" } }, "align-text": { @@ -53,9 +53,9 @@ "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", "dev": true, "requires": { - "kind-of": "3.2.2", - "longest": "1.0.1", - "repeat-string": "1.6.1" + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" } }, "amdefine": { @@ -88,7 +88,7 @@ "integrity": "sha1-126/jKlNJ24keja61EpLdKthGZE=", "dev": true, "requires": { - "default-require-extensions": "1.0.0" + "default-require-extensions": "^1.0.0" } }, "argparse": { @@ -97,7 +97,7 @@ "integrity": "sha1-c9g7wmP4bpf4zE9rrhsOkKfSLIY=", "dev": true, "requires": { - "sprintf-js": "1.0.3" + "sprintf-js": "~1.0.2" } }, "array-includes": { @@ -106,8 +106,8 @@ "integrity": "sha1-GEtI9i2S10UrsxsyMWXH+L0CJm0=", "dev": true, "requires": { - "define-properties": "1.1.2", - "es-abstract": "1.10.0" + "define-properties": "^1.1.2", + "es-abstract": "^1.7.0" } }, "array-union": { @@ -116,7 +116,7 @@ "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", "dev": true, "requires": { - "array-uniq": "1.0.3" + "array-uniq": "^1.0.1" } }, "array-uniq": { @@ -149,9 +149,9 @@ "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", "dev": true, "requires": { - "chalk": "1.1.3", - "esutils": "2.0.2", - "js-tokens": "3.0.2" + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" } }, "babel-generator": { @@ -160,14 +160,14 @@ "integrity": "sha1-rBriAHC3n248odMmlhMFN3TyDcU=", "dev": true, "requires": { - "babel-messages": "6.23.0", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0", - "detect-indent": "4.0.0", - "jsesc": "1.3.0", - "lodash": "4.17.4", - "source-map": "0.5.7", - "trim-right": "1.0.1" + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "detect-indent": "^4.0.0", + "jsesc": "^1.3.0", + "lodash": "^4.17.4", + "source-map": "^0.5.6", + "trim-right": "^1.0.1" } }, "babel-messages": { @@ -176,7 +176,7 @@ "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", "dev": true, "requires": { - "babel-runtime": "6.26.0" + "babel-runtime": "^6.22.0" } }, "babel-runtime": { @@ -185,8 +185,8 @@ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "2.5.1", - "regenerator-runtime": "0.11.0" + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" } }, "babel-template": { @@ -195,11 +195,11 @@ "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", "dev": true, "requires": { - "babel-runtime": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "lodash": "4.17.4" + "babel-runtime": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "lodash": "^4.17.4" } }, "babel-traverse": { @@ -208,15 +208,15 @@ "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", "dev": true, "requires": { - "babel-code-frame": "6.26.0", - "babel-messages": "6.23.0", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "debug": "2.6.9", - "globals": "9.18.0", - "invariant": "2.2.2", - "lodash": "4.17.4" + "babel-code-frame": "^6.26.0", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "debug": "^2.6.8", + "globals": "^9.18.0", + "invariant": "^2.2.2", + "lodash": "^4.17.4" }, "dependencies": { "debug": { @@ -236,10 +236,10 @@ "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", "dev": true, "requires": { - "babel-runtime": "6.26.0", - "esutils": "2.0.2", - "lodash": "4.17.4", - "to-fast-properties": "1.0.3" + "babel-runtime": "^6.26.0", + "esutils": "^2.0.2", + "lodash": "^4.17.4", + "to-fast-properties": "^1.0.3" } }, "babylon": { @@ -260,7 +260,7 @@ "integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==", "dev": true, "requires": { - "hoek": "4.2.0" + "hoek": "4.x.x" } }, "brace-expansion": { @@ -269,7 +269,7 @@ "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", "dev": true, "requires": { - "balanced-match": "1.0.0", + "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, @@ -291,7 +291,7 @@ "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", "dev": true, "requires": { - "callsites": "0.2.0" + "callsites": "^0.2.0" } }, "callsites": { @@ -314,8 +314,8 @@ "dev": true, "optional": true, "requires": { - "align-text": "0.1.4", - "lazy-cache": "1.0.4" + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" } }, "chalk": { @@ -324,11 +324,11 @@ "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" } }, "chardet": { @@ -350,7 +350,7 @@ "dev": true, "requires": { "exit": "0.1.2", - "glob": "7.1.2" + "glob": "^7.1.1" } }, "cli-cursor": { @@ -359,7 +359,7 @@ "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", "dev": true, "requires": { - "restore-cursor": "2.0.0" + "restore-cursor": "^2.0.0" } }, "cli-table2": { @@ -368,9 +368,9 @@ "integrity": "sha1-LR738hig54biFFQFYtS9F3/jLZc=", "dev": true, "requires": { - "colors": "1.1.2", - "lodash": "3.10.1", - "string-width": "1.0.2" + "colors": "^1.1.2", + "lodash": "^3.10.1", + "string-width": "^1.0.1" }, "dependencies": { "lodash": { @@ -394,8 +394,8 @@ "dev": true, "optional": true, "requires": { - "center-align": "0.1.3", - "right-align": "0.1.3", + "center-align": "^0.1.1", + "right-align": "^0.1.1", "wordwrap": "0.0.2" }, "dependencies": { @@ -426,7 +426,7 @@ "integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==", "dev": true, "requires": { - "color-name": "1.1.3" + "color-name": "^1.1.1" } }, "color-name": { @@ -460,9 +460,9 @@ "integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=", "dev": true, "requires": { - "inherits": "2.0.3", - "readable-stream": "2.3.3", - "typedarray": "0.0.6" + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" }, "dependencies": { "isarray": { @@ -477,13 +477,13 @@ "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", "dev": true, "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "1.0.7", - "safe-buffer": "5.1.1", - "string_decoder": "1.0.3", - "util-deprecate": "1.0.2" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~1.0.6", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.0.3", + "util-deprecate": "~1.0.1" } }, "string_decoder": { @@ -492,7 +492,7 @@ "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", "dev": true, "requires": { - "safe-buffer": "5.1.1" + "safe-buffer": "~5.1.0" } } } @@ -503,7 +503,7 @@ "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", "dev": true, "requires": { - "date-now": "0.1.4" + "date-now": "^0.1.4" } }, "contains-path": { @@ -530,9 +530,9 @@ "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", "dev": true, "requires": { - "lru-cache": "4.1.1", - "shebang-command": "1.2.0", - "which": "1.3.0" + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" } }, "cvss": { @@ -579,7 +579,7 @@ "integrity": "sha1-836hXT4T/9m0N9M+GnW1+5eHTLg=", "dev": true, "requires": { - "strip-bom": "2.0.0" + "strip-bom": "^2.0.0" } }, "define-properties": { @@ -588,8 +588,8 @@ "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", "dev": true, "requires": { - "foreach": "2.0.5", - "object-keys": "1.0.11" + "foreach": "^2.0.5", + "object-keys": "^1.0.8" } }, "deglob": { @@ -598,12 +598,12 @@ "integrity": "sha1-TUSr4W7zLHebSXK9FBqAMlApoUo=", "dev": true, "requires": { - "find-root": "1.1.0", - "glob": "7.1.2", - "ignore": "3.3.7", - "pkg-config": "1.1.1", - "run-parallel": "1.1.6", - "uniq": "1.0.1" + "find-root": "^1.0.0", + "glob": "^7.0.5", + "ignore": "^3.0.9", + "pkg-config": "^1.1.0", + "run-parallel": "^1.1.2", + "uniq": "^1.0.1" } }, "del": { @@ -612,13 +612,13 @@ "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", "dev": true, "requires": { - "globby": "5.0.0", - "is-path-cwd": "1.0.0", - "is-path-in-cwd": "1.0.0", - "object-assign": "4.1.1", - "pify": "2.3.0", - "pinkie-promise": "2.0.1", - "rimraf": "2.6.2" + "globby": "^5.0.0", + "is-path-cwd": "^1.0.0", + "is-path-in-cwd": "^1.0.0", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "rimraf": "^2.2.8" } }, "detect-indent": { @@ -627,7 +627,7 @@ "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", "dev": true, "requires": { - "repeating": "2.0.1" + "repeating": "^2.0.0" } }, "diff": { @@ -642,7 +642,7 @@ "integrity": "sha512-y0tm5Pq6ywp3qSTZ1vPgVdAnbDEoeoc5wlOHXoY1c4Wug/a7JvqHIl7BTvwodaHmejWkK/9dSb3sCYfyo/om8A==", "dev": true, "requires": { - "esutils": "2.0.2" + "esutils": "^2.0.2" } }, "dom-serializer": { @@ -651,8 +651,8 @@ "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=", "dev": true, "requires": { - "domelementtype": "1.1.3", - "entities": "1.1.1" + "domelementtype": "~1.1.1", + "entities": "~1.1.1" }, "dependencies": { "domelementtype": { @@ -681,7 +681,7 @@ "integrity": "sha1-LeWaCCLVAn+r/28DLCsloqir5zg=", "dev": true, "requires": { - "domelementtype": "1.3.0" + "domelementtype": "1" } }, "domutils": { @@ -690,8 +690,8 @@ "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", "dev": true, "requires": { - "dom-serializer": "0.1.0", - "domelementtype": "1.3.0" + "dom-serializer": "0", + "domelementtype": "1" } }, "encoding": { @@ -700,7 +700,7 @@ "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", "dev": true, "requires": { - "iconv-lite": "0.4.19" + "iconv-lite": "~0.4.13" } }, "entities": { @@ -715,7 +715,7 @@ "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", "dev": true, "requires": { - "is-arrayish": "0.2.1" + "is-arrayish": "^0.2.1" } }, "es-abstract": { @@ -724,11 +724,11 @@ "integrity": "sha512-/uh/DhdqIOSkAWifU+8nG78vlQxdLckUdI/sPgy0VhuXi2qJ7T8czBmqIYtLQVpCIFYafChnsRsB5pyb1JdmCQ==", "dev": true, "requires": { - "es-to-primitive": "1.1.1", - "function-bind": "1.1.1", - "has": "1.0.1", - "is-callable": "1.1.3", - "is-regex": "1.0.4" + "es-to-primitive": "^1.1.1", + "function-bind": "^1.1.1", + "has": "^1.0.1", + "is-callable": "^1.1.3", + "is-regex": "^1.0.4" } }, "es-to-primitive": { @@ -737,9 +737,9 @@ "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", "dev": true, "requires": { - "is-callable": "1.1.3", - "is-date-object": "1.0.1", - "is-symbol": "1.0.1" + "is-callable": "^1.1.1", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.1" } }, "es6-promise": { @@ -754,7 +754,7 @@ "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=", "dev": true, "requires": { - "es6-promise": "4.1.1" + "es6-promise": "^4.0.3" } }, "escape-string-regexp": { @@ -769,8 +769,8 @@ "integrity": "sha512-jDI/X5l/6D1rRD/3T43q8Qgbls2nq5km5KSqiwlyUbGo5+04fXhMKdCPhjwbqAa6HXWaMxj8Q4hQDIh7IadJQw==", "dev": true, "requires": { - "debug": "2.6.9", - "pkg-dir": "1.0.0" + "debug": "^2.6.8", + "pkg-dir": "^1.0.0" }, "dependencies": { "debug": { @@ -796,8 +796,8 @@ "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", "dev": true, "requires": { - "esrecurse": "4.2.0", - "estraverse": "4.2.0" + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" } }, "eslint-visitor-keys": { @@ -812,8 +812,8 @@ "integrity": "sha512-sadKeYwaR/aJ3stC2CdvgXu1T16TdYN+qwCpcWbMnGJ8s0zNWemzrvb2GbD4OhmJ/fwpJjudThAlLobGbWZbCQ==", "dev": true, "requires": { - "acorn": "5.2.1", - "acorn-jsx": "3.0.1" + "acorn": "^5.2.1", + "acorn-jsx": "^3.0.0" } }, "esprima": { @@ -828,7 +828,7 @@ "integrity": "sha1-z7qLV9f7qT8XKYqKAGoEzaE9gPo=", "dev": true, "requires": { - "estraverse": "4.2.0" + "estraverse": "^4.0.0" } }, "esrecurse": { @@ -837,8 +837,8 @@ "integrity": "sha1-+pVo2Y04I/mkHZHpAtyrnqblsWM=", "dev": true, "requires": { - "estraverse": "4.2.0", - "object-assign": "4.1.1" + "estraverse": "^4.1.0", + "object-assign": "^4.0.1" } }, "estraverse": { @@ -864,13 +864,13 @@ "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", "dev": true, "requires": { - "cross-spawn": "5.1.0", - "get-stream": "3.0.0", - "is-stream": "1.1.0", - "npm-run-path": "2.0.2", - "p-finally": "1.0.0", - "signal-exit": "3.0.2", - "strip-eof": "1.0.0" + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" } }, "exit": { @@ -885,9 +885,9 @@ "integrity": "sha512-E44iT5QVOUJBKij4IIV3uvxuNlbKS38Tw1HiupxEIHPv9qtC2PrDYohbXV5U+1jnfIXttny8gUhj+oZvflFlzA==", "dev": true, "requires": { - "chardet": "0.4.2", - "iconv-lite": "0.4.19", - "tmp": "0.0.33" + "chardet": "^0.4.0", + "iconv-lite": "^0.4.17", + "tmp": "^0.0.33" } }, "fast-deep-equal": { @@ -914,13 +914,13 @@ "integrity": "sha1-XmdDL1UNxBtXK/VYR7ispk5TN9s=", "dev": true, "requires": { - "core-js": "1.2.7", - "isomorphic-fetch": "2.2.1", - "loose-envify": "1.3.1", - "object-assign": "4.1.1", - "promise": "7.3.1", - "setimmediate": "1.0.5", - "ua-parser-js": "0.7.17" + "core-js": "^1.0.0", + "isomorphic-fetch": "^2.1.1", + "loose-envify": "^1.0.0", + "object-assign": "^4.1.0", + "promise": "^7.1.1", + "setimmediate": "^1.0.5", + "ua-parser-js": "^0.7.9" }, "dependencies": { "core-js": { @@ -937,7 +937,7 @@ "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", "dev": true, "requires": { - "escape-string-regexp": "1.0.5" + "escape-string-regexp": "^1.0.5" } }, "file-entry-cache": { @@ -946,8 +946,8 @@ "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", "dev": true, "requires": { - "flat-cache": "1.3.0", - "object-assign": "4.1.1" + "flat-cache": "^1.2.1", + "object-assign": "^4.0.1" } }, "fileset": { @@ -956,8 +956,8 @@ "integrity": "sha1-jnVIqW08wjJ+5eZ0FocjozO7oqA=", "dev": true, "requires": { - "glob": "7.1.2", - "minimatch": "3.0.4" + "glob": "^7.0.3", + "minimatch": "^3.0.3" } }, "find-root": { @@ -972,7 +972,7 @@ "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", "dev": true, "requires": { - "locate-path": "2.0.0" + "locate-path": "^2.0.0" } }, "flat-cache": { @@ -981,10 +981,10 @@ "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", "dev": true, "requires": { - "circular-json": "0.3.3", - "del": "2.2.2", - "graceful-fs": "4.1.11", - "write": "0.2.1" + "circular-json": "^0.3.1", + "del": "^2.0.2", + "graceful-fs": "^4.1.2", + "write": "^0.2.1" } }, "foreach": { @@ -1035,12 +1035,12 @@ "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "dev": 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" + "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" } }, "globals": { @@ -1055,12 +1055,12 @@ "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", "dev": true, "requires": { - "array-union": "1.0.2", - "arrify": "1.0.1", - "glob": "7.1.2", - "object-assign": "4.1.1", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" + "array-union": "^1.0.1", + "arrify": "^1.0.0", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" } }, "graceful-fs": { @@ -1081,10 +1081,10 @@ "integrity": "sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=", "dev": true, "requires": { - "async": "1.5.2", - "optimist": "0.6.1", - "source-map": "0.4.4", - "uglify-js": "2.8.29" + "async": "^1.4.0", + "optimist": "^0.6.1", + "source-map": "^0.4.4", + "uglify-js": "^2.6" }, "dependencies": { "source-map": { @@ -1093,7 +1093,7 @@ "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", "dev": true, "requires": { - "amdefine": "1.0.1" + "amdefine": ">=0.0.4" } } } @@ -1104,7 +1104,7 @@ "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=", "dev": true, "requires": { - "function-bind": "1.1.1" + "function-bind": "^1.0.2" } }, "has-ansi": { @@ -1113,7 +1113,7 @@ "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", "dev": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, "has-flag": { @@ -1146,11 +1146,11 @@ "integrity": "sha1-mWwosZFRaovoZQGn15dX5ccMEGg=", "dev": true, "requires": { - "domelementtype": "1.3.0", - "domhandler": "2.3.0", - "domutils": "1.5.1", - "entities": "1.0.0", - "readable-stream": "1.1.14" + "domelementtype": "1", + "domhandler": "2.3", + "domutils": "1.5", + "entities": "1.0", + "readable-stream": "1.1" } }, "https-proxy-agent": { @@ -1159,8 +1159,8 @@ "integrity": "sha512-LK6tQUR/VOkTI6ygAfWUKKP95I+e6M1h7N3PncGu1CATHCnex+CAv9ttR0lbHu1Uk2PXm/WoAHFo6JCGwMjVMw==", "dev": true, "requires": { - "agent-base": "4.1.2", - "debug": "3.1.0" + "agent-base": "^4.1.0", + "debug": "^3.1.0" } }, "iconv-lite": { @@ -1187,8 +1187,8 @@ "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" + "once": "^1.3.0", + "wrappy": "1" } }, "inherits": { @@ -1203,20 +1203,20 @@ "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", "dev": true, "requires": { - "ansi-escapes": "3.0.0", - "chalk": "2.3.0", - "cli-cursor": "2.1.0", - "cli-width": "2.2.0", - "external-editor": "2.1.0", - "figures": "2.0.0", - "lodash": "4.17.4", + "ansi-escapes": "^3.0.0", + "chalk": "^2.0.0", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^2.0.4", + "figures": "^2.0.0", + "lodash": "^4.3.0", "mute-stream": "0.0.7", - "run-async": "2.3.0", - "rx-lite": "4.0.8", - "rx-lite-aggregates": "4.0.8", - "string-width": "2.1.1", - "strip-ansi": "4.0.0", - "through": "2.3.8" + "run-async": "^2.2.0", + "rx-lite": "^4.0.8", + "rx-lite-aggregates": "^4.0.8", + "string-width": "^2.1.0", + "strip-ansi": "^4.0.0", + "through": "^2.3.6" }, "dependencies": { "ansi-regex": { @@ -1231,7 +1231,7 @@ "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", "dev": true, "requires": { - "color-convert": "1.9.1" + "color-convert": "^1.9.0" } }, "chalk": { @@ -1240,9 +1240,9 @@ "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", "dev": true, "requires": { - "ansi-styles": "3.2.0", - "escape-string-regexp": "1.0.5", - "supports-color": "4.5.0" + "ansi-styles": "^3.1.0", + "escape-string-regexp": "^1.0.5", + "supports-color": "^4.0.0" } }, "has-flag": { @@ -1263,8 +1263,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" } }, "strip-ansi": { @@ -1273,7 +1273,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } }, "supports-color": { @@ -1282,7 +1282,7 @@ "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", "dev": true, "requires": { - "has-flag": "2.0.0" + "has-flag": "^2.0.0" } } } @@ -1293,7 +1293,7 @@ "integrity": "sha1-nh9WrArNtr8wMwbzOL47IErmA2A=", "dev": true, "requires": { - "loose-envify": "1.3.1" + "loose-envify": "^1.0.0" } }, "invert-kv": { @@ -1320,7 +1320,7 @@ "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", "dev": true, "requires": { - "builtin-modules": "1.1.1" + "builtin-modules": "^1.0.0" } }, "is-callable": { @@ -1341,7 +1341,7 @@ "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", "dev": true, "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "is-fullwidth-code-point": { @@ -1350,7 +1350,7 @@ "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "is-path-cwd": { @@ -1365,7 +1365,7 @@ "integrity": "sha1-ZHdYK4IU1gI0YJRWcAO+ip6sBNw=", "dev": true, "requires": { - "is-path-inside": "1.0.1" + "is-path-inside": "^1.0.0" } }, "is-path-inside": { @@ -1374,7 +1374,7 @@ "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", "dev": true, "requires": { - "path-is-inside": "1.0.2" + "path-is-inside": "^1.0.1" } }, "is-promise": { @@ -1389,7 +1389,7 @@ "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", "dev": true, "requires": { - "has": "1.0.1" + "has": "^1.0.1" } }, "is-resolvable": { @@ -1398,7 +1398,7 @@ "integrity": "sha1-jfV8YeouPFAUCNEA+wE8+NbgzGI=", "dev": true, "requires": { - "tryit": "1.0.3" + "tryit": "^1.0.1" } }, "is-stream": { @@ -1437,8 +1437,8 @@ "integrity": "sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk=", "dev": true, "requires": { - "node-fetch": "1.7.3", - "whatwg-fetch": "2.0.3" + "node-fetch": "^1.0.1", + "whatwg-fetch": ">=0.10.0" } }, "istanbul": { @@ -1447,14 +1447,14 @@ "integrity": "sha1-eBeVZWAYohdMX2DzZ+5dNhy1e3c=", "dev": true, "requires": { - "abbrev": "1.0.9", - "async": "1.5.2", - "istanbul-api": "1.2.1", - "js-yaml": "3.10.0", - "mkdirp": "0.5.1", - "nopt": "3.0.6", - "which": "1.3.0", - "wordwrap": "1.0.0" + "abbrev": "1.0.x", + "async": "1.x", + "istanbul-api": "^1.1.0-alpha", + "js-yaml": "3.x", + "mkdirp": "0.5.x", + "nopt": "3.x", + "which": "^1.1.1", + "wordwrap": "^1.0.0" } }, "istanbul-api": { @@ -1463,17 +1463,17 @@ "integrity": "sha512-oFCwXvd65amgaPCzqrR+a2XjanS1MvpXN6l/MlMUTv6uiA1NOgGX+I0uyq8Lg3GDxsxPsaP1049krz3hIJ5+KA==", "dev": true, "requires": { - "async": "2.6.0", - "fileset": "2.0.3", - "istanbul-lib-coverage": "1.1.1", - "istanbul-lib-hook": "1.1.0", - "istanbul-lib-instrument": "1.9.1", - "istanbul-lib-report": "1.1.2", - "istanbul-lib-source-maps": "1.2.2", - "istanbul-reports": "1.1.3", - "js-yaml": "3.10.0", - "mkdirp": "0.5.1", - "once": "1.4.0" + "async": "^2.1.4", + "fileset": "^2.0.2", + "istanbul-lib-coverage": "^1.1.1", + "istanbul-lib-hook": "^1.1.0", + "istanbul-lib-instrument": "^1.9.1", + "istanbul-lib-report": "^1.1.2", + "istanbul-lib-source-maps": "^1.2.2", + "istanbul-reports": "^1.1.3", + "js-yaml": "^3.7.0", + "mkdirp": "^0.5.1", + "once": "^1.4.0" }, "dependencies": { "async": { @@ -1482,7 +1482,7 @@ "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", "dev": true, "requires": { - "lodash": "4.17.4" + "lodash": "^4.14.0" } } } @@ -1499,7 +1499,7 @@ "integrity": "sha512-U3qEgwVDUerZ0bt8cfl3dSP3S6opBoOtk3ROO5f2EfBr/SRiD9FQqzwaZBqFORu8W7O0EXpai+k7kxHK13beRg==", "dev": true, "requires": { - "append-transform": "0.4.0" + "append-transform": "^0.4.0" } }, "istanbul-lib-instrument": { @@ -1508,13 +1508,13 @@ "integrity": "sha512-RQmXeQ7sphar7k7O1wTNzVczF9igKpaeGQAG9qR2L+BS4DCJNTI9nytRmIVYevwO0bbq+2CXvJmYDuz0gMrywA==", "dev": true, "requires": { - "babel-generator": "6.26.0", - "babel-template": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "istanbul-lib-coverage": "1.1.1", - "semver": "5.4.1" + "babel-generator": "^6.18.0", + "babel-template": "^6.16.0", + "babel-traverse": "^6.18.0", + "babel-types": "^6.18.0", + "babylon": "^6.18.0", + "istanbul-lib-coverage": "^1.1.1", + "semver": "^5.3.0" } }, "istanbul-lib-report": { @@ -1523,10 +1523,10 @@ "integrity": "sha512-UTv4VGx+HZivJQwAo1wnRwe1KTvFpfi/NYwN7DcsrdzMXwpRT/Yb6r4SBPoHWj4VuQPakR32g4PUUeyKkdDkBA==", "dev": true, "requires": { - "istanbul-lib-coverage": "1.1.1", - "mkdirp": "0.5.1", - "path-parse": "1.0.5", - "supports-color": "3.2.3" + "istanbul-lib-coverage": "^1.1.1", + "mkdirp": "^0.5.1", + "path-parse": "^1.0.5", + "supports-color": "^3.1.2" }, "dependencies": { "supports-color": { @@ -1535,7 +1535,7 @@ "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", "dev": true, "requires": { - "has-flag": "1.0.0" + "has-flag": "^1.0.0" } } } @@ -1546,11 +1546,11 @@ "integrity": "sha512-8BfdqSfEdtip7/wo1RnrvLpHVEd8zMZEDmOFEnpC6dg0vXflHt9nvoAyQUzig2uMSXfF2OBEYBV3CVjIL9JvaQ==", "dev": true, "requires": { - "debug": "3.1.0", - "istanbul-lib-coverage": "1.1.1", - "mkdirp": "0.5.1", - "rimraf": "2.6.2", - "source-map": "0.5.7" + "debug": "^3.1.0", + "istanbul-lib-coverage": "^1.1.1", + "mkdirp": "^0.5.1", + "rimraf": "^2.6.1", + "source-map": "^0.5.3" } }, "istanbul-reports": { @@ -1559,7 +1559,7 @@ "integrity": "sha512-ZEelkHh8hrZNI5xDaKwPMFwDsUf5wIEI2bXAFGp1e6deR2mnEKBPhLJEgr4ZBt8Gi6Mj38E/C8kcy9XLggVO2Q==", "dev": true, "requires": { - "handlebars": "4.0.11" + "handlebars": "^4.0.3" } }, "js-tokens": { @@ -1574,8 +1574,8 @@ "integrity": "sha512-O2v52ffjLa9VeM43J4XocZE//WT9N0IiwDa3KSHH7Tu8CtH+1qM8SIZvnsTh6v+4yFy5KUY3BHUVwjpfAWsjIA==", "dev": true, "requires": { - "argparse": "1.0.9", - "esprima": "4.0.0" + "argparse": "^1.0.7", + "esprima": "^4.0.0" } }, "jsesc": { @@ -1590,14 +1590,14 @@ "integrity": "sha1-HnJSkVzmgbQIJ+4UJIxG006apiw=", "dev": true, "requires": { - "cli": "1.0.1", - "console-browserify": "1.1.0", - "exit": "0.1.2", - "htmlparser2": "3.8.3", - "lodash": "3.7.0", - "minimatch": "3.0.4", - "shelljs": "0.3.0", - "strip-json-comments": "1.0.4" + "cli": "~1.0.0", + "console-browserify": "1.1.x", + "exit": "0.1.x", + "htmlparser2": "3.8.x", + "lodash": "3.7.x", + "minimatch": "~3.0.2", + "shelljs": "0.3.x", + "strip-json-comments": "1.0.x" }, "dependencies": { "lodash": { @@ -1626,7 +1626,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } }, "lazy-cache": { @@ -1642,7 +1642,7 @@ "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", "dev": true, "requires": { - "invert-kv": "1.0.0" + "invert-kv": "^1.0.0" } }, "levn": { @@ -1651,8 +1651,8 @@ "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", "dev": true, "requires": { - "prelude-ls": "1.1.2", - "type-check": "0.3.2" + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" } }, "load-json-file": { @@ -1661,10 +1661,10 @@ "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "parse-json": "2.2.0", - "pify": "2.3.0", - "strip-bom": "3.0.0" + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "strip-bom": "^3.0.0" }, "dependencies": { "strip-bom": { @@ -1681,8 +1681,8 @@ "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", "dev": true, "requires": { - "p-locate": "2.0.0", - "path-exists": "3.0.0" + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" } }, "lodash": { @@ -1709,7 +1709,7 @@ "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", "dev": true, "requires": { - "js-tokens": "3.0.2" + "js-tokens": "^3.0.0" } }, "lru-cache": { @@ -1718,8 +1718,8 @@ "integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==", "dev": true, "requires": { - "pseudomap": "1.0.2", - "yallist": "2.1.2" + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" } }, "mem": { @@ -1728,7 +1728,7 @@ "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", "dev": true, "requires": { - "mimic-fn": "1.1.0" + "mimic-fn": "^1.0.0" } }, "mimic-fn": { @@ -1743,7 +1743,7 @@ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "requires": { - "brace-expansion": "1.1.8" + "brace-expansion": "^1.1.7" } }, "minimist": { @@ -1791,7 +1791,7 @@ "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", "dev": true, "requires": { - "has-flag": "2.0.0" + "has-flag": "^2.0.0" } } } @@ -1819,8 +1819,8 @@ "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", "dev": true, "requires": { - "encoding": "0.1.12", - "is-stream": "1.1.0" + "encoding": "^0.1.11", + "is-stream": "^1.0.1" } }, "nodesecurity-npm-utils": { @@ -1835,7 +1835,7 @@ "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", "dev": true, "requires": { - "abbrev": "1.0.9" + "abbrev": "1" } }, "normalize-package-data": { @@ -1844,10 +1844,10 @@ "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", "dev": true, "requires": { - "hosted-git-info": "2.5.0", - "is-builtin-module": "1.0.0", - "semver": "5.4.1", - "validate-npm-package-license": "3.0.1" + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" } }, "npm-run-path": { @@ -1856,7 +1856,7 @@ "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", "dev": true, "requires": { - "path-key": "2.0.1" + "path-key": "^2.0.0" } }, "nsp": { @@ -1865,15 +1865,15 @@ "integrity": "sha512-jtD2WMlmqWA3zSZTFog8MQkwUvXWdJD7ps7A30q8ImOIao0RFgZXbPPZ8O6yWaKxLbRxVUIoCfwvXyg7AVS+IA==", "dev": true, "requires": { - "chalk": "2.3.0", - "cli-table2": "0.2.0", - "cvss": "1.0.2", - "https-proxy-agent": "2.1.1", - "inquirer": "3.3.0", - "nodesecurity-npm-utils": "6.0.0", - "semver": "5.4.1", - "wreck": "12.5.1", - "yargs": "9.0.1" + "chalk": "^2.1.0", + "cli-table2": "^0.2.0", + "cvss": "^1.0.2", + "https-proxy-agent": "^2.1.0", + "inquirer": "^3.3.0", + "nodesecurity-npm-utils": "^6.0.0", + "semver": "^5.4.1", + "wreck": "^12.5.1", + "yargs": "^9.0.1" }, "dependencies": { "ansi-regex": { @@ -1888,7 +1888,7 @@ "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", "dev": true, "requires": { - "color-convert": "1.9.1" + "color-convert": "^1.9.0" } }, "camelcase": { @@ -1903,9 +1903,9 @@ "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", "dev": true, "requires": { - "ansi-styles": "3.2.0", - "escape-string-regexp": "1.0.5", - "supports-color": "4.5.0" + "ansi-styles": "^3.1.0", + "escape-string-regexp": "^1.0.5", + "supports-color": "^4.0.0" } }, "cliui": { @@ -1914,9 +1914,9 @@ "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", "dev": true, "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wrap-ansi": "2.1.0" + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" }, "dependencies": { "string-width": { @@ -1925,9 +1925,9 @@ "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" } } } @@ -1944,8 +1944,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" }, "dependencies": { "is-fullwidth-code-point": { @@ -1960,7 +1960,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -1971,7 +1971,7 @@ "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", "dev": true, "requires": { - "has-flag": "2.0.0" + "has-flag": "^2.0.0" } }, "yargs": { @@ -1980,19 +1980,19 @@ "integrity": "sha1-UqzCP+7Kw0BCB47njAwAf1CF20w=", "dev": true, "requires": { - "camelcase": "4.1.0", - "cliui": "3.2.0", - "decamelize": "1.2.0", - "get-caller-file": "1.0.2", - "os-locale": "2.1.0", - "read-pkg-up": "2.0.0", - "require-directory": "2.1.1", - "require-main-filename": "1.0.1", - "set-blocking": "2.0.0", - "string-width": "2.1.1", - "which-module": "2.0.0", - "y18n": "3.2.1", - "yargs-parser": "7.0.0" + "camelcase": "^4.1.0", + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "read-pkg-up": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^7.0.0" } } } @@ -2021,7 +2021,7 @@ "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, "requires": { - "wrappy": "1.0.2" + "wrappy": "1" } }, "onetime": { @@ -2030,7 +2030,7 @@ "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", "dev": true, "requires": { - "mimic-fn": "1.1.0" + "mimic-fn": "^1.0.0" } }, "optimist": { @@ -2039,8 +2039,8 @@ "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", "dev": true, "requires": { - "minimist": "0.0.8", - "wordwrap": "0.0.3" + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" }, "dependencies": { "wordwrap": { @@ -2057,12 +2057,12 @@ "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", "dev": true, "requires": { - "deep-is": "0.1.3", - "fast-levenshtein": "2.0.6", - "levn": "0.3.0", - "prelude-ls": "1.1.2", - "type-check": "0.3.2", - "wordwrap": "1.0.0" + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" } }, "os-locale": { @@ -2071,9 +2071,9 @@ "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", "dev": true, "requires": { - "execa": "0.7.0", - "lcid": "1.0.0", - "mem": "1.1.0" + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" } }, "os-tmpdir": { @@ -2100,7 +2100,7 @@ "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", "dev": true, "requires": { - "p-limit": "1.1.0" + "p-limit": "^1.1.0" } }, "parse-json": { @@ -2109,7 +2109,7 @@ "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", "dev": true, "requires": { - "error-ex": "1.3.1" + "error-ex": "^1.2.0" } }, "path-exists": { @@ -2148,7 +2148,7 @@ "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", "dev": true, "requires": { - "pify": "2.3.0" + "pify": "^2.0.0" } }, "pify": { @@ -2169,7 +2169,7 @@ "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "dev": true, "requires": { - "pinkie": "2.0.4" + "pinkie": "^2.0.0" } }, "pkg-conf": { @@ -2178,8 +2178,8 @@ "integrity": "sha1-BxyHZQQDvM+5xif1h1G/5HwGcnk=", "dev": true, "requires": { - "find-up": "2.1.0", - "load-json-file": "2.0.0" + "find-up": "^2.0.0", + "load-json-file": "^2.0.0" } }, "pkg-config": { @@ -2188,9 +2188,9 @@ "integrity": "sha1-VX7yLXPaPIg3EHdmxS6tq94pj+Q=", "dev": true, "requires": { - "debug-log": "1.0.1", - "find-root": "1.1.0", - "xtend": "4.0.1" + "debug-log": "^1.0.0", + "find-root": "^1.0.0", + "xtend": "^4.0.1" } }, "pkg-dir": { @@ -2199,7 +2199,7 @@ "integrity": "sha1-ektQio1bstYp1EcFb/TpyTFM89Q=", "dev": true, "requires": { - "find-up": "1.1.2" + "find-up": "^1.0.0" }, "dependencies": { "find-up": { @@ -2208,8 +2208,8 @@ "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", "dev": true, "requires": { - "path-exists": "2.1.0", - "pinkie-promise": "2.0.1" + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" } }, "path-exists": { @@ -2218,7 +2218,7 @@ "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", "dev": true, "requires": { - "pinkie-promise": "2.0.1" + "pinkie-promise": "^2.0.0" } } } @@ -2241,7 +2241,7 @@ "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", "dev": true, "requires": { - "asap": "2.0.6" + "asap": "~2.0.3" } }, "prop-types": { @@ -2250,9 +2250,9 @@ "integrity": "sha1-zq8IMCL8RrSjX2nhPvda7Q1jmFY=", "dev": true, "requires": { - "fbjs": "0.8.16", - "loose-envify": "1.3.1", - "object-assign": "4.1.1" + "fbjs": "^0.8.16", + "loose-envify": "^1.3.1", + "object-assign": "^4.1.1" } }, "pseudomap": { @@ -2267,9 +2267,9 @@ "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", "dev": true, "requires": { - "load-json-file": "2.0.0", - "normalize-package-data": "2.4.0", - "path-type": "2.0.0" + "load-json-file": "^2.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^2.0.0" } }, "read-pkg-up": { @@ -2278,8 +2278,8 @@ "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", "dev": true, "requires": { - "find-up": "2.1.0", - "read-pkg": "2.0.0" + "find-up": "^2.0.0", + "read-pkg": "^2.0.0" } }, "readable-stream": { @@ -2288,10 +2288,10 @@ "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", "dev": true, "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", "isarray": "0.0.1", - "string_decoder": "0.10.31" + "string_decoder": "~0.10.x" } }, "regenerator-runtime": { @@ -2312,7 +2312,7 @@ "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", "dev": true, "requires": { - "is-finite": "1.0.2" + "is-finite": "^1.0.0" } }, "require-directory": { @@ -2333,8 +2333,8 @@ "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", "dev": true, "requires": { - "caller-path": "0.1.0", - "resolve-from": "1.0.1" + "caller-path": "^0.1.0", + "resolve-from": "^1.0.0" } }, "resolve": { @@ -2343,7 +2343,7 @@ "integrity": "sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw==", "dev": true, "requires": { - "path-parse": "1.0.5" + "path-parse": "^1.0.5" } }, "resolve-from": { @@ -2358,8 +2358,8 @@ "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", "dev": true, "requires": { - "onetime": "2.0.1", - "signal-exit": "3.0.2" + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" } }, "right-align": { @@ -2369,7 +2369,7 @@ "dev": true, "optional": true, "requires": { - "align-text": "0.1.4" + "align-text": "^0.1.1" } }, "rimraf": { @@ -2378,7 +2378,7 @@ "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", "dev": true, "requires": { - "glob": "7.1.2" + "glob": "^7.0.5" } }, "run-async": { @@ -2387,7 +2387,7 @@ "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", "dev": true, "requires": { - "is-promise": "2.1.0" + "is-promise": "^2.1.0" } }, "run-parallel": { @@ -2408,7 +2408,7 @@ "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", "dev": true, "requires": { - "rx-lite": "4.0.8" + "rx-lite": "*" } }, "safe-buffer": { @@ -2423,16 +2423,16 @@ "integrity": "sha512-jykJZVDYWFZ7Hej9bYwynBa+A8yQFksm4zZoli4O+KkqMuQTdlBzkJvtFRER7xufSnB6+XnBS423tjI3Gtrg7Q==", "dev": true, "requires": { - "eslint": "4.14.0", - "eslint-config-semistandard": "12.0.0", + "eslint": "~4.14.0", + "eslint-config-semistandard": "^12.0.0", "eslint-config-standard": "11.0.0-beta.0", - "eslint-config-standard-jsx": "4.0.2", - "eslint-plugin-import": "2.8.0", - "eslint-plugin-node": "5.2.1", - "eslint-plugin-promise": "3.6.0", - "eslint-plugin-react": "7.5.1", - "eslint-plugin-standard": "3.0.1", - "standard-engine": "7.2.0" + "eslint-config-standard-jsx": "~4.0.2", + "eslint-plugin-import": "~2.8.0", + "eslint-plugin-node": "~5.2.1", + "eslint-plugin-promise": "~3.6.0", + "eslint-plugin-react": "~7.5.1", + "eslint-plugin-standard": "~3.0.1", + "standard-engine": "~7.2.0" }, "dependencies": { "ajv": { @@ -2441,10 +2441,10 @@ "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", "dev": true, "requires": { - "co": "4.6.0", - "fast-deep-equal": "1.0.0", - "fast-json-stable-stringify": "2.0.0", - "json-schema-traverse": "0.3.1" + "co": "^4.6.0", + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" } }, "ajv-keywords": { @@ -2465,7 +2465,7 @@ "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", "dev": true, "requires": { - "color-convert": "1.9.1" + "color-convert": "^1.9.0" } }, "chalk": { @@ -2474,9 +2474,9 @@ "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", "dev": true, "requires": { - "ansi-styles": "3.2.0", - "escape-string-regexp": "1.0.5", - "supports-color": "4.5.0" + "ansi-styles": "^3.1.0", + "escape-string-regexp": "^1.0.5", + "supports-color": "^4.0.0" } }, "eslint": { @@ -2485,43 +2485,43 @@ "integrity": "sha512-Ul6CSGRjKscEyg0X/EeNs7o2XdnbTEOD1OM8cTjmx85RPcBJQrEhZLevhuJZNAE/vS2iVl5Uhgiqf3h5uLMCJQ==", "dev": true, "requires": { - "ajv": "5.5.2", - "babel-code-frame": "6.26.0", - "chalk": "2.3.0", - "concat-stream": "1.6.0", - "cross-spawn": "5.1.0", - "debug": "3.1.0", - "doctrine": "2.0.2", - "eslint-scope": "3.7.1", - "eslint-visitor-keys": "1.0.0", - "espree": "3.5.2", - "esquery": "1.0.0", - "esutils": "2.0.2", - "file-entry-cache": "2.0.0", - "functional-red-black-tree": "1.0.1", - "glob": "7.1.2", - "globals": "11.1.0", - "ignore": "3.3.7", - "imurmurhash": "0.1.4", - "inquirer": "3.3.0", - "is-resolvable": "1.0.0", - "js-yaml": "3.10.0", - "json-stable-stringify-without-jsonify": "1.0.1", - "levn": "0.3.0", - "lodash": "4.17.4", - "minimatch": "3.0.4", - "mkdirp": "0.5.1", - "natural-compare": "1.4.0", - "optionator": "0.8.2", - "path-is-inside": "1.0.2", - "pluralize": "7.0.0", - "progress": "2.0.0", - "require-uncached": "1.0.3", - "semver": "5.4.1", - "strip-ansi": "4.0.0", - "strip-json-comments": "2.0.1", - "table": "4.0.2", - "text-table": "0.2.0" + "ajv": "^5.3.0", + "babel-code-frame": "^6.22.0", + "chalk": "^2.1.0", + "concat-stream": "^1.6.0", + "cross-spawn": "^5.1.0", + "debug": "^3.1.0", + "doctrine": "^2.0.2", + "eslint-scope": "^3.7.1", + "eslint-visitor-keys": "^1.0.0", + "espree": "^3.5.2", + "esquery": "^1.0.0", + "esutils": "^2.0.2", + "file-entry-cache": "^2.0.0", + "functional-red-black-tree": "^1.0.1", + "glob": "^7.1.2", + "globals": "^11.0.1", + "ignore": "^3.3.3", + "imurmurhash": "^0.1.4", + "inquirer": "^3.0.6", + "is-resolvable": "^1.0.0", + "js-yaml": "^3.9.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.3.0", + "lodash": "^4.17.4", + "minimatch": "^3.0.2", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.2", + "path-is-inside": "^1.0.2", + "pluralize": "^7.0.0", + "progress": "^2.0.0", + "require-uncached": "^1.0.3", + "semver": "^5.3.0", + "strip-ansi": "^4.0.0", + "strip-json-comments": "~2.0.1", + "table": "^4.0.1", + "text-table": "~0.2.0" } }, "eslint-config-semistandard": { @@ -2548,8 +2548,8 @@ "integrity": "sha512-sfmTqJfPSizWu4aymbPr4Iidp5yKm8yDkHp+Ir3YiTHiiDfxh69mOUsmiqW6RZ9zRXFaF64GtYmN7e+8GHBv6Q==", "dev": true, "requires": { - "debug": "2.6.9", - "resolve": "1.5.0" + "debug": "^2.6.9", + "resolve": "^1.5.0" }, "dependencies": { "debug": { @@ -2569,16 +2569,16 @@ "integrity": "sha512-Rf7dfKJxZ16QuTgVv1OYNxkZcsu/hULFnC+e+w0Gzi6jMC3guQoWQgxYxc54IDRinlb6/0v5z/PxxIKmVctN+g==", "dev": true, "requires": { - "builtin-modules": "1.1.1", - "contains-path": "0.1.0", - "debug": "2.6.9", + "builtin-modules": "^1.1.1", + "contains-path": "^0.1.0", + "debug": "^2.6.8", "doctrine": "1.5.0", - "eslint-import-resolver-node": "0.3.2", - "eslint-module-utils": "2.1.1", - "has": "1.0.1", - "lodash.cond": "4.5.2", - "minimatch": "3.0.4", - "read-pkg-up": "2.0.0" + "eslint-import-resolver-node": "^0.3.1", + "eslint-module-utils": "^2.1.1", + "has": "^1.0.1", + "lodash.cond": "^4.3.0", + "minimatch": "^3.0.3", + "read-pkg-up": "^2.0.0" }, "dependencies": { "debug": { @@ -2596,8 +2596,8 @@ "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", "dev": true, "requires": { - "esutils": "2.0.2", - "isarray": "1.0.0" + "esutils": "^2.0.2", + "isarray": "^1.0.0" } } } @@ -2608,9 +2608,9 @@ "integrity": "sha512-xhPXrh0Vl/b7870uEbaumb2Q+LxaEcOQ3kS1jtIXanBAwpMre1l5q/l2l/hESYJGEFKuI78bp6Uw50hlpr7B+g==", "dev": true, "requires": { - "ignore": "3.3.7", - "minimatch": "3.0.4", - "resolve": "1.5.0", + "ignore": "^3.3.6", + "minimatch": "^3.0.4", + "resolve": "^1.3.3", "semver": "5.3.0" }, "dependencies": { @@ -2634,10 +2634,10 @@ "integrity": "sha512-YGSjB9Qu6QbVTroUZi66pYky3DfoIPLdHQ/wmrBGyBRnwxQsBXAov9j2rpXt/55i8nyMv6IRWJv2s4d4YnduzQ==", "dev": true, "requires": { - "doctrine": "2.0.2", - "has": "1.0.1", - "jsx-ast-utils": "2.0.1", - "prop-types": "15.6.0" + "doctrine": "^2.0.0", + "has": "^1.0.1", + "jsx-ast-utils": "^2.0.0", + "prop-types": "^15.6.0" } }, "globals": { @@ -2670,7 +2670,7 @@ "integrity": "sha1-6AGxs5mF4g//yHtA43SAgOLcrH8=", "dev": true, "requires": { - "array-includes": "3.0.3" + "array-includes": "^3.0.3" } }, "minimist": { @@ -2697,7 +2697,7 @@ "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0" + "is-fullwidth-code-point": "^2.0.0" } }, "standard-engine": { @@ -2706,10 +2706,10 @@ "integrity": "sha512-4MTVXRZQjEWeD7tNt8lK1Yh7VLXbmZ/hj34uF9tpSdtYNNPosms2TLCnw/7MUl/rW1Uhx80s7CL8LtBdUtgrtw==", "dev": true, "requires": { - "deglob": "2.1.0", - "get-stdin": "5.0.1", - "minimist": "1.2.0", - "pkg-conf": "2.0.0" + "deglob": "^2.1.0", + "get-stdin": "^5.0.1", + "minimist": "^1.1.0", + "pkg-conf": "^2.0.0" } }, "string-width": { @@ -2718,8 +2718,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" } }, "strip-ansi": { @@ -2728,7 +2728,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } }, "strip-json-comments": { @@ -2743,7 +2743,7 @@ "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", "dev": true, "requires": { - "has-flag": "2.0.0" + "has-flag": "^2.0.0" } }, "table": { @@ -2752,12 +2752,12 @@ "integrity": "sha512-UUkEAPdSGxtRpiV9ozJ5cMTtYiqz7Ni1OGqLXRCynrvzdtR1p+cfOWe2RJLwvUG8hNanaSRjecIqwOjqeatDsA==", "dev": true, "requires": { - "ajv": "5.5.2", - "ajv-keywords": "2.1.1", - "chalk": "2.3.0", - "lodash": "4.17.4", + "ajv": "^5.2.3", + "ajv-keywords": "^2.1.0", + "chalk": "^2.1.0", + "lodash": "^4.17.4", "slice-ansi": "1.0.0", - "string-width": "2.1.1" + "string-width": "^2.1.1" } } } @@ -2786,7 +2786,7 @@ "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", "dev": true, "requires": { - "shebang-regex": "1.0.0" + "shebang-regex": "^1.0.0" } }, "shebang-regex": { @@ -2819,7 +2819,7 @@ "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=", "dev": true, "requires": { - "spdx-license-ids": "1.2.2" + "spdx-license-ids": "^1.0.2" } }, "spdx-expression-parse": { @@ -2846,9 +2846,9 @@ "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" } }, "string_decoder": { @@ -2863,7 +2863,7 @@ "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, "strip-bom": { @@ -2872,7 +2872,7 @@ "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", "dev": true, "requires": { - "is-utf8": "0.2.1" + "is-utf8": "^0.2.0" } }, "strip-eof": { @@ -2911,7 +2911,7 @@ "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", "dev": true, "requires": { - "os-tmpdir": "1.0.2" + "os-tmpdir": "~1.0.2" } }, "to-fast-properties": { @@ -2938,7 +2938,7 @@ "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", "dev": true, "requires": { - "prelude-ls": "1.1.2" + "prelude-ls": "~1.1.2" } }, "typedarray": { @@ -2965,9 +2965,9 @@ "dev": true, "optional": true, "requires": { - "source-map": "0.5.7", - "uglify-to-browserify": "1.0.2", - "yargs": "3.10.0" + "source-map": "~0.5.1", + "uglify-to-browserify": "~1.0.0", + "yargs": "~3.10.0" } }, "uglify-to-browserify": { @@ -2995,8 +2995,8 @@ "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=", "dev": true, "requires": { - "spdx-correct": "1.0.2", - "spdx-expression-parse": "1.0.4" + "spdx-correct": "~1.0.0", + "spdx-expression-parse": "~1.0.0" } }, "whatwg-fetch": { @@ -3011,7 +3011,7 @@ "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", "dev": true, "requires": { - "isexe": "2.0.0" + "isexe": "^2.0.0" } }, "which-module": { @@ -3039,8 +3039,8 @@ "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "dev": true, "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1" + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" } }, "wrappy": { @@ -3055,8 +3055,8 @@ "integrity": "sha512-l5DUGrc+yDyIflpty1x9XuMj1ehVjC/dTbF3/BasOO77xk0EdEa4M/DuOY8W88MQDAD0fEDqyjc8bkIMHd2E9A==", "dev": true, "requires": { - "boom": "5.2.0", - "hoek": "4.2.0" + "boom": "5.x.x", + "hoek": "4.x.x" } }, "write": { @@ -3065,7 +3065,7 @@ "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", "dev": true, "requires": { - "mkdirp": "0.5.1" + "mkdirp": "^0.5.1" } }, "xtend": { @@ -3093,9 +3093,9 @@ "dev": true, "optional": true, "requires": { - "camelcase": "1.2.1", - "cliui": "2.1.0", - "decamelize": "1.2.0", + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", "window-size": "0.1.0" } }, @@ -3105,7 +3105,7 @@ "integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=", "dev": true, "requires": { - "camelcase": "4.1.0" + "camelcase": "^4.1.0" }, "dependencies": { "camelcase": { From 700cf470fd510d984ea10efcd14a40b93f9c8852 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Berthommier?= Date: Thu, 24 May 2018 00:35:46 +0200 Subject: [PATCH 06/24] separate validateHook and pickArgsHook --- lib/hooks.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/hooks.js b/lib/hooks.js index 591418b047..cc681df268 100644 --- a/lib/hooks.js +++ b/lib/hooks.js @@ -47,9 +47,10 @@ const hookMixin = exports.hookMixin = function hookMixin (service) { const hookObject = createHookObject(method, args, hookData); - // A hook that validates the arguments and will always be the very first - const validateHook = context => { + // A hook that pick arguments for methods defined in `service.methods` + const pickArgsHook = context => { const methodArgsList = serviceMethods[method]; + if (methodArgsList) { const argsObject = args.reduce( (result, value, index) => Object.assign(result, { [methodArgsList[index]]: value }), @@ -59,12 +60,17 @@ const hookMixin = exports.hookMixin = function hookMixin (service) { Object.assign(context, argsObject); } + return context; + }; + + // A hook that validates the arguments and will always be the very first + const validateHook = context => { validateArguments(method, args); return context; }; // The `before` hook chain (including the validation hook) - const beforeHooks = [ validateHook, ...getHooks(app, service, 'before', method) ]; + const beforeHooks = [ pickArgsHook, validateHook, ...getHooks(app, service, 'before', method) ]; // Process all before hooks return processHooks.call(service, beforeHooks, hookObject) From a25679f036e14a37825f210e4b178f4b6d2a0c88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Berthommier?= Date: Sat, 26 May 2018 14:42:40 +0200 Subject: [PATCH 07/24] extend pickArgsHook to all methods --- lib/hooks.js | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/lib/hooks.js b/lib/hooks.js index cc681df268..30c4f00d3b 100644 --- a/lib/hooks.js +++ b/lib/hooks.js @@ -8,6 +8,15 @@ const { makeArguments } = hooks; +const argumentsOrders = { + find: ['params'], + get: ['id', 'params'], + create: ['data', 'params'], + update: ['id', 'data', 'params'], + patch: ['id', 'data', 'params'], + remove: ['id', 'params'] +}; + // A service mixin that adds `service.hooks()` method and functionality const hookMixin = exports.hookMixin = function hookMixin (service) { if (typeof service.hooks === 'function') { @@ -45,20 +54,20 @@ const hookMixin = exports.hookMixin = function hookMixin (service) { app }; - const hookObject = createHookObject(method, args, hookData); + const hookObject = createHookObject(method, hookData); - // A hook that pick arguments for methods defined in `service.methods` + // A hook that pick arguments for methods defined in + // `argumentsOrder` (top of file) and `service.methods` const pickArgsHook = context => { - const methodArgsList = serviceMethods[method]; + const argsList = Object.assign({}, argumentsOrders, serviceMethods); + const methodArgsList = argsList[method]; - if (methodArgsList) { - const argsObject = args.reduce( - (result, value, index) => Object.assign(result, { [methodArgsList[index]]: value }), - {} - ); + const argsObject = args.reduce( + (result, value, index) => Object.assign(result, { [methodArgsList[index]]: value }), + { params: {} } + ); - Object.assign(context, argsObject); - } + Object.assign(context, argsObject); return context; }; From 62cc332f37d245d194e8c7bad50e375f8033e09f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Berthommier?= Date: Sat, 26 May 2018 14:49:17 +0200 Subject: [PATCH 08/24] remove variable with single usage --- lib/hooks.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/hooks.js b/lib/hooks.js index 30c4f00d3b..31eeed187b 100644 --- a/lib/hooks.js +++ b/lib/hooks.js @@ -48,13 +48,11 @@ const hookMixin = exports.hookMixin = function hookMixin (service) { // A reference to the original method const _super = service._super.bind(service); // Create the hook object that gets passed through - const hookData = { + const hookObject = createHookObject(method, { type: 'before', // initial hook object type service, app - }; - - const hookObject = createHookObject(method, hookData); + }); // A hook that pick arguments for methods defined in // `argumentsOrder` (top of file) and `service.methods` From ecb66177bb36b37f4fe9e82cf234e3f098e15efc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Berthommier?= Date: Sat, 26 May 2018 15:39:55 +0200 Subject: [PATCH 09/24] validate before pick arguments --- lib/hooks.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/hooks.js b/lib/hooks.js index 31eeed187b..56df074ad2 100644 --- a/lib/hooks.js +++ b/lib/hooks.js @@ -54,14 +54,20 @@ const hookMixin = exports.hookMixin = function hookMixin (service) { app }); + const argsList = Object.assign({}, argumentsOrders, serviceMethods); + + // A hook that validates the arguments and will always be the very first + const validateHook = context => { + validateArguments(argsList, method, args); + + return context; + }; + // A hook that pick arguments for methods defined in // `argumentsOrder` (top of file) and `service.methods` const pickArgsHook = context => { - const argsList = Object.assign({}, argumentsOrders, serviceMethods); - const methodArgsList = argsList[method]; - const argsObject = args.reduce( - (result, value, index) => Object.assign(result, { [methodArgsList[index]]: value }), + (result, value, index) => Object.assign(result, { [argsList[method][index]]: value }), { params: {} } ); @@ -70,14 +76,8 @@ const hookMixin = exports.hookMixin = function hookMixin (service) { return context; }; - // A hook that validates the arguments and will always be the very first - const validateHook = context => { - validateArguments(method, args); - - return context; - }; // The `before` hook chain (including the validation hook) - const beforeHooks = [ pickArgsHook, validateHook, ...getHooks(app, service, 'before', method) ]; + const beforeHooks = [ validateHook, pickArgsHook, ...getHooks(app, service, 'before', method) ]; // Process all before hooks return processHooks.call(service, beforeHooks, hookObject) From 4dacd27a7d6f125315a9a5bc9dc11e290c1504c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Berthommier?= Date: Sun, 27 May 2018 20:37:57 +0200 Subject: [PATCH 10/24] export withHooks method --- lib/hooks.js | 230 +++++++++++++++++++++++++++++---------------------- 1 file changed, 131 insertions(+), 99 deletions(-) diff --git a/lib/hooks.js b/lib/hooks.js index 56df074ad2..3f08ee96e3 100644 --- a/lib/hooks.js +++ b/lib/hooks.js @@ -17,6 +17,119 @@ const argumentsOrders = { remove: ['id', 'params'] }; +function getHookArray (hooks, type) { + return hooks && hooks[type] && Array.isArray(hooks[type]) + ? hooks[type] + : hooks[type] + ? [hooks[type]] + : []; +} + +const withHooks = function withHooks ({ + app, + service, + method +}) { + return (hooks = {}) => (...args) => { + const returnHook = args[args.length - 1] === true + ? args.pop() : false; + + // A reference to the original method + const _super = service._super ? service._super.bind(service) : service[method].bind(service); + // Create the hook object that gets passed through + const hookObject = createHookObject(method, { + type: 'before', // initial hook object type + service, + app + }); + + hookObject.arguments = args; + + // A hook that pick arguments for methods defined in + // `argumentsOrder` (top of file) and `service.methods` + const pickArgsHook = context => { + const argsList = Object.assign({}, argumentsOrders, service.methods || {}); + const argsObject = context.arguments.reduce( + (result, value, index) => Object.assign(result, { [argsList[method][index]]: value }), + { params: {} } + ); + + Object.assign(context, argsObject); + + return context; + }; + + // Process all before hooks + return processHooks.call(service, [pickArgsHook, ...getHookArray(hooks, 'before')], hookObject) + // Use the hook object to call the original method + .then(hookObject => { + // If `hookObject.result` is set, skip the original method + if (typeof hookObject.result !== 'undefined') { + return hookObject; + } + + // Otherwise, call it with arguments created from the hook object + const promise = _super(...makeArguments(hookObject)); + + if (!isPromise(promise)) { + throw new Error(`Service method '${hookObject.method}' for '${hookObject.path}' service must return a promise`); + } + + return promise.then(result => { + hookObject.result = result; + + return hookObject; + }); + }) + // Make a (shallow) copy of hookObject from `before` hooks and update type + .then(hookObject => Object.assign({}, hookObject, { type: 'after' })) + // Run through all `after` hooks + .then(hookObject => { + // Combine all app and service `after` and `finally` hooks and process + const hookChain = getHookArray(hooks, 'after') + .concat(getHookArray(hooks, 'finally')); + + return processHooks.call(service, hookChain, hookObject); + }) + .then(hookObject => + // Finally, return the result + // Or the hook object if the `returnHook` flag is set + returnHook ? hookObject : hookObject.result + ) + // Handle errors + .catch(error => { + // Combine all app and service `error` and `finally` hooks and process + const hookChain = getHookArray(hooks, 'error') + .concat(getHookArray(hooks, 'finally')); + + // A shallow copy of the hook object + const errorHookObject = Object.assign({}, error.hook, hookObject, { + type: 'error', + result: null, + original: error.hook, + error + }); + + return processHooks.call(service, hookChain, errorHookObject) + .catch(error => { + errorHookObject.error = error; + + return errorHookObject; + }) + .then(hook => { + if (returnHook) { + // Either resolve or reject with the hook object + return hook.result ? hook : Promise.reject(hook); + } + + // Otherwise return either the result if set (to swallow errors) + // Or reject with the hook error + return hook.result ? hook.result : Promise.reject(hook.error); + }); + }); + }; +}; + // A service mixin that adds `service.hooks()` method and functionality const hookMixin = exports.hookMixin = function hookMixin (service) { if (typeof service.hooks === 'function') { @@ -40,115 +153,32 @@ const hookMixin = exports.hookMixin = function hookMixin (service) { mixin[method] = function () { const service = this; const args = Array.from(arguments); - // If the last argument is `true` we want to return - // the actual hook object instead of the result - const returnHook = args[args.length - 1] === true - ? args.pop() : false; - - // A reference to the original method - const _super = service._super.bind(service); - // Create the hook object that gets passed through - const hookObject = createHookObject(method, { - type: 'before', // initial hook object type - service, - app - }); const argsList = Object.assign({}, argumentsOrders, serviceMethods); // A hook that validates the arguments and will always be the very first const validateHook = context => { - validateArguments(argsList, method, args); + validateArguments(argsList, method, context.arguments); return context; }; - // A hook that pick arguments for methods defined in - // `argumentsOrder` (top of file) and `service.methods` - const pickArgsHook = context => { - const argsObject = args.reduce( - (result, value, index) => Object.assign(result, { [argsList[method][index]]: value }), - { params: {} } - ); - - Object.assign(context, argsObject); - - return context; - }; - - // The `before` hook chain (including the validation hook) - const beforeHooks = [ validateHook, pickArgsHook, ...getHooks(app, service, 'before', method) ]; - - // Process all before hooks - return processHooks.call(service, beforeHooks, hookObject) - // Use the hook object to call the original method - .then(hookObject => { - // If `hookObject.result` is set, skip the original method - if (typeof hookObject.result !== 'undefined') { - return hookObject; - } + // Needed + service._super = service._super.bind(service); - // Otherwise, call it with arguments created from the hook object - const promise = _super(...makeArguments(hookObject)); - - if (!isPromise(promise)) { - throw new Error(`Service method '${hookObject.method}' for '${hookObject.path}' service must return a promise`); - } - - return promise.then(result => { - hookObject.result = result; - - return hookObject; - }); - }) - // Make a (shallow) copy of hookObject from `before` hooks and update type - .then(hookObject => Object.assign({}, hookObject, { type: 'after' })) - // Run through all `after` hooks - .then(hookObject => { - // Combine all app and service `after` and `finally` hooks and process - const afterHooks = getHooks(app, service, 'after', method, true); - const finallyHooks = getHooks(app, service, 'finally', method, true); - const hookChain = afterHooks.concat(finallyHooks); - - return processHooks.call(service, hookChain, hookObject); - }) - .then(hookObject => - // Finally, return the result - // Or the hook object if the `returnHook` flag is set - returnHook ? hookObject : hookObject.result - ) - // Handle errors - .catch(error => { - // Combine all app and service `error` and `finally` hooks and process - const errorHooks = getHooks(app, service, 'error', method, true); - const finallyHooks = getHooks(app, service, 'finally', method, true); - const hookChain = errorHooks.concat(finallyHooks); - - // A shallow copy of the hook object - const errorHookObject = Object.assign({}, error.hook, hookObject, { - type: 'error', - result: null, - original: error.hook, - error - }); - - return processHooks.call(service, hookChain, errorHookObject) - .catch(error => { - errorHookObject.error = error; - - return errorHookObject; - }) - .then(hook => { - if (returnHook) { - // Either resolve or reject with the hook object - return hook.result ? hook : Promise.reject(hook); - } - - // Otherwise return either the result if set (to swallow errors) - // Or reject with the hook error - return hook.result ? hook.result : Promise.reject(hook.error); - }); - }); + return withHooks({ + app, + service, + method + })({ + before: [ + validateHook, + ...getHooks(app, service, 'before', method) + ], + after: getHooks(app, service, 'after', method, true), + error: getHooks(app, service, 'error', method, true), + finally: getHooks(app, service, 'finally', method, true) + })(...args); }; }); @@ -169,3 +199,5 @@ module.exports = function () { app.mixins.push(hookMixin); }; }; + +module.exports.withHooks = withHooks; From 8fe66d3b33d84cac207a3af3fe6a1ec82aaaf917 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Berthommier?= Date: Sun, 27 May 2018 20:55:48 +0200 Subject: [PATCH 11/24] add tests for withHooks --- test/hooks/with-hooks.test.js | 114 ++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100755 test/hooks/with-hooks.test.js diff --git a/test/hooks/with-hooks.test.js b/test/hooks/with-hooks.test.js new file mode 100755 index 0000000000..a5a92be30e --- /dev/null +++ b/test/hooks/with-hooks.test.js @@ -0,0 +1,114 @@ + +const assert = require('assert'); +const feathers = require('../../lib'); +const { withHooks } = require('../../lib/hooks'); + +function createApp (findResult) { + return feathers() + .use('svc', { + create (data) { + return Promise.resolve(data); + }, + find () { + return Promise.resolve(findResult); + } + }); +} + +const testHook = hook => { + hook._called = 'called'; + return hook; +}; + +describe('services withHooks', () => { + it('get expected hook & object result', () => { + const data = { name: 'john' }; + const params = {}; + + const app = createApp(); + const svc = app.service('svc'); + + return withHooks({ + app, + service: svc, + method: 'create' + })({ + before: testHook + })(data, params, true) + .then(hook => { + assert.deepEqual(hook.result, data, 'test result'); + assert.deepEqual(hook, { + app, + params, + service: svc, + method: 'create', + path: 'svc', + data, + arguments: [data, params], + _called: 'called', + result: data, + type: 'after' + }, 'test hook'); + }); + }); + + it('get expected array result', () => { + const data = [{ name: 'john' }]; + + const app = createApp(); + const svc = app.service('svc'); + + return withHooks({ + app, + service: svc, + method: 'create' + })({ + before: testHook + })(data) + .then(result => { + assert.deepEqual(result, data, 'test result'); + }); + }); + + it('get expected find result', () => { + const data = { total: 1, data: [{ name: 'john' }] }; + + const app = createApp(data); + const svc = app.service('svc'); + + return withHooks({ + app, + service: svc, + method: 'find' + })({ + before: testHook + })() + .then(result => { + assert.deepEqual(result, data, 'test result'); + }); + }); + + it('test using keep hook', () => { + const data = [{ name: 'John', job: 'dev', address: { city: 'Montreal', postal: 'H4T 2A1' } }]; + + const app = createApp(); + const svc = app.service('svc'); + + return withHooks({ + app, + service: svc, + method: 'create' + })({ + after: context => { + (Array.isArray(context.result) ? context.result : [context.result]) + .forEach(value => { + delete value.job; + delete value.address.postal; + }); + } + })(data) + .then(result => { + assert.deepEqual(result, [{ name: 'John', address: { city: 'Montreal' } }]); + }); + }); +}); From e6e0df0ce9887a6d2c6e4936c1c6917582b246c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Berthommier?= Date: Sun, 27 May 2018 22:31:22 +0200 Subject: [PATCH 12/24] fix getHookArray --- lib/hooks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/hooks.js b/lib/hooks.js index 3f08ee96e3..2647e4f978 100644 --- a/lib/hooks.js +++ b/lib/hooks.js @@ -20,7 +20,7 @@ const argumentsOrders = { function getHookArray (hooks, type) { return hooks && hooks[type] && Array.isArray(hooks[type]) ? hooks[type] - : hooks[type] + : hooks && hooks[type] ? [hooks[type]] : []; } From 0715859463add2ba374f2e76e039bcfa22278727 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Berthommier?= Date: Thu, 31 May 2018 23:17:16 +0200 Subject: [PATCH 13/24] replace Object.assign by assignation --- lib/hooks.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/hooks.js b/lib/hooks.js index 389a4b5445..92a686ae06 100644 --- a/lib/hooks.js +++ b/lib/hooks.js @@ -67,7 +67,10 @@ const hookMixin = exports.hookMixin = function hookMixin (service) { // `argumentsOrder` (top of file) and `service.methods` const pickArgsHook = context => { const argsObject = args.reduce( - (result, value, index) => Object.assign(result, { [argsList[method][index]]: value }), + (result, value, index) => { + result[argsList[method][index]] = value; + return result; + }, { params: {} } ); From 390abfc24dd3fd3f030e5278fc4b92371feeb59c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Berthommier?= Date: Thu, 31 May 2018 23:26:17 +0200 Subject: [PATCH 14/24] simplify names --- lib/hooks.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/hooks.js b/lib/hooks.js index 92a686ae06..c49e060468 100644 --- a/lib/hooks.js +++ b/lib/hooks.js @@ -24,15 +24,15 @@ const hookMixin = exports.hookMixin = function hookMixin (service) { } const app = this; - const serviceMethods = service.methods || {}; - const methods = app.methods.concat(Object.keys(serviceMethods)); + const methods = Object.assign({}, argumentsOrders, service.methods || {}); + const methodNames = Object.keys(methods); const mixin = {}; // Add .hooks method and properties to the service - enableHooks(service, methods, app.hookTypes); + enableHooks(service, methodNames, app.hookTypes); // Assemble the mixin object that contains all "hooked" service methods - methods.forEach(method => { + methodNames.forEach(method => { if (typeof service[method] !== 'function') { return; } @@ -54,11 +54,9 @@ const hookMixin = exports.hookMixin = function hookMixin (service) { app }); - const argsList = Object.assign({}, argumentsOrders, serviceMethods); - // A hook that validates the arguments and will always be the very first const validateHook = context => { - validateArguments(argsList, method, args); + validateArguments(methods, method, args); return context; }; @@ -68,7 +66,7 @@ const hookMixin = exports.hookMixin = function hookMixin (service) { const pickArgsHook = context => { const argsObject = args.reduce( (result, value, index) => { - result[argsList[method][index]] = value; + result[methods[method][index]] = value; return result; }, { params: {} } From df90c05067ec693a70df8c18f0f091024676a1c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Berthommier?= Date: Sun, 3 Jun 2018 18:00:18 +0200 Subject: [PATCH 15/24] add activeHooks method --- lib/hooks.js | 36 +++++++++++++++++++++++++++--------- lib/index.js | 3 +++ test/hooks/hooks.test.js | 22 +++++++++++++++++++--- 3 files changed, 49 insertions(+), 12 deletions(-) diff --git a/lib/hooks.js b/lib/hooks.js index c49e060468..529da0b89f 100644 --- a/lib/hooks.js +++ b/lib/hooks.js @@ -8,14 +8,9 @@ const { makeArguments } = hooks; -const argumentsOrders = { - find: ['params'], - get: ['id', 'params'], - create: ['data', 'params'], - update: ['id', 'data', 'params'], - patch: ['id', 'data', 'params'], - remove: ['id', 'params'] -}; +const ACTIVE_HOOKS = typeof Symbol !== 'undefined' + ? Symbol('__feathersActiveHooks') + : '__feathersActiveHooks'; // A service mixin that adds `service.hooks()` method and functionality const hookMixin = exports.hookMixin = function hookMixin (service) { @@ -23,8 +18,22 @@ const hookMixin = exports.hookMixin = function hookMixin (service) { return; } + service.methods = Object.keys(service) + .filter(key => typeof service[key] === 'function' && service[key][ACTIVE_HOOKS]) + .reduce((result, methodName) => { + result[methodName] = service[methodName][ACTIVE_HOOKS]; + return result; + }, service.methods || {}); + const app = this; - const methods = Object.assign({}, argumentsOrders, service.methods || {}); + const methods = Object.assign({ + find: ['params'], + get: ['id', 'params'], + create: ['data', 'params'], + update: ['id', 'data', 'params'], + patch: ['id', 'data', 'params'], + remove: ['id', 'params'] + }, service.methods); const methodNames = Object.keys(methods); const mixin = {}; @@ -169,3 +178,12 @@ module.exports = function () { app.mixins.push(hookMixin); }; }; + +module.exports.ACTIVE_HOOKS = ACTIVE_HOOKS; + +module.exports.activeHooks = function activeHooks (args) { + return fn => { + fn[ACTIVE_HOOKS] = args; + return fn; + }; +}; diff --git a/lib/index.js b/lib/index.js index b2ffeae80e..e1f52ba969 100644 --- a/lib/index.js +++ b/lib/index.js @@ -2,6 +2,7 @@ const { hooks } = require('@feathersjs/commons'); const Proto = require('uberproto'); const Application = require('./application'); const version = require('./version'); +const { ACTIVE_HOOKS, activeHooks } = require('./hooks'); function createApplication () { const app = {}; @@ -16,6 +17,8 @@ function createApplication () { createApplication.version = version; createApplication.SKIP = hooks.SKIP; +createApplication.ACTIVE_HOOKS = ACTIVE_HOOKS; +createApplication.activeHooks = activeHooks; module.exports = createApplication; diff --git a/test/hooks/hooks.test.js b/test/hooks/hooks.test.js index a8c1a6fa2d..d137430f62 100644 --- a/test/hooks/hooks.test.js +++ b/test/hooks/hooks.test.js @@ -243,7 +243,7 @@ describe('hooks basics', () => { }); }); - it('can register hooks on a custom method', () => { + it('can register hooks on a custom method', async () => { const app = feathers().use('/dummy', { methods: { custom: ['id', 'data', 'params'] @@ -251,7 +251,13 @@ describe('hooks basics', () => { get () {}, custom (id, data, params) { return Promise.resolve([id, data, params]); - } + }, + // activeHooks is usable as a decorator: @activeHooks(['id', 'data', 'params']) + other: feathers.activeHooks(['id', 'data', 'params'])( + (id, data, params) => { + return Promise.resolve([id, data, params]); + } + ) }); app.service('dummy').hooks({ @@ -275,9 +281,19 @@ describe('hooks basics', () => { const args = [1, { test: 'ok' }, { provider: 'rest' }]; - return app.service('dummy').custom(...args, true).then(hook => { + assert.deepEqual(app.service('dummy').methods, { + custom: ['id', 'data', 'params'], + other: ['id', 'data', 'params'] + }); + + await app.service('dummy').custom(...args, true).then(hook => { assert.deepEqual(hook.result, args); assert.deepEqual(hook.test, ['all::before', 'custom::before', 'all::after', 'custom::after']); }); + + return app.service('dummy').other(...args, true).then(hook => { + assert.deepEqual(hook.result, args); + assert.deepEqual(hook.test, ['all::before', 'all::after']); + }); }); }); From ab6f3591e5b04120ddf486decabfa829f420cfae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Berthommier?= Date: Mon, 4 Jun 2018 00:34:35 +0200 Subject: [PATCH 16/24] all methods in service.methods --- lib/hooks.js | 13 +++++++------ test/hooks/hooks.test.js | 6 ++++++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/lib/hooks.js b/lib/hooks.js index 529da0b89f..e5b0543ad0 100644 --- a/lib/hooks.js +++ b/lib/hooks.js @@ -25,16 +25,17 @@ const hookMixin = exports.hookMixin = function hookMixin (service) { return result; }, service.methods || {}); - const app = this; - const methods = Object.assign({ + service.methods = Object.assign(service.methods, { find: ['params'], get: ['id', 'params'], create: ['data', 'params'], update: ['id', 'data', 'params'], patch: ['id', 'data', 'params'], remove: ['id', 'params'] - }, service.methods); - const methodNames = Object.keys(methods); + }); + + const app = this; + const methodNames = Object.keys(service.methods); const mixin = {}; // Add .hooks method and properties to the service @@ -65,7 +66,7 @@ const hookMixin = exports.hookMixin = function hookMixin (service) { // A hook that validates the arguments and will always be the very first const validateHook = context => { - validateArguments(methods, method, args); + validateArguments(service.methods, method, args); return context; }; @@ -75,7 +76,7 @@ const hookMixin = exports.hookMixin = function hookMixin (service) { const pickArgsHook = context => { const argsObject = args.reduce( (result, value, index) => { - result[methods[method][index]] = value; + result[service.methods[method][index]] = value; return result; }, { params: {} } diff --git a/test/hooks/hooks.test.js b/test/hooks/hooks.test.js index d137430f62..f5c2e3b1c8 100644 --- a/test/hooks/hooks.test.js +++ b/test/hooks/hooks.test.js @@ -282,6 +282,12 @@ describe('hooks basics', () => { const args = [1, { test: 'ok' }, { provider: 'rest' }]; assert.deepEqual(app.service('dummy').methods, { + find: ['params'], + get: ['id', 'params'], + create: ['data', 'params'], + update: ['id', 'data', 'params'], + patch: ['id', 'data', 'params'], + remove: ['id', 'params'], custom: ['id', 'data', 'params'], other: ['id', 'data', 'params'] }); From 84e8c31ded4ae9c09aabcaeb9f4183305c9cbbd2 Mon Sep 17 00:00:00 2001 From: Bertho Date: Mon, 4 Jun 2018 09:55:42 +0200 Subject: [PATCH 17/24] rename activeHooks to activateHooks --- lib/hooks.js | 16 ++++++++-------- lib/index.js | 6 +++--- test/hooks/hooks.test.js | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/hooks.js b/lib/hooks.js index e5b0543ad0..243f4c34df 100644 --- a/lib/hooks.js +++ b/lib/hooks.js @@ -8,9 +8,9 @@ const { makeArguments } = hooks; -const ACTIVE_HOOKS = typeof Symbol !== 'undefined' - ? Symbol('__feathersActiveHooks') - : '__feathersActiveHooks'; +const ACTIVATE_HOOKS = typeof Symbol !== 'undefined' + ? Symbol('__feathersActivateHooks') + : '__feathersActivateHooks'; // A service mixin that adds `service.hooks()` method and functionality const hookMixin = exports.hookMixin = function hookMixin (service) { @@ -19,9 +19,9 @@ const hookMixin = exports.hookMixin = function hookMixin (service) { } service.methods = Object.keys(service) - .filter(key => typeof service[key] === 'function' && service[key][ACTIVE_HOOKS]) + .filter(key => typeof service[key] === 'function' && service[key][ACTIVATE_HOOKS]) .reduce((result, methodName) => { - result[methodName] = service[methodName][ACTIVE_HOOKS]; + result[methodName] = service[methodName][ACTIVATE_HOOKS]; return result; }, service.methods || {}); @@ -180,11 +180,11 @@ module.exports = function () { }; }; -module.exports.ACTIVE_HOOKS = ACTIVE_HOOKS; +module.exports.ACTIVATE_HOOKS = ACTIVATE_HOOKS; -module.exports.activeHooks = function activeHooks (args) { +module.exports.activateHooks = function activateHooks (args) { return fn => { - fn[ACTIVE_HOOKS] = args; + fn[ACTIVATE_HOOKS] = args; return fn; }; }; diff --git a/lib/index.js b/lib/index.js index e1f52ba969..e004f6621a 100644 --- a/lib/index.js +++ b/lib/index.js @@ -2,7 +2,7 @@ const { hooks } = require('@feathersjs/commons'); const Proto = require('uberproto'); const Application = require('./application'); const version = require('./version'); -const { ACTIVE_HOOKS, activeHooks } = require('./hooks'); +const { ACTIVATE_HOOKS, activateHooks } = require('./hooks'); function createApplication () { const app = {}; @@ -17,8 +17,8 @@ function createApplication () { createApplication.version = version; createApplication.SKIP = hooks.SKIP; -createApplication.ACTIVE_HOOKS = ACTIVE_HOOKS; -createApplication.activeHooks = activeHooks; +createApplication.ACTIVATE_HOOKS = ACTIVATE_HOOKS; +createApplication.activateHooks = activateHooks; module.exports = createApplication; diff --git a/test/hooks/hooks.test.js b/test/hooks/hooks.test.js index f5c2e3b1c8..7a8aa4ce4d 100644 --- a/test/hooks/hooks.test.js +++ b/test/hooks/hooks.test.js @@ -252,8 +252,8 @@ describe('hooks basics', () => { custom (id, data, params) { return Promise.resolve([id, data, params]); }, - // activeHooks is usable as a decorator: @activeHooks(['id', 'data', 'params']) - other: feathers.activeHooks(['id', 'data', 'params'])( + // activateHooks is usable as a decorator: @activateHooks(['id', 'data', 'params']) + other: feathers.activateHooks(['id', 'data', 'params'])( (id, data, params) => { return Promise.resolve([id, data, params]); } From c9ffd1b09d449babb87a0afcebf544e398ea6eeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Berthommier?= Date: Mon, 4 Jun 2018 22:35:46 +0200 Subject: [PATCH 18/24] remove useless assignation --- lib/hooks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/hooks.js b/lib/hooks.js index e5b0543ad0..2a4e68b911 100644 --- a/lib/hooks.js +++ b/lib/hooks.js @@ -25,7 +25,7 @@ const hookMixin = exports.hookMixin = function hookMixin (service) { return result; }, service.methods || {}); - service.methods = Object.assign(service.methods, { + Object.assign(service.methods, { find: ['params'], get: ['id', 'params'], create: ['data', 'params'], From 96b914410eb49416d95af993e833946b31442875 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Berthommier?= Date: Mon, 23 Jul 2018 21:32:41 +0200 Subject: [PATCH 19/24] use Object.getOwnPropertyNames instead of Object.keys --- lib/hooks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/hooks.js b/lib/hooks.js index fa66d0a31d..3353346572 100644 --- a/lib/hooks.js +++ b/lib/hooks.js @@ -18,7 +18,7 @@ const hookMixin = exports.hookMixin = function hookMixin (service) { return; } - service.methods = Object.keys(service) + service.methods = Object.getOwnPropertyNames(service) .filter(key => typeof service[key] === 'function' && service[key][ACTIVATE_HOOKS]) .reduce((result, methodName) => { result[methodName] = service[methodName][ACTIVATE_HOOKS]; From 4727b7ddae98bedc85978dd7357ec61c55db8869 Mon Sep 17 00:00:00 2001 From: Bertho Date: Fri, 3 Aug 2018 10:04:12 +0200 Subject: [PATCH 20/24] update @featherjs/commons --- package-lock.json | 954 +++++++++++++++++++++++----------------------- package.json | 2 +- 2 files changed, 478 insertions(+), 478 deletions(-) diff --git a/package-lock.json b/package-lock.json index 88974b2d85..2940832cdc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,9 +5,9 @@ "requires": true, "dependencies": { "@feathersjs/commons": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@feathersjs/commons/-/commons-1.4.0.tgz", - "integrity": "sha512-21/E+KpFJO32fK8snn9kVCWi7R3C2CEPUsuxgYg61mKqydXBvo0lDzMfhp//o4pu9rdZrvNSGyb32Gvi3eK3OA==" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@feathersjs/commons/-/commons-2.0.0.tgz", + "integrity": "sha512-DZV4sYYZ1sTWyS/B+y7RWhUhohS3gRvdwGk+Asia5j+fURHdwJDjEDvBgjYRudM4eGuxuRiJwf0iK/VqGvCvsw==" }, "abbrev": { "version": "1.0.9", @@ -27,7 +27,7 @@ "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", "dev": true, "requires": { - "acorn": "^3.0.4" + "acorn": "3.3.0" }, "dependencies": { "acorn": { @@ -44,7 +44,7 @@ "integrity": "sha512-c+R/U5X+2zz2+UCrCFv6odQzJdoqI+YecuhnAJLa1zYaMc13zPfwMwZrr91Pd1DYNo/yPRbiM4WVf9whgwFsIg==", "dev": true, "requires": { - "es6-promisify": "^5.0.0" + "es6-promisify": "5.0.0" } }, "align-text": { @@ -53,9 +53,9 @@ "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", "dev": true, "requires": { - "kind-of": "^3.0.2", - "longest": "^1.0.1", - "repeat-string": "^1.5.2" + "kind-of": "3.2.2", + "longest": "1.0.1", + "repeat-string": "1.6.1" } }, "amdefine": { @@ -88,7 +88,7 @@ "integrity": "sha1-126/jKlNJ24keja61EpLdKthGZE=", "dev": true, "requires": { - "default-require-extensions": "^1.0.0" + "default-require-extensions": "1.0.0" } }, "argparse": { @@ -97,7 +97,7 @@ "integrity": "sha1-c9g7wmP4bpf4zE9rrhsOkKfSLIY=", "dev": true, "requires": { - "sprintf-js": "~1.0.2" + "sprintf-js": "1.0.3" } }, "array-includes": { @@ -106,8 +106,8 @@ "integrity": "sha1-GEtI9i2S10UrsxsyMWXH+L0CJm0=", "dev": true, "requires": { - "define-properties": "^1.1.2", - "es-abstract": "^1.7.0" + "define-properties": "1.1.2", + "es-abstract": "1.10.0" } }, "array-union": { @@ -116,7 +116,7 @@ "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", "dev": true, "requires": { - "array-uniq": "^1.0.1" + "array-uniq": "1.0.3" } }, "array-uniq": { @@ -149,9 +149,9 @@ "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", "dev": true, "requires": { - "chalk": "^1.1.3", - "esutils": "^2.0.2", - "js-tokens": "^3.0.2" + "chalk": "1.1.3", + "esutils": "2.0.2", + "js-tokens": "3.0.2" } }, "babel-generator": { @@ -160,14 +160,14 @@ "integrity": "sha1-rBriAHC3n248odMmlhMFN3TyDcU=", "dev": true, "requires": { - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "detect-indent": "^4.0.0", - "jsesc": "^1.3.0", - "lodash": "^4.17.4", - "source-map": "^0.5.6", - "trim-right": "^1.0.1" + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "detect-indent": "4.0.0", + "jsesc": "1.3.0", + "lodash": "4.17.4", + "source-map": "0.5.7", + "trim-right": "1.0.1" } }, "babel-messages": { @@ -176,7 +176,7 @@ "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "babel-runtime": "6.26.0" } }, "babel-runtime": { @@ -185,8 +185,8 @@ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" + "core-js": "2.5.1", + "regenerator-runtime": "0.11.0" } }, "babel-template": { @@ -195,11 +195,11 @@ "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", "dev": true, "requires": { - "babel-runtime": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "lodash": "^4.17.4" + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "lodash": "4.17.4" } }, "babel-traverse": { @@ -208,15 +208,15 @@ "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", "dev": true, "requires": { - "babel-code-frame": "^6.26.0", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "debug": "^2.6.8", - "globals": "^9.18.0", - "invariant": "^2.2.2", - "lodash": "^4.17.4" + "babel-code-frame": "6.26.0", + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "debug": "2.6.9", + "globals": "9.18.0", + "invariant": "2.2.2", + "lodash": "4.17.4" }, "dependencies": { "debug": { @@ -236,10 +236,10 @@ "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", "dev": true, "requires": { - "babel-runtime": "^6.26.0", - "esutils": "^2.0.2", - "lodash": "^4.17.4", - "to-fast-properties": "^1.0.3" + "babel-runtime": "6.26.0", + "esutils": "2.0.2", + "lodash": "4.17.4", + "to-fast-properties": "1.0.3" } }, "babylon": { @@ -260,7 +260,7 @@ "integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==", "dev": true, "requires": { - "hoek": "4.x.x" + "hoek": "4.2.1" } }, "brace-expansion": { @@ -269,7 +269,7 @@ "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", "dev": true, "requires": { - "balanced-match": "^1.0.0", + "balanced-match": "1.0.0", "concat-map": "0.0.1" } }, @@ -291,7 +291,7 @@ "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", "dev": true, "requires": { - "callsites": "^0.2.0" + "callsites": "0.2.0" } }, "callsites": { @@ -314,8 +314,8 @@ "dev": true, "optional": true, "requires": { - "align-text": "^0.1.3", - "lazy-cache": "^1.0.3" + "align-text": "0.1.4", + "lazy-cache": "1.0.4" } }, "chalk": { @@ -324,11 +324,11 @@ "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" } }, "chardet": { @@ -350,7 +350,7 @@ "dev": true, "requires": { "exit": "0.1.2", - "glob": "^7.1.1" + "glob": "7.1.2" } }, "cli-cursor": { @@ -359,7 +359,7 @@ "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", "dev": true, "requires": { - "restore-cursor": "^2.0.0" + "restore-cursor": "2.0.0" } }, "cli-table2": { @@ -368,9 +368,9 @@ "integrity": "sha1-LR738hig54biFFQFYtS9F3/jLZc=", "dev": true, "requires": { - "colors": "^1.1.2", - "lodash": "^3.10.1", - "string-width": "^1.0.1" + "colors": "1.2.4", + "lodash": "3.10.1", + "string-width": "1.0.2" }, "dependencies": { "lodash": { @@ -394,8 +394,8 @@ "dev": true, "optional": true, "requires": { - "center-align": "^0.1.1", - "right-align": "^0.1.1", + "center-align": "0.1.3", + "right-align": "0.1.3", "wordwrap": "0.0.2" }, "dependencies": { @@ -426,7 +426,7 @@ "integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==", "dev": true, "requires": { - "color-name": "^1.1.1" + "color-name": "1.1.3" } }, "color-name": { @@ -460,9 +460,9 @@ "integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=", "dev": true, "requires": { - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" + "inherits": "2.0.3", + "readable-stream": "2.3.3", + "typedarray": "0.0.6" }, "dependencies": { "isarray": { @@ -477,13 +477,13 @@ "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", "dev": true, "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~1.0.6", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.0.3", - "util-deprecate": "~1.0.1" + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "1.0.2" } }, "string_decoder": { @@ -492,7 +492,7 @@ "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", "dev": true, "requires": { - "safe-buffer": "~5.1.0" + "safe-buffer": "5.1.1" } } } @@ -503,7 +503,7 @@ "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", "dev": true, "requires": { - "date-now": "^0.1.4" + "date-now": "0.1.4" } }, "contains-path": { @@ -530,9 +530,9 @@ "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", "dev": true, "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "lru-cache": "4.1.1", + "shebang-command": "1.2.0", + "which": "1.3.0" } }, "cvss": { @@ -579,7 +579,7 @@ "integrity": "sha1-836hXT4T/9m0N9M+GnW1+5eHTLg=", "dev": true, "requires": { - "strip-bom": "^2.0.0" + "strip-bom": "2.0.0" } }, "define-properties": { @@ -588,8 +588,8 @@ "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", "dev": true, "requires": { - "foreach": "^2.0.5", - "object-keys": "^1.0.8" + "foreach": "2.0.5", + "object-keys": "1.0.11" } }, "deglob": { @@ -598,12 +598,12 @@ "integrity": "sha1-TUSr4W7zLHebSXK9FBqAMlApoUo=", "dev": true, "requires": { - "find-root": "^1.0.0", - "glob": "^7.0.5", - "ignore": "^3.0.9", - "pkg-config": "^1.1.0", - "run-parallel": "^1.1.2", - "uniq": "^1.0.1" + "find-root": "1.1.0", + "glob": "7.1.2", + "ignore": "3.3.7", + "pkg-config": "1.1.1", + "run-parallel": "1.1.6", + "uniq": "1.0.1" } }, "del": { @@ -612,13 +612,13 @@ "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", "dev": true, "requires": { - "globby": "^5.0.0", - "is-path-cwd": "^1.0.0", - "is-path-in-cwd": "^1.0.0", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "rimraf": "^2.2.8" + "globby": "5.0.0", + "is-path-cwd": "1.0.0", + "is-path-in-cwd": "1.0.0", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "rimraf": "2.6.2" } }, "detect-indent": { @@ -627,7 +627,7 @@ "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", "dev": true, "requires": { - "repeating": "^2.0.0" + "repeating": "2.0.1" } }, "diff": { @@ -642,7 +642,7 @@ "integrity": "sha512-y0tm5Pq6ywp3qSTZ1vPgVdAnbDEoeoc5wlOHXoY1c4Wug/a7JvqHIl7BTvwodaHmejWkK/9dSb3sCYfyo/om8A==", "dev": true, "requires": { - "esutils": "^2.0.2" + "esutils": "2.0.2" } }, "dom-serializer": { @@ -651,8 +651,8 @@ "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=", "dev": true, "requires": { - "domelementtype": "~1.1.1", - "entities": "~1.1.1" + "domelementtype": "1.1.3", + "entities": "1.1.1" }, "dependencies": { "domelementtype": { @@ -681,7 +681,7 @@ "integrity": "sha1-LeWaCCLVAn+r/28DLCsloqir5zg=", "dev": true, "requires": { - "domelementtype": "1" + "domelementtype": "1.3.0" } }, "domutils": { @@ -690,8 +690,8 @@ "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", "dev": true, "requires": { - "dom-serializer": "0", - "domelementtype": "1" + "dom-serializer": "0.1.0", + "domelementtype": "1.3.0" } }, "encoding": { @@ -700,7 +700,7 @@ "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", "dev": true, "requires": { - "iconv-lite": "~0.4.13" + "iconv-lite": "0.4.19" } }, "entities": { @@ -715,7 +715,7 @@ "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", "dev": true, "requires": { - "is-arrayish": "^0.2.1" + "is-arrayish": "0.2.1" } }, "es-abstract": { @@ -724,11 +724,11 @@ "integrity": "sha512-/uh/DhdqIOSkAWifU+8nG78vlQxdLckUdI/sPgy0VhuXi2qJ7T8czBmqIYtLQVpCIFYafChnsRsB5pyb1JdmCQ==", "dev": true, "requires": { - "es-to-primitive": "^1.1.1", - "function-bind": "^1.1.1", - "has": "^1.0.1", - "is-callable": "^1.1.3", - "is-regex": "^1.0.4" + "es-to-primitive": "1.1.1", + "function-bind": "1.1.1", + "has": "1.0.1", + "is-callable": "1.1.3", + "is-regex": "1.0.4" } }, "es-to-primitive": { @@ -737,9 +737,9 @@ "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", "dev": true, "requires": { - "is-callable": "^1.1.1", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.1" + "is-callable": "1.1.3", + "is-date-object": "1.0.1", + "is-symbol": "1.0.1" } }, "es6-promise": { @@ -754,7 +754,7 @@ "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=", "dev": true, "requires": { - "es6-promise": "^4.0.3" + "es6-promise": "4.2.4" } }, "escape-string-regexp": { @@ -769,8 +769,8 @@ "integrity": "sha512-jDI/X5l/6D1rRD/3T43q8Qgbls2nq5km5KSqiwlyUbGo5+04fXhMKdCPhjwbqAa6HXWaMxj8Q4hQDIh7IadJQw==", "dev": true, "requires": { - "debug": "^2.6.8", - "pkg-dir": "^1.0.0" + "debug": "2.6.9", + "pkg-dir": "1.0.0" }, "dependencies": { "debug": { @@ -796,8 +796,8 @@ "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", "dev": true, "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" + "esrecurse": "4.2.0", + "estraverse": "4.2.0" } }, "eslint-visitor-keys": { @@ -812,8 +812,8 @@ "integrity": "sha512-sadKeYwaR/aJ3stC2CdvgXu1T16TdYN+qwCpcWbMnGJ8s0zNWemzrvb2GbD4OhmJ/fwpJjudThAlLobGbWZbCQ==", "dev": true, "requires": { - "acorn": "^5.2.1", - "acorn-jsx": "^3.0.0" + "acorn": "5.2.1", + "acorn-jsx": "3.0.1" } }, "esprima": { @@ -828,7 +828,7 @@ "integrity": "sha1-z7qLV9f7qT8XKYqKAGoEzaE9gPo=", "dev": true, "requires": { - "estraverse": "^4.0.0" + "estraverse": "4.2.0" } }, "esrecurse": { @@ -837,8 +837,8 @@ "integrity": "sha1-+pVo2Y04I/mkHZHpAtyrnqblsWM=", "dev": true, "requires": { - "estraverse": "^4.1.0", - "object-assign": "^4.0.1" + "estraverse": "4.2.0", + "object-assign": "4.1.1" } }, "estraverse": { @@ -864,13 +864,13 @@ "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", "dev": true, "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" + "cross-spawn": "5.1.0", + "get-stream": "3.0.0", + "is-stream": "1.1.0", + "npm-run-path": "2.0.2", + "p-finally": "1.0.0", + "signal-exit": "3.0.2", + "strip-eof": "1.0.0" } }, "exit": { @@ -885,9 +885,9 @@ "integrity": "sha512-E44iT5QVOUJBKij4IIV3uvxuNlbKS38Tw1HiupxEIHPv9qtC2PrDYohbXV5U+1jnfIXttny8gUhj+oZvflFlzA==", "dev": true, "requires": { - "chardet": "^0.4.0", - "iconv-lite": "^0.4.17", - "tmp": "^0.0.33" + "chardet": "0.4.2", + "iconv-lite": "0.4.19", + "tmp": "0.0.33" } }, "fast-deep-equal": { @@ -914,13 +914,13 @@ "integrity": "sha1-XmdDL1UNxBtXK/VYR7ispk5TN9s=", "dev": true, "requires": { - "core-js": "^1.0.0", - "isomorphic-fetch": "^2.1.1", - "loose-envify": "^1.0.0", - "object-assign": "^4.1.0", - "promise": "^7.1.1", - "setimmediate": "^1.0.5", - "ua-parser-js": "^0.7.9" + "core-js": "1.2.7", + "isomorphic-fetch": "2.2.1", + "loose-envify": "1.3.1", + "object-assign": "4.1.1", + "promise": "7.3.1", + "setimmediate": "1.0.5", + "ua-parser-js": "0.7.17" }, "dependencies": { "core-js": { @@ -937,7 +937,7 @@ "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", "dev": true, "requires": { - "escape-string-regexp": "^1.0.5" + "escape-string-regexp": "1.0.5" } }, "file-entry-cache": { @@ -946,8 +946,8 @@ "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", "dev": true, "requires": { - "flat-cache": "^1.2.1", - "object-assign": "^4.0.1" + "flat-cache": "1.3.0", + "object-assign": "4.1.1" } }, "fileset": { @@ -956,8 +956,8 @@ "integrity": "sha1-jnVIqW08wjJ+5eZ0FocjozO7oqA=", "dev": true, "requires": { - "glob": "^7.0.3", - "minimatch": "^3.0.3" + "glob": "7.1.2", + "minimatch": "3.0.4" } }, "find-root": { @@ -972,7 +972,7 @@ "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", "dev": true, "requires": { - "locate-path": "^2.0.0" + "locate-path": "2.0.0" } }, "flat-cache": { @@ -981,10 +981,10 @@ "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", "dev": true, "requires": { - "circular-json": "^0.3.1", - "del": "^2.0.2", - "graceful-fs": "^4.1.2", - "write": "^0.2.1" + "circular-json": "0.3.3", + "del": "2.2.2", + "graceful-fs": "4.1.11", + "write": "0.2.1" } }, "foreach": { @@ -1035,12 +1035,12 @@ "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" + "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" } }, "globals": { @@ -1055,12 +1055,12 @@ "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", "dev": true, "requires": { - "array-union": "^1.0.1", - "arrify": "^1.0.0", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" + "array-union": "1.0.2", + "arrify": "1.0.1", + "glob": "7.1.2", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" } }, "graceful-fs": { @@ -1081,10 +1081,10 @@ "integrity": "sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=", "dev": true, "requires": { - "async": "^1.4.0", - "optimist": "^0.6.1", - "source-map": "^0.4.4", - "uglify-js": "^2.6" + "async": "1.5.2", + "optimist": "0.6.1", + "source-map": "0.4.4", + "uglify-js": "2.8.29" }, "dependencies": { "source-map": { @@ -1093,7 +1093,7 @@ "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", "dev": true, "requires": { - "amdefine": ">=0.0.4" + "amdefine": "1.0.1" } } } @@ -1104,7 +1104,7 @@ "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=", "dev": true, "requires": { - "function-bind": "^1.0.2" + "function-bind": "1.1.1" } }, "has-ansi": { @@ -1113,7 +1113,7 @@ "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "ansi-regex": "2.1.1" } }, "has-flag": { @@ -1146,11 +1146,11 @@ "integrity": "sha1-mWwosZFRaovoZQGn15dX5ccMEGg=", "dev": true, "requires": { - "domelementtype": "1", - "domhandler": "2.3", - "domutils": "1.5", - "entities": "1.0", - "readable-stream": "1.1" + "domelementtype": "1.3.0", + "domhandler": "2.3.0", + "domutils": "1.5.1", + "entities": "1.0.0", + "readable-stream": "1.1.14" } }, "https-proxy-agent": { @@ -1159,8 +1159,8 @@ "integrity": "sha512-HPCTS1LW51bcyMYbxUIOO4HEOlQ1/1qRaFWcyxvwaqUS9TY88aoEuHUY33kuAh1YhVVaDQhLZsnPd+XNARWZlQ==", "dev": true, "requires": { - "agent-base": "^4.1.0", - "debug": "^3.1.0" + "agent-base": "4.2.0", + "debug": "3.1.0" } }, "iconv-lite": { @@ -1187,8 +1187,8 @@ "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, "requires": { - "once": "^1.3.0", - "wrappy": "1" + "once": "1.4.0", + "wrappy": "1.0.2" } }, "inherits": { @@ -1203,20 +1203,20 @@ "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", "dev": true, "requires": { - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.0", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^2.0.4", - "figures": "^2.0.0", - "lodash": "^4.3.0", + "ansi-escapes": "3.0.0", + "chalk": "2.3.0", + "cli-cursor": "2.1.0", + "cli-width": "2.2.0", + "external-editor": "2.1.0", + "figures": "2.0.0", + "lodash": "4.17.4", "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rx-lite": "^4.0.8", - "rx-lite-aggregates": "^4.0.8", - "string-width": "^2.1.0", - "strip-ansi": "^4.0.0", - "through": "^2.3.6" + "run-async": "2.3.0", + "rx-lite": "4.0.8", + "rx-lite-aggregates": "4.0.8", + "string-width": "2.1.1", + "strip-ansi": "4.0.0", + "through": "2.3.8" }, "dependencies": { "ansi-regex": { @@ -1231,7 +1231,7 @@ "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", "dev": true, "requires": { - "color-convert": "^1.9.0" + "color-convert": "1.9.1" } }, "chalk": { @@ -1240,9 +1240,9 @@ "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", "dev": true, "requires": { - "ansi-styles": "^3.1.0", - "escape-string-regexp": "^1.0.5", - "supports-color": "^4.0.0" + "ansi-styles": "3.2.0", + "escape-string-regexp": "1.0.5", + "supports-color": "4.5.0" } }, "has-flag": { @@ -1263,8 +1263,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" } }, "strip-ansi": { @@ -1273,7 +1273,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "3.0.0" } }, "supports-color": { @@ -1282,7 +1282,7 @@ "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", "dev": true, "requires": { - "has-flag": "^2.0.0" + "has-flag": "2.0.0" } } } @@ -1293,7 +1293,7 @@ "integrity": "sha1-nh9WrArNtr8wMwbzOL47IErmA2A=", "dev": true, "requires": { - "loose-envify": "^1.0.0" + "loose-envify": "1.3.1" } }, "invert-kv": { @@ -1320,7 +1320,7 @@ "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", "dev": true, "requires": { - "builtin-modules": "^1.0.0" + "builtin-modules": "1.1.1" } }, "is-callable": { @@ -1341,7 +1341,7 @@ "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", "dev": true, "requires": { - "number-is-nan": "^1.0.0" + "number-is-nan": "1.0.1" } }, "is-fullwidth-code-point": { @@ -1350,7 +1350,7 @@ "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, "requires": { - "number-is-nan": "^1.0.0" + "number-is-nan": "1.0.1" } }, "is-path-cwd": { @@ -1365,7 +1365,7 @@ "integrity": "sha1-ZHdYK4IU1gI0YJRWcAO+ip6sBNw=", "dev": true, "requires": { - "is-path-inside": "^1.0.0" + "is-path-inside": "1.0.1" } }, "is-path-inside": { @@ -1374,7 +1374,7 @@ "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", "dev": true, "requires": { - "path-is-inside": "^1.0.1" + "path-is-inside": "1.0.2" } }, "is-promise": { @@ -1389,7 +1389,7 @@ "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", "dev": true, "requires": { - "has": "^1.0.1" + "has": "1.0.1" } }, "is-resolvable": { @@ -1398,7 +1398,7 @@ "integrity": "sha1-jfV8YeouPFAUCNEA+wE8+NbgzGI=", "dev": true, "requires": { - "tryit": "^1.0.1" + "tryit": "1.0.3" } }, "is-stream": { @@ -1437,8 +1437,8 @@ "integrity": "sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk=", "dev": true, "requires": { - "node-fetch": "^1.0.1", - "whatwg-fetch": ">=0.10.0" + "node-fetch": "1.7.3", + "whatwg-fetch": "2.0.3" } }, "istanbul": { @@ -1447,14 +1447,14 @@ "integrity": "sha1-eBeVZWAYohdMX2DzZ+5dNhy1e3c=", "dev": true, "requires": { - "abbrev": "1.0.x", - "async": "1.x", - "istanbul-api": "^1.1.0-alpha", - "js-yaml": "3.x", - "mkdirp": "0.5.x", - "nopt": "3.x", - "which": "^1.1.1", - "wordwrap": "^1.0.0" + "abbrev": "1.0.9", + "async": "1.5.2", + "istanbul-api": "1.2.1", + "js-yaml": "3.10.0", + "mkdirp": "0.5.1", + "nopt": "3.0.6", + "which": "1.3.0", + "wordwrap": "1.0.0" } }, "istanbul-api": { @@ -1463,17 +1463,17 @@ "integrity": "sha512-oFCwXvd65amgaPCzqrR+a2XjanS1MvpXN6l/MlMUTv6uiA1NOgGX+I0uyq8Lg3GDxsxPsaP1049krz3hIJ5+KA==", "dev": true, "requires": { - "async": "^2.1.4", - "fileset": "^2.0.2", - "istanbul-lib-coverage": "^1.1.1", - "istanbul-lib-hook": "^1.1.0", - "istanbul-lib-instrument": "^1.9.1", - "istanbul-lib-report": "^1.1.2", - "istanbul-lib-source-maps": "^1.2.2", - "istanbul-reports": "^1.1.3", - "js-yaml": "^3.7.0", - "mkdirp": "^0.5.1", - "once": "^1.4.0" + "async": "2.6.0", + "fileset": "2.0.3", + "istanbul-lib-coverage": "1.1.1", + "istanbul-lib-hook": "1.1.0", + "istanbul-lib-instrument": "1.9.1", + "istanbul-lib-report": "1.1.2", + "istanbul-lib-source-maps": "1.2.2", + "istanbul-reports": "1.1.3", + "js-yaml": "3.10.0", + "mkdirp": "0.5.1", + "once": "1.4.0" }, "dependencies": { "async": { @@ -1482,7 +1482,7 @@ "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", "dev": true, "requires": { - "lodash": "^4.14.0" + "lodash": "4.17.4" } } } @@ -1499,7 +1499,7 @@ "integrity": "sha512-U3qEgwVDUerZ0bt8cfl3dSP3S6opBoOtk3ROO5f2EfBr/SRiD9FQqzwaZBqFORu8W7O0EXpai+k7kxHK13beRg==", "dev": true, "requires": { - "append-transform": "^0.4.0" + "append-transform": "0.4.0" } }, "istanbul-lib-instrument": { @@ -1508,13 +1508,13 @@ "integrity": "sha512-RQmXeQ7sphar7k7O1wTNzVczF9igKpaeGQAG9qR2L+BS4DCJNTI9nytRmIVYevwO0bbq+2CXvJmYDuz0gMrywA==", "dev": true, "requires": { - "babel-generator": "^6.18.0", - "babel-template": "^6.16.0", - "babel-traverse": "^6.18.0", - "babel-types": "^6.18.0", - "babylon": "^6.18.0", - "istanbul-lib-coverage": "^1.1.1", - "semver": "^5.3.0" + "babel-generator": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "istanbul-lib-coverage": "1.1.1", + "semver": "5.4.1" } }, "istanbul-lib-report": { @@ -1523,10 +1523,10 @@ "integrity": "sha512-UTv4VGx+HZivJQwAo1wnRwe1KTvFpfi/NYwN7DcsrdzMXwpRT/Yb6r4SBPoHWj4VuQPakR32g4PUUeyKkdDkBA==", "dev": true, "requires": { - "istanbul-lib-coverage": "^1.1.1", - "mkdirp": "^0.5.1", - "path-parse": "^1.0.5", - "supports-color": "^3.1.2" + "istanbul-lib-coverage": "1.1.1", + "mkdirp": "0.5.1", + "path-parse": "1.0.5", + "supports-color": "3.2.3" }, "dependencies": { "supports-color": { @@ -1535,7 +1535,7 @@ "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", "dev": true, "requires": { - "has-flag": "^1.0.0" + "has-flag": "1.0.0" } } } @@ -1546,11 +1546,11 @@ "integrity": "sha512-8BfdqSfEdtip7/wo1RnrvLpHVEd8zMZEDmOFEnpC6dg0vXflHt9nvoAyQUzig2uMSXfF2OBEYBV3CVjIL9JvaQ==", "dev": true, "requires": { - "debug": "^3.1.0", - "istanbul-lib-coverage": "^1.1.1", - "mkdirp": "^0.5.1", - "rimraf": "^2.6.1", - "source-map": "^0.5.3" + "debug": "3.1.0", + "istanbul-lib-coverage": "1.1.1", + "mkdirp": "0.5.1", + "rimraf": "2.6.2", + "source-map": "0.5.7" } }, "istanbul-reports": { @@ -1559,7 +1559,7 @@ "integrity": "sha512-ZEelkHh8hrZNI5xDaKwPMFwDsUf5wIEI2bXAFGp1e6deR2mnEKBPhLJEgr4ZBt8Gi6Mj38E/C8kcy9XLggVO2Q==", "dev": true, "requires": { - "handlebars": "^4.0.3" + "handlebars": "4.0.11" } }, "js-tokens": { @@ -1574,8 +1574,8 @@ "integrity": "sha512-O2v52ffjLa9VeM43J4XocZE//WT9N0IiwDa3KSHH7Tu8CtH+1qM8SIZvnsTh6v+4yFy5KUY3BHUVwjpfAWsjIA==", "dev": true, "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "argparse": "1.0.9", + "esprima": "4.0.0" } }, "jsesc": { @@ -1590,14 +1590,14 @@ "integrity": "sha1-HnJSkVzmgbQIJ+4UJIxG006apiw=", "dev": true, "requires": { - "cli": "~1.0.0", - "console-browserify": "1.1.x", - "exit": "0.1.x", - "htmlparser2": "3.8.x", - "lodash": "3.7.x", - "minimatch": "~3.0.2", - "shelljs": "0.3.x", - "strip-json-comments": "1.0.x" + "cli": "1.0.1", + "console-browserify": "1.1.0", + "exit": "0.1.2", + "htmlparser2": "3.8.3", + "lodash": "3.7.0", + "minimatch": "3.0.4", + "shelljs": "0.3.0", + "strip-json-comments": "1.0.4" }, "dependencies": { "lodash": { @@ -1626,7 +1626,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } }, "lazy-cache": { @@ -1642,7 +1642,7 @@ "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", "dev": true, "requires": { - "invert-kv": "^1.0.0" + "invert-kv": "1.0.0" } }, "levn": { @@ -1651,8 +1651,8 @@ "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", "dev": true, "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" + "prelude-ls": "1.1.2", + "type-check": "0.3.2" } }, "load-json-file": { @@ -1661,10 +1661,10 @@ "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "strip-bom": "^3.0.0" + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "strip-bom": "3.0.0" }, "dependencies": { "strip-bom": { @@ -1681,8 +1681,8 @@ "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", "dev": true, "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" + "p-locate": "2.0.0", + "path-exists": "3.0.0" } }, "lodash": { @@ -1709,7 +1709,7 @@ "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", "dev": true, "requires": { - "js-tokens": "^3.0.0" + "js-tokens": "3.0.2" } }, "lru-cache": { @@ -1718,8 +1718,8 @@ "integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==", "dev": true, "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" + "pseudomap": "1.0.2", + "yallist": "2.1.2" } }, "mem": { @@ -1728,7 +1728,7 @@ "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", "dev": true, "requires": { - "mimic-fn": "^1.0.0" + "mimic-fn": "1.1.0" } }, "mimic-fn": { @@ -1743,7 +1743,7 @@ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "requires": { - "brace-expansion": "^1.1.7" + "brace-expansion": "1.1.8" } }, "minimist": { @@ -1791,7 +1791,7 @@ "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", "dev": true, "requires": { - "has-flag": "^2.0.0" + "has-flag": "2.0.0" } } } @@ -1819,8 +1819,8 @@ "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", "dev": true, "requires": { - "encoding": "^0.1.11", - "is-stream": "^1.0.1" + "encoding": "0.1.12", + "is-stream": "1.1.0" } }, "nodesecurity-npm-utils": { @@ -1835,7 +1835,7 @@ "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", "dev": true, "requires": { - "abbrev": "1" + "abbrev": "1.0.9" } }, "normalize-package-data": { @@ -1844,10 +1844,10 @@ "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", "dev": true, "requires": { - "hosted-git-info": "^2.1.4", - "is-builtin-module": "^1.0.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" + "hosted-git-info": "2.5.0", + "is-builtin-module": "1.0.0", + "semver": "5.4.1", + "validate-npm-package-license": "3.0.1" } }, "npm-run-path": { @@ -1856,7 +1856,7 @@ "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", "dev": true, "requires": { - "path-key": "^2.0.0" + "path-key": "2.0.1" } }, "nsp": { @@ -1865,15 +1865,15 @@ "integrity": "sha512-dLmGi7IGixJEHKetErIH460MYiYIzAoxuVsloZFu9e1p9U8K0yULx7YQ1+VzrjZbB+wqq67ES1SfOvKVb/qMDQ==", "dev": true, "requires": { - "chalk": "^2.1.0", - "cli-table2": "^0.2.0", - "cvss": "^1.0.2", - "https-proxy-agent": "^2.1.0", - "inquirer": "^3.3.0", - "nodesecurity-npm-utils": "^6.0.0", - "semver": "^5.4.1", - "wreck": "^12.5.1", - "yargs": "^9.0.1" + "chalk": "2.4.1", + "cli-table2": "0.2.0", + "cvss": "1.0.2", + "https-proxy-agent": "2.2.1", + "inquirer": "3.3.0", + "nodesecurity-npm-utils": "6.0.0", + "semver": "5.4.1", + "wreck": "12.5.1", + "yargs": "9.0.1" }, "dependencies": { "ansi-regex": { @@ -1888,7 +1888,7 @@ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { - "color-convert": "^1.9.0" + "color-convert": "1.9.1" } }, "camelcase": { @@ -1903,9 +1903,9 @@ "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" } }, "cliui": { @@ -1914,9 +1914,9 @@ "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", "dev": true, "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wrap-ansi": "2.1.0" }, "dependencies": { "string-width": { @@ -1925,9 +1925,9 @@ "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" } } } @@ -1944,8 +1944,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" }, "dependencies": { "is-fullwidth-code-point": { @@ -1960,7 +1960,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "3.0.0" } } } @@ -1971,7 +1971,7 @@ "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "has-flag": "3.0.0" } }, "yargs": { @@ -1980,19 +1980,19 @@ "integrity": "sha1-UqzCP+7Kw0BCB47njAwAf1CF20w=", "dev": true, "requires": { - "camelcase": "^4.1.0", - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "os-locale": "^2.0.0", - "read-pkg-up": "^2.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^7.0.0" + "camelcase": "4.1.0", + "cliui": "3.2.0", + "decamelize": "1.2.0", + "get-caller-file": "1.0.2", + "os-locale": "2.1.0", + "read-pkg-up": "2.0.0", + "require-directory": "2.1.1", + "require-main-filename": "1.0.1", + "set-blocking": "2.0.0", + "string-width": "2.1.1", + "which-module": "2.0.0", + "y18n": "3.2.1", + "yargs-parser": "7.0.0" } } } @@ -2021,7 +2021,7 @@ "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, "requires": { - "wrappy": "1" + "wrappy": "1.0.2" } }, "onetime": { @@ -2030,7 +2030,7 @@ "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", "dev": true, "requires": { - "mimic-fn": "^1.0.0" + "mimic-fn": "1.1.0" } }, "optimist": { @@ -2039,8 +2039,8 @@ "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", "dev": true, "requires": { - "minimist": "~0.0.1", - "wordwrap": "~0.0.2" + "minimist": "0.0.8", + "wordwrap": "0.0.3" }, "dependencies": { "wordwrap": { @@ -2057,12 +2057,12 @@ "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", "dev": true, "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.4", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "wordwrap": "~1.0.0" + "deep-is": "0.1.3", + "fast-levenshtein": "2.0.6", + "levn": "0.3.0", + "prelude-ls": "1.1.2", + "type-check": "0.3.2", + "wordwrap": "1.0.0" } }, "os-locale": { @@ -2071,9 +2071,9 @@ "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", "dev": true, "requires": { - "execa": "^0.7.0", - "lcid": "^1.0.0", - "mem": "^1.1.0" + "execa": "0.7.0", + "lcid": "1.0.0", + "mem": "1.1.0" } }, "os-tmpdir": { @@ -2100,7 +2100,7 @@ "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", "dev": true, "requires": { - "p-limit": "^1.1.0" + "p-limit": "1.1.0" } }, "parse-json": { @@ -2109,7 +2109,7 @@ "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", "dev": true, "requires": { - "error-ex": "^1.2.0" + "error-ex": "1.3.1" } }, "path-exists": { @@ -2148,7 +2148,7 @@ "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", "dev": true, "requires": { - "pify": "^2.0.0" + "pify": "2.3.0" } }, "pify": { @@ -2169,7 +2169,7 @@ "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "dev": true, "requires": { - "pinkie": "^2.0.0" + "pinkie": "2.0.4" } }, "pkg-conf": { @@ -2178,8 +2178,8 @@ "integrity": "sha1-BxyHZQQDvM+5xif1h1G/5HwGcnk=", "dev": true, "requires": { - "find-up": "^2.0.0", - "load-json-file": "^2.0.0" + "find-up": "2.1.0", + "load-json-file": "2.0.0" } }, "pkg-config": { @@ -2188,9 +2188,9 @@ "integrity": "sha1-VX7yLXPaPIg3EHdmxS6tq94pj+Q=", "dev": true, "requires": { - "debug-log": "^1.0.0", - "find-root": "^1.0.0", - "xtend": "^4.0.1" + "debug-log": "1.0.1", + "find-root": "1.1.0", + "xtend": "4.0.1" } }, "pkg-dir": { @@ -2199,7 +2199,7 @@ "integrity": "sha1-ektQio1bstYp1EcFb/TpyTFM89Q=", "dev": true, "requires": { - "find-up": "^1.0.0" + "find-up": "1.1.2" }, "dependencies": { "find-up": { @@ -2208,8 +2208,8 @@ "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", "dev": true, "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" + "path-exists": "2.1.0", + "pinkie-promise": "2.0.1" } }, "path-exists": { @@ -2218,7 +2218,7 @@ "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", "dev": true, "requires": { - "pinkie-promise": "^2.0.0" + "pinkie-promise": "2.0.1" } } } @@ -2241,7 +2241,7 @@ "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", "dev": true, "requires": { - "asap": "~2.0.3" + "asap": "2.0.6" } }, "prop-types": { @@ -2250,9 +2250,9 @@ "integrity": "sha1-zq8IMCL8RrSjX2nhPvda7Q1jmFY=", "dev": true, "requires": { - "fbjs": "^0.8.16", - "loose-envify": "^1.3.1", - "object-assign": "^4.1.1" + "fbjs": "0.8.16", + "loose-envify": "1.3.1", + "object-assign": "4.1.1" } }, "pseudomap": { @@ -2267,9 +2267,9 @@ "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", "dev": true, "requires": { - "load-json-file": "^2.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^2.0.0" + "load-json-file": "2.0.0", + "normalize-package-data": "2.4.0", + "path-type": "2.0.0" } }, "read-pkg-up": { @@ -2278,8 +2278,8 @@ "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", "dev": true, "requires": { - "find-up": "^2.0.0", - "read-pkg": "^2.0.0" + "find-up": "2.1.0", + "read-pkg": "2.0.0" } }, "readable-stream": { @@ -2288,10 +2288,10 @@ "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", "dev": true, "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", + "core-util-is": "1.0.2", + "inherits": "2.0.3", "isarray": "0.0.1", - "string_decoder": "~0.10.x" + "string_decoder": "0.10.31" } }, "regenerator-runtime": { @@ -2312,7 +2312,7 @@ "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", "dev": true, "requires": { - "is-finite": "^1.0.0" + "is-finite": "1.0.2" } }, "require-directory": { @@ -2333,8 +2333,8 @@ "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", "dev": true, "requires": { - "caller-path": "^0.1.0", - "resolve-from": "^1.0.0" + "caller-path": "0.1.0", + "resolve-from": "1.0.1" } }, "resolve": { @@ -2343,7 +2343,7 @@ "integrity": "sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw==", "dev": true, "requires": { - "path-parse": "^1.0.5" + "path-parse": "1.0.5" } }, "resolve-from": { @@ -2358,8 +2358,8 @@ "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", "dev": true, "requires": { - "onetime": "^2.0.0", - "signal-exit": "^3.0.2" + "onetime": "2.0.1", + "signal-exit": "3.0.2" } }, "right-align": { @@ -2369,7 +2369,7 @@ "dev": true, "optional": true, "requires": { - "align-text": "^0.1.1" + "align-text": "0.1.4" } }, "rimraf": { @@ -2378,7 +2378,7 @@ "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", "dev": true, "requires": { - "glob": "^7.0.5" + "glob": "7.1.2" } }, "run-async": { @@ -2387,7 +2387,7 @@ "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", "dev": true, "requires": { - "is-promise": "^2.1.0" + "is-promise": "2.1.0" } }, "run-parallel": { @@ -2408,7 +2408,7 @@ "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", "dev": true, "requires": { - "rx-lite": "*" + "rx-lite": "4.0.8" } }, "safe-buffer": { @@ -2423,16 +2423,16 @@ "integrity": "sha512-jykJZVDYWFZ7Hej9bYwynBa+A8yQFksm4zZoli4O+KkqMuQTdlBzkJvtFRER7xufSnB6+XnBS423tjI3Gtrg7Q==", "dev": true, "requires": { - "eslint": "~4.14.0", - "eslint-config-semistandard": "^12.0.0", + "eslint": "4.14.0", + "eslint-config-semistandard": "12.0.0", "eslint-config-standard": "11.0.0-beta.0", - "eslint-config-standard-jsx": "~4.0.2", - "eslint-plugin-import": "~2.8.0", - "eslint-plugin-node": "~5.2.1", - "eslint-plugin-promise": "~3.6.0", - "eslint-plugin-react": "~7.5.1", - "eslint-plugin-standard": "~3.0.1", - "standard-engine": "~7.2.0" + "eslint-config-standard-jsx": "4.0.2", + "eslint-plugin-import": "2.8.0", + "eslint-plugin-node": "5.2.1", + "eslint-plugin-promise": "3.6.0", + "eslint-plugin-react": "7.5.1", + "eslint-plugin-standard": "3.0.1", + "standard-engine": "7.2.0" }, "dependencies": { "ajv": { @@ -2441,10 +2441,10 @@ "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", "dev": true, "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" + "co": "4.6.0", + "fast-deep-equal": "1.0.0", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.3.1" } }, "ajv-keywords": { @@ -2465,7 +2465,7 @@ "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", "dev": true, "requires": { - "color-convert": "^1.9.0" + "color-convert": "1.9.1" } }, "chalk": { @@ -2474,9 +2474,9 @@ "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", "dev": true, "requires": { - "ansi-styles": "^3.1.0", - "escape-string-regexp": "^1.0.5", - "supports-color": "^4.0.0" + "ansi-styles": "3.2.0", + "escape-string-regexp": "1.0.5", + "supports-color": "4.5.0" } }, "eslint": { @@ -2485,43 +2485,43 @@ "integrity": "sha512-Ul6CSGRjKscEyg0X/EeNs7o2XdnbTEOD1OM8cTjmx85RPcBJQrEhZLevhuJZNAE/vS2iVl5Uhgiqf3h5uLMCJQ==", "dev": true, "requires": { - "ajv": "^5.3.0", - "babel-code-frame": "^6.22.0", - "chalk": "^2.1.0", - "concat-stream": "^1.6.0", - "cross-spawn": "^5.1.0", - "debug": "^3.1.0", - "doctrine": "^2.0.2", - "eslint-scope": "^3.7.1", - "eslint-visitor-keys": "^1.0.0", - "espree": "^3.5.2", - "esquery": "^1.0.0", - "esutils": "^2.0.2", - "file-entry-cache": "^2.0.0", - "functional-red-black-tree": "^1.0.1", - "glob": "^7.1.2", - "globals": "^11.0.1", - "ignore": "^3.3.3", - "imurmurhash": "^0.1.4", - "inquirer": "^3.0.6", - "is-resolvable": "^1.0.0", - "js-yaml": "^3.9.1", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.3.0", - "lodash": "^4.17.4", - "minimatch": "^3.0.2", - "mkdirp": "^0.5.1", - "natural-compare": "^1.4.0", - "optionator": "^0.8.2", - "path-is-inside": "^1.0.2", - "pluralize": "^7.0.0", - "progress": "^2.0.0", - "require-uncached": "^1.0.3", - "semver": "^5.3.0", - "strip-ansi": "^4.0.0", - "strip-json-comments": "~2.0.1", - "table": "^4.0.1", - "text-table": "~0.2.0" + "ajv": "5.5.2", + "babel-code-frame": "6.26.0", + "chalk": "2.3.0", + "concat-stream": "1.6.0", + "cross-spawn": "5.1.0", + "debug": "3.1.0", + "doctrine": "2.0.2", + "eslint-scope": "3.7.1", + "eslint-visitor-keys": "1.0.0", + "espree": "3.5.2", + "esquery": "1.0.0", + "esutils": "2.0.2", + "file-entry-cache": "2.0.0", + "functional-red-black-tree": "1.0.1", + "glob": "7.1.2", + "globals": "11.1.0", + "ignore": "3.3.7", + "imurmurhash": "0.1.4", + "inquirer": "3.3.0", + "is-resolvable": "1.0.0", + "js-yaml": "3.10.0", + "json-stable-stringify-without-jsonify": "1.0.1", + "levn": "0.3.0", + "lodash": "4.17.4", + "minimatch": "3.0.4", + "mkdirp": "0.5.1", + "natural-compare": "1.4.0", + "optionator": "0.8.2", + "path-is-inside": "1.0.2", + "pluralize": "7.0.0", + "progress": "2.0.0", + "require-uncached": "1.0.3", + "semver": "5.4.1", + "strip-ansi": "4.0.0", + "strip-json-comments": "2.0.1", + "table": "4.0.2", + "text-table": "0.2.0" } }, "eslint-config-semistandard": { @@ -2548,8 +2548,8 @@ "integrity": "sha512-sfmTqJfPSizWu4aymbPr4Iidp5yKm8yDkHp+Ir3YiTHiiDfxh69mOUsmiqW6RZ9zRXFaF64GtYmN7e+8GHBv6Q==", "dev": true, "requires": { - "debug": "^2.6.9", - "resolve": "^1.5.0" + "debug": "2.6.9", + "resolve": "1.5.0" }, "dependencies": { "debug": { @@ -2569,16 +2569,16 @@ "integrity": "sha512-Rf7dfKJxZ16QuTgVv1OYNxkZcsu/hULFnC+e+w0Gzi6jMC3guQoWQgxYxc54IDRinlb6/0v5z/PxxIKmVctN+g==", "dev": true, "requires": { - "builtin-modules": "^1.1.1", - "contains-path": "^0.1.0", - "debug": "^2.6.8", + "builtin-modules": "1.1.1", + "contains-path": "0.1.0", + "debug": "2.6.9", "doctrine": "1.5.0", - "eslint-import-resolver-node": "^0.3.1", - "eslint-module-utils": "^2.1.1", - "has": "^1.0.1", - "lodash.cond": "^4.3.0", - "minimatch": "^3.0.3", - "read-pkg-up": "^2.0.0" + "eslint-import-resolver-node": "0.3.2", + "eslint-module-utils": "2.1.1", + "has": "1.0.1", + "lodash.cond": "4.5.2", + "minimatch": "3.0.4", + "read-pkg-up": "2.0.0" }, "dependencies": { "debug": { @@ -2596,8 +2596,8 @@ "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", "dev": true, "requires": { - "esutils": "^2.0.2", - "isarray": "^1.0.0" + "esutils": "2.0.2", + "isarray": "1.0.0" } } } @@ -2608,9 +2608,9 @@ "integrity": "sha512-xhPXrh0Vl/b7870uEbaumb2Q+LxaEcOQ3kS1jtIXanBAwpMre1l5q/l2l/hESYJGEFKuI78bp6Uw50hlpr7B+g==", "dev": true, "requires": { - "ignore": "^3.3.6", - "minimatch": "^3.0.4", - "resolve": "^1.3.3", + "ignore": "3.3.7", + "minimatch": "3.0.4", + "resolve": "1.5.0", "semver": "5.3.0" }, "dependencies": { @@ -2634,10 +2634,10 @@ "integrity": "sha512-YGSjB9Qu6QbVTroUZi66pYky3DfoIPLdHQ/wmrBGyBRnwxQsBXAov9j2rpXt/55i8nyMv6IRWJv2s4d4YnduzQ==", "dev": true, "requires": { - "doctrine": "^2.0.0", - "has": "^1.0.1", - "jsx-ast-utils": "^2.0.0", - "prop-types": "^15.6.0" + "doctrine": "2.0.2", + "has": "1.0.1", + "jsx-ast-utils": "2.0.1", + "prop-types": "15.6.0" } }, "globals": { @@ -2670,7 +2670,7 @@ "integrity": "sha1-6AGxs5mF4g//yHtA43SAgOLcrH8=", "dev": true, "requires": { - "array-includes": "^3.0.3" + "array-includes": "3.0.3" } }, "minimist": { @@ -2697,7 +2697,7 @@ "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0" + "is-fullwidth-code-point": "2.0.0" } }, "standard-engine": { @@ -2706,10 +2706,10 @@ "integrity": "sha512-4MTVXRZQjEWeD7tNt8lK1Yh7VLXbmZ/hj34uF9tpSdtYNNPosms2TLCnw/7MUl/rW1Uhx80s7CL8LtBdUtgrtw==", "dev": true, "requires": { - "deglob": "^2.1.0", - "get-stdin": "^5.0.1", - "minimist": "^1.1.0", - "pkg-conf": "^2.0.0" + "deglob": "2.1.0", + "get-stdin": "5.0.1", + "minimist": "1.2.0", + "pkg-conf": "2.0.0" } }, "string-width": { @@ -2718,8 +2718,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" } }, "strip-ansi": { @@ -2728,7 +2728,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "3.0.0" } }, "strip-json-comments": { @@ -2743,7 +2743,7 @@ "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", "dev": true, "requires": { - "has-flag": "^2.0.0" + "has-flag": "2.0.0" } }, "table": { @@ -2752,12 +2752,12 @@ "integrity": "sha512-UUkEAPdSGxtRpiV9ozJ5cMTtYiqz7Ni1OGqLXRCynrvzdtR1p+cfOWe2RJLwvUG8hNanaSRjecIqwOjqeatDsA==", "dev": true, "requires": { - "ajv": "^5.2.3", - "ajv-keywords": "^2.1.0", - "chalk": "^2.1.0", - "lodash": "^4.17.4", + "ajv": "5.5.2", + "ajv-keywords": "2.1.1", + "chalk": "2.3.0", + "lodash": "4.17.4", "slice-ansi": "1.0.0", - "string-width": "^2.1.1" + "string-width": "2.1.1" } } } @@ -2786,7 +2786,7 @@ "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", "dev": true, "requires": { - "shebang-regex": "^1.0.0" + "shebang-regex": "1.0.0" } }, "shebang-regex": { @@ -2819,7 +2819,7 @@ "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=", "dev": true, "requires": { - "spdx-license-ids": "^1.0.2" + "spdx-license-ids": "1.2.2" } }, "spdx-expression-parse": { @@ -2846,9 +2846,9 @@ "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" } }, "string_decoder": { @@ -2863,7 +2863,7 @@ "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "ansi-regex": "2.1.1" } }, "strip-bom": { @@ -2872,7 +2872,7 @@ "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", "dev": true, "requires": { - "is-utf8": "^0.2.0" + "is-utf8": "0.2.1" } }, "strip-eof": { @@ -2911,7 +2911,7 @@ "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", "dev": true, "requires": { - "os-tmpdir": "~1.0.2" + "os-tmpdir": "1.0.2" } }, "to-fast-properties": { @@ -2938,7 +2938,7 @@ "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", "dev": true, "requires": { - "prelude-ls": "~1.1.2" + "prelude-ls": "1.1.2" } }, "typedarray": { @@ -2965,9 +2965,9 @@ "dev": true, "optional": true, "requires": { - "source-map": "~0.5.1", - "uglify-to-browserify": "~1.0.0", - "yargs": "~3.10.0" + "source-map": "0.5.7", + "uglify-to-browserify": "1.0.2", + "yargs": "3.10.0" } }, "uglify-to-browserify": { @@ -2995,8 +2995,8 @@ "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=", "dev": true, "requires": { - "spdx-correct": "~1.0.0", - "spdx-expression-parse": "~1.0.0" + "spdx-correct": "1.0.2", + "spdx-expression-parse": "1.0.4" } }, "whatwg-fetch": { @@ -3011,7 +3011,7 @@ "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", "dev": true, "requires": { - "isexe": "^2.0.0" + "isexe": "2.0.0" } }, "which-module": { @@ -3039,8 +3039,8 @@ "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "dev": true, "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" + "string-width": "1.0.2", + "strip-ansi": "3.0.1" } }, "wrappy": { @@ -3055,8 +3055,8 @@ "integrity": "sha512-l5DUGrc+yDyIflpty1x9XuMj1ehVjC/dTbF3/BasOO77xk0EdEa4M/DuOY8W88MQDAD0fEDqyjc8bkIMHd2E9A==", "dev": true, "requires": { - "boom": "5.x.x", - "hoek": "4.x.x" + "boom": "5.2.0", + "hoek": "4.2.1" } }, "write": { @@ -3065,7 +3065,7 @@ "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", "dev": true, "requires": { - "mkdirp": "^0.5.1" + "mkdirp": "0.5.1" } }, "xtend": { @@ -3093,9 +3093,9 @@ "dev": true, "optional": true, "requires": { - "camelcase": "^1.0.2", - "cliui": "^2.1.0", - "decamelize": "^1.0.0", + "camelcase": "1.2.1", + "cliui": "2.1.0", + "decamelize": "1.2.0", "window-size": "0.1.0" } }, @@ -3105,7 +3105,7 @@ "integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=", "dev": true, "requires": { - "camelcase": "^4.1.0" + "camelcase": "4.1.0" }, "dependencies": { "camelcase": { diff --git a/package.json b/package.json index 0cd0fceb40..56a19203ef 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "node": ">= 6" }, "dependencies": { - "@feathersjs/commons": "^1.4.0", + "@feathersjs/commons": "^2.0.0", "debug": "^3.1.0", "events": "^3.0.0", "uberproto": "^1.2.0" From c06ed86cf8935e28b4f2430bbb039e28e00e808c Mon Sep 17 00:00:00 2001 From: Bertho Date: Fri, 3 Aug 2018 10:20:01 +0200 Subject: [PATCH 21/24] fix test for node 6 --- test/hooks/hooks.test.js | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/test/hooks/hooks.test.js b/test/hooks/hooks.test.js index 7a8aa4ce4d..fd8fb55706 100644 --- a/test/hooks/hooks.test.js +++ b/test/hooks/hooks.test.js @@ -243,7 +243,7 @@ describe('hooks basics', () => { }); }); - it('can register hooks on a custom method', async () => { + it('can register hooks on a custom method', () => { const app = feathers().use('/dummy', { methods: { custom: ['id', 'data', 'params'] @@ -292,14 +292,16 @@ describe('hooks basics', () => { other: ['id', 'data', 'params'] }); - await app.service('dummy').custom(...args, true).then(hook => { - assert.deepEqual(hook.result, args); - assert.deepEqual(hook.test, ['all::before', 'custom::before', 'all::after', 'custom::after']); - }); + return app.service('dummy').custom(...args, true) + .then(hook => { + assert.deepEqual(hook.result, args); + assert.deepEqual(hook.test, ['all::before', 'custom::before', 'all::after', 'custom::after']); - return app.service('dummy').other(...args, true).then(hook => { - assert.deepEqual(hook.result, args); - assert.deepEqual(hook.test, ['all::before', 'all::after']); - }); + app.service('dummy').other(...args, true) + .then(hook => { + assert.deepEqual(hook.result, args); + assert.deepEqual(hook.test, ['all::before', 'all::after']); + }); + }); }); }); From 52c1cfa7ef1c271ec76c900cc9123bfabd6c3bfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Berthommier?= Date: Mon, 6 Aug 2018 20:01:46 +0200 Subject: [PATCH 22/24] fix withHooks --- lib/hooks.js | 32 ++++++++------------------------ test/hooks/with-hooks.test.js | 1 - 2 files changed, 8 insertions(+), 25 deletions(-) diff --git a/lib/hooks.js b/lib/hooks.js index 0354afffc8..33c3590876 100644 --- a/lib/hooks.js +++ b/lib/hooks.js @@ -38,14 +38,13 @@ const withHooks = function withHooks ({ app }); - hookObject.arguments = args; - - // A hook that pick arguments for methods defined in - // `argumentsOrder` (top of file) and `service.methods` + // A hook that pick arguments for methods defined in `service.methods` const pickArgsHook = context => { - const argsList = Object.assign({}, argumentsOrders, service.methods || {}); - const argsObject = context.arguments.reduce( - (result, value, index) => Object.assign(result, { [argsList[method][index]]: value }), + const argsObject = args.reduce( + (result, value, index) => { + result[service.methods[method][index]] = value; + return result; + }, { params: {} } ); @@ -163,26 +162,11 @@ const hookMixin = exports.hookMixin = function hookMixin (service) { mixin[method] = function () { const service = this; const args = Array.from(arguments); + const returnHook = args[args.length - 1] === true; // A hook that validates the arguments and will always be the very first const validateHook = context => { - validateArguments(service.methods, method, args); - - return context; - }; - - // A hook that pick arguments for methods defined in - // `argumentsOrder` (top of file) and `service.methods` - const pickArgsHook = context => { - const argsObject = args.reduce( - (result, value, index) => { - result[service.methods[method][index]] = value; - return result; - }, - { params: {} } - ); - - Object.assign(context, argsObject); + validateArguments(service.methods, method, returnHook ? args.slice(0, -1) : args); return context; }; diff --git a/test/hooks/with-hooks.test.js b/test/hooks/with-hooks.test.js index a5a92be30e..a0ab27d024 100755 --- a/test/hooks/with-hooks.test.js +++ b/test/hooks/with-hooks.test.js @@ -44,7 +44,6 @@ describe('services withHooks', () => { method: 'create', path: 'svc', data, - arguments: [data, params], _called: 'called', result: data, type: 'after' From 4f742042fe95e7448b903b4cdbed995b3b5b79cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Berthommier?= Date: Tue, 7 Aug 2018 13:21:34 +0200 Subject: [PATCH 23/24] Update hooks.js --- lib/hooks.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/hooks.js b/lib/hooks.js index 33c3590876..a6e50f1775 100644 --- a/lib/hooks.js +++ b/lib/hooks.js @@ -99,7 +99,6 @@ const withHooks = function withHooks ({ // A shallow copy of the hook object const errorHookObject = _.omit(Object.assign({}, error.hook, hookObject, { type: 'error', - result: null, original: error.hook, error }), 'result'); From 254074a8703c6b7c8117cdc03e33abfdc7d5ef73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Berthommier?= Date: Tue, 7 Aug 2018 23:04:37 +0200 Subject: [PATCH 24/24] use Object.defineProperty in the activateHooks method --- lib/hooks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/hooks.js b/lib/hooks.js index a6e50f1775..e8f03acbd8 100644 --- a/lib/hooks.js +++ b/lib/hooks.js @@ -213,7 +213,7 @@ module.exports.ACTIVATE_HOOKS = ACTIVATE_HOOKS; module.exports.activateHooks = function activateHooks (args) { return fn => { - fn[ACTIVATE_HOOKS] = args; + Object.defineProperty(fn, ACTIVATE_HOOKS, { value: args }); return fn; }; };