From 746ae6b4b3b47a96ec09ea30bf62698626f90c73 Mon Sep 17 00:00:00 2001 From: Tom Pytleski Date: Sun, 5 May 2019 22:40:45 -0500 Subject: [PATCH 01/15] add test operation when generating patches --- dist/fast-json-patch.js | 80 +- dist/fast-json-patch.min.js | 2 +- src/duplex.ts | 278 ++- test/spec/duplexSpec.js | 2103 ++++++++++-------- yarn.lock | 4097 +++++++++++++++++++++++++++++++++++ 5 files changed, 5477 insertions(+), 1083 deletions(-) create mode 100644 yarn.lock diff --git a/dist/fast-json-patch.js b/dist/fast-json-patch.js index 3c73b217..c8d498ea 100644 --- a/dist/fast-json-patch.js +++ b/dist/fast-json-patch.js @@ -721,20 +721,24 @@ function observe(obj, callback) { clearTimeout(observer.next); observer.next = setTimeout(dirtyCheck); }; - if (typeof window !== 'undefined') { + if (typeof window !== "undefined") { + //not Node if (window.addEventListener) { - window.addEventListener('mouseup', fastCheck); - window.addEventListener('keyup', fastCheck); - window.addEventListener('mousedown', fastCheck); - window.addEventListener('keydown', fastCheck); - window.addEventListener('change', fastCheck); + //standards + window.addEventListener("mouseup", fastCheck); + window.addEventListener("keyup", fastCheck); + window.addEventListener("mousedown", fastCheck); + window.addEventListener("keydown", fastCheck); + window.addEventListener("change", fastCheck); } else { - document.documentElement.attachEvent('onmouseup', fastCheck); - document.documentElement.attachEvent('onkeyup', fastCheck); - document.documentElement.attachEvent('onmousedown', fastCheck); - document.documentElement.attachEvent('onkeydown', fastCheck); - document.documentElement.attachEvent('onchange', fastCheck); + //IE8 + ; + document.documentElement.attachEvent("onmouseup", fastCheck); + document.documentElement.attachEvent("onkeyup", fastCheck); + document.documentElement.attachEvent("onmousedown", fastCheck); + document.documentElement.attachEvent("onkeydown", fastCheck); + document.documentElement.attachEvent("onchange", fastCheck); } } } @@ -744,18 +748,19 @@ function observe(obj, callback) { generate(observer); clearTimeout(observer.next); removeObserverFromMirror(mirror, observer); - if (typeof window !== 'undefined') { + if (typeof window !== "undefined") { if (window.removeEventListener) { - window.removeEventListener('mouseup', fastCheck); - window.removeEventListener('keyup', fastCheck); - window.removeEventListener('mousedown', fastCheck); - window.removeEventListener('keydown', fastCheck); + window.removeEventListener("mouseup", fastCheck); + window.removeEventListener("keyup", fastCheck); + window.removeEventListener("mousedown", fastCheck); + window.removeEventListener("keydown", fastCheck); } else { - document.documentElement.detachEvent('onmouseup', fastCheck); - document.documentElement.detachEvent('onkeyup', fastCheck); - document.documentElement.detachEvent('onmousedown', fastCheck); - document.documentElement.detachEvent('onkeydown', fastCheck); + ; + document.documentElement.detachEvent("onmouseup", fastCheck); + document.documentElement.detachEvent("onkeyup", fastCheck); + document.documentElement.detachEvent("onmousedown", fastCheck); + document.documentElement.detachEvent("onkeydown", fastCheck); } } }; @@ -798,23 +803,44 @@ function _generate(mirror, obj, patches, path) { for (var t = oldKeys.length - 1; t >= 0; t--) { var key = oldKeys[t]; var oldVal = mirror[key]; - if (helpers_1.hasOwnProperty(obj, key) && !(obj[key] === undefined && oldVal !== undefined && Array.isArray(obj) === false)) { + if (helpers_1.hasOwnProperty(obj, key) && + !(obj[key] === undefined && + oldVal !== undefined && + Array.isArray(obj) === false)) { var newVal = obj[key]; - if (typeof oldVal == "object" && oldVal != null && typeof newVal == "object" && newVal != null) { + if (typeof oldVal == "object" && + oldVal != null && + typeof newVal == "object" && + newVal != null) { _generate(oldVal, newVal, patches, path + "/" + helpers_1.escapePathComponent(key)); } else { if (oldVal !== newVal) { changed = true; - patches.push({ op: "replace", path: path + "/" + helpers_1.escapePathComponent(key), value: helpers_1._deepClone(newVal) }); + patches.push({ + op: "test", + path: path + "/" + helpers_1.escapePathComponent(key), + value: helpers_1._deepClone(oldVal) + }); + patches.push({ + op: "replace", + path: path + "/" + helpers_1.escapePathComponent(key), + value: helpers_1._deepClone(newVal) + }); } } } else if (Array.isArray(mirror) === Array.isArray(obj)) { + patches.push({ + op: "test", + path: path + "/" + helpers_1.escapePathComponent(key), + value: helpers_1._deepClone(oldVal) + }); patches.push({ op: "remove", path: path + "/" + helpers_1.escapePathComponent(key) }); deleted = true; // property has been deleted } else { + patches.push({ op: "test", path: path, value: mirror }); patches.push({ op: "replace", path: path, value: obj }); changed = true; } @@ -825,7 +851,11 @@ function _generate(mirror, obj, patches, path) { for (var t = 0; t < newKeys.length; t++) { var key = newKeys[t]; if (!helpers_1.hasOwnProperty(mirror, key) && obj[key] !== undefined) { - patches.push({ op: "add", path: path + "/" + helpers_1.escapePathComponent(key), value: helpers_1._deepClone(obj[key]) }); + patches.push({ + op: "add", + path: path + "/" + helpers_1.escapePathComponent(key), + value: helpers_1._deepClone(obj[key]) + }); } } } @@ -834,7 +864,7 @@ function _generate(mirror, obj, patches, path) { */ function compare(tree1, tree2) { var patches = []; - _generate(tree1, tree2, patches, ''); + _generate(tree1, tree2, patches, ""); return patches; } exports.compare = compare; diff --git a/dist/fast-json-patch.min.js b/dist/fast-json-patch.min.js index 61b99b1b..83abe6a1 100644 --- a/dist/fast-json-patch.min.js +++ b/dist/fast-json-patch.min.js @@ -1,2 +1,2 @@ /*! fast-json-patch, version: 2.1.0 */ -var jsonpatch=function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c={};return b.m=a,b.c=c,b.i=function(a){return a},b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{configurable:!1,enumerable:!0,get:d})},b.n=function(a){var c=a&&a.__esModule?function(){return a['default']}:function(){return a};return b.d(c,'a',c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p='',b(b.s=2)}([function(a,b){function c(a,b){return j.call(a,b)}function d(a){if(Array.isArray(a)){for(var b=Array(a.length),d=0;d=b){c++;continue}return!1}return!0},b.escapePathComponent=e,b.unescapePathComponent=function(a){return a.replace(/~1/g,'/').replace(/~0/g,'~')},b._getPathRecursive=f,b.getPath=function(a,b){if(a===b)return'/';var c=f(a,b);if(''===c)throw new Error('Object not found in root');return'/'+c},b.hasUndefined=g;var k=function(a){function b(b,c,d,e,f){a.call(this,h(b,{name:c,index:d,operation:e,tree:f})),this.name=c,this.index=d,this.operation=e,this.tree=f,this.message=h(b,{name:c,index:d,operation:e,tree:f})}return i(b,a),b}(Error);b.PatchError=k},function(a,b,c){function d(a,b){if(''==b)return a;var c={op:'_get',path:b};return e(a,c),c.value}function e(a,c,e,f,h,i){if(void 0===e&&(e=!1),void 0===f&&(f=!0),void 0===h&&(h=!0),void 0===i&&(i=0),e&&('function'==typeof e?e(c,0,a,c.path):g(c,0)),''===c.path){var j={newDocument:a};if('add'===c.op)return j.newDocument=c.value,j;if('replace'===c.op)return j.newDocument=c.value,j.removed=a,j;if('move'===c.op||'copy'===c.op)return j.newDocument=d(a,c.from),'move'===c.op&&(j.removed=a),j;if('test'===c.op){if(j.test=k(a,c.value),!1===j.test)throw new b.JsonPatchError('Test operation failed','TEST_OPERATION_FAILED',i,c,a);return j.newDocument=a,j}if('remove'===c.op)return j.removed=a,j.newDocument=null,j;if('_get'===c.op)return c.value=a,j;if(e)throw new b.JsonPatchError('Operation `op` property is not one of operations defined in RFC-6902','OPERATION_OP_INVALID',i,c,a);else return j}else{f||(a=l._deepClone(a));var o,p,q,r=c.path||'',s=r.split('/'),u=a,v=1,t=s.length;for(q='function'==typeof e?e:g;;){if(p=s[v],h&&'__proto__'==p)throw new TypeError('JSON-Patch: modifying `__proto__` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README');if(e&&void 0==o&&(void 0===u[p]?o=s.slice(0,v).join('/'):v==t-1&&(o=c.path),void 0!==o&&q(c,0,a,o)),v++,Array.isArray(u)){if('-'===p)p=u.length;else if(e&&!l.isInteger(p))throw new b.JsonPatchError('Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index','OPERATION_PATH_ILLEGAL_ARRAY_INDEX',i,c,a);else l.isInteger(p)&&(p=~~p);if(v>=t){if(e&&'add'===c.op&&p>u.length)throw new b.JsonPatchError('The specified index MUST NOT be greater than the number of elements in the array','OPERATION_VALUE_OUT_OF_BOUNDS',i,c,a);var j=n[c.op].call(c,u,p,a);if(!1===j.test)throw new b.JsonPatchError('Test operation failed','TEST_OPERATION_FAILED',i,c,a);return j}}else if(p&&-1!=p.indexOf('~')&&(p=l.unescapePathComponent(p)),v>=t){var j=m[c.op].call(c,u,p,a);if(!1===j.test)throw new b.JsonPatchError('Test operation failed','TEST_OPERATION_FAILED',i,c,a);return j}u=u[p]}}}function f(a,c,d,f,g){if(void 0===f&&(f=!0),void 0===g&&(g=!0),d&&!Array.isArray(c))throw new b.JsonPatchError('Patch sequence must be an array','SEQUENCE_NOT_AN_ARRAY');f||(a=l._deepClone(a));for(var h=Array(c.length),j=0,i=c.length;j=b){c++;continue}return!1}return!0},b.escapePathComponent=e,b.unescapePathComponent=function(a){return a.replace(/~1/g,'/').replace(/~0/g,'~')},b._getPathRecursive=f,b.getPath=function(a,b){if(a===b)return'/';var c=f(a,b);if(''===c)throw new Error('Object not found in root');return'/'+c},b.hasUndefined=g;var k=function(a){function b(b,c,d,e,f){a.call(this,h(b,{name:c,index:d,operation:e,tree:f})),this.name=c,this.index=d,this.operation=e,this.tree=f,this.message=h(b,{name:c,index:d,operation:e,tree:f})}return i(b,a),b}(Error);b.PatchError=k},function(a,b,c){function d(a,b){if(''==b)return a;var c={op:'_get',path:b};return e(a,c),c.value}function e(a,c,e,f,h,i){if(void 0===e&&(e=!1),void 0===f&&(f=!0),void 0===h&&(h=!0),void 0===i&&(i=0),e&&('function'==typeof e?e(c,0,a,c.path):g(c,0)),''===c.path){var j={newDocument:a};if('add'===c.op)return j.newDocument=c.value,j;if('replace'===c.op)return j.newDocument=c.value,j.removed=a,j;if('move'===c.op||'copy'===c.op)return j.newDocument=d(a,c.from),'move'===c.op&&(j.removed=a),j;if('test'===c.op){if(j.test=k(a,c.value),!1===j.test)throw new b.JsonPatchError('Test operation failed','TEST_OPERATION_FAILED',i,c,a);return j.newDocument=a,j}if('remove'===c.op)return j.removed=a,j.newDocument=null,j;if('_get'===c.op)return c.value=a,j;if(e)throw new b.JsonPatchError('Operation `op` property is not one of operations defined in RFC-6902','OPERATION_OP_INVALID',i,c,a);else return j}else{f||(a=l._deepClone(a));var o=c.path||'',p=o.split('/'),q=a,r=1,s=p.length,t=void 0,u=void 0,v=void 0;for(v='function'==typeof e?e:g;;){if(u=p[r],h&&'__proto__'==u)throw new TypeError('JSON-Patch: modifying `__proto__` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README');if(e&&void 0==t&&(void 0===q[u]?t=p.slice(0,r).join('/'):r==s-1&&(t=c.path),void 0!==t&&v(c,0,a,t)),r++,Array.isArray(q)){if('-'===u)u=q.length;else if(e&&!l.isInteger(u))throw new b.JsonPatchError('Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index','OPERATION_PATH_ILLEGAL_ARRAY_INDEX',i,c,a);else l.isInteger(u)&&(u=~~u);if(r>=s){if(e&&'add'===c.op&&u>q.length)throw new b.JsonPatchError('The specified index MUST NOT be greater than the number of elements in the array','OPERATION_VALUE_OUT_OF_BOUNDS',i,c,a);var j=n[c.op].call(c,q,u,a);if(!1===j.test)throw new b.JsonPatchError('Test operation failed','TEST_OPERATION_FAILED',i,c,a);return j}}else if(u&&-1!=u.indexOf('~')&&(u=l.unescapePathComponent(u)),r>=s){var j=m[c.op].call(c,q,u,a);if(!1===j.test)throw new b.JsonPatchError('Test operation failed','TEST_OPERATION_FAILED',i,c,a);return j}q=q[u]}}}function f(a,c,d,f,g){if(void 0===f&&(f=!0),void 0===g&&(g=!0),d&&!Array.isArray(c))throw new b.JsonPatchError('Patch sequence must be an array','SEQUENCE_NOT_AN_ARRAY');f||(a=l._deepClone(a));for(var h=Array(c.length),j=0,i=c.length;j { - object: T; - patches: Operation[]; - unobserve: () => void; - callback: (patches: Operation[]) => void; + object: T + patches: Operation[] + unobserve: () => void + callback: (patches: Operation[]) => void } -var beforeDict = new WeakMap(); +var beforeDict = new WeakMap() class Mirror { - obj: any; - observers : Map = new Map(); - value: Object | Array; + obj: any + observers: Map = new Map() + value: Object | Array constructor(obj: Object) { - this.obj = obj; + this.obj = obj } } class ObserverInfo { - callback: Function; - observer: ObserverInfo; + callback: Function + observer: ObserverInfo constructor(callback: Function, observer: ObserverInfo) { - this.callback = callback; - this.observer = observer; + this.callback = callback + this.observer = observer } } function getMirror(obj: Object): Mirror { - return beforeDict.get(obj); + return beforeDict.get(obj) } function getObserverFromMirror(mirror: Mirror, callback): ObserverInfo { @@ -50,175 +69,216 @@ function getObserverFromMirror(mirror: Mirror, callback): ObserverInfo { } function removeObserverFromMirror(mirror: Mirror, observer): void { - mirror.observers.delete(observer.callback); + mirror.observers.delete(observer.callback) } /** * Detach an observer from an object */ export function unobserve(root: T, observer: Observer) { - observer.unobserve(); + observer.unobserve() } /** * Observes changes made to an object, which can then be retrieved using generate */ -export function observe(obj: Object|Array, callback?: (patches: Operation[]) => void): Observer { - var patches = []; - var observer; - var mirror = getMirror(obj); +export function observe( + obj: Object | Array, + callback?: (patches: Operation[]) => void +): Observer { + var patches = [] + var observer + var mirror = getMirror(obj) if (!mirror) { - mirror = new Mirror(obj); - beforeDict.set(obj, mirror); + mirror = new Mirror(obj) + beforeDict.set(obj, mirror) } else { - const observerInfo = getObserverFromMirror(mirror, callback); - observer = observerInfo && observerInfo.observer; + const observerInfo = getObserverFromMirror(mirror, callback) + observer = observerInfo && observerInfo.observer } if (observer) { - return observer; + return observer } - observer = {}; + observer = {} - mirror.value = _deepClone(obj); + mirror.value = _deepClone(obj) if (callback) { - observer.callback = callback; - observer.next = null; + observer.callback = callback + observer.next = null var dirtyCheck = () => { - generate(observer); - }; + generate(observer) + } var fastCheck = () => { - clearTimeout(observer.next); - observer.next = setTimeout(dirtyCheck); - }; - if (typeof window !== 'undefined') { //not Node - if (window.addEventListener) { //standards - window.addEventListener('mouseup', fastCheck); - window.addEventListener('keyup', fastCheck); - window.addEventListener('mousedown', fastCheck); - window.addEventListener('keydown', fastCheck); - window.addEventListener('change', fastCheck); - } - else { //IE8 - (document.documentElement).attachEvent('onmouseup', fastCheck); - (document.documentElement).attachEvent('onkeyup', fastCheck); - (document.documentElement).attachEvent('onmousedown', fastCheck); - (document.documentElement).attachEvent('onkeydown', fastCheck); - (document.documentElement).attachEvent('onchange', fastCheck); + clearTimeout(observer.next) + observer.next = setTimeout(dirtyCheck) + } + if (typeof window !== "undefined") { + //not Node + if (window.addEventListener) { + //standards + window.addEventListener("mouseup", fastCheck) + window.addEventListener("keyup", fastCheck) + window.addEventListener("mousedown", fastCheck) + window.addEventListener("keydown", fastCheck) + window.addEventListener("change", fastCheck) + } else { + //IE8 + ;(document.documentElement).attachEvent("onmouseup", fastCheck) + ;(document.documentElement).attachEvent("onkeyup", fastCheck) + ;(document.documentElement).attachEvent("onmousedown", fastCheck) + ;(document.documentElement).attachEvent("onkeydown", fastCheck) + ;(document.documentElement).attachEvent("onchange", fastCheck) } } } - observer.patches = patches; - observer.object = obj; + observer.patches = patches + observer.object = obj observer.unobserve = () => { - generate(observer); - clearTimeout(observer.next); - removeObserverFromMirror(mirror, observer); + generate(observer) + clearTimeout(observer.next) + removeObserverFromMirror(mirror, observer) - if (typeof window !== 'undefined') { + if (typeof window !== "undefined") { if (window.removeEventListener) { - window.removeEventListener('mouseup', fastCheck); - window.removeEventListener('keyup', fastCheck); - window.removeEventListener('mousedown', fastCheck); - window.removeEventListener('keydown', fastCheck); - } - else { - (document.documentElement).detachEvent('onmouseup', fastCheck); - (document.documentElement).detachEvent('onkeyup', fastCheck); - (document.documentElement).detachEvent('onmousedown', fastCheck); - (document.documentElement).detachEvent('onkeydown', fastCheck); + window.removeEventListener("mouseup", fastCheck) + window.removeEventListener("keyup", fastCheck) + window.removeEventListener("mousedown", fastCheck) + window.removeEventListener("keydown", fastCheck) + } else { + ;(document.documentElement).detachEvent("onmouseup", fastCheck) + ;(document.documentElement).detachEvent("onkeyup", fastCheck) + ;(document.documentElement).detachEvent("onmousedown", fastCheck) + ;(document.documentElement).detachEvent("onkeydown", fastCheck) } } - }; + } - mirror.observers.set(callback, new ObserverInfo(callback, observer)); + mirror.observers.set(callback, new ObserverInfo(callback, observer)) - return observer; + return observer } /** * Generate an array of patches from an observer */ export function generate(observer: Observer): Operation[] { - var mirror = beforeDict.get(observer.object); - _generate(mirror.value, observer.object, observer.patches, ""); + var mirror = beforeDict.get(observer.object) + _generate(mirror.value, observer.object, observer.patches, "") if (observer.patches.length) { - applyPatch(mirror.value, observer.patches); + applyPatch(mirror.value, observer.patches) } - var temp = observer.patches; + var temp = observer.patches if (temp.length > 0) { - observer.patches = []; + observer.patches = [] if (observer.callback) { - observer.callback(temp); + observer.callback(temp) } } - return temp; + return temp } // Dirty check if obj is different from mirror, generate patches and update mirror function _generate(mirror, obj, patches, path) { if (obj === mirror) { - return; + return } if (typeof obj.toJSON === "function") { - obj = obj.toJSON(); + obj = obj.toJSON() } - var newKeys = _objectKeys(obj); - var oldKeys = _objectKeys(mirror); - var changed = false; - var deleted = false; + var newKeys = _objectKeys(obj) + var oldKeys = _objectKeys(mirror) + var changed = false + var deleted = false //if ever "move" operation is implemented here, make sure this test runs OK: "should not generate the same patch twice (move)" for (var t = oldKeys.length - 1; t >= 0; t--) { - var key = oldKeys[t]; - var oldVal = mirror[key]; - - if (hasOwnProperty(obj, key) && !(obj[key] === undefined && oldVal !== undefined && Array.isArray(obj) === false)) { - var newVal = obj[key]; - - if (typeof oldVal == "object" && oldVal != null && typeof newVal == "object" && newVal != null) { - _generate(oldVal, newVal, patches, path + "/" + escapePathComponent(key)); - } - else { + var key = oldKeys[t] + var oldVal = mirror[key] + + if ( + hasOwnProperty(obj, key) && + !( + obj[key] === undefined && + oldVal !== undefined && + Array.isArray(obj) === false + ) + ) { + var newVal = obj[key] + + if ( + typeof oldVal == "object" && + oldVal != null && + typeof newVal == "object" && + newVal != null + ) { + _generate( + oldVal, + newVal, + patches, + path + "/" + escapePathComponent(key) + ) + } else { if (oldVal !== newVal) { - changed = true; - patches.push({ op: "replace", path: path + "/" + escapePathComponent(key), value: _deepClone(newVal) }); + changed = true + patches.push({ + op: "test", + path: path + "/" + escapePathComponent(key), + value: _deepClone(oldVal) + }) + patches.push({ + op: "replace", + path: path + "/" + escapePathComponent(key), + value: _deepClone(newVal) + }) } } - } - else if(Array.isArray(mirror) === Array.isArray(obj)) { - patches.push({ op: "remove", path: path + "/" + escapePathComponent(key) }); - deleted = true; // property has been deleted + } else if (Array.isArray(mirror) === Array.isArray(obj)) { + patches.push({ + op: "test", + path: path + "/" + escapePathComponent(key), + value: _deepClone(oldVal) + }) + patches.push({op: "remove", path: path + "/" + escapePathComponent(key)}) + deleted = true // property has been deleted } else { - patches.push({ op: "replace", path, value: obj }); - changed = true; + patches.push({op: "test", path, value: mirror}) + patches.push({op: "replace", path, value: obj}) + changed = true } } if (!deleted && newKeys.length == oldKeys.length) { - return; + return } for (var t = 0; t < newKeys.length; t++) { - var key = newKeys[t]; + var key = newKeys[t] if (!hasOwnProperty(mirror, key) && obj[key] !== undefined) { - patches.push({ op: "add", path: path + "/" + escapePathComponent(key), value: _deepClone(obj[key]) }); + patches.push({ + op: "add", + path: path + "/" + escapePathComponent(key), + value: _deepClone(obj[key]) + }) } } } /** * Create an array of patches from the differences in two objects */ -export function compare(tree1: Object | Array, tree2: Object | Array): Operation[] { - var patches = []; - _generate(tree1, tree2, patches, ''); - return patches; +export function compare( + tree1: Object | Array, + tree2: Object | Array +): Operation[] { + var patches = [] + _generate(tree1, tree2, patches, "") + return patches } diff --git a/test/spec/duplexSpec.js b/test/spec/duplexSpec.js index ce65f1fd..c9f1f25e 100644 --- a/test/spec/duplexSpec.js +++ b/test/spec/duplexSpec.js @@ -1,610 +1,680 @@ -var obj, obj2, patches; -if (typeof window === 'undefined') { - var jsdom = require('jsdom').jsdom; - var doc = jsdom(undefined, undefined); - GLOBAL.window = doc.defaultView; - GLOBAL.document = doc.defaultView.document; +var obj, obj2, patches +if (typeof window === "undefined") { + var jsdom = require("jsdom").jsdom + var doc = jsdom(undefined, undefined) + GLOBAL.window = doc.defaultView + GLOBAL.document = doc.defaultView.document } -if (typeof jsonpatch === 'undefined') { - jsonpatch = require('./../../lib/duplex'); +if (typeof jsonpatch === "undefined") { + jsonpatch = require("./../../lib/duplex") } -if (typeof _ === 'undefined') { - _ = require('./../lib/underscore.min.js'); +if (typeof _ === "undefined") { + _ = require("./../lib/underscore.min.js") } function trigger(eventName, elem) { - if (typeof document !== 'undefined') { - fireEvent(elem || document.documentElement, eventName); + if (typeof document !== "undefined") { + fireEvent(elem || document.documentElement, eventName) } } function getPatchesUsingGenerate(objFactory, objChanger) { - var obj = objFactory(); - var observer = jsonpatch.observe(obj); - objChanger(obj); - return jsonpatch.generate(observer); + var obj = objFactory() + var observer = jsonpatch.observe(obj) + objChanger(obj) + return jsonpatch.generate(observer) } function getPatchesUsingCompare(objFactory, objChanger) { - var obj = objFactory(); - var mirror = JSON.parse(JSON.stringify(obj)); - objChanger(obj); - return jsonpatch.compare(mirror, JSON.parse(JSON.stringify(obj))); + var obj = objFactory() + var mirror = JSON.parse(JSON.stringify(obj)) + objChanger(obj) + return jsonpatch.compare(mirror, JSON.parse(JSON.stringify(obj))) } //http://stackoverflow.com/questions/827716/emulate-clicking-a-link-with-javascript-that-works-with-ie function fireEvent(obj, evt) { - var fireOnThis = obj; + var fireOnThis = obj if (document.createEvent) { var evObj = document.createEvent( - evt.indexOf('mouse') > -1 ? 'MouseEvents' : 'KeyboardEvent' - ); - evObj.initEvent(evt, true, false); - fireOnThis.dispatchEvent(evObj); + evt.indexOf("mouse") > -1 ? "MouseEvents" : "KeyboardEvent" + ) + evObj.initEvent(evt, true, false) + fireOnThis.dispatchEvent(evObj) } else if (document.createEventObject) { - var evObj = document.createEventObject(); - fireOnThis.fireEvent('on' + evt, evObj); + var evObj = document.createEventObject() + fireOnThis.fireEvent("on" + evt, evObj) } } var customMatchers = { /** - * This matcher is only needed in Chrome 28 (Chrome 28 cannot successfully compare observed objects immediately after they have been changed. Chrome 30 is unaffected) - * @param obj - * @returns {boolean} - */ + * This matcher is only needed in Chrome 28 (Chrome 28 cannot successfully compare observed objects immediately after they have been changed. Chrome 30 is unaffected) + * @param obj + * @returns {boolean} + */ toEqualInJson: function(util, customEqualityTesters) { return { compare: function(actual, expected) { return { pass: JSON.stringify(actual) == JSON.stringify(expected) - }; + } } - }; + } }, toReallyEqual: function(util, customEqualityTesters) { return { compare: function(actual, expected) { return { pass: _.isEqual(actual, expected) - }; + } } - }; + } } -}; +} -describe('duplex', function() { +describe("duplex", function() { beforeEach(function() { - jasmine.addMatchers(customMatchers); - }); + jasmine.addMatchers(customMatchers) + }) - describe('toReallyEqual', function() { - it('should treat deleted, undefined and null values as different', function() { + describe("toReallyEqual", function() { + it("should treat deleted, undefined and null values as different", function() { expect({ a: undefined - }).not.toReallyEqual({}); + }).not.toReallyEqual({}) expect({ a: null - }).not.toReallyEqual({}); + }).not.toReallyEqual({}) expect({}).not.toReallyEqual({ a: undefined - }); + }) expect({}).not.toReallyEqual({ a: null - }); + }) expect({ a: undefined }).not.toReallyEqual({ a: null - }); + }) expect({ a: null }).not.toReallyEqual({ a: undefined - }); - }); - }); + }) + }) + }) - describe('generate', function() { - it('should generate replace', function() { + describe("generate", function() { + it("should generate replace", function() { obj = { - firstName: 'Albert', - lastName: 'Einstein', + firstName: "Albert", + lastName: "Einstein", phoneNumbers: [ { - number: '12345' + number: "12345" }, { - number: '45353' + number: "45353" } ] - }; + } - var observer = jsonpatch.observe(obj); - obj.firstName = 'Joachim'; - obj.lastName = 'Wester'; - obj.phoneNumbers[0].number = '123'; - obj.phoneNumbers[1].number = '456'; + var observer = jsonpatch.observe(obj) + obj.firstName = "Joachim" + obj.lastName = "Wester" + obj.phoneNumbers[0].number = "123" + obj.phoneNumbers[1].number = "456" - var patches = jsonpatch.generate(observer); + var patches = jsonpatch.generate(observer) obj2 = { - firstName: 'Albert', - lastName: 'Einstein', + firstName: "Albert", + lastName: "Einstein", phoneNumbers: [ { - number: '12345' + number: "12345" }, { - number: '45353' + number: "45353" } ] - }; + } - jsonpatch.applyPatch(obj2, patches); - expect(obj2).toReallyEqual(obj); - }); + jsonpatch.applyPatch(obj2, patches) + expect(obj2).toReallyEqual(obj) + }) - it('should generate replace (escaped chars)', function() { + it("should generate replace (escaped chars)", function() { obj = { - '/name/first': 'Albert', - '/name/last': 'Einstein', - '~phone~/numbers': [ + "/name/first": "Albert", + "/name/last": "Einstein", + "~phone~/numbers": [ { - number: '12345' + number: "12345" }, { - number: '45353' + number: "45353" } ] - }; + } - var observer = jsonpatch.observe(obj); - obj['/name/first'] = 'Joachim'; - obj['/name/last'] = 'Wester'; - obj['~phone~/numbers'][0].number = '123'; - obj['~phone~/numbers'][1].number = '456'; + var observer = jsonpatch.observe(obj) + obj["/name/first"] = "Joachim" + obj["/name/last"] = "Wester" + obj["~phone~/numbers"][0].number = "123" + obj["~phone~/numbers"][1].number = "456" - var patches = jsonpatch.generate(observer); + var patches = jsonpatch.generate(observer) obj2 = { - '/name/first': 'Albert', - '/name/last': 'Einstein', - '~phone~/numbers': [ + "/name/first": "Albert", + "/name/last": "Einstein", + "~phone~/numbers": [ { - number: '12345' + number: "12345" }, { - number: '45353' + number: "45353" } ] - }; + } - jsonpatch.applyPatch(obj2, patches); - expect(obj2).toReallyEqual(obj); - }); + jsonpatch.applyPatch(obj2, patches) + expect(obj2).toReallyEqual(obj) + }) - it('should generate replace (2 observers)', function() { + it("should generate replace (2 observers)", function() { var person1 = { - firstName: 'Alexandra', - lastName: 'Galbreath' - }; + firstName: "Alexandra", + lastName: "Galbreath" + } var person2 = { - firstName: 'Lisa', - lastName: 'Mendoza' - }; + firstName: "Lisa", + lastName: "Mendoza" + } - var observer1 = jsonpatch.observe(person1); - var observer2 = jsonpatch.observe(person2); + var observer1 = jsonpatch.observe(person1) + var observer2 = jsonpatch.observe(person2) - person1.firstName = 'Alexander'; - person2.firstName = 'Lucas'; + person1.firstName = "Alexander" + person2.firstName = "Lucas" - var patch1 = jsonpatch.generate(observer1); - var patch2 = jsonpatch.generate(observer2); + var patch1 = jsonpatch.generate(observer1) + var patch2 = jsonpatch.generate(observer2) expect(patch1).toReallyEqual([ { - op: 'replace', - path: '/firstName', - value: 'Alexander' + op: "test", + path: "/firstName", + value: "Alexandra" + }, + { + op: "replace", + path: "/firstName", + value: "Alexander" } - ]); + ]) expect(patch2).toReallyEqual([ { - op: 'replace', - path: '/firstName', - value: 'Lucas' + op: "test", + path: "/firstName", + value: "Lisa" + }, + { + op: "replace", + path: "/firstName", + value: "Lucas" } - ]); - }); + ]) + }) - it('should generate replace (double change, shallow object)', function() { + it("should generate replace (double change, shallow object)", function() { obj = { - firstName: 'Albert', - lastName: 'Einstein', + firstName: "Albert", + lastName: "Einstein", phoneNumbers: [ { - number: '12345' + number: "12345" }, { - number: '45353' + number: "45353" } ] - }; + } - var observer = jsonpatch.observe(obj); - obj.firstName = 'Marcin'; + var observer = jsonpatch.observe(obj) + obj.firstName = "Marcin" - var patches = jsonpatch.generate(observer); + var patches = jsonpatch.generate(observer) expect(patches).toReallyEqual([ { - op: 'replace', - path: '/firstName', - value: 'Marcin' + op: "test", + path: "/firstName", + value: "Albert" + }, + { + op: "replace", + path: "/firstName", + value: "Marcin" } - ]); + ]) - obj.lastName = 'Warp'; - patches = jsonpatch.generate(observer); //first patch should NOT be reported again here + obj.lastName = "Warp" + patches = jsonpatch.generate(observer) //first patch should NOT be reported again here expect(patches).toReallyEqual([ { - op: 'replace', - path: '/lastName', - value: 'Warp' + op: "test", + path: "/lastName", + value: "Einstein" + }, + { + op: "replace", + path: "/lastName", + value: "Warp" } - ]); + ]) expect(obj).toReallyEqual({ - firstName: 'Marcin', - lastName: 'Warp', + firstName: "Marcin", + lastName: "Warp", phoneNumbers: [ { - number: '12345' + number: "12345" }, { - number: '45353' + number: "45353" } ] - }); //objects should be still the same - }); + }) //objects should be still the same + }) - it('should generate replace (double change, deep object)', function() { + it("should generate replace (double change, deep object)", function() { obj = { - firstName: 'Albert', - lastName: 'Einstein', + firstName: "Albert", + lastName: "Einstein", phoneNumbers: [ { - number: '12345' + number: "12345" }, { - number: '45353' + number: "45353" } ] - }; + } - var observer = jsonpatch.observe(obj); - obj.phoneNumbers[0].number = '123'; + var observer = jsonpatch.observe(obj) + obj.phoneNumbers[0].number = "123" - var patches = jsonpatch.generate(observer); + var patches = jsonpatch.generate(observer) expect(patches).toReallyEqual([ { - op: 'replace', - path: '/phoneNumbers/0/number', - value: '123' + op: "test", + path: "/phoneNumbers/0/number", + value: "12345" + }, + { + op: "replace", + path: "/phoneNumbers/0/number", + value: "123" } - ]); + ]) - obj.phoneNumbers[1].number = '456'; - patches = jsonpatch.generate(observer); //first patch should NOT be reported again here + obj.phoneNumbers[1].number = "456" + patches = jsonpatch.generate(observer) //first patch should NOT be reported again here expect(patches).toReallyEqual([ { - op: 'replace', - path: '/phoneNumbers/1/number', - value: '456' + op: "test", + path: "/phoneNumbers/1/number", + value: "45353" + }, + { + op: "replace", + path: "/phoneNumbers/1/number", + value: "456" } - ]); + ]) expect(obj).toReallyEqual({ - firstName: 'Albert', - lastName: 'Einstein', + firstName: "Albert", + lastName: "Einstein", phoneNumbers: [ { - number: '123' + number: "123" }, { - number: '456' + number: "456" } ] - }); //objects should be still the same - }); + }) //objects should be still the same + }) - it('should generate replace (changes in new array cell, primitive values)', function() { - arr = [1]; + it("should generate replace (changes in new array cell, primitive values)", function() { + arr = [1] - var observer = jsonpatch.observe(arr); - arr.push(2); + var observer = jsonpatch.observe(arr) + arr.push(2) - var patches = jsonpatch.generate(observer); + var patches = jsonpatch.generate(observer) expect(patches).toReallyEqual([ { - op: 'add', - path: '/1', + op: "add", + path: "/1", value: 2 } - ]); + ]) - arr[0] = 3; + arr[0] = 3 - var patches = jsonpatch.generate(observer); + var patches = jsonpatch.generate(observer) expect(patches).toReallyEqual([ { - op: 'replace', - path: '/0', + op: "test", + path: "/0", + value: 1 + }, + { + op: "replace", + path: "/0", value: 3 } - ]); + ]) - arr[1] = 4; + arr[1] = 4 - var patches = jsonpatch.generate(observer); + var patches = jsonpatch.generate(observer) expect(patches).toReallyEqual([ { - op: 'replace', - path: '/1', + op: "test", + path: "/1", + value: 2 + }, + { + op: "replace", + path: "/1", value: 4 } - ]); - }); + ]) + }) - it('should generate replace (changes in new array cell, complex values)', function() { + it("should generate replace (changes in new array cell, complex values)", function() { arr = [ { id: 1, - name: 'Ted' + name: "Ted" } - ]; + ] - var observer = jsonpatch.observe(arr); + var observer = jsonpatch.observe(arr) arr.push({ id: 2, - name: 'Jerry' - }); + name: "Jerry" + }) - var patches = jsonpatch.generate(observer); + var patches = jsonpatch.generate(observer) expect(patches).toReallyEqual([ { - op: 'add', - path: '/1', + op: "add", + path: "/1", value: { id: 2, - name: 'Jerry' + name: "Jerry" } } - ]); + ]) - arr[0].id = 3; + arr[0].id = 3 - var patches = jsonpatch.generate(observer); + var patches = jsonpatch.generate(observer) expect(patches).toReallyEqual([ { - op: 'replace', - path: '/0/id', + op: "test", + path: "/0/id", + value: 1 + }, + { + op: "replace", + path: "/0/id", value: 3 } - ]); + ]) - arr[1].id = 4; + arr[1].id = 4 - var patches = jsonpatch.generate(observer); + var patches = jsonpatch.generate(observer) expect(patches).toReallyEqual([ { - op: 'replace', - path: '/1/id', + op: "test", + path: "/1/id", + value: 2 + }, + { + op: "replace", + path: "/1/id", value: 4 } - ]); - }); + ]) + }) - it('should generate add', function() { + it("should generate add", function() { obj = { - lastName: 'Einstein', + lastName: "Einstein", phoneNumbers: [ { - number: '12345' + number: "12345" } ] - }; - var observer = jsonpatch.observe(obj); + } + var observer = jsonpatch.observe(obj) - obj.firstName = 'Joachim'; - obj.lastName = 'Wester'; - obj.phoneNumbers[0].number = '123'; + obj.firstName = "Joachim" + obj.lastName = "Wester" + obj.phoneNumbers[0].number = "123" obj.phoneNumbers.push({ - number: '456' - }); + number: "456" + }) - patches = jsonpatch.generate(observer); + patches = jsonpatch.generate(observer) obj2 = { - lastName: 'Einstein', + lastName: "Einstein", phoneNumbers: [ { - number: '12345' + number: "12345" } ] - }; + } - jsonpatch.applyPatch(obj2, patches); - expect(obj2).toEqualInJson(obj); - }); + jsonpatch.applyPatch(obj2, patches) + expect(obj2).toEqualInJson(obj) + }) - it('should generate remove', function() { + it("should generate remove", function() { obj = { - lastName: 'Einstein', - firstName: 'Albert', + lastName: "Einstein", + firstName: "Albert", phoneNumbers: [ { - number: '12345' + number: "12345" }, { - number: '4234' + number: "4234" } ] - }; - var observer = jsonpatch.observe(obj); + } + var observer = jsonpatch.observe(obj) - delete obj.firstName; - obj.lastName = 'Wester'; - obj.phoneNumbers[0].number = '123'; - obj.phoneNumbers.pop(1); + delete obj.firstName + obj.lastName = "Wester" + obj.phoneNumbers[0].number = "123" + obj.phoneNumbers.pop(1) - patches = jsonpatch.generate(observer); + patches = jsonpatch.generate(observer) obj2 = { - lastName: 'Einstein', - firstName: 'Albert', + lastName: "Einstein", + firstName: "Albert", phoneNumbers: [ { - number: '12345' + number: "12345" }, { - number: '4234' + number: "4234" } ] - }; + } - jsonpatch.applyPatch(obj2, patches); - expect(obj2).toEqualInJson(obj); - }); + jsonpatch.applyPatch(obj2, patches) + expect(obj2).toEqualInJson(obj) + }) - it('should generate remove (array indexes should be sorted descending)', function() { + it("should generate remove (array indexes should be sorted descending)", function() { obj = { - items: ['a', 'b', 'c'] - }; - var observer = jsonpatch.observe(obj); + items: ["a", "b", "c"] + } + var observer = jsonpatch.observe(obj) - obj.items.pop(); - obj.items.pop(); + obj.items.pop() + obj.items.pop() - patches = jsonpatch.generate(observer); + patches = jsonpatch.generate(observer) //array indexes must be sorted descending, otherwise there is an index collision in apply expect(patches).toReallyEqual([ { - op: 'remove', - path: '/items/2' + op: "test", + path: "/items/2", + value: "c" + }, + { + op: "remove", + path: "/items/2" + }, + { + op: "test", + path: "/items/1", + value: "b" }, { - op: 'remove', - path: '/items/1' + op: "remove", + path: "/items/1" } - ]); + ]) obj2 = { - items: ['a', 'b', 'c'] - }; - jsonpatch.applyPatch(obj2, patches); - expect(obj).toEqualInJson(obj2); - }); + items: ["a", "b", "c"] + } + jsonpatch.applyPatch(obj2, patches) + expect(obj).toEqualInJson(obj2) + }) - it('should not generate the same patch twice (replace)', function() { + it("should not generate the same patch twice (replace)", function() { obj = { - lastName: 'Einstein' - }; - var observer = jsonpatch.observe(obj); + lastName: "Einstein" + } + var observer = jsonpatch.observe(obj) - obj.lastName = 'Wester'; + obj.lastName = "Wester" - patches = jsonpatch.generate(observer); + patches = jsonpatch.generate(observer) expect(patches).toReallyEqual([ { - op: 'replace', - path: '/lastName', - value: 'Wester' + op: "test", + path: "/lastName", + value: "Einstein" + }, + { + op: "replace", + path: "/lastName", + value: "Wester" } - ]); + ]) - patches = jsonpatch.generate(observer); - expect(patches).toReallyEqual([]); - }); + patches = jsonpatch.generate(observer) + expect(patches).toReallyEqual([]) + }) - it('should not generate the same patch twice (add)', function() { + it("should not generate the same patch twice (add)", function() { obj = { - lastName: 'Einstein' - }; - var observer = jsonpatch.observe(obj); + lastName: "Einstein" + } + var observer = jsonpatch.observe(obj) - obj.firstName = 'Albert'; + obj.firstName = "Albert" - patches = jsonpatch.generate(observer); + patches = jsonpatch.generate(observer) expect(patches).toReallyEqual([ { - op: 'add', - path: '/firstName', - value: 'Albert' + op: "add", + path: "/firstName", + value: "Albert" } - ]); + ]) - patches = jsonpatch.generate(observer); - expect(patches).toReallyEqual([]); - }); + patches = jsonpatch.generate(observer) + expect(patches).toReallyEqual([]) + }) - it('should not generate the same patch twice (remove)', function() { + it("should not generate the same patch twice (remove)", function() { obj = { - lastName: 'Einstein' - }; - var observer = jsonpatch.observe(obj); + lastName: "Einstein" + } + var observer = jsonpatch.observe(obj) - delete obj.lastName; + delete obj.lastName - patches = jsonpatch.generate(observer); + patches = jsonpatch.generate(observer) expect(patches).toReallyEqual([ { - op: 'remove', - path: '/lastName' + op: "test", + path: "/lastName", + value: "Einstein" + }, + { + op: "remove", + path: "/lastName" } - ]); + ]) - patches = jsonpatch.generate(observer); - expect(patches).toReallyEqual([]); - }); + patches = jsonpatch.generate(observer) + expect(patches).toReallyEqual([]) + }) - it('should ignore array properties', function() { + it("should ignore array properties", function() { var obj = { array: [1, 2, 3] - }; + } - var patches; - var observer = jsonpatch.observe(obj); + var patches + var observer = jsonpatch.observe(obj) - obj.array.value = 1; - patches = jsonpatch.generate(observer); - expect(patches.length).toReallyEqual(0); + obj.array.value = 1 + patches = jsonpatch.generate(observer) + expect(patches.length).toReallyEqual(0) - obj.array.value = 2; - patches = jsonpatch.generate(observer); - expect(patches.length).toReallyEqual(0); - }); + obj.array.value = 2 + patches = jsonpatch.generate(observer) + expect(patches.length).toReallyEqual(0) + }) - it('should respect toJSON', function() { - var a = {}; - a.self = a; + it("should respect toJSON", function() { + var a = {} + a.self = a var obj = { a: a, b: 3, toJSON: function() { return { b: this.b - }; + } } - }; + } - var observer = jsonpatch.observe(obj); - obj.b = 5; - patches = jsonpatch.generate(observer); - expect(patches.length).toReallyEqual(1); - }); + var observer = jsonpatch.observe(obj) + obj.b = 5 + patches = jsonpatch.generate(observer) + expect(patches.length).toReallyEqual(2) + }) - it('should respect toJSON in nested objects', function() { - var a = {}; - a.self = a; + it("should respect toJSON in nested objects", function() { + var a = {} + a.self = a var outer = { obj: { a: a, @@ -612,19 +682,20 @@ describe('duplex', function() { toJSON: function() { return { b: this.b - }; + } } } - }; + } - var observer = jsonpatch.observe(outer); - outer.obj.b = 5; - patches = jsonpatch.generate(observer); + var observer = jsonpatch.observe(outer) + outer.obj.b = 5 + patches = jsonpatch.generate(observer) - expect(patches.length).toReallyEqual(1); - expect(patches[0].path).toReallyEqual('/obj/b'); - expect(patches[0].value).toReallyEqual(5); - }); + expect(patches.length).toReallyEqual(2) + expect(patches[1].op).toReallyEqual("replace") + expect(patches[1].path).toReallyEqual("/obj/b") + expect(patches[1].value).toReallyEqual(5) + }) /*it('should not generate the same patch twice (move)', function() { //"move" is not implemented yet in jsonpatch.generate obj = { lastName: {str: "Einstein"} }; @@ -642,1135 +713,1271 @@ describe('duplex', function() { expect(patches).toReallyEqual([]); });*/ - xdescribe('undefined - JS to JSON projection', function() { - it('when value is set to `undefined`, should generate remove (undefined is JSON.stringified to no value)', function() { + xdescribe("undefined - JS to JSON projection", function() { + it("when value is set to `undefined`, should generate remove (undefined is JSON.stringified to no value)", function() { var obj = { - foo: 'bar' - }; + foo: "bar" + } - var observer = jsonpatch.observe(obj); - obj.foo = undefined; + var observer = jsonpatch.observe(obj) + obj.foo = undefined - var patches = jsonpatch.generate(observer); + var patches = jsonpatch.generate(observer) expect(patches).toReallyEqual([ { - op: 'remove', - path: '/foo' + op: "test", + path: "/foo", + value: "bar" + }, + { + op: "remove", + path: "/foo" } - ]); - }); + ]) + }) - it('when new property is added, and set to `undefined`, nothing should be generated (undefined is JSON.stringified to no value)', function() { + it("when new property is added, and set to `undefined`, nothing should be generated (undefined is JSON.stringified to no value)", function() { var obj = { - foo: 'bar' - }; + foo: "bar" + } - var observer = jsonpatch.observe(obj); - obj.baz = undefined; + var observer = jsonpatch.observe(obj) + obj.baz = undefined - var patches = jsonpatch.generate(observer); - expect(patches).toReallyEqual([]); - }); + var patches = jsonpatch.generate(observer) + expect(patches).toReallyEqual([]) + }) - it('when array element is set to `undefined`, should generate replace to `null` (undefined array elements are JSON.stringified to `null`)', function() { + it("when array element is set to `undefined`, should generate replace to `null` (undefined array elements are JSON.stringified to `null`)", function() { var obj = { foo: [0, 1, 2] - }; + } - var observer = jsonpatch.observe(obj); - obj.foo[1] = undefined; + var observer = jsonpatch.observe(obj) + obj.foo[1] = undefined - var patches = jsonpatch.generate(observer); + var patches = jsonpatch.generate(observer) expect(patches).toReallyEqual([ { - op: 'replace', - path: '/foo/1', + op: "test", + path: "/foo/1", + value: 1 + }, + { + op: "replace", + path: "/foo/1", value: null } - ]); - }); + ]) + }) - it('when `undefined` property is set to something, should generate add (undefined is JSON.stringified to no value)', function() { + it("when `undefined` property is set to something, should generate add (undefined is JSON.stringified to no value)", function() { var obj = { foo: undefined - }; + } - var observer = jsonpatch.observe(obj); - obj.foo = 'something'; + var observer = jsonpatch.observe(obj) + obj.foo = "something" - var patches = jsonpatch.generate(observer); + var patches = jsonpatch.generate(observer) expect(patches).toReallyEqual([ { - op: 'add', - path: '/foo', - value: 'something' + op: "add", + path: "/foo", + value: "something" } - ]); - }); - it('when `undefined` array element is set to something, should generate replace (undefined array elements are JSON.stringified to `null`)', function() { + ]) + }) + it("when `undefined` array element is set to something, should generate replace (undefined array elements are JSON.stringified to `null`)", function() { var obj = { foo: [0, undefined, 2] - }; + } - var observer = jsonpatch.observe(obj); - obj.foo[1] = 1; + var observer = jsonpatch.observe(obj) + obj.foo[1] = 1 - var patches = jsonpatch.generate(observer); + var patches = jsonpatch.generate(observer) expect(patches).toReallyEqual([ { - op: 'replace', - path: '/foo/1', + op: "test", + path: "/foo/1", + value: null + }, + { + op: "replace", + path: "/foo/1", value: 1 } - ]); - }); - }); + ]) + }) + }) - describe('undefined - JSON to JS extension', function() { - describe('should generate empty patch, when', function() { - it('when new property is set to `undefined`', function() { + describe("undefined - JSON to JS extension", function() { + describe("should generate empty patch, when", function() { + it("when new property is set to `undefined`", function() { var objFactory = function() { return { - foo: 'bar' - }; - }; + foo: "bar" + } + } var objChanger = function(obj) { - obj.baz = undefined; - }; + obj.baz = undefined + } var genereatedPatches = getPatchesUsingGenerate( objFactory, objChanger - ); - var comparedPatches = getPatchesUsingCompare(objFactory, objChanger); + ) + var comparedPatches = getPatchesUsingCompare(objFactory, objChanger) - expect(genereatedPatches).toReallyEqual([]); - expect(genereatedPatches).toReallyEqual(comparedPatches); - }); + expect(genereatedPatches).toReallyEqual([]) + expect(genereatedPatches).toReallyEqual(comparedPatches) + }) - it('when an `undefined` property is deleted', function() { + it("when an `undefined` property is deleted", function() { var objFactory = function() { return { foo: undefined - }; - }; + } + } var objChanger = function(obj) { - delete obj.foo; - }; + delete obj.foo + } var genereatedPatches = getPatchesUsingGenerate( objFactory, objChanger - ); - var comparedPatches = getPatchesUsingCompare(objFactory, objChanger); + ) + var comparedPatches = getPatchesUsingCompare(objFactory, objChanger) - expect(genereatedPatches).toReallyEqual([]); - expect(genereatedPatches).toReallyEqual(comparedPatches); - }); - }); + expect(genereatedPatches).toReallyEqual([]) + expect(genereatedPatches).toReallyEqual(comparedPatches) + }) + }) - describe('should generate add, when', function() { - it('`undefined` property is set to something', function() { + describe("should generate add, when", function() { + it("`undefined` property is set to something", function() { var objFactory = function() { return { foo: undefined - }; - }; + } + } var objChanger = function(obj) { - obj.foo = 'something'; - }; + obj.foo = "something" + } var genereatedPatches = getPatchesUsingGenerate( objFactory, objChanger - ); - var comparedPatches = getPatchesUsingCompare(objFactory, objChanger); + ) + var comparedPatches = getPatchesUsingCompare(objFactory, objChanger) expect(genereatedPatches).toReallyEqual([ { - op: 'add', - path: '/foo', - value: 'something' + op: "add", + path: "/foo", + value: "something" } - ]); - expect(genereatedPatches).toReallyEqual(comparedPatches); - }); - }); + ]) + expect(genereatedPatches).toReallyEqual(comparedPatches) + }) + }) - describe('should generate remove, when', function() { - it('value is set to `undefined`', function() { + describe("should generate remove, when", function() { + it("value is set to `undefined`", function() { var objFactory = function() { return { - foo: 'bar' - }; - }; + foo: "bar" + } + } var objChanger = function(obj) { - obj.foo = undefined; - }; + obj.foo = undefined + } var genereatedPatches = getPatchesUsingGenerate( objFactory, objChanger - ); - var comparedPatches = getPatchesUsingCompare(objFactory, objChanger); + ) + var comparedPatches = getPatchesUsingCompare(objFactory, objChanger) expect(genereatedPatches).toReallyEqual([ { - op: 'remove', - path: '/foo' + op: "test", + path: "/foo", + value: "bar" + }, + { + op: "remove", + path: "/foo" } - ]); - expect(genereatedPatches).toReallyEqual(comparedPatches); - }); - }); + ]) + expect(genereatedPatches).toReallyEqual(comparedPatches) + }) + }) - describe('should generate replace, when', function() { - it('array element is set to `undefined`', function() { + describe("should generate replace, when", function() { + it("array element is set to `undefined`", function() { var objFactory = function() { return { foo: [0, 1, 2] - }; - }; + } + } var objChanger = function(obj) { - obj.foo[1] = undefined; - }; + obj.foo[1] = undefined + } var genereatedPatches = getPatchesUsingGenerate( objFactory, objChanger - ); - var comparedPatches = getPatchesUsingCompare(objFactory, objChanger); + ) + var comparedPatches = getPatchesUsingCompare(objFactory, objChanger) expect(genereatedPatches).toReallyEqual([ { - op: 'replace', - path: '/foo/1', + op: "test", + path: "/foo/1", + value: 1 + }, + { + op: "replace", + path: "/foo/1", value: null } - ]); - expect(genereatedPatches).toReallyEqual(comparedPatches); - }); - it('`undefined` array element is set to something', function() { + ]) + expect(genereatedPatches).toReallyEqual(comparedPatches) + }) + it("`undefined` array element is set to something", function() { var objFactory = function() { return { foo: [0, undefined, 2] - }; - }; + } + } var objChanger = function(obj) { - obj.foo[1] = 1; - }; + obj.foo[1] = 1 + } var genereatedPatches = getPatchesUsingGenerate( objFactory, objChanger - ); - var comparedPatches = getPatchesUsingCompare(objFactory, objChanger); + ) + var comparedPatches = getPatchesUsingCompare(objFactory, objChanger) expect(genereatedPatches).toReallyEqual([ { - op: 'replace', - path: '/foo/1', + op: "test", + path: "/foo/1", + value: null + }, + { + op: "replace", + path: "/foo/1", value: 1 } - ]); - expect(genereatedPatches).toReallyEqual(comparedPatches); - }); - }); - }); - }); + ]) + expect(genereatedPatches).toReallyEqual(comparedPatches) + }) + }) + }) + }) - describe('apply', function() { + describe("apply", function() { // https://tools.ietf.org/html/rfc6902#appendix-A.16 - it('should add an Array Value', function() { + it("should add an Array Value", function() { var obj = { - foo: ['bar'] - }; + foo: ["bar"] + } var patches = [ { - op: 'add', - path: '/foo/-', - value: ['abc', 'def'] + op: "add", + path: "/foo/-", + value: ["abc", "def"] } - ]; + ] - jsonpatch.applyPatch(obj, patches); + jsonpatch.applyPatch(obj, patches) expect(obj).toReallyEqual({ - foo: ['bar', ['abc', 'def']] - }); - }); - }); + foo: ["bar", ["abc", "def"]] + }) + }) + }) - describe('callback', function() { - it('should generate replace', function(done) { - var patches; + describe("callback", function() { + it("should generate replace", function(done) { + var patches obj = { - firstName: 'Albert', - lastName: 'Einstein', + firstName: "Albert", + lastName: "Einstein", phoneNumbers: [ { - number: '12345' + number: "12345" }, { - number: '45353' + number: "45353" } ] - }; + } jsonpatch.observe(obj, function(_patches) { - patches = _patches; - patchesChanged(); - }); - obj.firstName = 'Joachim'; - obj.lastName = 'Wester'; - obj.phoneNumbers[0].number = '123'; - obj.phoneNumbers[1].number = '456'; + patches = _patches + patchesChanged() + }) + obj.firstName = "Joachim" + obj.lastName = "Wester" + obj.phoneNumbers[0].number = "123" + obj.phoneNumbers[1].number = "456" - trigger('keyup'); + trigger("keyup") function patchesChanged() { obj2 = { - firstName: 'Albert', - lastName: 'Einstein', + firstName: "Albert", + lastName: "Einstein", phoneNumbers: [ { - number: '12345' + number: "12345" }, { - number: '45353' + number: "45353" } ] - }; + } - jsonpatch.applyPatch(obj2, patches); - expect(obj2).toReallyEqual(obj); - done(); + jsonpatch.applyPatch(obj2, patches) + expect(obj2).toReallyEqual(obj) + done() } - }); + }) - it('should generate replace (double change, shallow object)', function( - done - ) { - var lastPatches, called = 0; + it("should generate replace (double change, shallow object)", function(done) { + var lastPatches, + called = 0 obj = { - firstName: 'Albert', - lastName: 'Einstein', + firstName: "Albert", + lastName: "Einstein", phoneNumbers: [ { - number: '12345' + number: "12345" }, { - number: '45353' + number: "45353" } ] - }; + } jsonpatch.observe(obj, function(patches) { - called++; - lastPatches = patches; - patchesChanged(called); - }); - obj.firstName = 'Marcin'; + called++ + lastPatches = patches + patchesChanged(called) + }) + obj.firstName = "Marcin" - trigger('keyup'); + trigger("keyup") // ugly migration from Jasmine 1.x to > 2.0 function patchesChanged(time) { switch (time) { case 1: - expect(called).toReallyEqual(1); + expect(called).toReallyEqual(1) expect(lastPatches).toReallyEqual([ { - op: 'replace', - path: '/firstName', - value: 'Marcin' + op: "test", + path: "/firstName", + value: "Albert" + }, + { + op: "replace", + path: "/firstName", + value: "Marcin" } - ]); + ]) - obj.lastName = 'Warp'; - trigger('keyup'); - break; + obj.lastName = "Warp" + trigger("keyup") + break case 2: - expect(called).toReallyEqual(2); + expect(called).toReallyEqual(2) expect(lastPatches).toReallyEqual([ { - op: 'replace', - path: '/lastName', - value: 'Warp' + op: "test", + path: "/lastName", + value: "Einstein" + }, + { + op: "replace", + path: "/lastName", + value: "Warp" } - ]); //first patch should NOT be reported again here + ]) //first patch should NOT be reported again here expect(obj).toReallyEqual({ - firstName: 'Marcin', - lastName: 'Warp', + firstName: "Marcin", + lastName: "Warp", phoneNumbers: [ { - number: '12345' + number: "12345" }, { - number: '45353' + number: "45353" } ] - }); //objects should be still the same + }) //objects should be still the same - done(); - break; + done() + break } } - }); + }) - it('should generate replace (double change, deep object)', function(done) { - var lastPatches, called = 0; + it("should generate replace (double change, deep object)", function(done) { + var lastPatches, + called = 0 obj = { - firstName: 'Albert', - lastName: 'Einstein', + firstName: "Albert", + lastName: "Einstein", phoneNumbers: [ { - number: '12345' + number: "12345" }, { - number: '45353' + number: "45353" } ] - }; + } jsonpatch.observe(obj, function(patches) { - called++; - lastPatches = patches; - patchesChanged(called); - }); - obj.phoneNumbers[0].number = '123'; + called++ + lastPatches = patches + patchesChanged(called) + }) + obj.phoneNumbers[0].number = "123" - trigger('keyup'); + trigger("keyup") // ugly migration from Jasmine 1.x to > 2.0 function patchesChanged(time) { switch (time) { case 1: - expect(called).toReallyEqual(1); + expect(called).toReallyEqual(1) expect(lastPatches).toReallyEqual([ { - op: 'replace', - path: '/phoneNumbers/0/number', - value: '123' + op: "test", + path: "/phoneNumbers/0/number", + value: "12345" + }, + { + op: "replace", + path: "/phoneNumbers/0/number", + value: "123" } - ]); + ]) - obj.phoneNumbers[1].number = '456'; - trigger('keyup'); - break; + obj.phoneNumbers[1].number = "456" + trigger("keyup") + break case 2: - expect(called).toReallyEqual(2); + expect(called).toReallyEqual(2) expect(lastPatches).toReallyEqual([ { - op: 'replace', - path: '/phoneNumbers/1/number', - value: '456' + op: "test", + path: "/phoneNumbers/1/number", + value: "45353" + }, + { + op: "replace", + path: "/phoneNumbers/1/number", + value: "456" } - ]); //first patch should NOT be reported again here + ]) //first patch should NOT be reported again here expect(obj).toReallyEqual({ - firstName: 'Albert', - lastName: 'Einstein', + firstName: "Albert", + lastName: "Einstein", phoneNumbers: [ { - number: '123' + number: "123" }, { - number: '456' + number: "456" } ] - }); //objects should be still the same - done(); - break; + }) //objects should be still the same + done() + break } } - }); + }) - it('generate should execute callback synchronously', function(done) { - var lastPatches, called = 0, res; + it("generate should execute callback synchronously", function(done) { + var lastPatches, + called = 0, + res obj = { - firstName: 'Albert', - lastName: 'Einstein', + firstName: "Albert", + lastName: "Einstein", phoneNumbers: [ { - number: '12345' + number: "12345" }, { - number: '45353' + number: "45353" } ] - }; + } var observer = jsonpatch.observe(obj, function(patches) { - called++; - lastPatches = patches; - }); - obj.phoneNumbers[0].number = '123'; + called++ + lastPatches = patches + }) + obj.phoneNumbers[0].number = "123" setTimeout(function() { - expect(called).toReallyEqual(0); + expect(called).toReallyEqual(0) - res = jsonpatch.generate(observer); - expect(called).toReallyEqual(1); + res = jsonpatch.generate(observer) + expect(called).toReallyEqual(1) expect(lastPatches).toReallyEqual([ { - op: 'replace', - path: '/phoneNumbers/0/number', - value: '123' + op: "test", + path: "/phoneNumbers/0/number", + value: "12345" + }, + { + op: "replace", + path: "/phoneNumbers/0/number", + value: "123" } - ]); - expect(lastPatches).toReallyEqual(res); + ]) + expect(lastPatches).toReallyEqual(res) - res = jsonpatch.generate(observer); - expect(called).toReallyEqual(1); + res = jsonpatch.generate(observer) + expect(called).toReallyEqual(1) expect(lastPatches).toReallyEqual([ { - op: 'replace', - path: '/phoneNumbers/0/number', - value: '123' + op: "test", + path: "/phoneNumbers/0/number", + value: "12345" + }, + { + op: "replace", + path: "/phoneNumbers/0/number", + value: "123" } - ]); - expect(res).toReallyEqual([]); - done(); - }, 100); - }); + ]) + expect(res).toReallyEqual([]) + done() + }, 100) + }) - it('should unobserve then observe again', function(done) { - var called = 0; + it("should unobserve then observe again", function(done) { + var called = 0 obj = { - firstName: 'Albert', - lastName: 'Einstein', + firstName: "Albert", + lastName: "Einstein", phoneNumbers: [ { - number: '12345' + number: "12345" }, { - number: '45353' + number: "45353" } ] - }; + } var observer = jsonpatch.observe(obj, function(patches) { - called++; - }); + called++ + }) - obj.firstName = 'Malvin'; + obj.firstName = "Malvin" - trigger('keyup'); + trigger("keyup") // ugly migration from Jasmine 1.x to > 2.0 setTimeout(function() { - expect(called).toReallyEqual(1); + expect(called).toReallyEqual(1) - jsonpatch.unobserve(obj, observer); + jsonpatch.unobserve(obj, observer) - obj.firstName = 'Wilfred'; + obj.firstName = "Wilfred" - trigger('keyup'); + trigger("keyup") setTimeout(function() { - expect(called).toReallyEqual(1); + expect(called).toReallyEqual(1) observer = jsonpatch.observe(obj, function(patches) { - called++; - }); + called++ + }) - obj.firstName = 'Megan'; - trigger('keyup'); + obj.firstName = "Megan" + trigger("keyup") setTimeout(function() { - expect(called).toReallyEqual(2); - done(); - }, 20); - }, 20); - }, 20); - }); + expect(called).toReallyEqual(2) + done() + }, 20) + }, 20) + }, 20) + }) - it('should unobserve then observe again (deep value)', function(done) { - var called = 0; + it("should unobserve then observe again (deep value)", function(done) { + var called = 0 obj = { - firstName: 'Albert', - lastName: 'Einstein', + firstName: "Albert", + lastName: "Einstein", phoneNumbers: [ { - number: '12345' + number: "12345" }, { - number: '45353' + number: "45353" } ] - }; + } var observer = jsonpatch.observe(obj, function(patches) { - called++; - }); + called++ + }) - obj.phoneNumbers[1].number = '555'; + obj.phoneNumbers[1].number = "555" - trigger('keyup'); + trigger("keyup") // ugly migration from Jasmine 1.x to > 2.0 setTimeout(function() { - expect(called).toReallyEqual(1); + expect(called).toReallyEqual(1) - jsonpatch.unobserve(obj, observer); + jsonpatch.unobserve(obj, observer) - obj.phoneNumbers[1].number = '556'; + obj.phoneNumbers[1].number = "556" - trigger('keyup'); + trigger("keyup") setTimeout(function() { - expect(called).toReallyEqual(1); + expect(called).toReallyEqual(1) observer = jsonpatch.observe(obj, function(patches) { - called++; - }); + called++ + }) - obj.phoneNumbers[1].number = '557'; + obj.phoneNumbers[1].number = "557" - trigger('keyup'); + trigger("keyup") setTimeout(function() { - expect(called).toReallyEqual(2); - done(); - }, 20); - }, 20); - }, 20); - }); - - it('calling unobserve should deliver pending changes synchronously', function( - done - ) { - var lastPatches = ''; + expect(called).toReallyEqual(2) + done() + }, 20) + }, 20) + }, 20) + }) + + it("calling unobserve should deliver pending changes synchronously", function(done) { + var lastPatches = "" obj = { - firstName: 'Albert', - lastName: 'Einstein', + firstName: "Albert", + lastName: "Einstein", phoneNumbers: [ { - number: '12345' + number: "12345" }, { - number: '45353' + number: "45353" } ] - }; + } var observer = jsonpatch.observe(obj, function(patches) { - lastPatches = patches; - }); + lastPatches = patches + }) - obj.firstName = 'Malvin'; + obj.firstName = "Malvin" - jsonpatch.unobserve(obj, observer); + jsonpatch.unobserve(obj, observer) - expect(lastPatches[0].value).toBe('Malvin'); + expect(lastPatches[1].value).toBe("Malvin") - obj.firstName = 'Jonathan'; + obj.firstName = "Jonathan" // ugly migration from Jasmine 1.x to > 2.0 setTimeout(function() { - expect(lastPatches[0].value).toBe('Malvin'); - done(); - }, 20); - }); - - it('should handle callbacks that calls observe() and unobserve() internally', function( - done - ) { + expect(lastPatches[1].value).toBe("Malvin") + done() + }, 20) + }) + + it("should handle callbacks that calls observe() and unobserve() internally", function(done) { var obj = { - foo: 'bar' - }; + foo: "bar" + } - var observer; - var callbackCalled, count = 0; + var observer + var callbackCalled, + count = 0 var callback = jasmine - .createSpy('callback', function() { - jsonpatch.unobserve(obj, observer); + .createSpy("callback", function() { + jsonpatch.unobserve(obj, observer) - jsonpatch.observe(obj, callback); - callbackCalled(++count); + jsonpatch.observe(obj, callback) + callbackCalled(++count) }) - .and.callThrough(); + .and.callThrough() - observer = jsonpatch.observe(obj, callback); + observer = jsonpatch.observe(obj, callback) - expect(callback.calls.count()).toReallyEqual(0); + expect(callback.calls.count()).toReallyEqual(0) - obj.foo = 'bazz'; + obj.foo = "bazz" - trigger('keyup'); + trigger("keyup") // ugly migration from Jasmine 1.x to > 2.0 function callbackCalled(time) { switch (time) { case 1: - expect(callback.calls.count()).toReallyEqual(1); + expect(callback.calls.count()).toReallyEqual(1) - obj.foo = 'bazinga'; + obj.foo = "bazinga" - trigger('keyup'); - break; + trigger("keyup") + break case 2: - expect(callback.calls.count()).toReallyEqual(2); - done(); - break; + expect(callback.calls.count()).toReallyEqual(2) + done() + break } } - }); + }) - it('should generate patch after `mouseup` event', function(done) { + it("should generate patch after `mouseup` event", function(done) { obj = { - lastName: 'Einstein' - }; - var lastPatches; + lastName: "Einstein" + } + var lastPatches var observer = jsonpatch.observe(obj, function(patches) { - lastPatches = patches; - }); + lastPatches = patches + }) - obj.lastName = 'Hawking'; + obj.lastName = "Hawking" - trigger('mouseup'); + trigger("mouseup") setTimeout(function() { expect(lastPatches).toEqual([ { - op: 'replace', - path: '/lastName', - value: 'Hawking' + op: "test", + path: "/lastName", + value: "Einstein" + }, + { + op: "replace", + path: "/lastName", + value: "Hawking" } - ]); - done(); - }); - }); + ]) + done() + }) + }) - it('should generate patch after `mousedown` event', function(done) { + it("should generate patch after `mousedown` event", function(done) { obj = { - lastName: 'Einstein' - }; - var lastPatches; + lastName: "Einstein" + } + var lastPatches var observer = jsonpatch.observe(obj, function(patches) { - lastPatches = patches; - }); + lastPatches = patches + }) - obj.lastName = 'Hawking'; - trigger('mousedown'); + obj.lastName = "Hawking" + trigger("mousedown") setTimeout(function() { expect(lastPatches).toEqual([ { - op: 'replace', - path: '/lastName', - value: 'Hawking' + op: "test", + path: "/lastName", + value: "Einstein" + }, + { + op: "replace", + path: "/lastName", + value: "Hawking" } - ]); - done(); - }, 20); - }); + ]) + done() + }, 20) + }) - it('should generate patch after `keydown` event', function(done) { + it("should generate patch after `keydown` event", function(done) { obj = { - lastName: 'Einstein' - }; - var lastPatches; + lastName: "Einstein" + } + var lastPatches var observer = jsonpatch.observe(obj, function(patches) { - lastPatches = patches; - }); + lastPatches = patches + }) - obj.lastName = 'Hawking'; - trigger('keydown'); + obj.lastName = "Hawking" + trigger("keydown") setTimeout(function() { expect(lastPatches).toEqual([ { - op: 'replace', - path: '/lastName', - value: 'Hawking' + op: "test", + path: "/lastName", + value: "Einstein" + }, + { + op: "replace", + path: "/lastName", + value: "Hawking" } - ]); - done(); - }, 20); - }); + ]) + done() + }, 20) + }) - it('should generate patch after `change` event', function(done) { + it("should generate patch after `change` event", function(done) { obj = { - lastName: 'Einstein' - }; - var lastPatches; + lastName: "Einstein" + } + var lastPatches var observer = jsonpatch.observe(obj, function(patches) { - lastPatches = patches; - }); + lastPatches = patches + }) - obj.lastName = 'Hawking'; - trigger('change'); + obj.lastName = "Hawking" + trigger("change") setTimeout(function() { expect(lastPatches).toEqual([ { - op: 'replace', - path: '/lastName', - value: 'Hawking' + op: "test", + path: "/lastName", + value: "Einstein" + }, + { + op: "replace", + path: "/lastName", + value: "Hawking" } - ]); - done(); - }, 20); - }); - }); - describe('compare', function() { - it('Replacing a root array with an object should be handled well', function() { - - const obj = {}; - var patches = jsonpatch.compare(['jack'], obj); + ]) + done() + }, 20) + }) + }) + describe("compare", function() { + it("Replacing a root array with an object should be handled well", function() { + const obj = {} + var patches = jsonpatch.compare(["jack"], obj) expect(patches).toEqual([ { - op: 'replace', - path: '', + op: "test", + path: "", + value: ["jack"] + }, + { + op: "replace", + path: "", value: obj } - ]); - - }); - it('Replacing an array with an object should be handled well', function() { - - const obj = {}; - var patches = jsonpatch.compare({arr: ['jack']}, {arr: obj}); + ]) + }) + it("Replacing an array with an object should be handled well", function() { + const obj = {} + var patches = jsonpatch.compare({arr: ["jack"]}, {arr: obj}) expect(patches).toEqual([ { - op: 'replace', - path: '/arr', + op: "test", + path: "/arr", + value: ["jack"] + }, + { + op: "replace", + path: "/arr", value: obj } - ]); - - }); - it('Replacing an array that nested in an object with an object nested in an an object should be handled well', function() { - - const obj = {}; - var patches = jsonpatch.compare({arr: {deeperArray: ['jack']}}, {arr: {deeperArray: obj}}); + ]) + }) + it("Replacing an array that nested in an object with an object nested in an an object should be handled well", function() { + const obj = {} + var patches = jsonpatch.compare( + {arr: {deeperArray: ["jack"]}}, + {arr: {deeperArray: obj}} + ) expect(patches).toEqual([ { - op: 'replace', - path: '/arr/deeperArray', + op: "test", + path: "/arr/deeperArray", + value: ["jack"] + }, + { + op: "replace", + path: "/arr/deeperArray", value: obj } - ]); - - }); - it('should return an add for a property that does not exist in the first obj', function() { + ]) + }) + it("should return an add for a property that does not exist in the first obj", function() { var objA = { user: { - firstName: 'Albert' + firstName: "Albert" } - }; + } var objB = { user: { - firstName: 'Albert', - lastName: 'Einstein' + firstName: "Albert", + lastName: "Einstein" } - }; + } expect(jsonpatch.compare(objA, objB)).toReallyEqual([ { - op: 'add', - path: '/user/lastName', - value: 'Einstein' + op: "add", + path: "/user/lastName", + value: "Einstein" } - ]); - }); + ]) + }) - it('should return a remove for a property that does not exist in the second obj', function() { + it("should return a remove for a property that does not exist in the second obj", function() { var objA = { user: { - firstName: 'Albert', - lastName: 'Einstein' + firstName: "Albert", + lastName: "Einstein" } - }; + } var objB = { user: { - firstName: 'Albert' + firstName: "Albert" } - }; + } expect(jsonpatch.compare(objA, objB)).toReallyEqual([ { - op: 'remove', - path: '/user/lastName' + op: "test", + path: "/user/lastName", + value: "Einstein" + }, + { + op: "remove", + path: "/user/lastName" } - ]); - }); + ]) + }) - it('should return a replace for a property that exists in both', function() { + it("should return a replace for a property that exists in both", function() { var objA = { user: { - firstName: 'Albert', - lastName: 'Einstein' + firstName: "Albert", + lastName: "Einstein" } - }; + } var objB = { user: { - firstName: 'Albert', - lastName: 'Collins' + firstName: "Albert", + lastName: "Collins" } - }; + } expect(jsonpatch.compare(objA, objB)).toReallyEqual([ { - op: 'replace', - path: '/user/lastName', - value: 'Collins' + op: "test", + path: "/user/lastName", + value: "Einstein" + }, + { + op: "replace", + path: "/user/lastName", + value: "Collins" } - ]); - }); + ]) + }) - it('should replace null with object', function() { + it("should replace null with object", function() { var objA = { user: null - }; + } var objB = { user: {} - }; + } expect(jsonpatch.compare(objA, objB)).toReallyEqual([ { - op: 'replace', - path: '/user', + op: "test", + path: "/user", + value: null + }, + { + op: "replace", + path: "/user", value: {} } - ]); - }); + ]) + }) - it('should replace object with null', function() { + it("should replace object with null", function() { var objA = { user: {} - }; + } var objB = { user: null - }; + } expect(jsonpatch.compare(objA, objB)).toReallyEqual([ { - op: 'replace', - path: '/user', + op: "test", + path: "/user", + value: {} + }, + { + op: "replace", + path: "/user", value: null } - ]); - }); + ]) + }) - it('should not remove undefined', function() { + it("should not remove undefined", function() { var objA = { user: undefined - }; + } var objB = { user: undefined - }; + } - expect(jsonpatch.compare(objA, objB)).toReallyEqual([]); - }); + expect(jsonpatch.compare(objA, objB)).toReallyEqual([]) + }) - it('should replace 0 with empty string', function() { + it("should replace 0 with empty string", function() { var objA = { user: 0 - }; + } var objB = { - user: '' - }; + user: "" + } expect(jsonpatch.compare(objA, objB)).toReallyEqual([ { - op: 'replace', - path: '/user', - value: '' + op: "test", + path: "/user", + value: 0 + }, + { + op: "replace", + path: "/user", + value: "" } - ]); - }); - }); + ]) + }) + }) - describe('Registering multiple observers with the same callback', function() { - it('should register only one observer', function(done) { + describe("Registering multiple observers with the same callback", function() { + it("should register only one observer", function(done) { var obj = { - foo: 'bar' - }; + foo: "bar" + } - var callback = jasmine.createSpy('callback'); + var callback = jasmine.createSpy("callback") - jsonpatch.observe(obj, callback); - jsonpatch.observe(obj, callback); + jsonpatch.observe(obj, callback) + jsonpatch.observe(obj, callback) - expect(callback.calls.count()).toReallyEqual(0); + expect(callback.calls.count()).toReallyEqual(0) - obj.foo = 'bazz'; + obj.foo = "bazz" - trigger('keyup'); + trigger("keyup") setTimeout(function() { - expect(callback.calls.count()).toReallyEqual(1); - done(); - }, 100); - }); + expect(callback.calls.count()).toReallyEqual(1) + done() + }, 100) + }) - it('should return the same observer if callback has been already registered)', function() { + it("should return the same observer if callback has been already registered)", function() { var obj = { - foo: 'bar' - }; + foo: "bar" + } - var callback = jasmine.createSpy('callback'); + var callback = jasmine.createSpy("callback") - var observer1 = jsonpatch.observe(obj, callback); - var observer2 = jsonpatch.observe(obj, callback); + var observer1 = jsonpatch.observe(obj, callback) + var observer2 = jsonpatch.observe(obj, callback) - expect(observer1).toBe(observer2); - }); + expect(observer1).toBe(observer2) + }) - it('should return a different observer if callback has been unregistered and registered again', function() { + it("should return a different observer if callback has been unregistered and registered again", function() { var obj = { - foo: 'bar' - }; + foo: "bar" + } - var callback = jasmine.createSpy('callback'); + var callback = jasmine.createSpy("callback") - var observer1 = jsonpatch.observe(obj, callback); + var observer1 = jsonpatch.observe(obj, callback) - jsonpatch.unobserve(obj, observer1); + jsonpatch.unobserve(obj, observer1) - var observer2 = jsonpatch.observe(obj, callback); + var observer2 = jsonpatch.observe(obj, callback) - expect(observer1).not.toBe(observer2); - }); + expect(observer1).not.toBe(observer2) + }) - it('should not call callback on key and mouse events after unobserve', function( - done - ) { - var called = 0; + it("should not call callback on key and mouse events after unobserve", function(done) { + var called = 0 obj = { - firstName: 'Albert', - lastName: 'Einstein', + firstName: "Albert", + lastName: "Einstein", phoneNumbers: [ { - number: '12345' + number: "12345" }, { - number: '45353' + number: "45353" } ] - }; + } var observer = jsonpatch.observe(obj, function(patches) { - called++; - }); + called++ + }) - obj.firstName = 'Malvin'; + obj.firstName = "Malvin" - trigger('keyup'); + trigger("keyup") // ugly migration from Jasmine 1.x to > 2.0 setTimeout(function() { - expect(called).toReallyEqual(1); + expect(called).toReallyEqual(1) - jsonpatch.unobserve(obj, observer); + jsonpatch.unobserve(obj, observer) - obj.firstName = 'Wilfred'; + obj.firstName = "Wilfred" - trigger('mousedown'); - trigger('mouseup'); - trigger('keydown'); - trigger('keyup'); + trigger("mousedown") + trigger("mouseup") + trigger("keydown") + trigger("keyup") setTimeout(function() { - expect(called).toReallyEqual(1); - done(); - }, 20); - }, 20); - }); - }); - - describe('compare', function() { - it('should return patch difference between objects', function() { + expect(called).toReallyEqual(1) + done() + }, 20) + }, 20) + }) + }) + + describe("compare", function() { + it("should return patch difference between objects", function() { var obj = { - firstName: 'Albert', - lastName: 'Einstein', + firstName: "Albert", + lastName: "Einstein", phoneNumbers: [ { - number: '12345' + number: "12345" }, { - number: '45353' + number: "45353" } ] - }; + } var obj2 = { - firstName: 'Joachim', - lastName: 'Wester', + firstName: "Joachim", + lastName: "Wester", mobileNumbers: [ { - number: '12345' + number: "12345" }, { - number: '45353' + number: "45353" } ] - }; + } - var patches = jsonpatch.compare(obj, obj2); + var patches = jsonpatch.compare(obj, obj2) expect(patches).toReallyEqual([ { - op: 'remove', - path: '/phoneNumbers' + op: "test", + path: "/phoneNumbers", + value: [ + { + number: "12345" + }, + { + number: "45353" + } + ] }, { - op: 'replace', - path: '/lastName', - value: 'Wester' + op: "remove", + path: "/phoneNumbers" }, { - op: 'replace', - path: '/firstName', - value: 'Joachim' + op: "test", + path: "/lastName", + value: "Einstein" }, { - op: 'add', - path: '/mobileNumbers', + op: "replace", + path: "/lastName", + value: "Wester" + }, + { + op: "test", + path: "/firstName", + value: "Albert" + }, + { + op: "replace", + path: "/firstName", + value: "Joachim" + }, + { + op: "add", + path: "/mobileNumbers", value: [ { - number: '12345' + number: "12345" }, { - number: '45353' + number: "45353" } ] } - ]); - }); + ]) + }) - it('should not modify the source object', function() { + it("should not modify the source object", function() { var obj = { - foo: 'bar' - }; - jsonpatch.compare(obj, {}); - expect(obj.foo).toReallyEqual('bar'); - }); - }); - - it('should work with plain objects', function() { + foo: "bar" + } + jsonpatch.compare(obj, {}) + expect(obj.foo).toReallyEqual("bar") + }) + }) + + it("should work with plain objects", function() { // Objects without Object prototype - var one = Object.create(null); - var two = Object.create(null); - one.onlyOne = Object.create(null); - two.onlyTwo = Object.create(null); - one.both = Object.create(null); - two.both = Object.create(null); + var one = Object.create(null) + var two = Object.create(null) + one.onlyOne = Object.create(null) + two.onlyTwo = Object.create(null) + one.both = Object.create(null) + two.both = Object.create(null) // This must not throw - jsonpatch.compare(one, two); - }); -}); + jsonpatch.compare(one, two) + }) +}) diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 00000000..99207cf4 --- /dev/null +++ b/yarn.lock @@ -0,0 +1,4097 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +abab@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.4.tgz#5faad9c2c07f60dd76770f71cf025b62a63cfd4e" + integrity sha1-X6rZwsB/YN12dw9xzwJbYqY8/U4= + +abbrev@1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== + +accepts@~1.3.4: + version "1.3.7" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" + integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== + dependencies: + mime-types "~2.1.24" + negotiator "0.6.2" + +acorn-dynamic-import@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-2.0.2.tgz#c752bd210bef679501b6c6cb7fc84f8f47158cc4" + integrity sha1-x1K9IQvvZ5UBtsbLf8hPj0cVjMQ= + dependencies: + acorn "^4.0.3" + +acorn-globals@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-3.1.0.tgz#fd8270f71fbb4996b004fa880ee5d46573a731bf" + integrity sha1-/YJw9x+7SZawBPqIDuXUZXOnMb8= + dependencies: + acorn "^4.0.4" + +acorn@^4.0.3, acorn@^4.0.4: + version "4.0.13" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" + integrity sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c= + +acorn@^5.0.0: + version "5.7.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279" + integrity sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw== + +agent-base@^4.1.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.1.tgz#d89e5999f797875674c07d87f260fc41e83e8ca9" + integrity sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg== + dependencies: + es6-promisify "^5.0.0" + +ajv-keywords@^1.1.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c" + integrity sha1-MU3QpLM2j609/NxU7eYXG4htrzw= + +ajv@^4.7.0: + version "4.11.8" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" + integrity sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY= + dependencies: + co "^4.6.0" + json-stable-stringify "^1.0.1" + +ajv@^6.5.5: + version "6.10.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.0.tgz#90d0d54439da587cd7e843bfb7045f50bd22bdf1" + integrity sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg== + dependencies: + fast-deep-equal "^2.0.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +align-text@^0.1.1, align-text@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" + integrity sha1-DNkKVhCT810KmSVsIrcGlDP60Rc= + dependencies: + kind-of "^3.0.2" + longest "^1.0.1" + repeat-string "^1.5.2" + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= + +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= + +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= + +ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + +anymatch@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" + integrity sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw== + dependencies: + micromatch "^3.1.4" + normalize-path "^2.1.1" + +aproba@^1.0.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" + integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== + +are-we-there-yet@~1.1.2: + version "1.1.5" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" + integrity sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w== + dependencies: + delegates "^1.0.0" + readable-stream "^2.0.6" + +argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== + dependencies: + sprintf-js "~1.0.2" + +arr-diff@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" + integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= + +arr-flatten@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== + +arr-union@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" + integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= + +array-equal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" + integrity sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM= + +array-find-index@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" + integrity sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E= + +array-unique@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" + integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= + +asn1.js@^4.0.0: + version "4.10.1" + resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.10.1.tgz#b9c2bf5805f1e64aadeed6df3a2bfafb5a73f5a0" + integrity sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw== + dependencies: + bn.js "^4.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + +asn1@~0.2.3: + version "0.2.4" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" + integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg== + dependencies: + safer-buffer "~2.1.0" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= + +assert@1.4.1, assert@^1.1.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/assert/-/assert-1.4.1.tgz#99912d591836b5a6f5b345c0f07eefc08fc65d91" + integrity sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE= + dependencies: + util "0.10.3" + +assign-symbols@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" + integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= + +async-each@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" + integrity sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ== + +async-limiter@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8" + integrity sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg== + +async@^2.1.2, async@^2.6.0, async@^2.6.1: + version "2.6.2" + resolved "https://registry.yarnpkg.com/async/-/async-2.6.2.tgz#18330ea7e6e313887f5d2f2a904bac6fe4dd5381" + integrity sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg== + dependencies: + lodash "^4.17.11" + +async@~1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" + integrity sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo= + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= + +atob@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" + integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== + +aws-sign2@~0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= + +aws4@^1.8.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" + integrity sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ== + +babel-code-frame@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" + integrity sha1-Y/1D99weO7fONZR9uP42mj9Yx0s= + dependencies: + chalk "^1.1.3" + esutils "^2.0.2" + js-tokens "^3.0.2" + +babel-core@^6.24.1, babel-core@^6.26.0: + version "6.26.3" + resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.3.tgz#b2e2f09e342d0f0c88e2f02e067794125e75c207" + integrity sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA== + dependencies: + babel-code-frame "^6.26.0" + babel-generator "^6.26.0" + babel-helpers "^6.24.1" + babel-messages "^6.23.0" + babel-register "^6.26.0" + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + convert-source-map "^1.5.1" + debug "^2.6.9" + json5 "^0.5.1" + lodash "^4.17.4" + minimatch "^3.0.4" + path-is-absolute "^1.0.1" + private "^0.1.8" + slash "^1.0.0" + source-map "^0.5.7" + +babel-generator@^6.26.0: + version "6.26.1" + resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" + integrity sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA== + dependencies: + 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-helper-evaluate-path@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/babel-helper-evaluate-path/-/babel-helper-evaluate-path-0.1.0.tgz#95d98c4ea36150483db2e7d3ec9e1954a72629cb" + integrity sha1-ldmMTqNhUEg9sufT7J4ZVKcmKcs= + +babel-helper-flip-expressions@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/babel-helper-flip-expressions/-/babel-helper-flip-expressions-0.1.2.tgz#77f6652f9de9c42401d827bd46ebd2109e3ef18a" + integrity sha1-d/ZlL53pxCQB2Ce9RuvSEJ4+8Yo= + +babel-helper-is-nodes-equiv@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/babel-helper-is-nodes-equiv/-/babel-helper-is-nodes-equiv-0.0.1.tgz#34e9b300b1479ddd98ec77ea0bbe9342dfe39684" + integrity sha1-NOmzALFHnd2Y7HfqC76TQt/jloQ= + +babel-helper-is-void-0@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/babel-helper-is-void-0/-/babel-helper-is-void-0-0.1.1.tgz#72f21a3abba0bef3837f9174fca731aed9a02888" + integrity sha1-cvIaOrugvvODf5F0/KcxrtmgKIg= + +babel-helper-mark-eval-scopes@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/babel-helper-mark-eval-scopes/-/babel-helper-mark-eval-scopes-0.1.1.tgz#4554345edf9f2549427bd2098e530253f8af2992" + integrity sha1-RVQ0Xt+fJUlCe9IJjlMCU/ivKZI= + +babel-helper-remove-or-void@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/babel-helper-remove-or-void/-/babel-helper-remove-or-void-0.1.1.tgz#9d7e1856dc6fafcb41b283a416730dc1844f66d7" + integrity sha1-nX4YVtxvr8tBsoOkFnMNwYRPZtc= + +babel-helper-to-multiple-sequence-expressions@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/babel-helper-to-multiple-sequence-expressions/-/babel-helper-to-multiple-sequence-expressions-0.1.1.tgz#5f1b832b39e4acf954e9137f0251395c71196b35" + integrity sha1-XxuDKznkrPlU6RN/AlE5XHEZazU= + +babel-helpers@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" + integrity sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI= + dependencies: + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-messages@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" + integrity sha1-8830cDhYA1sqKVHG7F7fbGLyYw4= + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-minify-builtins@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/babel-plugin-minify-builtins/-/babel-plugin-minify-builtins-0.1.3.tgz#4f21a7dcb51f91a04ea71d47ff0e8e3b05fec021" + integrity sha1-TyGn3LUfkaBOpx1H/w6OOwX+wCE= + dependencies: + babel-helper-evaluate-path "^0.1.0" + +babel-plugin-minify-constant-folding@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/babel-plugin-minify-constant-folding/-/babel-plugin-minify-constant-folding-0.1.3.tgz#57bd172adf8b8d74ad7c99612eb950414ebea3ca" + integrity sha1-V70XKt+LjXStfJlhLrlQQU6+o8o= + dependencies: + babel-helper-evaluate-path "^0.1.0" + +babel-plugin-minify-dead-code-elimination@^0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/babel-plugin-minify-dead-code-elimination/-/babel-plugin-minify-dead-code-elimination-0.1.7.tgz#774f536f347b98393a27baa717872968813c342c" + integrity sha1-d09TbzR7mDk6J7qnF4cpaIE8NCw= + dependencies: + babel-helper-mark-eval-scopes "^0.1.1" + babel-helper-remove-or-void "^0.1.1" + lodash.some "^4.6.0" + +babel-plugin-minify-flip-comparisons@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/babel-plugin-minify-flip-comparisons/-/babel-plugin-minify-flip-comparisons-0.1.2.tgz#e286b40b7599b18dfea195071e4279465cfc1884" + integrity sha1-4oa0C3WZsY3+oZUHHkJ5Rlz8GIQ= + dependencies: + babel-helper-is-void-0 "^0.1.1" + +babel-plugin-minify-guarded-expressions@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/babel-plugin-minify-guarded-expressions/-/babel-plugin-minify-guarded-expressions-0.1.2.tgz#dfc3d473b0362d9605d3ce0ac1e22328c60d1007" + integrity sha1-38PUc7A2LZYF084KweIjKMYNEAc= + dependencies: + babel-helper-flip-expressions "^0.1.2" + +babel-plugin-minify-infinity@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/babel-plugin-minify-infinity/-/babel-plugin-minify-infinity-0.1.2.tgz#5f1cf67ddedcba13c8a00da832542df0091a1cd4" + integrity sha1-Xxz2fd7cuhPIoA2oMlQt8AkaHNQ= + +babel-plugin-minify-mangle-names@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/babel-plugin-minify-mangle-names/-/babel-plugin-minify-mangle-names-0.1.3.tgz#bfa24661a6794fb03833587e55828b65449e06fe" + integrity sha1-v6JGYaZ5T7A4M1h+VYKLZUSeBv4= + dependencies: + babel-helper-mark-eval-scopes "^0.1.1" + +babel-plugin-minify-numeric-literals@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/babel-plugin-minify-numeric-literals/-/babel-plugin-minify-numeric-literals-0.1.1.tgz#d4b8b0c925f874714ee33ee4b26678583d7ce7fb" + integrity sha1-1LiwySX4dHFO4z7ksmZ4WD185/s= + +babel-plugin-minify-replace@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/babel-plugin-minify-replace/-/babel-plugin-minify-replace-0.1.2.tgz#b90b9e71ab4d3b36325629a91beabe13b0b16ac1" + integrity sha1-uQuecatNOzYyVimpG+q+E7CxasE= + +babel-plugin-minify-simplify@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/babel-plugin-minify-simplify/-/babel-plugin-minify-simplify-0.1.2.tgz#a968f1658fdeb2fc759e81fe331d89829df0f6b9" + integrity sha1-qWjxZY/esvx1noH+Mx2Jgp3w9rk= + dependencies: + babel-helper-flip-expressions "^0.1.2" + babel-helper-is-nodes-equiv "^0.0.1" + babel-helper-to-multiple-sequence-expressions "^0.1.1" + +babel-plugin-minify-type-constructors@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/babel-plugin-minify-type-constructors/-/babel-plugin-minify-type-constructors-0.1.2.tgz#db53c5b76cb8e2fcd45d862f17104c78761337ee" + integrity sha1-21PFt2y44vzUXYYvFxBMeHYTN+4= + dependencies: + babel-helper-is-void-0 "^0.1.1" + +babel-plugin-transform-inline-consecutive-adds@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-inline-consecutive-adds/-/babel-plugin-transform-inline-consecutive-adds-0.1.2.tgz#5442e9f1c19c78a7899f8a4dee6fd481f61001f5" + integrity sha1-VELp8cGceKeJn4pN7m/UgfYQAfU= + +babel-plugin-transform-member-expression-literals@^6.8.4: + version "6.9.4" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-member-expression-literals/-/babel-plugin-transform-member-expression-literals-6.9.4.tgz#37039c9a0c3313a39495faac2ff3a6b5b9d038bf" + integrity sha1-NwOcmgwzE6OUlfqsL/OmtbnQOL8= + +babel-plugin-transform-merge-sibling-variables@^6.8.5: + version "6.9.4" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-merge-sibling-variables/-/babel-plugin-transform-merge-sibling-variables-6.9.4.tgz#85b422fc3377b449c9d1cde44087203532401dae" + integrity sha1-hbQi/DN3tEnJ0c3kQIcgNTJAHa4= + +babel-plugin-transform-minify-booleans@^6.8.2: + version "6.9.4" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-minify-booleans/-/babel-plugin-transform-minify-booleans-6.9.4.tgz#acbb3e56a3555dd23928e4b582d285162dd2b198" + integrity sha1-rLs+VqNVXdI5KOS1gtKFFi3SsZg= + +babel-plugin-transform-property-literals@^6.8.4: + version "6.9.4" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-property-literals/-/babel-plugin-transform-property-literals-6.9.4.tgz#98c1d21e255736573f93ece54459f6ce24985d39" + integrity sha1-mMHSHiVXNlc/k+zlRFn2ziSYXTk= + dependencies: + esutils "^2.0.2" + +babel-plugin-transform-regexp-constructors@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-regexp-constructors/-/babel-plugin-transform-regexp-constructors-0.1.1.tgz#312ab7487cc88a1c62ee25ea1b6087e89b87799c" + integrity sha1-MSq3SHzIihxi7iXqG2CH6JuHeZw= + +babel-plugin-transform-remove-console@^6.8.4: + version "6.9.4" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-remove-console/-/babel-plugin-transform-remove-console-6.9.4.tgz#b980360c067384e24b357a588d807d3c83527780" + integrity sha1-uYA2DAZzhOJLNXpYjYB9PINSd4A= + +babel-plugin-transform-remove-debugger@^6.8.4: + version "6.9.4" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-remove-debugger/-/babel-plugin-transform-remove-debugger-6.9.4.tgz#42b727631c97978e1eb2d199a7aec84a18339ef2" + integrity sha1-QrcnYxyXl44estGZp67IShgznvI= + +babel-plugin-transform-remove-undefined@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-remove-undefined/-/babel-plugin-transform-remove-undefined-0.1.2.tgz#e1ebf51110f6b1e0665f28382ef73f95e5023652" + integrity sha1-4ev1ERD2seBmXyg4Lvc/leUCNlI= + +babel-plugin-transform-simplify-comparison-operators@^6.8.4: + version "6.9.4" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-simplify-comparison-operators/-/babel-plugin-transform-simplify-comparison-operators-6.9.4.tgz#f62afe096cab0e1f68a2d753fdf283888471ceb9" + integrity sha1-9ir+CWyrDh9ootdT/fKDiIRxzrk= + +babel-plugin-transform-undefined-to-void@^6.8.2: + version "6.9.4" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-undefined-to-void/-/babel-plugin-transform-undefined-to-void-6.9.4.tgz#be241ca81404030678b748717322b89d0c8fe280" + integrity sha1-viQcqBQEAwZ4t0hxcyK4nQyP4oA= + +babel-preset-babili@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/babel-preset-babili/-/babel-preset-babili-0.1.4.tgz#ad9d6651002f5bc3f07cab300781167f54724bf2" + integrity sha1-rZ1mUQAvW8PwfKswB4EWf1RyS/I= + dependencies: + babel-plugin-minify-builtins "^0.1.3" + babel-plugin-minify-constant-folding "^0.1.3" + babel-plugin-minify-dead-code-elimination "^0.1.7" + babel-plugin-minify-flip-comparisons "^0.1.2" + babel-plugin-minify-guarded-expressions "^0.1.2" + babel-plugin-minify-infinity "^0.1.2" + babel-plugin-minify-mangle-names "^0.1.3" + babel-plugin-minify-numeric-literals "^0.1.1" + babel-plugin-minify-replace "^0.1.2" + babel-plugin-minify-simplify "^0.1.2" + babel-plugin-minify-type-constructors "^0.1.2" + babel-plugin-transform-inline-consecutive-adds "^0.1.2" + babel-plugin-transform-member-expression-literals "^6.8.4" + babel-plugin-transform-merge-sibling-variables "^6.8.5" + babel-plugin-transform-minify-booleans "^6.8.2" + babel-plugin-transform-property-literals "^6.8.4" + babel-plugin-transform-regexp-constructors "^0.1.1" + babel-plugin-transform-remove-console "^6.8.4" + babel-plugin-transform-remove-debugger "^6.8.4" + babel-plugin-transform-remove-undefined "^0.1.2" + babel-plugin-transform-simplify-comparison-operators "^6.8.4" + babel-plugin-transform-undefined-to-void "^6.8.2" + lodash.isplainobject "^4.0.6" + +babel-register@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071" + integrity sha1-btAhFz4vy0htestFxgCahW9kcHE= + dependencies: + babel-core "^6.26.0" + babel-runtime "^6.26.0" + core-js "^2.5.0" + home-or-tmp "^2.0.0" + lodash "^4.17.4" + mkdirp "^0.5.1" + source-map-support "^0.4.15" + +babel-runtime@^6.22.0, babel-runtime@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" + integrity sha1-llxwWGaOgrVde/4E/yM3vItWR/4= + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.11.0" + +babel-template@^6.24.1, babel-template@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" + integrity sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI= + dependencies: + 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@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" + integrity sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4= + dependencies: + 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-types@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" + integrity sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc= + dependencies: + babel-runtime "^6.26.0" + esutils "^2.0.2" + lodash "^4.17.4" + to-fast-properties "^1.0.3" + +babili-webpack-plugin@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/babili-webpack-plugin/-/babili-webpack-plugin-0.1.2.tgz#164ac03d5932f6a52143e7ffc06f2711c651b6f2" + integrity sha1-FkrAPVky9qUhQ+f/wG8nEcZRtvI= + dependencies: + babel-core "^6.24.1" + babel-preset-babili "^0.1.4" + webpack-sources "^1.0.1" + +babylon@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" + integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ== + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= + +base64-js@^1.0.2: + version "1.3.0" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.0.tgz#cab1e6118f051095e58b5281aea8c1cd22bfc0e3" + integrity sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw== + +base@^0.11.1: + version "0.11.2" + resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" + integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== + dependencies: + cache-base "^1.0.1" + class-utils "^0.3.5" + component-emitter "^1.2.1" + define-property "^1.0.0" + isobject "^3.0.1" + mixin-deep "^1.2.0" + pascalcase "^0.1.1" + +basic-auth@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/basic-auth/-/basic-auth-2.0.1.tgz#b998279bf47ce38344b4f3cf916d4679bbf51e3a" + integrity sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg== + dependencies: + safe-buffer "5.1.2" + +batch@0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/batch/-/batch-0.6.1.tgz#dc34314f4e679318093fc760272525f94bf25c16" + integrity sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY= + +bcrypt-pbkdf@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" + integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= + dependencies: + tweetnacl "^0.14.3" + +benchmark@^2.1.2: + version "2.1.4" + resolved "https://registry.yarnpkg.com/benchmark/-/benchmark-2.1.4.tgz#09f3de31c916425d498cc2ee565a0ebf3c2a5629" + integrity sha1-CfPeMckWQl1JjMLuVloOvzwqVik= + dependencies: + lodash "^4.17.4" + platform "^1.3.3" + +big.js@^3.1.3: + version "3.2.0" + resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.2.0.tgz#a5fc298b81b9e0dca2e458824784b65c52ba588e" + integrity sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q== + +binary-extensions@^1.0.0: + version "1.13.1" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" + integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw== + +bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: + version "4.11.8" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" + integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA== + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@^2.3.1, braces@^2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" + integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== + dependencies: + arr-flatten "^1.1.0" + array-unique "^0.3.2" + extend-shallow "^2.0.1" + fill-range "^4.0.0" + isobject "^3.0.1" + repeat-element "^1.1.2" + snapdragon "^0.8.1" + snapdragon-node "^2.0.1" + split-string "^3.0.2" + to-regex "^3.0.1" + +brorand@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" + integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= + +browserify-aes@^1.0.0, browserify-aes@^1.0.4: + version "1.2.0" + resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" + integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== + dependencies: + buffer-xor "^1.0.3" + cipher-base "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.3" + inherits "^2.0.1" + safe-buffer "^5.0.1" + +browserify-cipher@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.1.tgz#8d6474c1b870bfdabcd3bcfcc1934a10e94f15f0" + integrity sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w== + dependencies: + browserify-aes "^1.0.4" + browserify-des "^1.0.0" + evp_bytestokey "^1.0.0" + +browserify-des@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.2.tgz#3af4f1f59839403572f1c66204375f7a7f703e9c" + integrity sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A== + dependencies: + cipher-base "^1.0.1" + des.js "^1.0.0" + inherits "^2.0.1" + safe-buffer "^5.1.2" + +browserify-rsa@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" + integrity sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ= + dependencies: + bn.js "^4.1.0" + randombytes "^2.0.1" + +browserify-sign@^4.0.0: + version "4.0.4" + resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.0.4.tgz#aa4eb68e5d7b658baa6bf6a57e630cbd7a93d298" + integrity sha1-qk62jl17ZYuqa/alfmMMvXqT0pg= + dependencies: + bn.js "^4.1.1" + browserify-rsa "^4.0.0" + create-hash "^1.1.0" + create-hmac "^1.1.2" + elliptic "^6.0.0" + inherits "^2.0.1" + parse-asn1 "^5.0.0" + +browserify-zlib@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.2.0.tgz#2869459d9aa3be245fe8fe2ca1f46e2e7f54d73f" + integrity sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA== + dependencies: + pako "~1.0.5" + +buffer-xor@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" + integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= + +buffer@^4.3.0: + version "4.9.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298" + integrity sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg= + dependencies: + base64-js "^1.0.2" + ieee754 "^1.1.4" + isarray "^1.0.0" + +builtin-status-codes@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" + integrity sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug= + +cache-base@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" + integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== + dependencies: + collection-visit "^1.0.0" + component-emitter "^1.2.1" + get-value "^2.0.6" + has-value "^1.0.0" + isobject "^3.0.1" + set-value "^2.0.0" + to-object-path "^0.3.0" + union-value "^1.0.0" + unset-value "^1.0.0" + +camelcase-keys@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7" + integrity sha1-MIvur/3ygRkFHvodkyITyRuPkuc= + dependencies: + camelcase "^2.0.0" + map-obj "^1.0.0" + +camelcase@^1.0.2: + version "1.2.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" + integrity sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk= + +camelcase@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" + integrity sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8= + +camelcase@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" + integrity sha1-MvxLn82vhF/N9+c7uXysImHwqwo= + +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= + +center-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" + integrity sha1-qg0yYptu6XIgBBHL1EYckHvCt60= + dependencies: + align-text "^0.1.3" + lazy-cache "^1.0.3" + +chalk@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= + dependencies: + 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" + +chalk@~2.4.1: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chokidar@^2.0.2: + version "2.1.5" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.5.tgz#0ae8434d962281a5f56c72869e79cb6d9d86ad4d" + integrity sha512-i0TprVWp+Kj4WRPtInjexJ8Q+BqTE909VpH8xVhXrJkoc5QC8VO9TryGOqTr+2hljzc1sC62t22h5tZePodM/A== + dependencies: + anymatch "^2.0.0" + async-each "^1.0.1" + braces "^2.3.2" + glob-parent "^3.1.0" + inherits "^2.0.3" + is-binary-path "^1.0.0" + is-glob "^4.0.0" + normalize-path "^3.0.0" + path-is-absolute "^1.0.0" + readdirp "^2.2.1" + upath "^1.1.1" + optionalDependencies: + fsevents "^1.2.7" + +chownr@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.1.tgz#54726b8b8fff4df053c42187e801fb4412df1494" + integrity sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g== + +cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" + integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +class-utils@^0.3.5: + version "0.3.6" + resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" + integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== + dependencies: + arr-union "^3.1.0" + define-property "^0.2.5" + isobject "^3.0.0" + static-extend "^0.1.1" + +cliui@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" + integrity sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE= + dependencies: + center-align "^0.1.1" + right-align "^0.1.1" + wordwrap "0.0.2" + +cliui@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" + integrity sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0= + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + wrap-ansi "^2.0.0" + +co@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ= + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= + +coffeescript@~1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/coffeescript/-/coffeescript-1.10.0.tgz#e7aa8301917ef621b35d8a39f348dcdd1db7e33e" + integrity sha1-56qDAZF+9iGzXYo580jc3R234z4= + +collection-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" + integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA= + dependencies: + map-visit "^1.0.0" + object-visit "^1.0.0" + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= + +colors@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" + integrity sha1-FopHAXVran9RoSzgyXv6KMCE7WM= + +combined-stream@^1.0.6, combined-stream@~1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.7.tgz#2d1d24317afb8abe95d6d2c0b07b57813539d828" + integrity sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w== + dependencies: + delayed-stream "~1.0.0" + +component-emitter@^1.2.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" + integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + +connect-livereload@^0.6.0: + version "0.6.1" + resolved "https://registry.yarnpkg.com/connect-livereload/-/connect-livereload-0.6.1.tgz#1ac0c8bb9d9cfd5b28b629987a56a9239db9baaa" + integrity sha512-3R0kMOdL7CjJpU66fzAkCe6HNtd3AavCS4m+uW4KtJjrdGPT0SQEZieAYd+cm+lJoBznNQ4lqipYWkhBMgk00g== + +connect@^3.6.6: + version "3.6.6" + resolved "https://registry.yarnpkg.com/connect/-/connect-3.6.6.tgz#09eff6c55af7236e137135a72574858b6786f524" + integrity sha1-Ce/2xVr3I24TcTWnJXSFi2eG9SQ= + dependencies: + debug "2.6.9" + finalhandler "1.1.0" + parseurl "~1.3.2" + utils-merge "1.0.1" + +console-browserify@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" + integrity sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA= + dependencies: + date-now "^0.1.4" + +console-control-strings@^1.0.0, console-control-strings@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= + +constants-browserify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" + integrity sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U= + +content-type-parser@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/content-type-parser/-/content-type-parser-1.0.2.tgz#caabe80623e63638b2502fd4c7f12ff4ce2352e7" + integrity sha512-lM4l4CnMEwOLHAHr/P6MEZwZFPJFtAAKgL6pogbXmVZggIqXhdB6RbBtPOTsw2FcXwYhehRGERJmRrjOiIB8pQ== + +convert-source-map@^1.5.1: + version "1.6.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.6.0.tgz#51b537a8c43e0f04dec1993bffcdd504e758ac20" + integrity sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A== + dependencies: + safe-buffer "~5.1.1" + +copy-descriptor@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" + integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= + +core-js@^2.4.0, core-js@^2.5.0: + version "2.6.5" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.5.tgz#44bc8d249e7fb2ff5d00e0341a7ffb94fbf67895" + integrity sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A== + +core-util-is@1.0.2, core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= + +create-ecdh@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.3.tgz#c9111b6f33045c4697f144787f9254cdc77c45ff" + integrity sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw== + dependencies: + bn.js "^4.1.0" + elliptic "^6.0.0" + +create-hash@^1.1.0, create-hash@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" + integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== + dependencies: + cipher-base "^1.0.1" + inherits "^2.0.1" + md5.js "^1.3.4" + ripemd160 "^2.0.1" + sha.js "^2.4.0" + +create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4: + version "1.1.7" + resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" + integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== + dependencies: + cipher-base "^1.0.3" + create-hash "^1.1.0" + inherits "^2.0.1" + ripemd160 "^2.0.0" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +crypto-browserify@^3.11.0: + version "3.12.0" + resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" + integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg== + dependencies: + browserify-cipher "^1.0.0" + browserify-sign "^4.0.0" + create-ecdh "^4.0.0" + create-hash "^1.1.0" + create-hmac "^1.1.0" + diffie-hellman "^5.0.0" + inherits "^2.0.1" + pbkdf2 "^3.0.3" + public-encrypt "^4.0.0" + randombytes "^2.0.0" + randomfill "^1.0.3" + +cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0": + version "0.3.6" + resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.6.tgz#f85206cee04efa841f3c5982a74ba96ab20d65ad" + integrity sha512-DtUeseGk9/GBW0hl0vVPpU22iHL6YB5BUX7ml1hB+GMpo0NX5G4voX3kdWiMSEguFtcW3Vh3djqNF4aIe6ne0A== + +"cssstyle@>= 0.2.37 < 0.3.0": + version "0.2.37" + resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-0.2.37.tgz#541097234cb2513c83ceed3acddc27ff27987d54" + integrity sha1-VBCXI0yyUTyDzu06zdwn/yeYfVQ= + dependencies: + cssom "0.3.x" + +currently-unhandled@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" + integrity sha1-mI3zP+qxke95mmE2nddsF635V+o= + dependencies: + array-find-index "^1.0.1" + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= + dependencies: + assert-plus "^1.0.0" + +date-now@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" + integrity sha1-6vQ5/U1ISK105cx9vvIAZyueNFs= + +dateformat@~1.0.12: + version "1.0.12" + resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-1.0.12.tgz#9f124b67594c937ff706932e4a642cca8dbbfee9" + integrity sha1-nxJLZ1lMk3/3BpMuSmQsyo27/uk= + dependencies: + get-stdin "^4.0.1" + meow "^3.3.0" + +debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +debug@^3.1.0: + version "3.2.6" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" + integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== + dependencies: + ms "^2.1.1" + +debug@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" + integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== + dependencies: + ms "^2.1.1" + +decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= + +decode-uri-component@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" + integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= + +deep-equal@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5" + integrity sha1-9dJgKStmDghO/0zbyfCK0yR0SLU= + +deep-extend@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" + integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== + +deep-is@~0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" + integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= + +define-property@^0.2.5: + version "0.2.5" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" + integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= + dependencies: + is-descriptor "^0.1.0" + +define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" + integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY= + dependencies: + is-descriptor "^1.0.0" + +define-property@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" + integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== + dependencies: + is-descriptor "^1.0.2" + isobject "^3.0.1" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= + +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= + +depd@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" + integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= + +des.js@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.0.tgz#c074d2e2aa6a8a9a07dbd61f9a15c2cd83ec8ecc" + integrity sha1-wHTS4qpqipoH29YfmhXCzYPsjsw= + dependencies: + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + +destroy@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" + integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= + +detect-indent@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" + integrity sha1-920GQ1LN9Docts5hnE7jqUdd4gg= + dependencies: + repeating "^2.0.0" + +detect-libc@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" + integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= + +diffie-hellman@^5.0.0: + version "5.0.3" + resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" + integrity sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg== + dependencies: + bn.js "^4.1.0" + miller-rabin "^4.0.0" + randombytes "^2.0.0" + +domain-browser@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" + integrity sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA== + +duplexify@^3.5.1: + version "3.7.1" + resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.7.1.tgz#2a4df5317f6ccfd91f86d6fd25d8d8a103b88309" + integrity sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g== + dependencies: + end-of-stream "^1.0.0" + inherits "^2.0.1" + readable-stream "^2.0.0" + stream-shift "^1.0.0" + +ecc-jsbn@~0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" + integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= + dependencies: + jsbn "~0.1.0" + safer-buffer "^2.1.0" + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= + +elliptic@^6.0.0: + version "6.4.1" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.1.tgz#c2d0b7776911b86722c632c3c06c60f2f819939a" + integrity sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ== + dependencies: + bn.js "^4.4.0" + brorand "^1.0.1" + hash.js "^1.0.0" + hmac-drbg "^1.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.0" + +emojis-list@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" + integrity sha1-TapNnbAPmBmIDHn6RXrlsJof04k= + +encodeurl@~1.0.1, encodeurl@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= + +end-of-stream@^1.0.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.1.tgz#ed29634d19baba463b6ce6b80a37213eab71ec43" + integrity sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q== + dependencies: + once "^1.4.0" + +enhanced-resolve@^3.3.0: + version "3.4.1" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-3.4.1.tgz#0421e339fd71419b3da13d129b3979040230476e" + integrity sha1-BCHjOf1xQZs9oT0Smzl5BAIwR24= + dependencies: + graceful-fs "^4.1.2" + memory-fs "^0.4.0" + object-assign "^4.0.1" + tapable "^0.2.7" + +errno@^0.1.3: + version "0.1.7" + resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618" + integrity sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg== + dependencies: + prr "~1.0.1" + +error-ex@^1.2.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + dependencies: + is-arrayish "^0.2.1" + +es6-promise@^4.0.3: + version "4.2.6" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.6.tgz#b685edd8258886365ea62b57d30de28fadcd974f" + integrity sha512-aRVgGdnmW2OiySVPUC9e6m+plolMAJKjZnQlCwNSuK5yQ0JN61DZSO1X1Ufd1foqWRAlig0rhduTCHe7sVtK5Q== + +es6-promisify@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" + integrity sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM= + dependencies: + es6-promise "^4.0.3" + +escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= + +escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= + +escodegen@^1.6.1: + version "1.11.1" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.11.1.tgz#c485ff8d6b4cdb89e27f4a856e91f118401ca510" + integrity sha512-JwiqFD9KdGVVpeuRa68yU3zZnBEOcPs0nKW7wZzXky8Z7tffdYUHbe11bPCV5jYlK6DVdKLWLm0f5I/QlL0Kmw== + dependencies: + esprima "^3.1.3" + estraverse "^4.2.0" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.6.1" + +esprima@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" + integrity sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM= + +esprima@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + +estraverse@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" + integrity sha1-De4/7TH81GlhjOc0IJn8GvoL2xM= + +esutils@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" + integrity sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs= + +etag@~1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" + integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= + +eventemitter2@~0.4.13: + version "0.4.14" + resolved "https://registry.yarnpkg.com/eventemitter2/-/eventemitter2-0.4.14.tgz#8f61b75cde012b2e9eb284d4545583b5643b61ab" + integrity sha1-j2G3XN4BKy6esoTUVFWDtWQ7Yas= + +events@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924" + integrity sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ= + +events@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/events/-/events-3.0.0.tgz#9a0a0dfaf62893d92b875b8f2698ca4114973e88" + integrity sha512-Dc381HFWJzEOhQ+d8pkNon++bk9h6cdAoAj4iE6Q4y6xgTzySWXlKn05/TVNpjnfRqi/X0EpJEJohPjNI3zpVA== + +evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" + integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== + dependencies: + md5.js "^1.3.4" + safe-buffer "^5.1.1" + +exit@^0.1.2, exit@~0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" + integrity sha1-BjJjj42HfMghB9MKD/8aF8uhzQw= + +expand-brackets@^2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" + integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI= + dependencies: + debug "^2.3.3" + define-property "^0.2.5" + extend-shallow "^2.0.1" + posix-character-classes "^0.1.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +extend-shallow@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" + integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= + dependencies: + is-extendable "^0.1.0" + +extend-shallow@^3.0.0, extend-shallow@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" + integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg= + dependencies: + assign-symbols "^1.0.0" + is-extendable "^1.0.1" + +extend@^3.0.0, extend@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== + +extglob@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" + integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== + dependencies: + array-unique "^0.3.2" + define-property "^1.0.0" + expand-brackets "^2.1.4" + extend-shallow "^2.0.1" + fragment-cache "^0.2.1" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +extsprintf@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= + +extsprintf@^1.2.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" + integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= + +fast-deep-equal@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" + integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk= + +fast-json-stable-stringify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" + integrity sha1-1RQsDK7msRifh9OnYREGT4bIu/I= + +fast-levenshtein@~2.0.4: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= + +fg-lodash@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/fg-lodash/-/fg-lodash-0.0.2.tgz#988352537f427da6af222129bb63acca49e62fa3" + integrity sha1-mINSU39CfaavIiEpu2OsyknmL6M= + dependencies: + lodash "^2.4.1" + underscore.string "~2.3.3" + +fill-range@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" + integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= + dependencies: + extend-shallow "^2.0.1" + is-number "^3.0.0" + repeat-string "^1.6.1" + to-regex-range "^2.1.0" + +finalhandler@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.0.tgz#ce0b6855b45853e791b2fcc680046d88253dd7f5" + integrity sha1-zgtoVbRYU+eRsvzGgARtiCU91/U= + dependencies: + debug "2.6.9" + encodeurl "~1.0.1" + escape-html "~1.0.3" + on-finished "~2.3.0" + parseurl "~1.3.2" + statuses "~1.3.1" + unpipe "~1.0.0" + +find-up@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" + integrity sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8= + dependencies: + path-exists "^2.0.0" + pinkie-promise "^2.0.0" + +findup-sync@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-0.3.0.tgz#37930aa5d816b777c03445e1966cc6790a4c0b16" + integrity sha1-N5MKpdgWt3fANEXhlmzGeQpMCxY= + dependencies: + glob "~5.0.0" + +for-in@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= + +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= + +form-data@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" + integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.6" + mime-types "^2.1.12" + +fragment-cache@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" + integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk= + dependencies: + map-cache "^0.2.2" + +fresh@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" + integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= + +fs-minipass@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.5.tgz#06c277218454ec288df77ada54a03b8702aacb9d" + integrity sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ== + dependencies: + minipass "^2.2.1" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + +fsevents@^1.2.7: + version "1.2.9" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.9.tgz#3f5ed66583ccd6f400b5a00db6f7e861363e388f" + integrity sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw== + dependencies: + nan "^2.12.1" + node-pre-gyp "^0.12.0" + +gauge@~2.7.3: + version "2.7.4" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" + integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c= + dependencies: + aproba "^1.0.3" + console-control-strings "^1.0.0" + has-unicode "^2.0.0" + object-assign "^4.1.0" + signal-exit "^3.0.0" + string-width "^1.0.1" + strip-ansi "^3.0.1" + wide-align "^1.1.0" + +get-caller-file@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" + integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== + +get-stdin@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" + integrity sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4= + +get-value@^2.0.3, get-value@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" + integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= + +getobject@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/getobject/-/getobject-0.1.0.tgz#047a449789fa160d018f5486ed91320b6ec7885c" + integrity sha1-BHpEl4n6Fg0Bj1SG7ZEyC27HiFw= + +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= + dependencies: + assert-plus "^1.0.0" + +glob-parent@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" + integrity sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4= + dependencies: + is-glob "^3.1.0" + path-dirname "^1.0.0" + +glob@^7.0.6, glob@^7.1.3: + version "7.1.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" + integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== + dependencies: + 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" + +glob@~5.0.0: + version "5.0.15" + resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" + integrity sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E= + dependencies: + inflight "^1.0.4" + inherits "2" + minimatch "2 || 3" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@~7.0.0: + version "7.0.6" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.0.6.tgz#211bafaf49e525b8cd93260d14ab136152b3f57a" + integrity sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo= + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.2" + once "^1.3.0" + path-is-absolute "^1.0.0" + +globals@^9.18.0: + version "9.18.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" + integrity sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ== + +graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6: + version "4.1.15" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00" + integrity sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA== + +grunt-cli@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/grunt-cli/-/grunt-cli-1.2.0.tgz#562b119ebb069ddb464ace2845501be97b35b6a8" + integrity sha1-VisRnrsGndtGSs4oRVAb6Xs1tqg= + dependencies: + findup-sync "~0.3.0" + grunt-known-options "~1.1.0" + nopt "~3.0.6" + resolve "~1.1.0" + +grunt-contrib-connect@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/grunt-contrib-connect/-/grunt-contrib-connect-2.0.0.tgz#7ee86838f351f72c12186143ebc60823d8d524dd" + integrity sha512-JVjM9UDP84WbT2S7swkyuwPuxFtT+zry/RUBuP3IT8LZPEQjtzzMwiM+qimswNKQ9plh5WhcFWaaqz2ruB9/DA== + dependencies: + async "^2.6.1" + connect "^3.6.6" + connect-livereload "^0.6.0" + morgan "^1.9.0" + node-http2 "^4.0.1" + opn "^5.3.0" + portscanner "^2.2.0" + serve-index "^1.9.1" + serve-static "^1.13.2" + +grunt-known-options@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/grunt-known-options/-/grunt-known-options-1.1.1.tgz#6cc088107bd0219dc5d3e57d91923f469059804d" + integrity sha512-cHwsLqoighpu7TuYj5RonnEuxGVFnztcUqTqp5rXFGYL4OuPFofwC4Ycg7n9fYwvK6F5WbYgeVOwph9Crs2fsQ== + +grunt-legacy-log-utils@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/grunt-legacy-log-utils/-/grunt-legacy-log-utils-2.0.1.tgz#d2f442c7c0150065d9004b08fd7410d37519194e" + integrity sha512-o7uHyO/J+i2tXG8r2bZNlVk20vlIFJ9IEYyHMCQGfWYru8Jv3wTqKZzvV30YW9rWEjq0eP3cflQ1qWojIe9VFA== + dependencies: + chalk "~2.4.1" + lodash "~4.17.10" + +grunt-legacy-log@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/grunt-legacy-log/-/grunt-legacy-log-2.0.0.tgz#c8cd2c6c81a4465b9bbf2d874d963fef7a59ffb9" + integrity sha512-1m3+5QvDYfR1ltr8hjiaiNjddxGdQWcH0rw1iKKiQnF0+xtgTazirSTGu68RchPyh1OBng1bBUjLmX8q9NpoCw== + dependencies: + colors "~1.1.2" + grunt-legacy-log-utils "~2.0.0" + hooker "~0.2.3" + lodash "~4.17.5" + +grunt-legacy-util@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/grunt-legacy-util/-/grunt-legacy-util-1.1.1.tgz#e10624e7c86034e5b870c8a8616743f0a0845e42" + integrity sha512-9zyA29w/fBe6BIfjGENndwoe1Uy31BIXxTH3s8mga0Z5Bz2Sp4UCjkeyv2tI449ymkx3x26B+46FV4fXEddl5A== + dependencies: + async "~1.5.2" + exit "~0.1.1" + getobject "~0.1.0" + hooker "~0.2.3" + lodash "~4.17.10" + underscore.string "~3.3.4" + which "~1.3.0" + +grunt-saucelabs@^9.0.1: + version "9.0.1" + resolved "https://registry.yarnpkg.com/grunt-saucelabs/-/grunt-saucelabs-9.0.1.tgz#b9bfa6fe3780f81f1402de057a1360d148e77a0c" + integrity sha512-3WD5/RtSp8AyEnmtN5HK1NUkU7o/kBl6rGQILnfg7WHTe0g0uG3LtecWPwTRYrD7kop79WkDfeVQ85WjvwDUZw== + dependencies: + colors "~1.1.2" + lodash "^4.17.11" + q "~1.4.1" + requestretry "~1.9.0" + sauce-tunnel "~2.5.0" + saucelabs "^1.5.0" + +grunt@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/grunt/-/grunt-1.0.4.tgz#c799883945a53a3d07622e0737c8f70bfe19eb38" + integrity sha512-PYsMOrOC+MsdGEkFVwMaMyc6Ob7pKmq+deg1Sjr+vvMWp35sztfwKE7qoN51V+UEtHsyNuMcGdgMLFkBHvMxHQ== + dependencies: + coffeescript "~1.10.0" + dateformat "~1.0.12" + eventemitter2 "~0.4.13" + exit "~0.1.1" + findup-sync "~0.3.0" + glob "~7.0.0" + grunt-cli "~1.2.0" + grunt-known-options "~1.1.0" + grunt-legacy-log "~2.0.0" + grunt-legacy-util "~1.1.1" + iconv-lite "~0.4.13" + js-yaml "~3.13.0" + minimatch "~3.0.2" + mkdirp "~0.5.1" + nopt "~3.0.6" + path-is-absolute "~1.0.0" + rimraf "~2.6.2" + +har-schema@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" + integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= + +har-validator@~5.1.0: + version "5.1.3" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.3.tgz#1ef89ebd3e4996557675eed9893110dc350fa080" + integrity sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g== + dependencies: + ajv "^6.5.5" + har-schema "^2.0.0" + +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= + dependencies: + ansi-regex "^2.0.0" + +has-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" + integrity sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo= + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= + +has-unicode@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= + +has-value@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" + integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8= + dependencies: + get-value "^2.0.3" + has-values "^0.1.4" + isobject "^2.0.0" + +has-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" + integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc= + dependencies: + get-value "^2.0.6" + has-values "^1.0.0" + isobject "^3.0.0" + +has-values@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" + integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E= + +has-values@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" + integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8= + dependencies: + is-number "^3.0.0" + kind-of "^4.0.0" + +hash-base@^3.0.0: + version "3.0.4" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918" + integrity sha1-X8hoaEfs1zSZQDMZprCj8/auSRg= + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +hash.js@^1.0.0, hash.js@^1.0.3: + version "1.1.7" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" + integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.1" + +hmac-drbg@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" + integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= + dependencies: + hash.js "^1.0.3" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.1" + +home-or-tmp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" + integrity sha1-42w/LSyufXRqhX440Y1fMqeILbg= + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.1" + +hooker@~0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/hooker/-/hooker-0.2.3.tgz#b834f723cc4a242aa65963459df6d984c5d3d959" + integrity sha1-uDT3I8xKJCqmWWNFnfbZhMXT2Vk= + +hosted-git-info@^2.1.4: + version "2.7.1" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047" + integrity sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w== + +html-encoding-sniffer@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz#e70d84b94da53aa375e11fe3a351be6642ca46f8" + integrity sha512-71lZziiDnsuabfdYiUeWdCVyKuqwWi23L8YeIgV9jSSZHCtb6wB1BKWooH7L3tn4/FuZJMVWyNaIDr4RGmaSYw== + dependencies: + whatwg-encoding "^1.0.1" + +http-errors@~1.6.2: + version "1.6.3" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d" + integrity sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0= + dependencies: + depd "~1.1.2" + inherits "2.0.3" + setprototypeof "1.1.0" + statuses ">= 1.4.0 < 2" + +http-signature@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" + integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= + dependencies: + assert-plus "^1.0.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +https-browserify@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-0.0.1.tgz#3f91365cabe60b77ed0ebba24b454e3e09d95a82" + integrity sha1-P5E2XKvmC3ftDruiS0VOPgnZWoI= + +https-browserify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" + integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= + +https-proxy-agent@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz#51552970fa04d723e04c56d04178c3f92592bbc0" + integrity sha512-HPCTS1LW51bcyMYbxUIOO4HEOlQ1/1qRaFWcyxvwaqUS9TY88aoEuHUY33kuAh1YhVVaDQhLZsnPd+XNARWZlQ== + dependencies: + agent-base "^4.1.0" + debug "^3.1.0" + +iconv-lite@0.4.24, iconv-lite@^0.4.4, iconv-lite@~0.4.13: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + +ieee754@^1.1.4: + version "1.1.13" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84" + integrity sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg== + +ignore-walk@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.1.tgz#a83e62e7d272ac0e3b551aaa82831a19b69f82f8" + integrity sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ== + dependencies: + minimatch "^3.0.4" + +indent-string@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80" + integrity sha1-ji1INIdCEhtKghi3oTfppSBJ3IA= + dependencies: + repeating "^2.0.0" + +indexof@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" + integrity sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10= + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= + +inherits@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" + integrity sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE= + +ini@~1.3.0: + version "1.3.5" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" + integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== + +interpret@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.2.0.tgz#d5061a6224be58e8083985f5014d844359576296" + integrity sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw== + +invariant@^2.2.2: + version "2.2.4" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" + integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== + dependencies: + loose-envify "^1.0.0" + +invert-kv@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" + integrity sha1-EEqOSqym09jNFXqO+L+rLXo//bY= + +is-accessor-descriptor@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" + integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= + dependencies: + kind-of "^3.0.2" + +is-accessor-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" + integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== + dependencies: + kind-of "^6.0.0" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= + +is-binary-path@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" + integrity sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg= + dependencies: + binary-extensions "^1.0.0" + +is-buffer@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== + +is-data-descriptor@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" + integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= + dependencies: + kind-of "^3.0.2" + +is-data-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" + integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== + dependencies: + kind-of "^6.0.0" + +is-descriptor@^0.1.0: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" + integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== + dependencies: + is-accessor-descriptor "^0.1.6" + is-data-descriptor "^0.1.4" + kind-of "^5.0.0" + +is-descriptor@^1.0.0, is-descriptor@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" + integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== + dependencies: + is-accessor-descriptor "^1.0.0" + is-data-descriptor "^1.0.0" + kind-of "^6.0.2" + +is-extendable@^0.1.0, is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= + +is-extendable@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" + integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== + dependencies: + is-plain-object "^2.0.4" + +is-extglob@^2.1.0, is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= + +is-finite@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" + integrity sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko= + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs= + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= + +is-glob@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" + integrity sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo= + dependencies: + is-extglob "^2.1.0" + +is-glob@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" + integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== + dependencies: + is-extglob "^2.1.1" + +is-number-like@^1.0.3: + version "1.0.8" + resolved "https://registry.yarnpkg.com/is-number-like/-/is-number-like-1.0.8.tgz#2e129620b50891042e44e9bbbb30593e75cfbbe3" + integrity sha512-6rZi3ezCyFcn5L71ywzz2bS5b2Igl1En3eTlZlvKjpz1n3IZLAYMbKYAIQgFmEu0GENg92ziU/faEOA/aixjbA== + dependencies: + lodash.isfinite "^3.3.2" + +is-number@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= + dependencies: + kind-of "^3.0.2" + +is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== + dependencies: + isobject "^3.0.1" + +is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= + +is-utf8@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" + integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= + +is-windows@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" + integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== + +is-wsl@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" + integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0= + +isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= + dependencies: + isarray "1.0.0" + +isobject@^3.0.0, isobject@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= + +jasmine-core@~2.99.0: + version "2.99.1" + resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-2.99.1.tgz#e6400df1e6b56e130b61c4bcd093daa7f6e8ca15" + integrity sha1-5kAN8ea1bhMLYcS80JPap/boyhU= + +jasmine@^2.99.0: + version "2.99.0" + resolved "https://registry.yarnpkg.com/jasmine/-/jasmine-2.99.0.tgz#8ca72d102e639b867c6489856e0e18a9c7aa42b7" + integrity sha1-jKctEC5jm4Z8ZImFbg4YqceqQrc= + dependencies: + exit "^0.1.2" + glob "^7.0.6" + jasmine-core "~2.99.0" + +"js-tokens@^3.0.0 || ^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +js-tokens@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" + integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= + +js-yaml@~3.13.0: + version "3.13.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" + integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= + +jsdom@^9.5.0: + version "9.12.0" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-9.12.0.tgz#e8c546fffcb06c00d4833ca84410fed7f8a097d4" + integrity sha1-6MVG//ywbADUgzyoRBD+1/igl9Q= + dependencies: + abab "^1.0.3" + acorn "^4.0.4" + acorn-globals "^3.1.0" + array-equal "^1.0.0" + content-type-parser "^1.0.1" + cssom ">= 0.3.2 < 0.4.0" + cssstyle ">= 0.2.37 < 0.3.0" + escodegen "^1.6.1" + html-encoding-sniffer "^1.0.1" + nwmatcher ">= 1.3.9 < 2.0.0" + parse5 "^1.5.1" + request "^2.79.0" + sax "^1.2.1" + symbol-tree "^3.2.1" + tough-cookie "^2.3.2" + webidl-conversions "^4.0.0" + whatwg-encoding "^1.0.1" + whatwg-url "^4.3.0" + xml-name-validator "^2.0.1" + +jsesc@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" + integrity sha1-RsP+yMGJKxKwgz25vHYiF226s0s= + +json-loader@^0.5.4: + version "0.5.7" + resolved "https://registry.yarnpkg.com/json-loader/-/json-loader-0.5.7.tgz#dca14a70235ff82f0ac9a3abeb60d337a365185d" + integrity sha512-QLPs8Dj7lnf3e3QYS1zkCo+4ZwqOiF9d/nZnYozTISxXWCfNs9yuky5rJw4/W34s7POaNlbZmQGaB5NiXCbP4w== + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= + +json-stable-stringify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" + integrity sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8= + dependencies: + jsonify "~0.0.0" + +json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= + +json5@^0.5.0, json5@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" + integrity sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE= + +jsonfile@^2.3.1: + version "2.4.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" + integrity sha1-NzaitCi4e72gzIO1P6PWM6NcKug= + optionalDependencies: + graceful-fs "^4.1.6" + +jsonify@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" + integrity sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM= + +jsprim@^1.2.2: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" + integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= + dependencies: + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.2.3" + verror "1.10.0" + +kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= + dependencies: + is-buffer "^1.1.5" + +kind-of@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc= + dependencies: + is-buffer "^1.1.5" + +kind-of@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" + integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== + +kind-of@^6.0.0, kind-of@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" + integrity sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA== + +lazy-cache@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" + integrity sha1-odePw6UEdMuAhF07O24dpJpEbo4= + +lcid@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" + integrity sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU= + dependencies: + invert-kv "^1.0.0" + +levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + +load-json-file@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" + integrity sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA= + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + pinkie-promise "^2.0.0" + strip-bom "^2.0.0" + +loader-runner@^2.3.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.4.0.tgz#ed47066bfe534d7e84c4c7b9998c2a75607d9357" + integrity sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw== + +loader-utils@^0.2.16: + version "0.2.17" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.17.tgz#f86e6374d43205a6e6c60e9196f17c0299bfb348" + integrity sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g= + dependencies: + big.js "^3.1.3" + emojis-list "^2.0.0" + json5 "^0.5.0" + object-assign "^4.0.1" + +lodash.isfinite@^3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/lodash.isfinite/-/lodash.isfinite-3.3.2.tgz#fb89b65a9a80281833f0b7478b3a5104f898ebb3" + integrity sha1-+4m2WpqAKBgz8LdHizpRBPiY67M= + +lodash.isplainobject@^4.0.6: + version "4.0.6" + resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" + integrity sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs= + +lodash.some@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.some/-/lodash.some-4.6.0.tgz#1bb9f314ef6b8baded13b549169b2a945eb68e4d" + integrity sha1-G7nzFO9ri63tE7VJFpsqlF62jk0= + +lodash@^2.4.1: + version "2.4.2" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-2.4.2.tgz#fadd834b9683073da179b3eae6d9c0d15053f73e" + integrity sha1-+t2DS5aDBz2hebPq5tnA0VBT9z4= + +lodash@^4.17.11, lodash@^4.17.4, lodash@~4.17.10, lodash@~4.17.5: + version "4.17.11" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" + integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg== + +longest@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" + integrity sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc= + +loose-envify@^1.0.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" + integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== + dependencies: + js-tokens "^3.0.0 || ^4.0.0" + +loud-rejection@^1.0.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" + integrity sha1-W0b4AUft7leIcPCG0Eghz5mOVR8= + dependencies: + currently-unhandled "^0.4.1" + signal-exit "^3.0.0" + +map-cache@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" + integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= + +map-obj@^1.0.0, map-obj@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" + integrity sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0= + +map-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" + integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= + dependencies: + object-visit "^1.0.0" + +md5.js@^1.3.4: + version "1.3.5" + resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" + integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + safe-buffer "^5.1.2" + +memory-fs@^0.4.0, memory-fs@~0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" + integrity sha1-OpoguEYlI+RHz7x+i7gO1me/xVI= + dependencies: + errno "^0.1.3" + readable-stream "^2.0.1" + +meow@^3.3.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" + integrity sha1-cstmi0JSKCkKu/qFaJJYcwioAfs= + dependencies: + camelcase-keys "^2.0.0" + decamelize "^1.1.2" + loud-rejection "^1.0.0" + map-obj "^1.0.1" + minimist "^1.1.3" + normalize-package-data "^2.3.4" + object-assign "^4.0.1" + read-pkg-up "^1.0.1" + redent "^1.0.0" + trim-newlines "^1.0.0" + +micromatch@^3.1.10, micromatch@^3.1.4: + version "3.1.10" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" + integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + braces "^2.3.1" + define-property "^2.0.2" + extend-shallow "^3.0.2" + extglob "^2.0.4" + fragment-cache "^0.2.1" + kind-of "^6.0.2" + nanomatch "^1.2.9" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.2" + +miller-rabin@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" + integrity sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA== + dependencies: + bn.js "^4.0.0" + brorand "^1.0.1" + +mime-db@1.40.0: + version "1.40.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.40.0.tgz#a65057e998db090f732a68f6c276d387d4126c32" + integrity sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA== + +mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24: + version "2.1.24" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.24.tgz#b6f8d0b3e951efb77dedeca194cff6d16f676f81" + integrity sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ== + dependencies: + mime-db "1.40.0" + +mime@1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6" + integrity sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ== + +minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" + integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== + +minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= + +"minimatch@2 || 3", minimatch@^3.0.2, minimatch@^3.0.4, minimatch@~3.0.2: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== + dependencies: + brace-expansion "^1.1.7" + +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= + +minimist@^1.1.3, minimist@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= + +minipass@^2.2.1, minipass@^2.3.4: + version "2.3.5" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.5.tgz#cacebe492022497f656b0f0f51e2682a9ed2d848" + integrity sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA== + dependencies: + safe-buffer "^5.1.2" + yallist "^3.0.0" + +minizlib@^1.1.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.2.1.tgz#dd27ea6136243c7c880684e8672bb3a45fd9b614" + integrity sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA== + dependencies: + minipass "^2.2.1" + +mixin-deep@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.1.tgz#a49e7268dce1a0d9698e45326c5626df3543d0fe" + integrity sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ== + dependencies: + for-in "^1.0.2" + is-extendable "^1.0.1" + +mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= + dependencies: + minimist "0.0.8" + +morgan@^1.9.0: + version "1.9.1" + resolved "https://registry.yarnpkg.com/morgan/-/morgan-1.9.1.tgz#0a8d16734a1d9afbc824b99df87e738e58e2da59" + integrity sha512-HQStPIV4y3afTiCYVxirakhlCfGkI161c76kKFca7Fk1JusM//Qeo1ej2XaMniiNeaZklMVrh3vTtIzpzwbpmA== + dependencies: + basic-auth "~2.0.0" + debug "2.6.9" + depd "~1.1.2" + on-finished "~2.3.0" + on-headers "~1.0.1" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= + +ms@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" + integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== + +nan@^2.12.1: + version "2.13.2" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.13.2.tgz#f51dc7ae66ba7d5d55e1e6d4d8092e802c9aefe7" + integrity sha512-TghvYc72wlMGMVMluVo9WRJc0mB8KxxF/gZ4YYFy7V2ZQX9l7rgbPg7vjS9mt6U5HXODVFVI2bOduCzwOMv/lw== + +nanomatch@^1.2.9: + version "1.2.13" + resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" + integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + define-property "^2.0.2" + extend-shallow "^3.0.2" + fragment-cache "^0.2.1" + is-windows "^1.0.2" + kind-of "^6.0.2" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +needle@^2.2.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/needle/-/needle-2.3.1.tgz#d272f2f4034afb9c4c9ab1379aabc17fc85c9388" + integrity sha512-CaLXV3W8Vnbps8ZANqDGz7j4x7Yj1LW4TWF/TQuDfj7Cfx4nAPTvw98qgTevtto1oHDrh3pQkaODbqupXlsWTg== + dependencies: + debug "^4.1.0" + iconv-lite "^0.4.4" + sax "^1.2.4" + +negotiator@0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" + integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== + +neo-async@^2.5.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.0.tgz#b9d15e4d71c6762908654b5183ed38b753340835" + integrity sha512-MFh0d/Wa7vkKO3Y3LlacqAEeHK0mckVqzDieUKTT+KGxi+zIpeVsFxymkIiRpbpDziHc290Xr9A1O4Om7otoRA== + +node-http2@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/node-http2/-/node-http2-4.0.1.tgz#164ff53b5dd22c84f0af142b877c5eaeb6809959" + integrity sha1-Fk/1O13SLITwrxQrh3xerraAmVk= + dependencies: + assert "1.4.1" + events "1.1.1" + https-browserify "0.0.1" + setimmediate "^1.0.5" + stream-browserify "2.0.1" + timers-browserify "2.0.2" + url "^0.11.0" + websocket-stream "^5.0.1" + +node-libs-browser@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.2.0.tgz#c72f60d9d46de08a940dedbb25f3ffa2f9bbaa77" + integrity sha512-5MQunG/oyOaBdttrL40dA7bUfPORLRWMUJLQtMg7nluxUvk5XwnLdL9twQHFAjRx/y7mIMkLKT9++qPbbk6BZA== + dependencies: + assert "^1.1.1" + browserify-zlib "^0.2.0" + buffer "^4.3.0" + console-browserify "^1.1.0" + constants-browserify "^1.0.0" + crypto-browserify "^3.11.0" + domain-browser "^1.1.1" + events "^3.0.0" + https-browserify "^1.0.0" + os-browserify "^0.3.0" + path-browserify "0.0.0" + process "^0.11.10" + punycode "^1.2.4" + querystring-es3 "^0.2.0" + readable-stream "^2.3.3" + stream-browserify "^2.0.1" + stream-http "^2.7.2" + string_decoder "^1.0.0" + timers-browserify "^2.0.4" + tty-browserify "0.0.0" + url "^0.11.0" + util "^0.11.0" + vm-browserify "0.0.4" + +node-pre-gyp@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.12.0.tgz#39ba4bb1439da030295f899e3b520b7785766149" + integrity sha512-4KghwV8vH5k+g2ylT+sLTjy5wmUOb9vPhnM8NHvRf9dHmnW/CndrFXy2aRPaPST6dugXSdHXfeaHQm77PIz/1A== + dependencies: + detect-libc "^1.0.2" + mkdirp "^0.5.1" + needle "^2.2.1" + nopt "^4.0.1" + npm-packlist "^1.1.6" + npmlog "^4.0.2" + rc "^1.2.7" + rimraf "^2.6.1" + semver "^5.3.0" + tar "^4" + +nopt@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" + integrity sha1-0NRoWv1UFRk8jHUFYC0NF81kR00= + dependencies: + abbrev "1" + osenv "^0.1.4" + +nopt@~3.0.6: + version "3.0.6" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" + integrity sha1-xkZdvwirzU2zWTF/eaxopkayj/k= + dependencies: + abbrev "1" + +normalize-package-data@^2.3.2, normalize-package-data@^2.3.4: + version "2.5.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" + integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== + dependencies: + hosted-git-info "^2.1.4" + resolve "^1.10.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +normalize-path@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= + dependencies: + remove-trailing-separator "^1.0.1" + +normalize-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +npm-bundled@^1.0.1: + version "1.0.6" + resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.6.tgz#e7ba9aadcef962bb61248f91721cd932b3fe6bdd" + integrity sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g== + +npm-packlist@^1.1.6: + version "1.4.1" + resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.1.tgz#19064cdf988da80ea3cee45533879d90192bbfbc" + integrity sha512-+TcdO7HJJ8peiiYhvPxsEDhF3PJFGUGRcFsGve3vxvxdcpO2Z4Z7rkosRM0kWj6LfbK/P0gu3dzk5RU1ffvFcw== + dependencies: + ignore-walk "^3.0.1" + npm-bundled "^1.0.1" + +npmlog@^4.0.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" + integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== + dependencies: + are-we-there-yet "~1.1.2" + console-control-strings "~1.1.0" + gauge "~2.7.3" + set-blocking "~2.0.0" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= + +"nwmatcher@>= 1.3.9 < 2.0.0": + version "1.4.4" + resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.4.4.tgz#2285631f34a95f0d0395cd900c96ed39b58f346e" + integrity sha512-3iuY4N5dhgMpCUrOVnuAdGrgxVqV2cJpM+XNccjR2DKOB1RUP0aA+wGXEiNziG/UKboFyGBIoKOaNlJxx8bciQ== + +oauth-sign@~0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" + integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== + +object-assign@^4.0.1, object-assign@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= + +object-copy@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" + integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw= + dependencies: + copy-descriptor "^0.1.0" + define-property "^0.2.5" + kind-of "^3.0.3" + +object-visit@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" + integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= + dependencies: + isobject "^3.0.0" + +object.pick@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" + integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= + dependencies: + isobject "^3.0.1" + +on-finished@~2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= + dependencies: + ee-first "1.1.1" + +on-headers@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.2.tgz#772b0ae6aaa525c399e489adfad90c403eb3c28f" + integrity sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA== + +once@^1.3.0, once@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + dependencies: + wrappy "1" + +opn@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/opn/-/opn-5.5.0.tgz#fc7164fab56d235904c51c3b27da6758ca3b9bfc" + integrity sha512-PqHpggC9bLV0VeWcdKhkpxY+3JTzetLSqTCWL/z/tFIbI6G8JCjondXklT1JinczLz2Xib62sSp0T/gKT4KksA== + dependencies: + is-wsl "^1.1.0" + +optionator@^0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" + integrity sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q= + dependencies: + 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-browserify@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" + integrity sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc= + +os-homedir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= + +os-locale@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" + integrity sha1-IPnxeuKe00XoveWDsT0gCYA8FNk= + dependencies: + lcid "^1.0.0" + +os-tmpdir@^1.0.0, os-tmpdir@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= + +osenv@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" + integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.0" + +pako@~1.0.5: + version "1.0.10" + resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.10.tgz#4328badb5086a426aa90f541977d4955da5c9732" + integrity sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw== + +parse-asn1@^5.0.0: + version "5.1.4" + resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.4.tgz#37f6628f823fbdeb2273b4d540434a22f3ef1fcc" + integrity sha512-Qs5duJcuvNExRfFZ99HDD3z4mAi3r9Wl/FOjEOijlxwCZs7E7mW2vjTpgQ4J8LpTF8x5v+1Vn5UQFejmWT11aw== + dependencies: + asn1.js "^4.0.0" + browserify-aes "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.0" + pbkdf2 "^3.0.3" + safe-buffer "^5.1.1" + +parse-json@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + integrity sha1-9ID0BDTvgHQfhGkJn43qGPVaTck= + dependencies: + error-ex "^1.2.0" + +parse5@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-1.5.1.tgz#9b7f3b0de32be78dc2401b17573ccaf0f6f59d94" + integrity sha1-m387DeMr543CQBsXVzzK8Pb1nZQ= + +parseurl@~1.3.2: + version "1.3.3" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" + integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== + +pascalcase@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" + integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= + +path-browserify@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.0.tgz#a0b870729aae214005b7d5032ec2cbbb0fb4451a" + integrity sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo= + +path-dirname@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" + integrity sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA= + +path-exists@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" + integrity sha1-D+tsZPD8UY2adU3V77YscCJ2H0s= + dependencies: + pinkie-promise "^2.0.0" + +path-is-absolute@^1.0.0, path-is-absolute@^1.0.1, path-is-absolute@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + +path-parse@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" + integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== + +path-type@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" + integrity sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE= + dependencies: + graceful-fs "^4.1.2" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +pbkdf2@^3.0.3: + version "3.0.17" + resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.17.tgz#976c206530617b14ebb32114239f7b09336e93a6" + integrity sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA== + dependencies: + create-hash "^1.1.2" + create-hmac "^1.1.4" + ripemd160 "^2.0.1" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +performance-now@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= + +pify@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= + +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o= + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= + +platform@^1.3.3: + version "1.3.5" + resolved "https://registry.yarnpkg.com/platform/-/platform-1.3.5.tgz#fb6958c696e07e2918d2eeda0f0bc9448d733444" + integrity sha512-TuvHS8AOIZNAlE77WUDiR4rySV/VMptyMfcfeoMgs4P8apaZM3JrnbzBiixKUv+XR6i+BXrQh8WAnjaSPFO65Q== + +portscanner@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/portscanner/-/portscanner-2.2.0.tgz#6059189b3efa0965c9d96a56b958eb9508411cf1" + integrity sha512-IFroCz/59Lqa2uBvzK3bKDbDDIEaAY8XJ1jFxcLWTqosrsc32//P4VuSB2vZXoHiHqOmx8B5L5hnKOxL/7FlPw== + dependencies: + async "^2.6.0" + is-number-like "^1.0.3" + +posix-character-classes@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" + integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= + +prelude-ls@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= + +private@^0.1.8: + version "0.1.8" + resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" + integrity sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg== + +process-nextick-args@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" + integrity sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw== + +process@^0.11.10: + version "0.11.10" + resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" + integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= + +prr@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" + integrity sha1-0/wRS6BplaRexok/SEzrHXj19HY= + +psl@^1.1.24, psl@^1.1.28: + version "1.1.31" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.31.tgz#e9aa86d0101b5b105cbe93ac6b784cd547276184" + integrity sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw== + +public-encrypt@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.3.tgz#4fcc9d77a07e48ba7527e7cbe0de33d0701331e0" + integrity sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q== + dependencies: + bn.js "^4.1.0" + browserify-rsa "^4.0.0" + create-hash "^1.1.0" + parse-asn1 "^5.0.0" + randombytes "^2.0.1" + safe-buffer "^5.1.2" + +punycode@1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" + integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0= + +punycode@^1.2.4, punycode@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= + +punycode@^2.1.0, punycode@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + +q@~1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/q/-/q-1.4.1.tgz#55705bcd93c5f3673530c2c2cbc0c2b3addc286e" + integrity sha1-VXBbzZPF82c1MMLCy8DCs63cKG4= + +qs@~6.5.2: + version "6.5.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" + integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== + +querystring-es3@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" + integrity sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM= + +querystring@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" + integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= + +randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5: + version "2.1.0" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== + dependencies: + safe-buffer "^5.1.0" + +randomfill@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458" + integrity sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw== + dependencies: + randombytes "^2.0.5" + safe-buffer "^5.1.0" + +range-parser@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" + integrity sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4= + +rc@^1.2.7: + version "1.2.8" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" + integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== + dependencies: + deep-extend "^0.6.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + +read-pkg-up@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" + integrity sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI= + dependencies: + find-up "^1.0.0" + read-pkg "^1.0.0" + +read-pkg@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" + integrity sha1-9f+qXs0pyzHAR0vKfXVra7KePyg= + dependencies: + load-json-file "^1.0.0" + normalize-package-data "^2.3.2" + path-type "^1.0.0" + +readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.3.3, readable-stream@^2.3.6: + version "2.3.6" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" + integrity sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + +readdirp@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525" + integrity sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ== + dependencies: + graceful-fs "^4.1.11" + micromatch "^3.1.10" + readable-stream "^2.0.2" + +redent@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" + integrity sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94= + dependencies: + indent-string "^2.1.0" + strip-indent "^1.0.1" + +regenerator-runtime@^0.11.0: + version "0.11.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" + integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== + +regex-not@^1.0.0, regex-not@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" + integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== + dependencies: + extend-shallow "^3.0.2" + safe-regex "^1.1.0" + +remove-trailing-separator@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" + integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8= + +repeat-element@^1.1.2: + version "1.1.3" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce" + integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g== + +repeat-string@^1.5.2, repeat-string@^1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= + +repeating@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" + integrity sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo= + dependencies: + is-finite "^1.0.0" + +request@^2.72.0, request@^2.74.x, request@^2.79.0, request@^2.88.0: + version "2.88.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef" + integrity sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg== + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.8.0" + caseless "~0.12.0" + combined-stream "~1.0.6" + extend "~3.0.2" + forever-agent "~0.6.1" + form-data "~2.3.2" + har-validator "~5.1.0" + http-signature "~1.2.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.19" + oauth-sign "~0.9.0" + performance-now "^2.1.0" + qs "~6.5.2" + safe-buffer "^5.1.2" + tough-cookie "~2.4.3" + tunnel-agent "^0.6.0" + uuid "^3.3.2" + +requestretry@~1.9.0: + version "1.9.1" + resolved "https://registry.yarnpkg.com/requestretry/-/requestretry-1.9.1.tgz#0a2a004eaf211969c4cc2cfebf3fe9e57b92c74e" + integrity sha1-CioATq8hGWnEzCz+vz/p5XuSx04= + dependencies: + extend "^3.0.0" + fg-lodash "0.0.2" + request "^2.74.x" + when "~3.7.5" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= + +require-main-filename@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" + integrity sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE= + +resolve-url@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" + integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= + +resolve@^1.10.0: + version "1.10.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.10.1.tgz#664842ac960795bbe758221cdccda61fb64b5f18" + integrity sha512-KuIe4mf++td/eFb6wkaPbMDnP6kObCaEtIDuHOUED6MNUo4K670KZUHuuvYPZDxNF0WVLw49n06M2m2dXphEzA== + dependencies: + path-parse "^1.0.6" + +resolve@~1.1.0: + version "1.1.7" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" + integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= + +ret@~0.1.10: + version "0.1.15" + resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" + integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== + +right-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" + integrity sha1-YTObci/mo1FWiSENJOFMlhSGE+8= + dependencies: + align-text "^0.1.1" + +rimraf@^2.6.1, rimraf@~2.6.2: + version "2.6.3" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" + integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== + dependencies: + glob "^7.1.3" + +ripemd160@^2.0.0, ripemd160@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" + integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + +safe-buffer@5.1.2, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + +safe-regex@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" + integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4= + dependencies: + ret "~0.1.10" + +"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +sauce-tunnel@~2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/sauce-tunnel/-/sauce-tunnel-2.5.0.tgz#0ee4c4ff9b47e013e8b072cbfac495b7fed8e8eb" + integrity sha1-DuTE/5tH4BPosHLL+sSVt/7Y6Os= + dependencies: + chalk "^1.1.3" + request "^2.72.0" + split "^1.0.0" + +saucelabs@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/saucelabs/-/saucelabs-1.5.0.tgz#9405a73c360d449b232839919a86c396d379fd9d" + integrity sha512-jlX3FGdWvYf4Q3LFfFWS1QvPg3IGCGWxIc8QBFdPTbpTJnt/v17FHXYVAn7C8sHf1yUXo2c7yIM0isDryfYtHQ== + dependencies: + https-proxy-agent "^2.2.1" + +sax@^1.2.1, sax@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" + integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== + +"semver@2 || 3 || 4 || 5", semver@^5.3.0: + version "5.7.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b" + integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA== + +send@0.16.2: + version "0.16.2" + resolved "https://registry.yarnpkg.com/send/-/send-0.16.2.tgz#6ecca1e0f8c156d141597559848df64730a6bbc1" + integrity sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw== + dependencies: + debug "2.6.9" + depd "~1.1.2" + destroy "~1.0.4" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "~1.6.2" + mime "1.4.1" + ms "2.0.0" + on-finished "~2.3.0" + range-parser "~1.2.0" + statuses "~1.4.0" + +serve-index@^1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/serve-index/-/serve-index-1.9.1.tgz#d3768d69b1e7d82e5ce050fff5b453bea12a9239" + integrity sha1-03aNabHn2C5c4FD/9bRTvqEqkjk= + dependencies: + accepts "~1.3.4" + batch "0.6.1" + debug "2.6.9" + escape-html "~1.0.3" + http-errors "~1.6.2" + mime-types "~2.1.17" + parseurl "~1.3.2" + +serve-static@^1.13.2: + version "1.13.2" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.13.2.tgz#095e8472fd5b46237db50ce486a43f4b86c6cec1" + integrity sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw== + dependencies: + encodeurl "~1.0.2" + escape-html "~1.0.3" + parseurl "~1.3.2" + send "0.16.2" + +set-blocking@^2.0.0, set-blocking@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= + +set-value@^0.4.3: + version "0.4.3" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1" + integrity sha1-fbCPnT0i3H945Trzw79GZuzfzPE= + dependencies: + extend-shallow "^2.0.1" + is-extendable "^0.1.1" + is-plain-object "^2.0.1" + to-object-path "^0.3.0" + +set-value@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.0.tgz#71ae4a88f0feefbbf52d1ea604f3fb315ebb6274" + integrity sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg== + dependencies: + extend-shallow "^2.0.1" + is-extendable "^0.1.1" + is-plain-object "^2.0.3" + split-string "^3.0.1" + +setimmediate@^1.0.4, setimmediate@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" + integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= + +setprototypeof@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" + integrity sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ== + +sha.js@^2.4.0, sha.js@^2.4.8: + version "2.4.11" + resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" + integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +signal-exit@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" + integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0= + +slash@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" + integrity sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU= + +snapdragon-node@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" + integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== + dependencies: + define-property "^1.0.0" + isobject "^3.0.0" + snapdragon-util "^3.0.1" + +snapdragon-util@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" + integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== + dependencies: + kind-of "^3.2.0" + +snapdragon@^0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" + integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== + dependencies: + base "^0.11.1" + debug "^2.2.0" + define-property "^0.2.5" + extend-shallow "^2.0.1" + map-cache "^0.2.2" + source-map "^0.5.6" + source-map-resolve "^0.5.0" + use "^3.1.0" + +source-list-map@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" + integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw== + +source-map-resolve@^0.5.0: + version "0.5.2" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.2.tgz#72e2cc34095543e43b2c62b2c4c10d4a9054f259" + integrity sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA== + dependencies: + atob "^2.1.1" + decode-uri-component "^0.2.0" + resolve-url "^0.2.1" + source-map-url "^0.4.0" + urix "^0.1.0" + +source-map-support@^0.4.15: + version "0.4.18" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f" + integrity sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA== + dependencies: + source-map "^0.5.6" + +source-map-url@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" + integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= + +source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= + +source-map@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +spdx-correct@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.0.tgz#fb83e504445268f154b074e218c87c003cd31df4" + integrity sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q== + dependencies: + spdx-expression-parse "^3.0.0" + spdx-license-ids "^3.0.0" + +spdx-exceptions@^2.1.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz#2ea450aee74f2a89bfb94519c07fcd6f41322977" + integrity sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA== + +spdx-expression-parse@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" + integrity sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg== + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + +spdx-license-ids@^3.0.0: + version "3.0.4" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.4.tgz#75ecd1a88de8c184ef015eafb51b5b48bfd11bb1" + integrity sha512-7j8LYJLeY/Yb6ACbQ7F76qy5jHkp0U6jgBfJsk97bwWlVUnUWsAgpyaCvo17h0/RQGnQ036tVDomiwoI4pDkQA== + +split-string@^3.0.1, split-string@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" + integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== + dependencies: + extend-shallow "^3.0.0" + +split@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/split/-/split-1.0.1.tgz#605bd9be303aa59fb35f9229fbea0ddec9ea07d9" + integrity sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg== + dependencies: + through "2" + +sprintf-js@^1.0.3: + version "1.1.2" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.2.tgz#da1765262bf8c0f571749f2ad6c26300207ae673" + integrity sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug== + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= + +sshpk@^1.7.0: + version "1.16.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877" + integrity sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg== + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + bcrypt-pbkdf "^1.0.0" + dashdash "^1.12.0" + ecc-jsbn "~0.1.1" + getpass "^0.1.1" + jsbn "~0.1.0" + safer-buffer "^2.0.2" + tweetnacl "~0.14.0" + +static-extend@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" + integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= + dependencies: + define-property "^0.2.5" + object-copy "^0.1.0" + +"statuses@>= 1.4.0 < 2": + version "1.5.0" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" + integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= + +statuses@~1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.3.1.tgz#faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e" + integrity sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4= + +statuses@~1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087" + integrity sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew== + +stream-browserify@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.1.tgz#66266ee5f9bdb9940a4e4514cafb43bb71e5c9db" + integrity sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds= + dependencies: + inherits "~2.0.1" + readable-stream "^2.0.2" + +stream-browserify@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.2.tgz#87521d38a44aa7ee91ce1cd2a47df0cb49dd660b" + integrity sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg== + dependencies: + inherits "~2.0.1" + readable-stream "^2.0.2" + +stream-http@^2.7.2: + version "2.8.3" + resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.3.tgz#b2d242469288a5a27ec4fe8933acf623de6514fc" + integrity sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw== + dependencies: + builtin-status-codes "^3.0.0" + inherits "^2.0.1" + readable-stream "^2.3.6" + to-arraybuffer "^1.0.0" + xtend "^4.0.0" + +stream-shift@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952" + integrity sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI= + +string-width@^1.0.1, string-width@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +"string-width@^1.0.2 || 2": + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + +string_decoder@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.2.0.tgz#fe86e738b19544afe70469243b2a1ee9240eae8d" + integrity sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w== + dependencies: + safe-buffer "~5.1.0" + +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + +strip-ansi@^3.0.0, strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= + dependencies: + ansi-regex "^2.0.0" + +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= + dependencies: + ansi-regex "^3.0.0" + +strip-bom@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" + integrity sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4= + dependencies: + is-utf8 "^0.2.0" + +strip-indent@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2" + integrity sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI= + dependencies: + get-stdin "^4.0.1" + +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= + +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= + +supports-color@^3.1.0: + version "3.2.3" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" + integrity sha1-ZawFBLOVQXHYpklGsq48u4pfVPY= + dependencies: + has-flag "^1.0.0" + +supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +symbol-tree@^3.2.1: + version "3.2.2" + resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" + integrity sha1-rifbOPZgp64uHDt9G8KQgZuFGeY= + +tapable@^0.2.7, tapable@~0.2.5: + version "0.2.9" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-0.2.9.tgz#af2d8bbc9b04f74ee17af2b4d9048f807acd18a8" + integrity sha512-2wsvQ+4GwBvLPLWsNfLCDYGsW6xb7aeC6utq2Qh0PFwgEy7K7dsma9Jsmb2zSQj7GvYAyUGSntLtsv++GmgL1A== + +tar@^4: + version "4.4.8" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.8.tgz#b19eec3fde2a96e64666df9fdb40c5ca1bc3747d" + integrity sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ== + dependencies: + chownr "^1.1.1" + fs-minipass "^1.2.5" + minipass "^2.3.4" + minizlib "^1.1.1" + mkdirp "^0.5.0" + safe-buffer "^5.1.2" + yallist "^3.0.2" + +through@2: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= + +timers-browserify@2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.2.tgz#ab4883cf597dcd50af211349a00fbca56ac86b86" + integrity sha1-q0iDz1l9zVCvIRNJoA+8pWrIa4Y= + dependencies: + setimmediate "^1.0.4" + +timers-browserify@^2.0.4: + version "2.0.10" + resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.10.tgz#1d28e3d2aadf1d5a5996c4e9f95601cd053480ae" + integrity sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg== + dependencies: + setimmediate "^1.0.4" + +to-arraybuffer@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" + integrity sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M= + +to-fast-properties@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" + integrity sha1-uDVx+k2MJbguIxsG46MFXeTKGkc= + +to-object-path@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" + integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= + dependencies: + kind-of "^3.0.2" + +to-regex-range@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" + integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= + dependencies: + is-number "^3.0.0" + repeat-string "^1.6.1" + +to-regex@^3.0.1, to-regex@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" + integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== + dependencies: + define-property "^2.0.2" + extend-shallow "^3.0.2" + regex-not "^1.0.2" + safe-regex "^1.1.0" + +tough-cookie@^2.3.2: + version "2.5.0" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" + integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== + dependencies: + psl "^1.1.28" + punycode "^2.1.1" + +tough-cookie@~2.4.3: + version "2.4.3" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781" + integrity sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ== + dependencies: + psl "^1.1.24" + punycode "^1.4.1" + +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" + integrity sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o= + +trim-newlines@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" + integrity sha1-WIeWa7WCpFA6QetST301ARgVphM= + +trim-right@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" + integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= + +tty-browserify@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" + integrity sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY= + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= + dependencies: + safe-buffer "^5.0.1" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= + +type-check@~0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I= + dependencies: + prelude-ls "~1.1.2" + +typescript@~2.0.0: + version "2.0.10" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.0.10.tgz#ccdd4ed86fd5550a407101a0814012e1b3fac3dd" + integrity sha1-zN1O2G/VVQpAcQGggUAS4bP6w90= + +uglify-js@^2.8.27: + version "2.8.29" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" + integrity sha1-KcVzMUgFe7Th913zW3qcty5qWd0= + dependencies: + source-map "~0.5.1" + yargs "~3.10.0" + optionalDependencies: + uglify-to-browserify "~1.0.0" + +uglify-to-browserify@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" + integrity sha1-bgkk1r2mta/jSeOabWMoUKD4grc= + +ultron@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.1.tgz#9fe1536a10a664a65266a1e3ccf85fd36302bc9c" + integrity sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og== + +underscore.string@~2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/underscore.string/-/underscore.string-2.3.3.tgz#71c08bf6b428b1133f37e78fa3a21c82f7329b0d" + integrity sha1-ccCL9rQosRM/N+ePo6Icgvcymw0= + +underscore.string@~3.3.4: + version "3.3.5" + resolved "https://registry.yarnpkg.com/underscore.string/-/underscore.string-3.3.5.tgz#fc2ad255b8bd309e239cbc5816fd23a9b7ea4023" + integrity sha512-g+dpmgn+XBneLmXXo+sGlW5xQEt4ErkS3mgeN2GFbremYeMBSJKr9Wf2KJplQVaiPY/f7FN6atosWYNm9ovrYg== + dependencies: + sprintf-js "^1.0.3" + util-deprecate "^1.0.2" + +underscore@^1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.9.1.tgz#06dce34a0e68a7babc29b365b8e74b8925203961" + integrity sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg== + +union-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4" + integrity sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ= + dependencies: + arr-union "^3.1.0" + get-value "^2.0.6" + is-extendable "^0.1.1" + set-value "^0.4.3" + +unpipe@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= + +unset-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" + integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= + dependencies: + has-value "^0.3.1" + isobject "^3.0.0" + +upath@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/upath/-/upath-1.1.2.tgz#3db658600edaeeccbe6db5e684d67ee8c2acd068" + integrity sha512-kXpym8nmDmlCBr7nKdIx8P2jNBa+pBpIUFRnKJ4dr8htyYGJFokkr2ZvERRtUN+9SY+JqXouNgUPtv6JQva/2Q== + +uri-js@^4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" + integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ== + dependencies: + punycode "^2.1.0" + +urix@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" + integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= + +url@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" + integrity sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE= + dependencies: + punycode "1.3.2" + querystring "0.2.0" + +use@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" + integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== + +util-deprecate@^1.0.2, util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= + +util@0.10.3: + version "0.10.3" + resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" + integrity sha1-evsa/lCAUkZInj23/g7TeTNqwPk= + dependencies: + inherits "2.0.1" + +util@^0.11.0: + version "0.11.1" + resolved "https://registry.yarnpkg.com/util/-/util-0.11.1.tgz#3236733720ec64bb27f6e26f421aaa2e1b588d61" + integrity sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ== + dependencies: + inherits "2.0.3" + +utils-merge@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" + integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= + +uuid@^3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" + integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA== + +validate-npm-package-license@^3.0.1: + version "3.0.4" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" + integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== + dependencies: + spdx-correct "^3.0.0" + spdx-expression-parse "^3.0.0" + +verror@1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= + dependencies: + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" + +vm-browserify@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73" + integrity sha1-XX6kW7755Kb/ZflUOOCofDV9WnM= + dependencies: + indexof "0.0.1" + +watchpack@^1.3.1: + version "1.6.0" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.6.0.tgz#4bc12c2ebe8aa277a71f1d3f14d685c7b446cd00" + integrity sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA== + dependencies: + chokidar "^2.0.2" + graceful-fs "^4.1.2" + neo-async "^2.5.0" + +webidl-conversions@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" + integrity sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE= + +webidl-conversions@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" + integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== + +webpack-sources@^1.0.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.3.0.tgz#2a28dcb9f1f45fe960d8f1493252b5ee6530fa85" + integrity sha512-OiVgSrbGu7NEnEvQJJgdSFPl2qWKkWq5lHMhgiToIiN9w34EBnjYzSYs+VbL5KoYiLNtFFa7BZIKxRED3I32pA== + dependencies: + source-list-map "^2.0.0" + source-map "~0.6.1" + +webpack@^2.7.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-2.7.0.tgz#b2a1226804373ffd3d03ea9c6bd525067034f6b1" + integrity sha512-MjAA0ZqO1ba7ZQJRnoCdbM56mmFpipOPUv/vQpwwfSI42p5PVDdoiuK2AL2FwFUVgT859Jr43bFZXRg/LNsqvg== + dependencies: + acorn "^5.0.0" + acorn-dynamic-import "^2.0.0" + ajv "^4.7.0" + ajv-keywords "^1.1.1" + async "^2.1.2" + enhanced-resolve "^3.3.0" + interpret "^1.0.0" + json-loader "^0.5.4" + json5 "^0.5.1" + loader-runner "^2.3.0" + loader-utils "^0.2.16" + memory-fs "~0.4.1" + mkdirp "~0.5.0" + node-libs-browser "^2.0.0" + source-map "^0.5.3" + supports-color "^3.1.0" + tapable "~0.2.5" + uglify-js "^2.8.27" + watchpack "^1.3.1" + webpack-sources "^1.0.1" + yargs "^6.0.0" + +websocket-stream@^5.0.1: + version "5.5.0" + resolved "https://registry.yarnpkg.com/websocket-stream/-/websocket-stream-5.5.0.tgz#9827f2846fc0d2b4dca7aab8f92980b2548b868e" + integrity sha512-EXy/zXb9kNHI07TIMz1oIUIrPZxQRA8aeJ5XYg5ihV8K4kD1DuA+FY6R96HfdIHzlSzS8HiISAfrm+vVQkZBug== + dependencies: + duplexify "^3.5.1" + inherits "^2.0.1" + readable-stream "^2.3.3" + safe-buffer "^5.1.2" + ws "^3.2.0" + xtend "^4.0.0" + +whatwg-encoding@^1.0.1: + version "1.0.5" + resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz#5abacf777c32166a51d085d6b4f3e7d27113ddb0" + integrity sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw== + dependencies: + iconv-lite "0.4.24" + +whatwg-url@^4.3.0: + version "4.8.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-4.8.0.tgz#d2981aa9148c1e00a41c5a6131166ab4683bbcc0" + integrity sha1-0pgaqRSMHgCkHFphMRZqtGg7vMA= + dependencies: + tr46 "~0.0.3" + webidl-conversions "^3.0.0" + +when@~3.7.5: + version "3.7.8" + resolved "https://registry.yarnpkg.com/when/-/when-3.7.8.tgz#c7130b6a7ea04693e842cdc9e7a1f2aa39a39f82" + integrity sha1-xxMLan6gRpPoQs3J56Hyqjmjn4I= + +which-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" + integrity sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8= + +which@~1.3.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== + dependencies: + isexe "^2.0.0" + +wide-align@^1.1.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" + integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== + dependencies: + string-width "^1.0.2 || 2" + +window-size@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" + integrity sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0= + +wordwrap@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" + integrity sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8= + +wordwrap@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= + +wrap-ansi@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" + integrity sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU= + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + +ws@^3.2.0: + version "3.3.3" + resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.3.tgz#f1cf84fe2d5e901ebce94efaece785f187a228f2" + integrity sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA== + dependencies: + async-limiter "~1.0.0" + safe-buffer "~5.1.0" + ultron "~1.1.0" + +xml-name-validator@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-2.0.1.tgz#4d8b8f1eccd3419aa362061becef515e1e559635" + integrity sha1-TYuPHszTQZqjYgYb7O9RXh5VljU= + +xtend@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" + integrity sha1-pcbVMr5lbiPbgg77lDofBJmNY68= + +y18n@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" + integrity sha1-bRX7qITAhnnA136I53WegR4H+kE= + +yallist@^3.0.0, yallist@^3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.3.tgz#b4b049e314be545e3ce802236d6cd22cd91c3de9" + integrity sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A== + +yargs-parser@^4.2.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-4.2.1.tgz#29cceac0dc4f03c6c87b4a9f217dd18c9f74871c" + integrity sha1-KczqwNxPA8bIe0qfIX3RjJ90hxw= + dependencies: + camelcase "^3.0.0" + +yargs@^6.0.0: + version "6.6.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-6.6.0.tgz#782ec21ef403345f830a808ca3d513af56065208" + integrity sha1-eC7CHvQDNF+DCoCMo9UTr1YGUgg= + dependencies: + camelcase "^3.0.0" + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + os-locale "^1.4.0" + read-pkg-up "^1.0.1" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^1.0.2" + which-module "^1.0.0" + y18n "^3.2.1" + yargs-parser "^4.2.0" + +yargs@~3.10.0: + version "3.10.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" + integrity sha1-9+572FfdfB0tOMDnTvvWgdFDH9E= + dependencies: + camelcase "^1.0.2" + cliui "^2.1.0" + decamelize "^1.0.0" + window-size "0.1.0" From 27711f68e84acc7d7bbd6e34c60c65e324997b38 Mon Sep 17 00:00:00 2001 From: Tom Pytleski Date: Mon, 6 May 2019 17:14:24 -0500 Subject: [PATCH 02/15] add inversible options --- dist/fast-json-patch.js | 2 + dist/fast-json-patch.min.js | 2 +- src/duplex.ts | 69 ++++++--- test/spec/duplexSpec.js | 275 +++++++++++++++++++++--------------- 4 files changed, 213 insertions(+), 135 deletions(-) diff --git a/dist/fast-json-patch.js b/dist/fast-json-patch.js index c8d498ea..fae92cef 100644 --- a/dist/fast-json-patch.js +++ b/dist/fast-json-patch.js @@ -837,6 +837,8 @@ function _generate(mirror, obj, patches, path) { value: helpers_1._deepClone(oldVal) }); patches.push({ op: "remove", path: path + "/" + helpers_1.escapePathComponent(key) }); + console.log("patches are"); + console.log(JSON.stringify(patches, null, 2)); deleted = true; // property has been deleted } else { diff --git a/dist/fast-json-patch.min.js b/dist/fast-json-patch.min.js index 83abe6a1..edd13378 100644 --- a/dist/fast-json-patch.min.js +++ b/dist/fast-json-patch.min.js @@ -1,2 +1,2 @@ /*! fast-json-patch, version: 2.1.0 */ -var jsonpatch=function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c={};return b.m=a,b.c=c,b.i=function(a){return a},b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{configurable:!1,enumerable:!0,get:d})},b.n=function(a){var c=a&&a.__esModule?function(){return a['default']}:function(){return a};return b.d(c,'a',c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p='',b(b.s=2)}([function(a,b){function c(a,b){return j.call(a,b)}function d(a){if(Array.isArray(a)){for(var b=Array(a.length),d=0;d=b){c++;continue}return!1}return!0},b.escapePathComponent=e,b.unescapePathComponent=function(a){return a.replace(/~1/g,'/').replace(/~0/g,'~')},b._getPathRecursive=f,b.getPath=function(a,b){if(a===b)return'/';var c=f(a,b);if(''===c)throw new Error('Object not found in root');return'/'+c},b.hasUndefined=g;var k=function(a){function b(b,c,d,e,f){a.call(this,h(b,{name:c,index:d,operation:e,tree:f})),this.name=c,this.index=d,this.operation=e,this.tree=f,this.message=h(b,{name:c,index:d,operation:e,tree:f})}return i(b,a),b}(Error);b.PatchError=k},function(a,b,c){function d(a,b){if(''==b)return a;var c={op:'_get',path:b};return e(a,c),c.value}function e(a,c,e,f,h,i){if(void 0===e&&(e=!1),void 0===f&&(f=!0),void 0===h&&(h=!0),void 0===i&&(i=0),e&&('function'==typeof e?e(c,0,a,c.path):g(c,0)),''===c.path){var j={newDocument:a};if('add'===c.op)return j.newDocument=c.value,j;if('replace'===c.op)return j.newDocument=c.value,j.removed=a,j;if('move'===c.op||'copy'===c.op)return j.newDocument=d(a,c.from),'move'===c.op&&(j.removed=a),j;if('test'===c.op){if(j.test=k(a,c.value),!1===j.test)throw new b.JsonPatchError('Test operation failed','TEST_OPERATION_FAILED',i,c,a);return j.newDocument=a,j}if('remove'===c.op)return j.removed=a,j.newDocument=null,j;if('_get'===c.op)return c.value=a,j;if(e)throw new b.JsonPatchError('Operation `op` property is not one of operations defined in RFC-6902','OPERATION_OP_INVALID',i,c,a);else return j}else{f||(a=l._deepClone(a));var o=c.path||'',p=o.split('/'),q=a,r=1,s=p.length,t=void 0,u=void 0,v=void 0;for(v='function'==typeof e?e:g;;){if(u=p[r],h&&'__proto__'==u)throw new TypeError('JSON-Patch: modifying `__proto__` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README');if(e&&void 0==t&&(void 0===q[u]?t=p.slice(0,r).join('/'):r==s-1&&(t=c.path),void 0!==t&&v(c,0,a,t)),r++,Array.isArray(q)){if('-'===u)u=q.length;else if(e&&!l.isInteger(u))throw new b.JsonPatchError('Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index','OPERATION_PATH_ILLEGAL_ARRAY_INDEX',i,c,a);else l.isInteger(u)&&(u=~~u);if(r>=s){if(e&&'add'===c.op&&u>q.length)throw new b.JsonPatchError('The specified index MUST NOT be greater than the number of elements in the array','OPERATION_VALUE_OUT_OF_BOUNDS',i,c,a);var j=n[c.op].call(c,q,u,a);if(!1===j.test)throw new b.JsonPatchError('Test operation failed','TEST_OPERATION_FAILED',i,c,a);return j}}else if(u&&-1!=u.indexOf('~')&&(u=l.unescapePathComponent(u)),r>=s){var j=m[c.op].call(c,q,u,a);if(!1===j.test)throw new b.JsonPatchError('Test operation failed','TEST_OPERATION_FAILED',i,c,a);return j}q=q[u]}}}function f(a,c,d,f,g){if(void 0===f&&(f=!0),void 0===g&&(g=!0),d&&!Array.isArray(c))throw new b.JsonPatchError('Patch sequence must be an array','SEQUENCE_NOT_AN_ARRAY');f||(a=l._deepClone(a));for(var h=Array(c.length),j=0,i=c.length;j=b){c++;continue}return!1}return!0},b.escapePathComponent=e,b.unescapePathComponent=function(a){return a.replace(/~1/g,'/').replace(/~0/g,'~')},b._getPathRecursive=f,b.getPath=function(a,b){if(a===b)return'/';var c=f(a,b);if(''===c)throw new Error('Object not found in root');return'/'+c},b.hasUndefined=g;var k=function(a){function b(b,c,d,e,f){a.call(this,h(b,{name:c,index:d,operation:e,tree:f})),this.name=c,this.index=d,this.operation=e,this.tree=f,this.message=h(b,{name:c,index:d,operation:e,tree:f})}return i(b,a),b}(Error);b.PatchError=k},function(a,b,c){function d(a,b){if(''==b)return a;var c={op:'_get',path:b};return e(a,c),c.value}function e(a,c,e,f,h,i){if(void 0===e&&(e=!1),void 0===f&&(f=!0),void 0===h&&(h=!0),void 0===i&&(i=0),e&&('function'==typeof e?e(c,0,a,c.path):g(c,0)),''===c.path){var j={newDocument:a};if('add'===c.op)return j.newDocument=c.value,j;if('replace'===c.op)return j.newDocument=c.value,j.removed=a,j;if('move'===c.op||'copy'===c.op)return j.newDocument=d(a,c.from),'move'===c.op&&(j.removed=a),j;if('test'===c.op){if(j.test=k(a,c.value),!1===j.test)throw new b.JsonPatchError('Test operation failed','TEST_OPERATION_FAILED',i,c,a);return j.newDocument=a,j}if('remove'===c.op)return j.removed=a,j.newDocument=null,j;if('_get'===c.op)return c.value=a,j;if(e)throw new b.JsonPatchError('Operation `op` property is not one of operations defined in RFC-6902','OPERATION_OP_INVALID',i,c,a);else return j}else{f||(a=l._deepClone(a));var o=c.path||'',p=o.split('/'),q=a,r=1,s=p.length,t=void 0,u=void 0,v=void 0;for(v='function'==typeof e?e:g;;){if(u=p[r],h&&'__proto__'==u)throw new TypeError('JSON-Patch: modifying `__proto__` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README');if(e&&void 0==t&&(void 0===q[u]?t=p.slice(0,r).join('/'):r==s-1&&(t=c.path),void 0!==t&&v(c,0,a,t)),r++,Array.isArray(q)){if('-'===u)u=q.length;else if(e&&!l.isInteger(u))throw new b.JsonPatchError('Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index','OPERATION_PATH_ILLEGAL_ARRAY_INDEX',i,c,a);else l.isInteger(u)&&(u=~~u);if(r>=s){if(e&&'add'===c.op&&u>q.length)throw new b.JsonPatchError('The specified index MUST NOT be greater than the number of elements in the array','OPERATION_VALUE_OUT_OF_BOUNDS',i,c,a);var j=n[c.op].call(c,q,u,a);if(!1===j.test)throw new b.JsonPatchError('Test operation failed','TEST_OPERATION_FAILED',i,c,a);return j}}else if(u&&-1!=u.indexOf('~')&&(u=l.unescapePathComponent(u)),r>=s){var j=m[c.op].call(c,q,u,a);if(!1===j.test)throw new b.JsonPatchError('Test operation failed','TEST_OPERATION_FAILED',i,c,a);return j}q=q[u]}}}function f(a,c,d,f,g){if(void 0===f&&(f=!0),void 0===g&&(g=!0),d&&!Array.isArray(c))throw new b.JsonPatchError('Patch sequence must be an array','SEQUENCE_NOT_AN_ARRAY');f||(a=l._deepClone(a));for(var h=Array(c.length),j=0,i=c.length;j(root: T, observer: Observer) { */ export function observe( obj: Object | Array, - callback?: (patches: Operation[]) => void + opts: { + callback?: (patches: Operation[]) => void + inversible?: boolean + } = {} ): Observer { var patches = [] var observer + var callback = opts.callback var mirror = getMirror(obj) if (!mirror) { @@ -111,7 +115,9 @@ export function observe( observer.next = null var dirtyCheck = () => { - generate(observer) + generate(observer, { + inversible: opts.inversible + }) } var fastCheck = () => { clearTimeout(observer.next) @@ -140,7 +146,9 @@ export function observe( observer.object = obj observer.unobserve = () => { - generate(observer) + generate(observer, { + inversible: opts.inversible + }) clearTimeout(observer.next) removeObserverFromMirror(mirror, observer) @@ -167,9 +175,14 @@ export function observe( /** * Generate an array of patches from an observer */ -export function generate(observer: Observer): Operation[] { +export function generate( + observer: Observer, + opts?: { + inversible: boolean + } +): Operation[] { var mirror = beforeDict.get(observer.object) - _generate(mirror.value, observer.object, observer.patches, "") + _generate(mirror.value, observer.object, observer.patches, "", opts) if (observer.patches.length) { applyPatch(mirror.value, observer.patches) } @@ -184,7 +197,15 @@ export function generate(observer: Observer): Operation[] { } // Dirty check if obj is different from mirror, generate patches and update mirror -function _generate(mirror, obj, patches, path) { +function _generate( + mirror, + obj, + patches, + path, + opts = { + inversible: false + } +) { if (obj === mirror) { return } @@ -197,7 +218,7 @@ function _generate(mirror, obj, patches, path) { var oldKeys = _objectKeys(mirror) var changed = false var deleted = false - + var {inversible} = opts //if ever "move" operation is implemented here, make sure this test runs OK: "should not generate the same patch twice (move)" for (var t = oldKeys.length - 1; t >= 0; t--) { @@ -224,16 +245,18 @@ function _generate(mirror, obj, patches, path) { oldVal, newVal, patches, - path + "/" + escapePathComponent(key) + path + "/" + escapePathComponent(key), + opts ) } else { if (oldVal !== newVal) { changed = true - patches.push({ - op: "test", - path: path + "/" + escapePathComponent(key), - value: _deepClone(oldVal) - }) + if (inversible) + patches.push({ + op: "test", + path: path + "/" + escapePathComponent(key), + value: _deepClone(oldVal) + }) patches.push({ op: "replace", path: path + "/" + escapePathComponent(key), @@ -242,15 +265,16 @@ function _generate(mirror, obj, patches, path) { } } } else if (Array.isArray(mirror) === Array.isArray(obj)) { - patches.push({ - op: "test", - path: path + "/" + escapePathComponent(key), - value: _deepClone(oldVal) - }) + if (inversible) + patches.push({ + op: "test", + path: path + "/" + escapePathComponent(key), + value: _deepClone(oldVal) + }) patches.push({op: "remove", path: path + "/" + escapePathComponent(key)}) deleted = true // property has been deleted } else { - patches.push({op: "test", path, value: mirror}) + if (inversible) patches.push({op: "test", path, value: mirror}) patches.push({op: "replace", path, value: obj}) changed = true } @@ -276,9 +300,12 @@ function _generate(mirror, obj, patches, path) { */ export function compare( tree1: Object | Array, - tree2: Object | Array + tree2: Object | Array, + opts?: { + inversible: boolean + } ): Operation[] { var patches = [] - _generate(tree1, tree2, patches, "") + _generate(tree1, tree2, patches, "", opts) return patches } diff --git a/test/spec/duplexSpec.js b/test/spec/duplexSpec.js index c9f1f25e..65dac903 100644 --- a/test/spec/duplexSpec.js +++ b/test/spec/duplexSpec.js @@ -20,16 +20,18 @@ function trigger(eventName, elem) { function getPatchesUsingGenerate(objFactory, objChanger) { var obj = objFactory() - var observer = jsonpatch.observe(obj) + var observer = jsonpatch.observe(obj, {inversible: true}) objChanger(obj) - return jsonpatch.generate(observer) + return jsonpatch.generate(observer, {inversible: true}) } function getPatchesUsingCompare(objFactory, objChanger) { var obj = objFactory() var mirror = JSON.parse(JSON.stringify(obj)) objChanger(obj) - return jsonpatch.compare(mirror, JSON.parse(JSON.stringify(obj))) + return jsonpatch.compare(mirror, JSON.parse(JSON.stringify(obj)), { + inversible: true + }) } //http://stackoverflow.com/questions/827716/emulate-clicking-a-link-with-javascript-that-works-with-ie @@ -120,13 +122,13 @@ describe("duplex", function() { ] } - var observer = jsonpatch.observe(obj) + var observer = jsonpatch.observe(obj, {inversible: true}) obj.firstName = "Joachim" obj.lastName = "Wester" obj.phoneNumbers[0].number = "123" obj.phoneNumbers[1].number = "456" - var patches = jsonpatch.generate(observer) + var patches = jsonpatch.generate(observer, {inversible: true}) obj2 = { firstName: "Albert", lastName: "Einstein", @@ -158,13 +160,13 @@ describe("duplex", function() { ] } - var observer = jsonpatch.observe(obj) + var observer = jsonpatch.observe(obj, {inversible: true}) obj["/name/first"] = "Joachim" obj["/name/last"] = "Wester" obj["~phone~/numbers"][0].number = "123" obj["~phone~/numbers"][1].number = "456" - var patches = jsonpatch.generate(observer) + var patches = jsonpatch.generate(observer, {inversible: true}) obj2 = { "/name/first": "Albert", "/name/last": "Einstein", @@ -198,8 +200,8 @@ describe("duplex", function() { person1.firstName = "Alexander" person2.firstName = "Lucas" - var patch1 = jsonpatch.generate(observer1) - var patch2 = jsonpatch.generate(observer2) + var patch1 = jsonpatch.generate(observer1, {inversible: true}) + var patch2 = jsonpatch.generate(observer2, {inversible: true}) expect(patch1).toReallyEqual([ { @@ -241,10 +243,10 @@ describe("duplex", function() { ] } - var observer = jsonpatch.observe(obj) + var observer = jsonpatch.observe(obj, {inversible: true}) obj.firstName = "Marcin" - var patches = jsonpatch.generate(observer) + var patches = jsonpatch.generate(observer, {inversible: true}) expect(patches).toReallyEqual([ { op: "test", @@ -259,7 +261,7 @@ describe("duplex", function() { ]) obj.lastName = "Warp" - patches = jsonpatch.generate(observer) //first patch should NOT be reported again here + patches = jsonpatch.generate(observer, {inversible: true}) //first patch should NOT be reported again here expect(patches).toReallyEqual([ { op: "test", @@ -301,10 +303,10 @@ describe("duplex", function() { ] } - var observer = jsonpatch.observe(obj) + var observer = jsonpatch.observe(obj, {inversible: true}) obj.phoneNumbers[0].number = "123" - var patches = jsonpatch.generate(observer) + var patches = jsonpatch.generate(observer, {inversible: true}) expect(patches).toReallyEqual([ { op: "test", @@ -319,7 +321,7 @@ describe("duplex", function() { ]) obj.phoneNumbers[1].number = "456" - patches = jsonpatch.generate(observer) //first patch should NOT be reported again here + patches = jsonpatch.generate(observer, {inversible: true}) //first patch should NOT be reported again here expect(patches).toReallyEqual([ { op: "test", @@ -350,10 +352,10 @@ describe("duplex", function() { it("should generate replace (changes in new array cell, primitive values)", function() { arr = [1] - var observer = jsonpatch.observe(arr) + var observer = jsonpatch.observe(arr, {inversible: true}) arr.push(2) - var patches = jsonpatch.generate(observer) + var patches = jsonpatch.generate(observer, {inversible: true}) expect(patches).toReallyEqual([ { op: "add", @@ -364,7 +366,7 @@ describe("duplex", function() { arr[0] = 3 - var patches = jsonpatch.generate(observer) + var patches = jsonpatch.generate(observer, {inversible: true}) expect(patches).toReallyEqual([ { op: "test", @@ -380,7 +382,7 @@ describe("duplex", function() { arr[1] = 4 - var patches = jsonpatch.generate(observer) + var patches = jsonpatch.generate(observer, {inversible: true}) expect(patches).toReallyEqual([ { op: "test", @@ -403,13 +405,13 @@ describe("duplex", function() { } ] - var observer = jsonpatch.observe(arr) + var observer = jsonpatch.observe(arr, {inversible: true}) arr.push({ id: 2, name: "Jerry" }) - var patches = jsonpatch.generate(observer) + var patches = jsonpatch.generate(observer, {inversible: true}) expect(patches).toReallyEqual([ { op: "add", @@ -423,7 +425,7 @@ describe("duplex", function() { arr[0].id = 3 - var patches = jsonpatch.generate(observer) + var patches = jsonpatch.generate(observer, {inversible: true}) expect(patches).toReallyEqual([ { op: "test", @@ -439,7 +441,7 @@ describe("duplex", function() { arr[1].id = 4 - var patches = jsonpatch.generate(observer) + var patches = jsonpatch.generate(observer, {inversible: true}) expect(patches).toReallyEqual([ { op: "test", @@ -463,7 +465,7 @@ describe("duplex", function() { } ] } - var observer = jsonpatch.observe(obj) + var observer = jsonpatch.observe(obj, {inversible: true}) obj.firstName = "Joachim" obj.lastName = "Wester" @@ -472,7 +474,7 @@ describe("duplex", function() { number: "456" }) - patches = jsonpatch.generate(observer) + patches = jsonpatch.generate(observer, {inversible: true}) obj2 = { lastName: "Einstein", phoneNumbers: [ @@ -499,14 +501,14 @@ describe("duplex", function() { } ] } - var observer = jsonpatch.observe(obj) + var observer = jsonpatch.observe(obj, {inversible: true}) delete obj.firstName obj.lastName = "Wester" obj.phoneNumbers[0].number = "123" obj.phoneNumbers.pop(1) - patches = jsonpatch.generate(observer) + patches = jsonpatch.generate(observer, {inversible: true}) obj2 = { lastName: "Einstein", firstName: "Albert", @@ -528,12 +530,12 @@ describe("duplex", function() { obj = { items: ["a", "b", "c"] } - var observer = jsonpatch.observe(obj) + var observer = jsonpatch.observe(obj, {inversible: true}) obj.items.pop() obj.items.pop() - patches = jsonpatch.generate(observer) + patches = jsonpatch.generate(observer, {inversible: true}) //array indexes must be sorted descending, otherwise there is an index collision in apply expect(patches).toReallyEqual([ @@ -568,11 +570,11 @@ describe("duplex", function() { obj = { lastName: "Einstein" } - var observer = jsonpatch.observe(obj) + var observer = jsonpatch.observe(obj, {inversible: true}) obj.lastName = "Wester" - patches = jsonpatch.generate(observer) + patches = jsonpatch.generate(observer, {inversible: true}) expect(patches).toReallyEqual([ { op: "test", @@ -586,7 +588,7 @@ describe("duplex", function() { } ]) - patches = jsonpatch.generate(observer) + patches = jsonpatch.generate(observer, {inversible: true}) expect(patches).toReallyEqual([]) }) @@ -594,11 +596,11 @@ describe("duplex", function() { obj = { lastName: "Einstein" } - var observer = jsonpatch.observe(obj) + var observer = jsonpatch.observe(obj, {inversible: true}) obj.firstName = "Albert" - patches = jsonpatch.generate(observer) + patches = jsonpatch.generate(observer, {inversible: true}) expect(patches).toReallyEqual([ { op: "add", @@ -607,7 +609,7 @@ describe("duplex", function() { } ]) - patches = jsonpatch.generate(observer) + patches = jsonpatch.generate(observer, {inversible: true}) expect(patches).toReallyEqual([]) }) @@ -615,11 +617,11 @@ describe("duplex", function() { obj = { lastName: "Einstein" } - var observer = jsonpatch.observe(obj) + var observer = jsonpatch.observe(obj, {inversible: true}) delete obj.lastName - patches = jsonpatch.generate(observer) + patches = jsonpatch.generate(observer, {inversible: true}) expect(patches).toReallyEqual([ { op: "test", @@ -632,7 +634,7 @@ describe("duplex", function() { } ]) - patches = jsonpatch.generate(observer) + patches = jsonpatch.generate(observer, {inversible: true}) expect(patches).toReallyEqual([]) }) @@ -642,14 +644,14 @@ describe("duplex", function() { } var patches - var observer = jsonpatch.observe(obj) + var observer = jsonpatch.observe(obj, {inversible: true}) obj.array.value = 1 - patches = jsonpatch.generate(observer) + patches = jsonpatch.generate(observer, {inversible: true}) expect(patches.length).toReallyEqual(0) obj.array.value = 2 - patches = jsonpatch.generate(observer) + patches = jsonpatch.generate(observer, {inversible: true}) expect(patches.length).toReallyEqual(0) }) @@ -666,9 +668,9 @@ describe("duplex", function() { } } - var observer = jsonpatch.observe(obj) + var observer = jsonpatch.observe(obj, {inversible: true}) obj.b = 5 - patches = jsonpatch.generate(observer) + patches = jsonpatch.generate(observer, {inversible: true}) expect(patches.length).toReallyEqual(2) }) @@ -689,7 +691,7 @@ describe("duplex", function() { var observer = jsonpatch.observe(outer) outer.obj.b = 5 - patches = jsonpatch.generate(observer) + patches = jsonpatch.generate(observer, {inversible: true}) expect(patches.length).toReallyEqual(2) expect(patches[1].op).toReallyEqual("replace") @@ -699,17 +701,17 @@ describe("duplex", function() { /*it('should not generate the same patch twice (move)', function() { //"move" is not implemented yet in jsonpatch.generate obj = { lastName: {str: "Einstein"} }; - var observer = jsonpatch.observe(obj); + var observer = jsonpatch.observe(obj, {inversible: true}); obj.lastName2 = obj.lastName; delete obj.lastName; - patches = jsonpatch.generate(observer); + patches = jsonpatch.generate(observer), { inversible: true} ; expect(patches).toReallyEqual([ { op: 'move', from: '/lastName', to: '/lastName2' } ]); - patches = jsonpatch.generate(observer); + patches = jsonpatch.generate(observer), { inversible: true} ; expect(patches).toReallyEqual([]); });*/ @@ -719,10 +721,10 @@ describe("duplex", function() { foo: "bar" } - var observer = jsonpatch.observe(obj) + var observer = jsonpatch.observe(obj, {inversible: true}) obj.foo = undefined - var patches = jsonpatch.generate(observer) + var patches = jsonpatch.generate(observer, {inversible: true}) expect(patches).toReallyEqual([ { op: "test", @@ -741,10 +743,10 @@ describe("duplex", function() { foo: "bar" } - var observer = jsonpatch.observe(obj) + var observer = jsonpatch.observe(obj, {inversible: true}) obj.baz = undefined - var patches = jsonpatch.generate(observer) + var patches = jsonpatch.generate(observer, {inversible: true}) expect(patches).toReallyEqual([]) }) @@ -753,10 +755,10 @@ describe("duplex", function() { foo: [0, 1, 2] } - var observer = jsonpatch.observe(obj) + var observer = jsonpatch.observe(obj, {inversible: true}) obj.foo[1] = undefined - var patches = jsonpatch.generate(observer) + var patches = jsonpatch.generate(observer, {inversible: true}) expect(patches).toReallyEqual([ { op: "test", @@ -776,10 +778,10 @@ describe("duplex", function() { foo: undefined } - var observer = jsonpatch.observe(obj) + var observer = jsonpatch.observe(obj, {inversible: true}) obj.foo = "something" - var patches = jsonpatch.generate(observer) + var patches = jsonpatch.generate(observer, {inversible: true}) expect(patches).toReallyEqual([ { op: "add", @@ -793,10 +795,10 @@ describe("duplex", function() { foo: [0, undefined, 2] } - var observer = jsonpatch.observe(obj) + var observer = jsonpatch.observe(obj, {inversible: true}) obj.foo[1] = 1 - var patches = jsonpatch.generate(observer) + var patches = jsonpatch.generate(observer, {inversible: true}) expect(patches).toReallyEqual([ { op: "test", @@ -1024,9 +1026,12 @@ describe("duplex", function() { ] } - jsonpatch.observe(obj, function(_patches) { - patches = _patches - patchesChanged() + jsonpatch.observe(obj, { + callback: function(_patches) { + patches = _patches + patchesChanged() + }, + inversible: true }) obj.firstName = "Joachim" obj.lastName = "Wester" @@ -1072,10 +1077,13 @@ describe("duplex", function() { ] } - jsonpatch.observe(obj, function(patches) { - called++ - lastPatches = patches - patchesChanged(called) + jsonpatch.observe(obj, { + callback: function(patches) { + called++ + lastPatches = patches + patchesChanged(called) + }, + inversible: true }) obj.firstName = "Marcin" @@ -1152,10 +1160,13 @@ describe("duplex", function() { ] } - jsonpatch.observe(obj, function(patches) { - called++ - lastPatches = patches - patchesChanged(called) + jsonpatch.observe(obj, { + callback: function(patches) { + called++ + lastPatches = patches + patchesChanged(called) + }, + inversible: true }) obj.phoneNumbers[0].number = "123" @@ -1233,16 +1244,19 @@ describe("duplex", function() { ] } - var observer = jsonpatch.observe(obj, function(patches) { - called++ - lastPatches = patches + var observer = jsonpatch.observe(obj, { + callback: function(patches) { + called++ + lastPatches = patches + }, + inversible: true }) obj.phoneNumbers[0].number = "123" setTimeout(function() { expect(called).toReallyEqual(0) - res = jsonpatch.generate(observer) + res = jsonpatch.generate(observer, {inversible: true}) expect(called).toReallyEqual(1) expect(lastPatches).toReallyEqual([ { @@ -1258,7 +1272,7 @@ describe("duplex", function() { ]) expect(lastPatches).toReallyEqual(res) - res = jsonpatch.generate(observer) + res = jsonpatch.generate(observer, {inversible: true}) expect(called).toReallyEqual(1) expect(lastPatches).toReallyEqual([ { @@ -1293,8 +1307,11 @@ describe("duplex", function() { ] } - var observer = jsonpatch.observe(obj, function(patches) { - called++ + var observer = jsonpatch.observe(obj, { + callback: function(patches) { + called++ + }, + inversible: true }) obj.firstName = "Malvin" @@ -1314,8 +1331,11 @@ describe("duplex", function() { setTimeout(function() { expect(called).toReallyEqual(1) - observer = jsonpatch.observe(obj, function(patches) { - called++ + observer = jsonpatch.observe(obj, { + callback: function(patches) { + called++ + }, + inversible: true }) obj.firstName = "Megan" @@ -1345,8 +1365,11 @@ describe("duplex", function() { ] } - var observer = jsonpatch.observe(obj, function(patches) { - called++ + var observer = jsonpatch.observe(obj, { + callback: function(patches) { + called++ + }, + inversible: true }) obj.phoneNumbers[1].number = "555" @@ -1365,8 +1388,11 @@ describe("duplex", function() { setTimeout(function() { expect(called).toReallyEqual(1) - observer = jsonpatch.observe(obj, function(patches) { - called++ + observer = jsonpatch.observe(obj, { + callback: function(patches) { + called++ + }, + inversible: true }) obj.phoneNumbers[1].number = "557" @@ -1397,8 +1423,11 @@ describe("duplex", function() { ] } - var observer = jsonpatch.observe(obj, function(patches) { - lastPatches = patches + var observer = jsonpatch.observe(obj, { + callback: function(patches) { + lastPatches = patches + }, + inversible: true }) obj.firstName = "Malvin" @@ -1428,12 +1457,12 @@ describe("duplex", function() { .createSpy("callback", function() { jsonpatch.unobserve(obj, observer) - jsonpatch.observe(obj, callback) + jsonpatch.observe(obj, {callback}) callbackCalled(++count) }) .and.callThrough() - observer = jsonpatch.observe(obj, callback) + observer = jsonpatch.observe(obj, {callback}) expect(callback.calls.count()).toReallyEqual(0) @@ -1464,8 +1493,11 @@ describe("duplex", function() { lastName: "Einstein" } var lastPatches - var observer = jsonpatch.observe(obj, function(patches) { - lastPatches = patches + var observer = jsonpatch.observe(obj, { + callback: function(patches) { + lastPatches = patches + }, + inversible: true }) obj.lastName = "Hawking" @@ -1494,8 +1526,11 @@ describe("duplex", function() { lastName: "Einstein" } var lastPatches - var observer = jsonpatch.observe(obj, function(patches) { - lastPatches = patches + var observer = jsonpatch.observe(obj, { + callback: function(patches) { + lastPatches = patches + }, + inversible: true }) obj.lastName = "Hawking" @@ -1523,8 +1558,11 @@ describe("duplex", function() { lastName: "Einstein" } var lastPatches - var observer = jsonpatch.observe(obj, function(patches) { - lastPatches = patches + var observer = jsonpatch.observe(obj, { + callback: function(patches) { + lastPatches = patches + }, + inversible: true }) obj.lastName = "Hawking" @@ -1552,8 +1590,11 @@ describe("duplex", function() { lastName: "Einstein" } var lastPatches - var observer = jsonpatch.observe(obj, function(patches) { - lastPatches = patches + var observer = jsonpatch.observe(obj, { + callback: function(patches) { + lastPatches = patches + }, + inversible: true }) obj.lastName = "Hawking" @@ -1579,7 +1620,7 @@ describe("duplex", function() { describe("compare", function() { it("Replacing a root array with an object should be handled well", function() { const obj = {} - var patches = jsonpatch.compare(["jack"], obj) + var patches = jsonpatch.compare(["jack"], obj, {inversible: true}) expect(patches).toEqual([ { op: "test", @@ -1595,7 +1636,11 @@ describe("duplex", function() { }) it("Replacing an array with an object should be handled well", function() { const obj = {} - var patches = jsonpatch.compare({arr: ["jack"]}, {arr: obj}) + var patches = jsonpatch.compare( + {arr: ["jack"]}, + {arr: obj}, + {inversible: true} + ) expect(patches).toEqual([ { op: "test", @@ -1613,7 +1658,8 @@ describe("duplex", function() { const obj = {} var patches = jsonpatch.compare( {arr: {deeperArray: ["jack"]}}, - {arr: {deeperArray: obj}} + {arr: {deeperArray: obj}}, + {inversible: true} ) expect(patches).toEqual([ @@ -1642,7 +1688,7 @@ describe("duplex", function() { } } - expect(jsonpatch.compare(objA, objB)).toReallyEqual([ + expect(jsonpatch.compare(objA, objB, {inversible: true})).toReallyEqual([ { op: "add", path: "/user/lastName", @@ -1664,7 +1710,7 @@ describe("duplex", function() { } } - expect(jsonpatch.compare(objA, objB)).toReallyEqual([ + expect(jsonpatch.compare(objA, objB, {inversible: true})).toReallyEqual([ { op: "test", path: "/user/lastName", @@ -1691,7 +1737,7 @@ describe("duplex", function() { } } - expect(jsonpatch.compare(objA, objB)).toReallyEqual([ + expect(jsonpatch.compare(objA, objB, {inversible: true})).toReallyEqual([ { op: "test", path: "/user/lastName", @@ -1713,7 +1759,7 @@ describe("duplex", function() { user: {} } - expect(jsonpatch.compare(objA, objB)).toReallyEqual([ + expect(jsonpatch.compare(objA, objB, {inversible: true})).toReallyEqual([ { op: "test", path: "/user", @@ -1735,7 +1781,7 @@ describe("duplex", function() { user: null } - expect(jsonpatch.compare(objA, objB)).toReallyEqual([ + expect(jsonpatch.compare(objA, objB, {inversible: true})).toReallyEqual([ { op: "test", path: "/user", @@ -1768,7 +1814,7 @@ describe("duplex", function() { user: "" } - expect(jsonpatch.compare(objA, objB)).toReallyEqual([ + expect(jsonpatch.compare(objA, objB, {inversible: true})).toReallyEqual([ { op: "test", path: "/user", @@ -1791,8 +1837,8 @@ describe("duplex", function() { var callback = jasmine.createSpy("callback") - jsonpatch.observe(obj, callback) - jsonpatch.observe(obj, callback) + jsonpatch.observe(obj, {callback}) + jsonpatch.observe(obj, {callback}) expect(callback.calls.count()).toReallyEqual(0) @@ -1813,8 +1859,8 @@ describe("duplex", function() { var callback = jasmine.createSpy("callback") - var observer1 = jsonpatch.observe(obj, callback) - var observer2 = jsonpatch.observe(obj, callback) + var observer1 = jsonpatch.observe(obj, {callback}) + var observer2 = jsonpatch.observe(obj, {callback}) expect(observer1).toBe(observer2) }) @@ -1826,11 +1872,11 @@ describe("duplex", function() { var callback = jasmine.createSpy("callback") - var observer1 = jsonpatch.observe(obj, callback) + var observer1 = jsonpatch.observe(obj, {callback}) jsonpatch.unobserve(obj, observer1) - var observer2 = jsonpatch.observe(obj, callback) + var observer2 = jsonpatch.observe(obj, {callback}) expect(observer1).not.toBe(observer2) }) @@ -1851,8 +1897,11 @@ describe("duplex", function() { ] } - var observer = jsonpatch.observe(obj, function(patches) { - called++ + var observer = jsonpatch.observe(obj, { + callback: function(patches) { + called++ + }, + inversible: true }) obj.firstName = "Malvin" @@ -1907,7 +1956,7 @@ describe("duplex", function() { ] } - var patches = jsonpatch.compare(obj, obj2) + var patches = jsonpatch.compare(obj, obj2, {inversible: true}) expect(patches).toReallyEqual([ { op: "test", @@ -1964,7 +2013,7 @@ describe("duplex", function() { var obj = { foo: "bar" } - jsonpatch.compare(obj, {}) + jsonpatch.compare(obj, {}, {inversible: true}) expect(obj.foo).toReallyEqual("bar") }) }) @@ -1978,6 +2027,6 @@ describe("duplex", function() { one.both = Object.create(null) two.both = Object.create(null) // This must not throw - jsonpatch.compare(one, two) + jsonpatch.compare(one, two, {inversible: true}) }) }) From 479a6e8942c70191eb3b88d36cda9ca841b1000f Mon Sep 17 00:00:00 2001 From: Tom Pytleski Date: Mon, 6 May 2019 17:33:39 -0500 Subject: [PATCH 03/15] update dist --- dist/fast-json-patch.js | 55 ++++++++++++++++++++++--------------- dist/fast-json-patch.min.js | 2 +- 2 files changed, 34 insertions(+), 23 deletions(-) diff --git a/dist/fast-json-patch.js b/dist/fast-json-patch.js index fae92cef..e584dc9d 100644 --- a/dist/fast-json-patch.js +++ b/dist/fast-json-patch.js @@ -694,9 +694,11 @@ exports.unobserve = unobserve; /** * Observes changes made to an object, which can then be retrieved using generate */ -function observe(obj, callback) { +function observe(obj, opts) { + if (opts === void 0) { opts = {}; } var patches = []; var observer; + var callback = opts.callback; var mirror = getMirror(obj); if (!mirror) { mirror = new Mirror(obj); @@ -715,7 +717,9 @@ function observe(obj, callback) { observer.callback = callback; observer.next = null; var dirtyCheck = function () { - generate(observer); + generate(observer, { + inversible: opts.inversible + }); }; var fastCheck = function () { clearTimeout(observer.next); @@ -745,7 +749,9 @@ function observe(obj, callback) { observer.patches = patches; observer.object = obj; observer.unobserve = function () { - generate(observer); + generate(observer, { + inversible: opts.inversible + }); clearTimeout(observer.next); removeObserverFromMirror(mirror, observer); if (typeof window !== "undefined") { @@ -771,9 +777,9 @@ exports.observe = observe; /** * Generate an array of patches from an observer */ -function generate(observer) { +function generate(observer, opts) { var mirror = beforeDict.get(observer.object); - _generate(mirror.value, observer.object, observer.patches, ""); + _generate(mirror.value, observer.object, observer.patches, "", opts); if (observer.patches.length) { core_1.applyPatch(mirror.value, observer.patches); } @@ -788,7 +794,10 @@ function generate(observer) { } exports.generate = generate; // Dirty check if obj is different from mirror, generate patches and update mirror -function _generate(mirror, obj, patches, path) { +function _generate(mirror, obj, patches, path, opts) { + if (opts === void 0) { opts = { + inversible: false + }; } if (obj === mirror) { return; } @@ -799,6 +808,7 @@ function _generate(mirror, obj, patches, path) { var oldKeys = helpers_1._objectKeys(mirror); var changed = false; var deleted = false; + var inversible = opts.inversible; //if ever "move" operation is implemented here, make sure this test runs OK: "should not generate the same patch twice (move)" for (var t = oldKeys.length - 1; t >= 0; t--) { var key = oldKeys[t]; @@ -812,16 +822,17 @@ function _generate(mirror, obj, patches, path) { oldVal != null && typeof newVal == "object" && newVal != null) { - _generate(oldVal, newVal, patches, path + "/" + helpers_1.escapePathComponent(key)); + _generate(oldVal, newVal, patches, path + "/" + helpers_1.escapePathComponent(key), opts); } else { if (oldVal !== newVal) { changed = true; - patches.push({ - op: "test", - path: path + "/" + helpers_1.escapePathComponent(key), - value: helpers_1._deepClone(oldVal) - }); + if (inversible) + patches.push({ + op: "test", + path: path + "/" + helpers_1.escapePathComponent(key), + value: helpers_1._deepClone(oldVal) + }); patches.push({ op: "replace", path: path + "/" + helpers_1.escapePathComponent(key), @@ -831,18 +842,18 @@ function _generate(mirror, obj, patches, path) { } } else if (Array.isArray(mirror) === Array.isArray(obj)) { - patches.push({ - op: "test", - path: path + "/" + helpers_1.escapePathComponent(key), - value: helpers_1._deepClone(oldVal) - }); + if (inversible) + patches.push({ + op: "test", + path: path + "/" + helpers_1.escapePathComponent(key), + value: helpers_1._deepClone(oldVal) + }); patches.push({ op: "remove", path: path + "/" + helpers_1.escapePathComponent(key) }); - console.log("patches are"); - console.log(JSON.stringify(patches, null, 2)); deleted = true; // property has been deleted } else { - patches.push({ op: "test", path: path, value: mirror }); + if (inversible) + patches.push({ op: "test", path: path, value: mirror }); patches.push({ op: "replace", path: path, value: obj }); changed = true; } @@ -864,9 +875,9 @@ function _generate(mirror, obj, patches, path) { /** * Create an array of patches from the differences in two objects */ -function compare(tree1, tree2) { +function compare(tree1, tree2, opts) { var patches = []; - _generate(tree1, tree2, patches, ""); + _generate(tree1, tree2, patches, "", opts); return patches; } exports.compare = compare; diff --git a/dist/fast-json-patch.min.js b/dist/fast-json-patch.min.js index edd13378..6149f5c9 100644 --- a/dist/fast-json-patch.min.js +++ b/dist/fast-json-patch.min.js @@ -1,2 +1,2 @@ /*! fast-json-patch, version: 2.1.0 */ -var jsonpatch=function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c={};return b.m=a,b.c=c,b.i=function(a){return a},b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{configurable:!1,enumerable:!0,get:d})},b.n=function(a){var c=a&&a.__esModule?function(){return a['default']}:function(){return a};return b.d(c,'a',c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p='',b(b.s=2)}([function(a,b){function c(a,b){return j.call(a,b)}function d(a){if(Array.isArray(a)){for(var b=Array(a.length),d=0;d=b){c++;continue}return!1}return!0},b.escapePathComponent=e,b.unescapePathComponent=function(a){return a.replace(/~1/g,'/').replace(/~0/g,'~')},b._getPathRecursive=f,b.getPath=function(a,b){if(a===b)return'/';var c=f(a,b);if(''===c)throw new Error('Object not found in root');return'/'+c},b.hasUndefined=g;var k=function(a){function b(b,c,d,e,f){a.call(this,h(b,{name:c,index:d,operation:e,tree:f})),this.name=c,this.index=d,this.operation=e,this.tree=f,this.message=h(b,{name:c,index:d,operation:e,tree:f})}return i(b,a),b}(Error);b.PatchError=k},function(a,b,c){function d(a,b){if(''==b)return a;var c={op:'_get',path:b};return e(a,c),c.value}function e(a,c,e,f,h,i){if(void 0===e&&(e=!1),void 0===f&&(f=!0),void 0===h&&(h=!0),void 0===i&&(i=0),e&&('function'==typeof e?e(c,0,a,c.path):g(c,0)),''===c.path){var j={newDocument:a};if('add'===c.op)return j.newDocument=c.value,j;if('replace'===c.op)return j.newDocument=c.value,j.removed=a,j;if('move'===c.op||'copy'===c.op)return j.newDocument=d(a,c.from),'move'===c.op&&(j.removed=a),j;if('test'===c.op){if(j.test=k(a,c.value),!1===j.test)throw new b.JsonPatchError('Test operation failed','TEST_OPERATION_FAILED',i,c,a);return j.newDocument=a,j}if('remove'===c.op)return j.removed=a,j.newDocument=null,j;if('_get'===c.op)return c.value=a,j;if(e)throw new b.JsonPatchError('Operation `op` property is not one of operations defined in RFC-6902','OPERATION_OP_INVALID',i,c,a);else return j}else{f||(a=l._deepClone(a));var o=c.path||'',p=o.split('/'),q=a,r=1,s=p.length,t=void 0,u=void 0,v=void 0;for(v='function'==typeof e?e:g;;){if(u=p[r],h&&'__proto__'==u)throw new TypeError('JSON-Patch: modifying `__proto__` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README');if(e&&void 0==t&&(void 0===q[u]?t=p.slice(0,r).join('/'):r==s-1&&(t=c.path),void 0!==t&&v(c,0,a,t)),r++,Array.isArray(q)){if('-'===u)u=q.length;else if(e&&!l.isInteger(u))throw new b.JsonPatchError('Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index','OPERATION_PATH_ILLEGAL_ARRAY_INDEX',i,c,a);else l.isInteger(u)&&(u=~~u);if(r>=s){if(e&&'add'===c.op&&u>q.length)throw new b.JsonPatchError('The specified index MUST NOT be greater than the number of elements in the array','OPERATION_VALUE_OUT_OF_BOUNDS',i,c,a);var j=n[c.op].call(c,q,u,a);if(!1===j.test)throw new b.JsonPatchError('Test operation failed','TEST_OPERATION_FAILED',i,c,a);return j}}else if(u&&-1!=u.indexOf('~')&&(u=l.unescapePathComponent(u)),r>=s){var j=m[c.op].call(c,q,u,a);if(!1===j.test)throw new b.JsonPatchError('Test operation failed','TEST_OPERATION_FAILED',i,c,a);return j}q=q[u]}}}function f(a,c,d,f,g){if(void 0===f&&(f=!0),void 0===g&&(g=!0),d&&!Array.isArray(c))throw new b.JsonPatchError('Patch sequence must be an array','SEQUENCE_NOT_AN_ARRAY');f||(a=l._deepClone(a));for(var h=Array(c.length),j=0,i=c.length;j=b){c++;continue}return!1}return!0},b.escapePathComponent=e,b.unescapePathComponent=function(a){return a.replace(/~1/g,'/').replace(/~0/g,'~')},b._getPathRecursive=f,b.getPath=function(a,b){if(a===b)return'/';var c=f(a,b);if(''===c)throw new Error('Object not found in root');return'/'+c},b.hasUndefined=g;var k=function(a){function b(b,c,d,e,f){a.call(this,h(b,{name:c,index:d,operation:e,tree:f})),this.name=c,this.index=d,this.operation=e,this.tree=f,this.message=h(b,{name:c,index:d,operation:e,tree:f})}return i(b,a),b}(Error);b.PatchError=k},function(a,b,c){function d(a,b){if(''==b)return a;var c={op:'_get',path:b};return e(a,c),c.value}function e(a,c,e,f,h,i){if(void 0===e&&(e=!1),void 0===f&&(f=!0),void 0===h&&(h=!0),void 0===i&&(i=0),e&&('function'==typeof e?e(c,0,a,c.path):g(c,0)),''===c.path){var j={newDocument:a};if('add'===c.op)return j.newDocument=c.value,j;if('replace'===c.op)return j.newDocument=c.value,j.removed=a,j;if('move'===c.op||'copy'===c.op)return j.newDocument=d(a,c.from),'move'===c.op&&(j.removed=a),j;if('test'===c.op){if(j.test=k(a,c.value),!1===j.test)throw new b.JsonPatchError('Test operation failed','TEST_OPERATION_FAILED',i,c,a);return j.newDocument=a,j}if('remove'===c.op)return j.removed=a,j.newDocument=null,j;if('_get'===c.op)return c.value=a,j;if(e)throw new b.JsonPatchError('Operation `op` property is not one of operations defined in RFC-6902','OPERATION_OP_INVALID',i,c,a);else return j}else{f||(a=l._deepClone(a));var o=c.path||'',p=o.split('/'),q=a,r=1,s=p.length,t=void 0,u=void 0,v=void 0;for(v='function'==typeof e?e:g;;){if(u=p[r],h&&'__proto__'==u)throw new TypeError('JSON-Patch: modifying `__proto__` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README');if(e&&void 0==t&&(void 0===q[u]?t=p.slice(0,r).join('/'):r==s-1&&(t=c.path),void 0!==t&&v(c,0,a,t)),r++,Array.isArray(q)){if('-'===u)u=q.length;else if(e&&!l.isInteger(u))throw new b.JsonPatchError('Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index','OPERATION_PATH_ILLEGAL_ARRAY_INDEX',i,c,a);else l.isInteger(u)&&(u=~~u);if(r>=s){if(e&&'add'===c.op&&u>q.length)throw new b.JsonPatchError('The specified index MUST NOT be greater than the number of elements in the array','OPERATION_VALUE_OUT_OF_BOUNDS',i,c,a);var j=n[c.op].call(c,q,u,a);if(!1===j.test)throw new b.JsonPatchError('Test operation failed','TEST_OPERATION_FAILED',i,c,a);return j}}else if(u&&-1!=u.indexOf('~')&&(u=l.unescapePathComponent(u)),r>=s){var j=m[c.op].call(c,q,u,a);if(!1===j.test)throw new b.JsonPatchError('Test operation failed','TEST_OPERATION_FAILED',i,c,a);return j}q=q[u]}}}function f(a,c,d,f,g){if(void 0===f&&(f=!0),void 0===g&&(g=!0),d&&!Array.isArray(c))throw new b.JsonPatchError('Patch sequence must be an array','SEQUENCE_NOT_AN_ARRAY');f||(a=l._deepClone(a));for(var h=Array(c.length),j=0,i=c.length;j Date: Wed, 8 May 2019 15:02:27 -0500 Subject: [PATCH 04/15] don't introduce breaking change to observe api --- dist/fast-json-patch.js | 9 +- dist/fast-json-patch.min.js | 2 +- src/duplex.ts | 11 +-- test/spec/duplexSpec.js | 184 +++++++++++++++++++----------------- 4 files changed, 108 insertions(+), 98 deletions(-) diff --git a/dist/fast-json-patch.js b/dist/fast-json-patch.js index e584dc9d..8f7f80b4 100644 --- a/dist/fast-json-patch.js +++ b/dist/fast-json-patch.js @@ -694,11 +694,10 @@ exports.unobserve = unobserve; /** * Observes changes made to an object, which can then be retrieved using generate */ -function observe(obj, opts) { - if (opts === void 0) { opts = {}; } +function observe(obj, callback, inversible) { + if (inversible === void 0) { inversible = false; } var patches = []; var observer; - var callback = opts.callback; var mirror = getMirror(obj); if (!mirror) { mirror = new Mirror(obj); @@ -718,7 +717,7 @@ function observe(obj, opts) { observer.next = null; var dirtyCheck = function () { generate(observer, { - inversible: opts.inversible + inversible: inversible }); }; var fastCheck = function () { @@ -750,7 +749,7 @@ function observe(obj, opts) { observer.object = obj; observer.unobserve = function () { generate(observer, { - inversible: opts.inversible + inversible: inversible }); clearTimeout(observer.next); removeObserverFromMirror(mirror, observer); diff --git a/dist/fast-json-patch.min.js b/dist/fast-json-patch.min.js index 6149f5c9..78993c69 100644 --- a/dist/fast-json-patch.min.js +++ b/dist/fast-json-patch.min.js @@ -1,2 +1,2 @@ /*! fast-json-patch, version: 2.1.0 */ -var jsonpatch=function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c={};return b.m=a,b.c=c,b.i=function(a){return a},b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{configurable:!1,enumerable:!0,get:d})},b.n=function(a){var c=a&&a.__esModule?function(){return a['default']}:function(){return a};return b.d(c,'a',c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p='',b(b.s=2)}([function(a,b){function c(a,b){return j.call(a,b)}function d(a){if(Array.isArray(a)){for(var b=Array(a.length),d=0;d=b){c++;continue}return!1}return!0},b.escapePathComponent=e,b.unescapePathComponent=function(a){return a.replace(/~1/g,'/').replace(/~0/g,'~')},b._getPathRecursive=f,b.getPath=function(a,b){if(a===b)return'/';var c=f(a,b);if(''===c)throw new Error('Object not found in root');return'/'+c},b.hasUndefined=g;var k=function(a){function b(b,c,d,e,f){a.call(this,h(b,{name:c,index:d,operation:e,tree:f})),this.name=c,this.index=d,this.operation=e,this.tree=f,this.message=h(b,{name:c,index:d,operation:e,tree:f})}return i(b,a),b}(Error);b.PatchError=k},function(a,b,c){function d(a,b){if(''==b)return a;var c={op:'_get',path:b};return e(a,c),c.value}function e(a,c,e,f,h,i){if(void 0===e&&(e=!1),void 0===f&&(f=!0),void 0===h&&(h=!0),void 0===i&&(i=0),e&&('function'==typeof e?e(c,0,a,c.path):g(c,0)),''===c.path){var j={newDocument:a};if('add'===c.op)return j.newDocument=c.value,j;if('replace'===c.op)return j.newDocument=c.value,j.removed=a,j;if('move'===c.op||'copy'===c.op)return j.newDocument=d(a,c.from),'move'===c.op&&(j.removed=a),j;if('test'===c.op){if(j.test=k(a,c.value),!1===j.test)throw new b.JsonPatchError('Test operation failed','TEST_OPERATION_FAILED',i,c,a);return j.newDocument=a,j}if('remove'===c.op)return j.removed=a,j.newDocument=null,j;if('_get'===c.op)return c.value=a,j;if(e)throw new b.JsonPatchError('Operation `op` property is not one of operations defined in RFC-6902','OPERATION_OP_INVALID',i,c,a);else return j}else{f||(a=l._deepClone(a));var o=c.path||'',p=o.split('/'),q=a,r=1,s=p.length,t=void 0,u=void 0,v=void 0;for(v='function'==typeof e?e:g;;){if(u=p[r],h&&'__proto__'==u)throw new TypeError('JSON-Patch: modifying `__proto__` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README');if(e&&void 0==t&&(void 0===q[u]?t=p.slice(0,r).join('/'):r==s-1&&(t=c.path),void 0!==t&&v(c,0,a,t)),r++,Array.isArray(q)){if('-'===u)u=q.length;else if(e&&!l.isInteger(u))throw new b.JsonPatchError('Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index','OPERATION_PATH_ILLEGAL_ARRAY_INDEX',i,c,a);else l.isInteger(u)&&(u=~~u);if(r>=s){if(e&&'add'===c.op&&u>q.length)throw new b.JsonPatchError('The specified index MUST NOT be greater than the number of elements in the array','OPERATION_VALUE_OUT_OF_BOUNDS',i,c,a);var j=n[c.op].call(c,q,u,a);if(!1===j.test)throw new b.JsonPatchError('Test operation failed','TEST_OPERATION_FAILED',i,c,a);return j}}else if(u&&-1!=u.indexOf('~')&&(u=l.unescapePathComponent(u)),r>=s){var j=m[c.op].call(c,q,u,a);if(!1===j.test)throw new b.JsonPatchError('Test operation failed','TEST_OPERATION_FAILED',i,c,a);return j}q=q[u]}}}function f(a,c,d,f,g){if(void 0===f&&(f=!0),void 0===g&&(g=!0),d&&!Array.isArray(c))throw new b.JsonPatchError('Patch sequence must be an array','SEQUENCE_NOT_AN_ARRAY');f||(a=l._deepClone(a));for(var h=Array(c.length),j=0,i=c.length;j=b){c++;continue}return!1}return!0},b.escapePathComponent=e,b.unescapePathComponent=function(a){return a.replace(/~1/g,'/').replace(/~0/g,'~')},b._getPathRecursive=f,b.getPath=function(a,b){if(a===b)return'/';var c=f(a,b);if(''===c)throw new Error('Object not found in root');return'/'+c},b.hasUndefined=g;var k=function(a){function b(b,c,d,e,f){a.call(this,h(b,{name:c,index:d,operation:e,tree:f})),this.name=c,this.index=d,this.operation=e,this.tree=f,this.message=h(b,{name:c,index:d,operation:e,tree:f})}return i(b,a),b}(Error);b.PatchError=k},function(a,b,c){function d(a,b){if(''==b)return a;var c={op:'_get',path:b};return e(a,c),c.value}function e(a,c,e,f,h,i){if(void 0===e&&(e=!1),void 0===f&&(f=!0),void 0===h&&(h=!0),void 0===i&&(i=0),e&&('function'==typeof e?e(c,0,a,c.path):g(c,0)),''===c.path){var j={newDocument:a};if('add'===c.op)return j.newDocument=c.value,j;if('replace'===c.op)return j.newDocument=c.value,j.removed=a,j;if('move'===c.op||'copy'===c.op)return j.newDocument=d(a,c.from),'move'===c.op&&(j.removed=a),j;if('test'===c.op){if(j.test=k(a,c.value),!1===j.test)throw new b.JsonPatchError('Test operation failed','TEST_OPERATION_FAILED',i,c,a);return j.newDocument=a,j}if('remove'===c.op)return j.removed=a,j.newDocument=null,j;if('_get'===c.op)return c.value=a,j;if(e)throw new b.JsonPatchError('Operation `op` property is not one of operations defined in RFC-6902','OPERATION_OP_INVALID',i,c,a);else return j}else{f||(a=l._deepClone(a));var o=c.path||'',p=o.split('/'),q=a,r=1,s=p.length,t=void 0,u=void 0,v=void 0;for(v='function'==typeof e?e:g;;){if(u=p[r],h&&'__proto__'==u)throw new TypeError('JSON-Patch: modifying `__proto__` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README');if(e&&void 0==t&&(void 0===q[u]?t=p.slice(0,r).join('/'):r==s-1&&(t=c.path),void 0!==t&&v(c,0,a,t)),r++,Array.isArray(q)){if('-'===u)u=q.length;else if(e&&!l.isInteger(u))throw new b.JsonPatchError('Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index','OPERATION_PATH_ILLEGAL_ARRAY_INDEX',i,c,a);else l.isInteger(u)&&(u=~~u);if(r>=s){if(e&&'add'===c.op&&u>q.length)throw new b.JsonPatchError('The specified index MUST NOT be greater than the number of elements in the array','OPERATION_VALUE_OUT_OF_BOUNDS',i,c,a);var j=n[c.op].call(c,q,u,a);if(!1===j.test)throw new b.JsonPatchError('Test operation failed','TEST_OPERATION_FAILED',i,c,a);return j}}else if(u&&-1!=u.indexOf('~')&&(u=l.unescapePathComponent(u)),r>=s){var j=m[c.op].call(c,q,u,a);if(!1===j.test)throw new b.JsonPatchError('Test operation failed','TEST_OPERATION_FAILED',i,c,a);return j}q=q[u]}}}function f(a,c,d,f,g){if(void 0===f&&(f=!0),void 0===g&&(g=!0),d&&!Array.isArray(c))throw new b.JsonPatchError('Patch sequence must be an array','SEQUENCE_NOT_AN_ARRAY');f||(a=l._deepClone(a));for(var h=Array(c.length),j=0,i=c.length;j(root: T, observer: Observer) { */ export function observe( obj: Object | Array, - opts: { - callback?: (patches: Operation[]) => void - inversible?: boolean - } = {} + callback?: (patches: Operation[]) => void, + inversible: boolean = false ): Observer { var patches = [] var observer - var callback = opts.callback var mirror = getMirror(obj) if (!mirror) { @@ -116,7 +113,7 @@ export function observe( var dirtyCheck = () => { generate(observer, { - inversible: opts.inversible + inversible: inversible }) } var fastCheck = () => { @@ -147,7 +144,7 @@ export function observe( observer.unobserve = () => { generate(observer, { - inversible: opts.inversible + inversible: inversible }) clearTimeout(observer.next) removeObserverFromMirror(mirror, observer) diff --git a/test/spec/duplexSpec.js b/test/spec/duplexSpec.js index 65dac903..4dfabd63 100644 --- a/test/spec/duplexSpec.js +++ b/test/spec/duplexSpec.js @@ -20,7 +20,7 @@ function trigger(eventName, elem) { function getPatchesUsingGenerate(objFactory, objChanger) { var obj = objFactory() - var observer = jsonpatch.observe(obj, {inversible: true}) + var observer = jsonpatch.observe(obj, undefined, true) objChanger(obj) return jsonpatch.generate(observer, {inversible: true}) } @@ -122,7 +122,7 @@ describe("duplex", function() { ] } - var observer = jsonpatch.observe(obj, {inversible: true}) + var observer = jsonpatch.observe(obj, undefined, true) obj.firstName = "Joachim" obj.lastName = "Wester" obj.phoneNumbers[0].number = "123" @@ -160,7 +160,7 @@ describe("duplex", function() { ] } - var observer = jsonpatch.observe(obj, {inversible: true}) + var observer = jsonpatch.observe(obj, undefined, true) obj["/name/first"] = "Joachim" obj["/name/last"] = "Wester" obj["~phone~/numbers"][0].number = "123" @@ -243,7 +243,7 @@ describe("duplex", function() { ] } - var observer = jsonpatch.observe(obj, {inversible: true}) + var observer = jsonpatch.observe(obj, undefined, true) obj.firstName = "Marcin" var patches = jsonpatch.generate(observer, {inversible: true}) @@ -303,7 +303,7 @@ describe("duplex", function() { ] } - var observer = jsonpatch.observe(obj, {inversible: true}) + var observer = jsonpatch.observe(obj, undefined, true) obj.phoneNumbers[0].number = "123" var patches = jsonpatch.generate(observer, {inversible: true}) @@ -352,7 +352,7 @@ describe("duplex", function() { it("should generate replace (changes in new array cell, primitive values)", function() { arr = [1] - var observer = jsonpatch.observe(arr, {inversible: true}) + var observer = jsonpatch.observe(arr, undefined, true) arr.push(2) var patches = jsonpatch.generate(observer, {inversible: true}) @@ -405,7 +405,7 @@ describe("duplex", function() { } ] - var observer = jsonpatch.observe(arr, {inversible: true}) + var observer = jsonpatch.observe(arr, undefined, true) arr.push({ id: 2, name: "Jerry" @@ -465,7 +465,7 @@ describe("duplex", function() { } ] } - var observer = jsonpatch.observe(obj, {inversible: true}) + var observer = jsonpatch.observe(obj, undefined, true) obj.firstName = "Joachim" obj.lastName = "Wester" @@ -501,7 +501,7 @@ describe("duplex", function() { } ] } - var observer = jsonpatch.observe(obj, {inversible: true}) + var observer = jsonpatch.observe(obj, undefined, true) delete obj.firstName obj.lastName = "Wester" @@ -530,7 +530,7 @@ describe("duplex", function() { obj = { items: ["a", "b", "c"] } - var observer = jsonpatch.observe(obj, {inversible: true}) + var observer = jsonpatch.observe(obj, undefined, true) obj.items.pop() obj.items.pop() @@ -570,7 +570,7 @@ describe("duplex", function() { obj = { lastName: "Einstein" } - var observer = jsonpatch.observe(obj, {inversible: true}) + var observer = jsonpatch.observe(obj, undefined, true) obj.lastName = "Wester" @@ -596,7 +596,7 @@ describe("duplex", function() { obj = { lastName: "Einstein" } - var observer = jsonpatch.observe(obj, {inversible: true}) + var observer = jsonpatch.observe(obj, undefined, true) obj.firstName = "Albert" @@ -617,7 +617,7 @@ describe("duplex", function() { obj = { lastName: "Einstein" } - var observer = jsonpatch.observe(obj, {inversible: true}) + var observer = jsonpatch.observe(obj, undefined, true) delete obj.lastName @@ -644,7 +644,7 @@ describe("duplex", function() { } var patches - var observer = jsonpatch.observe(obj, {inversible: true}) + var observer = jsonpatch.observe(obj, undefined, true) obj.array.value = 1 patches = jsonpatch.generate(observer, {inversible: true}) @@ -668,7 +668,7 @@ describe("duplex", function() { } } - var observer = jsonpatch.observe(obj, {inversible: true}) + var observer = jsonpatch.observe(obj, undefined, true) obj.b = 5 patches = jsonpatch.generate(observer, {inversible: true}) expect(patches.length).toReallyEqual(2) @@ -701,7 +701,7 @@ describe("duplex", function() { /*it('should not generate the same patch twice (move)', function() { //"move" is not implemented yet in jsonpatch.generate obj = { lastName: {str: "Einstein"} }; - var observer = jsonpatch.observe(obj, {inversible: true}); + var observer = jsonpatch.observe(obj, undefined, true); obj.lastName2 = obj.lastName; delete obj.lastName; @@ -721,7 +721,7 @@ describe("duplex", function() { foo: "bar" } - var observer = jsonpatch.observe(obj, {inversible: true}) + var observer = jsonpatch.observe(obj, undefined, true) obj.foo = undefined var patches = jsonpatch.generate(observer, {inversible: true}) @@ -743,7 +743,7 @@ describe("duplex", function() { foo: "bar" } - var observer = jsonpatch.observe(obj, {inversible: true}) + var observer = jsonpatch.observe(obj, undefined, true) obj.baz = undefined var patches = jsonpatch.generate(observer, {inversible: true}) @@ -755,7 +755,7 @@ describe("duplex", function() { foo: [0, 1, 2] } - var observer = jsonpatch.observe(obj, {inversible: true}) + var observer = jsonpatch.observe(obj, undefined, true) obj.foo[1] = undefined var patches = jsonpatch.generate(observer, {inversible: true}) @@ -778,7 +778,7 @@ describe("duplex", function() { foo: undefined } - var observer = jsonpatch.observe(obj, {inversible: true}) + var observer = jsonpatch.observe(obj, undefined, true) obj.foo = "something" var patches = jsonpatch.generate(observer, {inversible: true}) @@ -795,7 +795,7 @@ describe("duplex", function() { foo: [0, undefined, 2] } - var observer = jsonpatch.observe(obj, {inversible: true}) + var observer = jsonpatch.observe(obj, undefined, true) obj.foo[1] = 1 var patches = jsonpatch.generate(observer, {inversible: true}) @@ -1026,13 +1026,14 @@ describe("duplex", function() { ] } - jsonpatch.observe(obj, { - callback: function(_patches) { + jsonpatch.observe( + obj, + function(_patches) { patches = _patches patchesChanged() }, - inversible: true - }) + true + ) obj.firstName = "Joachim" obj.lastName = "Wester" obj.phoneNumbers[0].number = "123" @@ -1077,14 +1078,15 @@ describe("duplex", function() { ] } - jsonpatch.observe(obj, { - callback: function(patches) { + jsonpatch.observe( + obj, + function(patches) { called++ lastPatches = patches patchesChanged(called) }, - inversible: true - }) + true + ) obj.firstName = "Marcin" trigger("keyup") @@ -1160,14 +1162,15 @@ describe("duplex", function() { ] } - jsonpatch.observe(obj, { - callback: function(patches) { + jsonpatch.observe( + obj, + function(patches) { called++ lastPatches = patches patchesChanged(called) }, - inversible: true - }) + true + ) obj.phoneNumbers[0].number = "123" trigger("keyup") @@ -1244,13 +1247,14 @@ describe("duplex", function() { ] } - var observer = jsonpatch.observe(obj, { - callback: function(patches) { + var observer = jsonpatch.observe( + obj, + function(patches) { called++ lastPatches = patches }, - inversible: true - }) + true + ) obj.phoneNumbers[0].number = "123" setTimeout(function() { @@ -1307,12 +1311,13 @@ describe("duplex", function() { ] } - var observer = jsonpatch.observe(obj, { - callback: function(patches) { + var observer = jsonpatch.observe( + obj, + function(patches) { called++ }, - inversible: true - }) + true + ) obj.firstName = "Malvin" @@ -1331,12 +1336,13 @@ describe("duplex", function() { setTimeout(function() { expect(called).toReallyEqual(1) - observer = jsonpatch.observe(obj, { - callback: function(patches) { + observer = jsonpatch.observe( + obj, + function(patches) { called++ }, - inversible: true - }) + true + ) obj.firstName = "Megan" trigger("keyup") @@ -1365,12 +1371,13 @@ describe("duplex", function() { ] } - var observer = jsonpatch.observe(obj, { - callback: function(patches) { + var observer = jsonpatch.observe( + obj, + function(patches) { called++ }, - inversible: true - }) + true + ) obj.phoneNumbers[1].number = "555" @@ -1388,12 +1395,13 @@ describe("duplex", function() { setTimeout(function() { expect(called).toReallyEqual(1) - observer = jsonpatch.observe(obj, { - callback: function(patches) { + observer = jsonpatch.observe( + obj, + function(patches) { called++ }, - inversible: true - }) + true + ) obj.phoneNumbers[1].number = "557" @@ -1423,12 +1431,13 @@ describe("duplex", function() { ] } - var observer = jsonpatch.observe(obj, { - callback: function(patches) { + var observer = jsonpatch.observe( + obj, + function(patches) { lastPatches = patches }, - inversible: true - }) + true + ) obj.firstName = "Malvin" @@ -1457,12 +1466,12 @@ describe("duplex", function() { .createSpy("callback", function() { jsonpatch.unobserve(obj, observer) - jsonpatch.observe(obj, {callback}) + jsonpatch.observe(obj, callback) callbackCalled(++count) }) .and.callThrough() - observer = jsonpatch.observe(obj, {callback}) + observer = jsonpatch.observe(obj, callback) expect(callback.calls.count()).toReallyEqual(0) @@ -1493,12 +1502,13 @@ describe("duplex", function() { lastName: "Einstein" } var lastPatches - var observer = jsonpatch.observe(obj, { - callback: function(patches) { + var observer = jsonpatch.observe( + obj, + function(patches) { lastPatches = patches }, - inversible: true - }) + true + ) obj.lastName = "Hawking" @@ -1526,12 +1536,13 @@ describe("duplex", function() { lastName: "Einstein" } var lastPatches - var observer = jsonpatch.observe(obj, { - callback: function(patches) { + var observer = jsonpatch.observe( + obj, + function(patches) { lastPatches = patches }, - inversible: true - }) + true + ) obj.lastName = "Hawking" trigger("mousedown") @@ -1558,12 +1569,13 @@ describe("duplex", function() { lastName: "Einstein" } var lastPatches - var observer = jsonpatch.observe(obj, { - callback: function(patches) { + var observer = jsonpatch.observe( + obj, + function(patches) { lastPatches = patches }, - inversible: true - }) + true + ) obj.lastName = "Hawking" trigger("keydown") @@ -1590,12 +1602,13 @@ describe("duplex", function() { lastName: "Einstein" } var lastPatches - var observer = jsonpatch.observe(obj, { - callback: function(patches) { + var observer = jsonpatch.observe( + obj, + function(patches) { lastPatches = patches }, - inversible: true - }) + true + ) obj.lastName = "Hawking" trigger("change") @@ -1837,8 +1850,8 @@ describe("duplex", function() { var callback = jasmine.createSpy("callback") - jsonpatch.observe(obj, {callback}) - jsonpatch.observe(obj, {callback}) + jsonpatch.observe(obj, callback) + jsonpatch.observe(obj, callback) expect(callback.calls.count()).toReallyEqual(0) @@ -1859,8 +1872,8 @@ describe("duplex", function() { var callback = jasmine.createSpy("callback") - var observer1 = jsonpatch.observe(obj, {callback}) - var observer2 = jsonpatch.observe(obj, {callback}) + var observer1 = jsonpatch.observe(obj, callback) + var observer2 = jsonpatch.observe(obj, callback) expect(observer1).toBe(observer2) }) @@ -1872,11 +1885,11 @@ describe("duplex", function() { var callback = jasmine.createSpy("callback") - var observer1 = jsonpatch.observe(obj, {callback}) + var observer1 = jsonpatch.observe(obj, callback) jsonpatch.unobserve(obj, observer1) - var observer2 = jsonpatch.observe(obj, {callback}) + var observer2 = jsonpatch.observe(obj, callback) expect(observer1).not.toBe(observer2) }) @@ -1897,12 +1910,13 @@ describe("duplex", function() { ] } - var observer = jsonpatch.observe(obj, { - callback: function(patches) { + var observer = jsonpatch.observe( + obj, + function(patches) { called++ }, - inversible: true - }) + true + ) obj.firstName = "Malvin" From 09ca15ee73f5c3a740cc0bdf2aae97178df951d9 Mon Sep 17 00:00:00 2001 From: Tom Pytleski Date: Wed, 8 May 2019 16:14:25 -0500 Subject: [PATCH 05/15] - clean up function args - add inversible property to IObserver - update readme --- README.md | 221 +++++++---- dist/fast-json-patch.js | 19 +- dist/fast-json-patch.min.js | 2 +- src/duplex.ts | 28 +- test/spec/duplexSpec.js | 84 ++-- test/spec/validateSpec.js | 744 ++++++++++++++++++------------------ 6 files changed, 595 insertions(+), 503 deletions(-) diff --git a/README.md b/README.md index 9c93221a..5b66bbc7 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,29 @@ -JSON-Patch -=============== +# JSON-Patch > A leaner and meaner implementation of JSON-Patch. Small footprint. High performance. [![Build Status](https://travis-ci.org/Starcounter-Jack/JSON-Patch.svg?branch=master)](https://travis-ci.org/Starcounter-Jack/JSON-Patch) With JSON-Patch, you can: + - **applyPatch** to apply patches - **applyOperation** to apply single operations - **validate** a sequence of patches - **observe** for changes (and generate patches when a change is detected) - **compare** two objects (to obtain the difference). - [![Sauce Test Status](https://saucelabs.com/browser-matrix/json-patch.svg)](https://travis-ci.org/Starcounter-Jack/JSON-Patch) - ## Why you should use JSON-Patch JSON-Patch [(RFC6902)](http://tools.ietf.org/html/rfc6902) is a standard format that allows you to update a JSON document by sending the changes rather than the whole document. JSON Patch plays well with the HTTP PATCH verb (method) and REST style programming. -Mark Nottingham has a [nice blog]( http://www.mnot.net/blog/2012/09/05/patch) about it. +Mark Nottingham has a [nice blog](http://www.mnot.net/blog/2012/09/05/patch) about it. ## Footprint + 4 KB minified and gzipped (12 KB minified) ## Performance @@ -45,13 +44,13 @@ Tested on 29.08.2018. Compared libraries: - [jiff](https://www.npmjs.com/package/jiff) 0.7.3 - [RFC6902](https://www.npmjs.com/package/rfc6902) 2.4.0 -We aim the tests to be fair. Our library puts performance as the #1 priority, while other libraries can have different priorities. If you'd like to update the benchmarks or add a library, please fork the [perf.zone](https://perf.zone) benchmarks linked above and open an issue to include new results. +We aim the tests to be fair. Our library puts performance as the #1 priority, while other libraries can have different priorities. If you'd like to update the benchmarks or add a library, please fork the [perf.zone](https://perf.zone) benchmarks linked above and open an issue to include new results. ## Features -* Allows you to apply patches on object trees for incoming traffic. -* Allows you to freely manipulate object trees and then generate patches for outgoing traffic. -* Tested in IE11, Firefox, Chrome, Safari and Node.js +- Allows you to apply patches on object trees for incoming traffic. +- Allows you to freely manipulate object trees and then generate patches for outgoing traffic. +- Tested in IE11, Firefox, Chrome, Safari and Node.js ## Install @@ -62,6 +61,7 @@ Install the current version (and save it as a dependency): ```sh $ npm install fast-json-patch --save ``` + ### bower ```sh @@ -70,7 +70,6 @@ $ bower install fast-json-patch --save ### [download as ZIP](https://github.com/Starcounter-Jack/JSON-Patch/archive/master.zip) - ## Adding to your project ### In a web browser @@ -82,19 +81,19 @@ Include `dist/fast-json-patch.js`. Call require to get the instance: ```js -var jsonpatch = require('fast-json-patch') +var jsonpatch = require("fast-json-patch") ``` Or use ES6 style: ```js -import { applyOperation } from 'fast-json-patch' +import {applyOperation} from "fast-json-patch" ``` You can also require all API functions individually, all jsonpatch functions can be used as pure functions: ```js -const { applyOperation } = require('fast-json-patch'); +const {applyOperation} = require("fast-json-patch") ``` ## Usage @@ -102,13 +101,17 @@ const { applyOperation } = require('fast-json-patch'); #### Applying patches: ```js -var document = { firstName: "Albert", contactDetails: { phoneNumbers: [] } }; +var document = {firstName: "Albert", contactDetails: {phoneNumbers: []}} var patch = [ - { op: "replace", path: "/firstName", value: "Joachim" }, - { op: "add", path: "/lastName", value: "Wester" }, - { op: "add", path: "/contactDetails/phoneNumbers/0", value: { number: "555-123" } } -]; -document = jsonpatch.applyPatch(document, patch).newDocument; + {op: "replace", path: "/firstName", value: "Joachim"}, + {op: "add", path: "/lastName", value: "Wester"}, + { + op: "add", + path: "/contactDetails/phoneNumbers/0", + value: {number: "555-123"} + } +] +document = jsonpatch.applyPatch(document, patch).newDocument // document == { firstName: "Joachim", lastName: "Wester", contactDetails: { phoneNumbers: [{number:"555-123"}] } }; ``` @@ -117,9 +120,9 @@ document = jsonpatch.applyPatch(document, patch).newDocument; `jsonpatch.applyOperation` accepts a single operation object instead of a sequence, and returns the object after applying the operation. It works with all the standard JSON patch operations (`add, replace, move, test, remove and copy`). ```js -var document = { firstName: "Albert", contactDetails: { phoneNumbers: [] } }; -var operation = { op: "replace", path: "/firstName", value: "Joachim" }; -document = jsonpatch.applyOperation(document, operation).newDocument; +var document = {firstName: "Albert", contactDetails: {phoneNumbers: []}} +var operation = {op: "replace", path: "/firstName", value: "Joachim"} +document = jsonpatch.applyOperation(document, operation).newDocument // document == { firstName: "Joachim", contactDetails: { phoneNumbers: [] }} ``` @@ -128,25 +131,33 @@ document = jsonpatch.applyOperation(document, operation).newDocument; If you have an array of operations, you can simple reduce them using `applyReducer` as your reducer: ```js -var document = { firstName: "Albert", contactDetails: { phoneNumbers: [ ] } }; +var document = {firstName: "Albert", contactDetails: {phoneNumbers: []}} var patch = [ - { op:"replace", path: "/firstName", value: "Joachim" }, - { op:"add", path: "/lastName", value: "Wester" }, - { op:"add", path: "/contactDetails/phoneNumbers/0", value: { number: "555-123" } } -]; -var updatedDocument = patch.reduce(applyReducer, document); + {op: "replace", path: "/firstName", value: "Joachim"}, + {op: "add", path: "/lastName", value: "Wester"}, + { + op: "add", + path: "/contactDetails/phoneNumbers/0", + value: {number: "555-123"} + } +] +var updatedDocument = patch.reduce(applyReducer, document) // updatedDocument == { firstName:"Joachim", lastName:"Wester", contactDetails:{ phoneNumbers[ {number:"555-123"} ] } }; ``` -Generating patches: +#### Generating patches ```js -var document = { firstName: "Joachim", lastName: "Wester", contactDetails: { phoneNumbers: [ { number:"555-123" }] } }; -var observer = jsonpatch.observe(document); -document.firstName = "Albert"; -document.contactDetails.phoneNumbers[0].number = "123"; -document.contactDetails.phoneNumbers.push({ number:"456" }); -var patch = jsonpatch.generate(observer); +var document = { + firstName: "Joachim", + lastName: "Wester", + contactDetails: {phoneNumbers: [{number: "555-123"}]} +} +var observer = jsonpatch.observe(document) +document.firstName = "Albert" +document.contactDetails.phoneNumbers[0].number = "123" +document.contactDetails.phoneNumbers.push({number: "456"}) +var patch = jsonpatch.generate(observer) // patch == [ // { op: "replace", path: "/firstName", value: "Albert"}, // { op: "replace", path: "/contactDetails/phoneNumbers/0/number", value: "123" }, @@ -154,31 +165,73 @@ var patch = jsonpatch.generate(observer); // ]; ``` -Comparing two object trees: +#### Generating patches with test operations ```js -var documentA = {user: {firstName: "Albert", lastName: "Einstein"}}; -var documentB = {user: {firstName: "Albert", lastName: "Collins"}}; -var diff = jsonpatch.compare(documentA, documentB); +var document = { + firstName: "Joachim", + lastName: "Wester", + contactDetails: {phoneNumbers: [{number: "555-123"}]} +} +var observer = jsonpatch.observe(document, undefined, true) +// Or +// var observer = jsonpatch.observe(document) +// observer.inversible = true + +document.firstName = "Albert" +document.contactDetails.phoneNumbers[0].number = "123" +document.contactDetails.phoneNumbers.push({number: "456"}) +var patch = jsonpatch.generate(observer) +// Or +// var patch = jsonpatch.generate(observer, { inversible: true }) + +// patch == [ +// { op: "test", path: "/firstName", value: "Joachim"}, +// { op: "replace", path: "/firstName", value: "Albert"}, +// { op: "test", path: "/contactDetails/phoneNumbers/0/number", value: "555-123" }, +// { op: "replace", path: "/contactDetails/phoneNumbers/0/number", value: "123" }, +// { op: "add", path: "/contactDetails/phoneNumbers/1", value: {number:"456"}} +// ]; +``` + +#### Comparing two object trees + +```js +var documentA = {user: {firstName: "Albert", lastName: "Einstein"}} +var documentB = {user: {firstName: "Albert", lastName: "Collins"}} +var diff = jsonpatch.compare(documentA, documentB) //diff == [{op: "replace", path: "/user/lastName", value: "Collins"}] ``` -Validating a sequence of patches: +#### Comparing two object trees with test operations ```js -var obj = {user: {firstName: "Albert"}}; -var patches = [{op: "replace", path: "/user/firstName", value: "Albert"}, {op: "replace", path: "/user/lastName", value: "Einstein"}]; -var errors = jsonpatch.validate(patches, obj); +var documentA = {user: {firstName: "Albert", lastName: "Einstein"}} +var documentB = {user: {firstName: "Albert", lastName: "Collins"}} +var diff = jsonpatch.compare(documentA, documentB, {inversible: true}) +//diff == [ +// {op: "test", path: "/user/lastName", value: "Einstein"}, +// {op: "replace", path: "/user/lastName", value: "Collins"} +// ]; +``` + +#### Validating a sequence of patches + +```js +var obj = {user: {firstName: "Albert"}} +var patches = [ + {op: "replace", path: "/user/firstName", value: "Albert"}, + {op: "replace", path: "/user/lastName", value: "Einstein"} +] +var errors = jsonpatch.validate(patches, obj) if (errors.length == 0) { - //there are no errors! -} -else { - for (var i=0; i < errors.length; i++) { + //there are no errors! +} else { + for (var i = 0; i < errors.length; i++) { if (!errors[i]) { - console.log("Valid patch at index", i, patches[i]); - } - else { - console.error("Invalid patch at index", i, errors[i], patches[i]); + console.log("Valid patch at index", i, patches[i]) + } else { + console.error("Invalid patch at index", i, errors[i], patches[i]) } } } @@ -194,7 +247,7 @@ Applies `patch` array on `obj`. - `patch` a JSON-Patch array of operations to apply - `validateOperation` Boolean for whether to validate each operation with our default validator, or to pass a validator callback - `mutateDocument` Whether to mutate the original document or clone it before applying -- `banPrototypeModifications` Whether to ban modifications to `__proto__`, defaults to `true`. +- `banPrototypeModifications` Whether to ban modifications to `__proto__`, defaults to `true`. An invalid patch results in throwing an error (see `jsonpatch.validate` for more information about the error object). @@ -203,15 +256,15 @@ If you would like to avoid touching your `patch` array values, clone them: `json Returns an array of [`OperationResult`](#operationresult-type) objects - one item for each item in `patches`, each item is an object `{newDocument: any, test?: boolean, removed?: any}`. -* `test` - boolean result of the test -* `remove`, `replace` and `move` - original object that has been removed -* `add` (only when adding to an array) - index at which item has been inserted (useful when using `-` alias) +- `test` - boolean result of the test +- `remove`, `replace` and `move` - original object that has been removed +- `add` (only when adding to an array) - index at which item has been inserted (useful when using `-` alias) -- ** Note: It throws `TEST_OPERATION_FAILED` error if `test` operation fails. ** -- ** Note II: the returned array has `newDocument` property that you can use as the final state of the patched document **. -- ** Note III: By default, when `banPrototypeModifications` is `true`, this method throws a `TypeError` when you attempt to modify an object's prototype. +* ** Note: It throws `TEST_OPERATION_FAILED` error if `test` operation fails. ** +* ** Note II: the returned array has `newDocument` property that you can use as the final state of the patched document **. +* \*\* Note III: By default, when `banPrototypeModifications` is `true`, this method throws a `TypeError` when you attempt to modify an object's prototype. -- See [Validation notes](#validation-notes). +* See [Validation notes](#validation-notes). #### `function applyOperation(document: T, operation: Operation, validateOperation: boolean | Validator = false, mutateDocument: boolean = true, banPrototypeModifications: boolean = true, index: number = 0): OperationResult` @@ -230,7 +283,7 @@ If you would like to avoid touching your values, clone them: `jsonpatch.applyOpe Returns an [`OperationResult`](#operationresult-type) object `{newDocument: any, test?: boolean, removed?: any}`. - ** Note: It throws `TEST_OPERATION_FAILED` error if `test` operation fails. ** -- ** Note II: By default, when `banPrototypeModifications` is `true`, this method throws a `TypeError` when you attempt to modify an object's prototype. +- \*\* Note II: By default, when `banPrototypeModifications` is `true`, this method throws a `TypeError` when you attempt to modify an object's prototype. - See [Validation notes](#validation-notes). @@ -262,17 +315,16 @@ Retrieves a value from a JSON document by a JSON pointer. Returns the value. -#### `jsonpatch.observe(document: any, callback?: Function): Observer` +#### `jsonpatch.observe(document: any, callback?: Function, inversible: boolean = false): Observer` -Sets up an deep observer on `document` that listens for changes in object tree. When changes are detected, the optional -callback is called with the generated patches array as the parameter. +Sets up an deep observer on `document` that listens for changes in object tree. When changes are detected, the optional callback is called with the generated patches array as the parameter. If inversible is true, then observer will generate test operations. Returns `observer`. -#### `jsonpatch.generate(document: any, observer: Observer): Operation[]` +#### `jsonpatch.generate(document: any, observer: Observer, opts?: { inversible: boolean }): Operation[]` If there are pending changes in `obj`, returns them synchronously. If a `callback` was defined in `observe` -method, it will be triggered synchronously as well. +method, it will be triggered synchronously as well. If opts.inversible is undefined then fallback to observer.inversible. If there are no pending changes in `obj`, returns an empty array (length 0). @@ -282,9 +334,9 @@ Destroys the observer set up on `document`. Any remaining changes are delivered synchronously (as in `jsonpatch.generate`). Note: this is different that ES6/7 `Object.unobserve`, which delivers remaining changes asynchronously. -#### `jsonpatch.compare(document1: any, document2: any): Operation[]` +#### `jsonpatch.compare(document1: any, document2: any, opts?: { inversible: boolean }): Operation[]` -Compares object trees `document1` and `document2` and returns the difference relative to `document1` as a patches array. +Compares object trees `document1` and `document2` and returns the difference relative to `document1` as a patches array. If opts.inversible is true, test operations will be generated. If there are no differences, returns an empty array (length 0). @@ -304,21 +356,21 @@ If there are no errors, returns undefined. If there is an errors, returns a Json Possible errors: -Error name | Error message -------------------------------|------------ -SEQUENCE_NOT_AN_ARRAY | Patch sequence must be an array -OPERATION_NOT_AN_OBJECT | Operation is not an object -OPERATION_OP_INVALID | Operation `op` property is not one of operations defined in RFC-6902 -OPERATION_PATH_INVALID | Operation `path` property is not a valid string -OPERATION_FROM_REQUIRED | Operation `from` property is not present (applicable in `move` and `copy` operations) -OPERATION_VALUE_REQUIRED | Operation `value` property is not present, or `undefined` (applicable in `add`, `replace` and `test` operations) -OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED | Operation `value` property object has at least one `undefined` value (applicable in `add`, `replace` and `test` operations) -OPERATION_PATH_CANNOT_ADD | Cannot perform an `add` operation at the desired path -OPERATION_PATH_UNRESOLVABLE | Cannot perform the operation at a path that does not exist -OPERATION_FROM_UNRESOLVABLE | Cannot perform the operation from a path that does not exist -OPERATION_PATH_ILLEGAL_ARRAY_INDEX | Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index -OPERATION_VALUE_OUT_OF_BOUNDS | The specified index MUST NOT be greater than the number of elements in the array -TEST_OPERATION_FAILED | When operation is `test` and the test fails, applies to `applyReducer`. +| Error name | Error message | +| ---------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | +| SEQUENCE_NOT_AN_ARRAY | Patch sequence must be an array | +| OPERATION_NOT_AN_OBJECT | Operation is not an object | +| OPERATION_OP_INVALID | Operation `op` property is not one of operations defined in RFC-6902 | +| OPERATION_PATH_INVALID | Operation `path` property is not a valid string | +| OPERATION_FROM_REQUIRED | Operation `from` property is not present (applicable in `move` and `copy` operations) | +| OPERATION_VALUE_REQUIRED | Operation `value` property is not present, or `undefined` (applicable in `add`, `replace` and `test` operations) | +| OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED | Operation `value` property object has at least one `undefined` value (applicable in `add`, `replace` and `test` operations) | +| OPERATION_PATH_CANNOT_ADD | Cannot perform an `add` operation at the desired path | +| OPERATION_PATH_UNRESOLVABLE | Cannot perform the operation at a path that does not exist | +| OPERATION_FROM_UNRESOLVABLE | Cannot perform the operation from a path that does not exist | +| OPERATION_PATH_ILLEGAL_ARRAY_INDEX | Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index | +| OPERATION_VALUE_OUT_OF_BOUNDS | The specified index MUST NOT be greater than the number of elements in the array | +| TEST_OPERATION_FAILED | When operation is `test` and the test fails, applies to `applyReducer`. | ## `OperationResult` Type @@ -334,7 +386,6 @@ Where: - `test`: if the operation was a `test` operation. This will be its result. - `removed`: contains the removed, moved, or replaced values from the document after a `remove`, `move` or `replace` operation. - ## Validation Notes Functions `applyPatch`, `applyOperation`, and `validate` accept a `validate`/ `validator` parameter: @@ -346,7 +397,7 @@ Functions `applyPatch`, `applyOperation`, and `validate` accept a `validate`/ `v If you pass a validator, it will be called with four parameters for each operation, `function(operation, index, tree, existingPath)` and it is expected to throw `JsonPatchError` when your conditions are not met. - `operation` The operation it self. -- `index` `operation`'s index in the patch array (if application). +- `index` `operation`'s index in the patch array (if application). - `tree` The object that is supposed to be patched. - `existingPath` the path `operation` points to. @@ -366,7 +417,7 @@ See the [ECMAScript spec](http://www.ecma-international.org/ecma-262/6.0/index.h ## Specs/tests - - [Run in browser](http://starcounter-jack.github.io/JSON-Patch/test/) +- [Run in browser](http://starcounter-jack.github.io/JSON-Patch/test/) ## [Contributing](CONTRIBUTING.md) diff --git a/dist/fast-json-patch.js b/dist/fast-json-patch.js index 8f7f80b4..00998223 100644 --- a/dist/fast-json-patch.js +++ b/dist/fast-json-patch.js @@ -710,15 +710,15 @@ function observe(obj, callback, inversible) { if (observer) { return observer; } - observer = {}; + observer = { + inversible: inversible + }; mirror.value = helpers_1._deepClone(obj); if (callback) { observer.callback = callback; observer.next = null; var dirtyCheck = function () { - generate(observer, { - inversible: inversible - }); + generate(observer); }; var fastCheck = function () { clearTimeout(observer.next); @@ -748,9 +748,7 @@ function observe(obj, callback, inversible) { observer.patches = patches; observer.object = obj; observer.unobserve = function () { - generate(observer, { - inversible: inversible - }); + generate(observer); clearTimeout(observer.next); removeObserverFromMirror(mirror, observer); if (typeof window !== "undefined") { @@ -775,10 +773,15 @@ function observe(obj, callback, inversible) { exports.observe = observe; /** * Generate an array of patches from an observer + * If opts.inversible is defined, overwrite observer.inversible */ function generate(observer, opts) { + if (opts === void 0) { opts = {}; } var mirror = beforeDict.get(observer.object); - _generate(mirror.value, observer.object, observer.patches, "", opts); + var inversible = typeof opts.inversible !== "undefined" + ? opts.inversible + : observer.inversible; + _generate(mirror.value, observer.object, observer.patches, "", { inversible: inversible }); if (observer.patches.length) { core_1.applyPatch(mirror.value, observer.patches); } diff --git a/dist/fast-json-patch.min.js b/dist/fast-json-patch.min.js index 78993c69..25772bfa 100644 --- a/dist/fast-json-patch.min.js +++ b/dist/fast-json-patch.min.js @@ -1,2 +1,2 @@ /*! fast-json-patch, version: 2.1.0 */ -var jsonpatch=function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c={};return b.m=a,b.c=c,b.i=function(a){return a},b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{configurable:!1,enumerable:!0,get:d})},b.n=function(a){var c=a&&a.__esModule?function(){return a['default']}:function(){return a};return b.d(c,'a',c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p='',b(b.s=2)}([function(a,b){function c(a,b){return j.call(a,b)}function d(a){if(Array.isArray(a)){for(var b=Array(a.length),d=0;d=b){c++;continue}return!1}return!0},b.escapePathComponent=e,b.unescapePathComponent=function(a){return a.replace(/~1/g,'/').replace(/~0/g,'~')},b._getPathRecursive=f,b.getPath=function(a,b){if(a===b)return'/';var c=f(a,b);if(''===c)throw new Error('Object not found in root');return'/'+c},b.hasUndefined=g;var k=function(a){function b(b,c,d,e,f){a.call(this,h(b,{name:c,index:d,operation:e,tree:f})),this.name=c,this.index=d,this.operation=e,this.tree=f,this.message=h(b,{name:c,index:d,operation:e,tree:f})}return i(b,a),b}(Error);b.PatchError=k},function(a,b,c){function d(a,b){if(''==b)return a;var c={op:'_get',path:b};return e(a,c),c.value}function e(a,c,e,f,h,i){if(void 0===e&&(e=!1),void 0===f&&(f=!0),void 0===h&&(h=!0),void 0===i&&(i=0),e&&('function'==typeof e?e(c,0,a,c.path):g(c,0)),''===c.path){var j={newDocument:a};if('add'===c.op)return j.newDocument=c.value,j;if('replace'===c.op)return j.newDocument=c.value,j.removed=a,j;if('move'===c.op||'copy'===c.op)return j.newDocument=d(a,c.from),'move'===c.op&&(j.removed=a),j;if('test'===c.op){if(j.test=k(a,c.value),!1===j.test)throw new b.JsonPatchError('Test operation failed','TEST_OPERATION_FAILED',i,c,a);return j.newDocument=a,j}if('remove'===c.op)return j.removed=a,j.newDocument=null,j;if('_get'===c.op)return c.value=a,j;if(e)throw new b.JsonPatchError('Operation `op` property is not one of operations defined in RFC-6902','OPERATION_OP_INVALID',i,c,a);else return j}else{f||(a=l._deepClone(a));var o=c.path||'',p=o.split('/'),q=a,r=1,s=p.length,t=void 0,u=void 0,v=void 0;for(v='function'==typeof e?e:g;;){if(u=p[r],h&&'__proto__'==u)throw new TypeError('JSON-Patch: modifying `__proto__` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README');if(e&&void 0==t&&(void 0===q[u]?t=p.slice(0,r).join('/'):r==s-1&&(t=c.path),void 0!==t&&v(c,0,a,t)),r++,Array.isArray(q)){if('-'===u)u=q.length;else if(e&&!l.isInteger(u))throw new b.JsonPatchError('Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index','OPERATION_PATH_ILLEGAL_ARRAY_INDEX',i,c,a);else l.isInteger(u)&&(u=~~u);if(r>=s){if(e&&'add'===c.op&&u>q.length)throw new b.JsonPatchError('The specified index MUST NOT be greater than the number of elements in the array','OPERATION_VALUE_OUT_OF_BOUNDS',i,c,a);var j=n[c.op].call(c,q,u,a);if(!1===j.test)throw new b.JsonPatchError('Test operation failed','TEST_OPERATION_FAILED',i,c,a);return j}}else if(u&&-1!=u.indexOf('~')&&(u=l.unescapePathComponent(u)),r>=s){var j=m[c.op].call(c,q,u,a);if(!1===j.test)throw new b.JsonPatchError('Test operation failed','TEST_OPERATION_FAILED',i,c,a);return j}q=q[u]}}}function f(a,c,d,f,g){if(void 0===f&&(f=!0),void 0===g&&(g=!0),d&&!Array.isArray(c))throw new b.JsonPatchError('Patch sequence must be an array','SEQUENCE_NOT_AN_ARRAY');f||(a=l._deepClone(a));for(var h=Array(c.length),j=0,i=c.length;j=b){c++;continue}return!1}return!0},b.escapePathComponent=e,b.unescapePathComponent=function(a){return a.replace(/~1/g,'/').replace(/~0/g,'~')},b._getPathRecursive=f,b.getPath=function(a,b){if(a===b)return'/';var c=f(a,b);if(''===c)throw new Error('Object not found in root');return'/'+c},b.hasUndefined=g;var k=function(a){function b(b,c,d,e,f){a.call(this,h(b,{name:c,index:d,operation:e,tree:f})),this.name=c,this.index=d,this.operation=e,this.tree=f,this.message=h(b,{name:c,index:d,operation:e,tree:f})}return i(b,a),b}(Error);b.PatchError=k},function(a,b,c){function d(a,b){if(''==b)return a;var c={op:'_get',path:b};return e(a,c),c.value}function e(a,c,e,f,h,i){if(void 0===e&&(e=!1),void 0===f&&(f=!0),void 0===h&&(h=!0),void 0===i&&(i=0),e&&('function'==typeof e?e(c,0,a,c.path):g(c,0)),''===c.path){var j={newDocument:a};if('add'===c.op)return j.newDocument=c.value,j;if('replace'===c.op)return j.newDocument=c.value,j.removed=a,j;if('move'===c.op||'copy'===c.op)return j.newDocument=d(a,c.from),'move'===c.op&&(j.removed=a),j;if('test'===c.op){if(j.test=k(a,c.value),!1===j.test)throw new b.JsonPatchError('Test operation failed','TEST_OPERATION_FAILED',i,c,a);return j.newDocument=a,j}if('remove'===c.op)return j.removed=a,j.newDocument=null,j;if('_get'===c.op)return c.value=a,j;if(e)throw new b.JsonPatchError('Operation `op` property is not one of operations defined in RFC-6902','OPERATION_OP_INVALID',i,c,a);else return j}else{f||(a=l._deepClone(a));var o=c.path||'',p=o.split('/'),q=a,r=1,s=p.length,t=void 0,u=void 0,v=void 0;for(v='function'==typeof e?e:g;;){if(u=p[r],h&&'__proto__'==u)throw new TypeError('JSON-Patch: modifying `__proto__` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README');if(e&&void 0==t&&(void 0===q[u]?t=p.slice(0,r).join('/'):r==s-1&&(t=c.path),void 0!==t&&v(c,0,a,t)),r++,Array.isArray(q)){if('-'===u)u=q.length;else if(e&&!l.isInteger(u))throw new b.JsonPatchError('Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index','OPERATION_PATH_ILLEGAL_ARRAY_INDEX',i,c,a);else l.isInteger(u)&&(u=~~u);if(r>=s){if(e&&'add'===c.op&&u>q.length)throw new b.JsonPatchError('The specified index MUST NOT be greater than the number of elements in the array','OPERATION_VALUE_OUT_OF_BOUNDS',i,c,a);var j=n[c.op].call(c,q,u,a);if(!1===j.test)throw new b.JsonPatchError('Test operation failed','TEST_OPERATION_FAILED',i,c,a);return j}}else if(u&&-1!=u.indexOf('~')&&(u=l.unescapePathComponent(u)),r>=s){var j=m[c.op].call(c,q,u,a);if(!1===j.test)throw new b.JsonPatchError('Test operation failed','TEST_OPERATION_FAILED',i,c,a);return j}q=q[u]}}}function f(a,c,d,f,g){if(void 0===f&&(f=!0),void 0===g&&(g=!0),d&&!Array.isArray(c))throw new b.JsonPatchError('Patch sequence must be an array','SEQUENCE_NOT_AN_ARRAY');f||(a=l._deepClone(a));for(var h=Array(c.length),j=0,i=c.length;j { patches: Operation[] unobserve: () => void callback: (patches: Operation[]) => void + inversible: boolean } var beforeDict = new WeakMap() @@ -103,7 +104,9 @@ export function observe( return observer } - observer = {} + observer = { + inversible + } mirror.value = _deepClone(obj) @@ -112,9 +115,7 @@ export function observe( observer.next = null var dirtyCheck = () => { - generate(observer, { - inversible: inversible - }) + generate(observer) } var fastCheck = () => { clearTimeout(observer.next) @@ -143,9 +144,7 @@ export function observe( observer.object = obj observer.unobserve = () => { - generate(observer, { - inversible: inversible - }) + generate(observer) clearTimeout(observer.next) removeObserverFromMirror(mirror, observer) @@ -171,15 +170,22 @@ export function observe( /** * Generate an array of patches from an observer + * If opts.inversible is defined, overwrite observer.inversible */ export function generate( observer: Observer, - opts?: { - inversible: boolean - } + opts: { + inversible?: boolean + } = {} ): Operation[] { var mirror = beforeDict.get(observer.object) - _generate(mirror.value, observer.object, observer.patches, "", opts) + + var inversible = + typeof opts.inversible !== "undefined" + ? opts.inversible + : observer.inversible + + _generate(mirror.value, observer.object, observer.patches, "", {inversible}) if (observer.patches.length) { applyPatch(mirror.value, observer.patches) } diff --git a/test/spec/duplexSpec.js b/test/spec/duplexSpec.js index 4dfabd63..7271a60b 100644 --- a/test/spec/duplexSpec.js +++ b/test/spec/duplexSpec.js @@ -22,7 +22,7 @@ function getPatchesUsingGenerate(objFactory, objChanger) { var obj = objFactory() var observer = jsonpatch.observe(obj, undefined, true) objChanger(obj) - return jsonpatch.generate(observer, {inversible: true}) + return jsonpatch.generate(observer) } function getPatchesUsingCompare(objFactory, objChanger) { @@ -122,13 +122,15 @@ describe("duplex", function() { ] } - var observer = jsonpatch.observe(obj, undefined, true) + var observer = jsonpatch.observe(obj) + observer.inversible = true + obj.firstName = "Joachim" obj.lastName = "Wester" obj.phoneNumbers[0].number = "123" obj.phoneNumbers[1].number = "456" - var patches = jsonpatch.generate(observer, {inversible: true}) + var patches = jsonpatch.generate(observer) obj2 = { firstName: "Albert", lastName: "Einstein", @@ -160,13 +162,13 @@ describe("duplex", function() { ] } - var observer = jsonpatch.observe(obj, undefined, true) + var observer = jsonpatch.observe(obj) obj["/name/first"] = "Joachim" obj["/name/last"] = "Wester" obj["~phone~/numbers"][0].number = "123" obj["~phone~/numbers"][1].number = "456" - var patches = jsonpatch.generate(observer, {inversible: true}) + var patches = jsonpatch.generate(observer) obj2 = { "/name/first": "Albert", "/name/last": "Einstein", @@ -246,7 +248,7 @@ describe("duplex", function() { var observer = jsonpatch.observe(obj, undefined, true) obj.firstName = "Marcin" - var patches = jsonpatch.generate(observer, {inversible: true}) + var patches = jsonpatch.generate(observer) expect(patches).toReallyEqual([ { op: "test", @@ -261,7 +263,7 @@ describe("duplex", function() { ]) obj.lastName = "Warp" - patches = jsonpatch.generate(observer, {inversible: true}) //first patch should NOT be reported again here + patches = jsonpatch.generate(observer) //first patch should NOT be reported again here expect(patches).toReallyEqual([ { op: "test", @@ -306,7 +308,7 @@ describe("duplex", function() { var observer = jsonpatch.observe(obj, undefined, true) obj.phoneNumbers[0].number = "123" - var patches = jsonpatch.generate(observer, {inversible: true}) + var patches = jsonpatch.generate(observer) expect(patches).toReallyEqual([ { op: "test", @@ -321,7 +323,7 @@ describe("duplex", function() { ]) obj.phoneNumbers[1].number = "456" - patches = jsonpatch.generate(observer, {inversible: true}) //first patch should NOT be reported again here + patches = jsonpatch.generate(observer) //first patch should NOT be reported again here expect(patches).toReallyEqual([ { op: "test", @@ -355,7 +357,7 @@ describe("duplex", function() { var observer = jsonpatch.observe(arr, undefined, true) arr.push(2) - var patches = jsonpatch.generate(observer, {inversible: true}) + var patches = jsonpatch.generate(observer) expect(patches).toReallyEqual([ { op: "add", @@ -366,7 +368,7 @@ describe("duplex", function() { arr[0] = 3 - var patches = jsonpatch.generate(observer, {inversible: true}) + var patches = jsonpatch.generate(observer) expect(patches).toReallyEqual([ { op: "test", @@ -382,7 +384,7 @@ describe("duplex", function() { arr[1] = 4 - var patches = jsonpatch.generate(observer, {inversible: true}) + var patches = jsonpatch.generate(observer) expect(patches).toReallyEqual([ { op: "test", @@ -411,7 +413,7 @@ describe("duplex", function() { name: "Jerry" }) - var patches = jsonpatch.generate(observer, {inversible: true}) + var patches = jsonpatch.generate(observer) expect(patches).toReallyEqual([ { op: "add", @@ -425,7 +427,7 @@ describe("duplex", function() { arr[0].id = 3 - var patches = jsonpatch.generate(observer, {inversible: true}) + var patches = jsonpatch.generate(observer) expect(patches).toReallyEqual([ { op: "test", @@ -439,9 +441,20 @@ describe("duplex", function() { } ]) + arr[0].id = 4 + // Disable test operations + var patches = jsonpatch.generate(observer, {inversible: false}) + expect(patches).toReallyEqual([ + { + op: "replace", + path: "/0/id", + value: 4 + } + ]) + arr[1].id = 4 - var patches = jsonpatch.generate(observer, {inversible: true}) + var patches = jsonpatch.generate(observer) expect(patches).toReallyEqual([ { op: "test", @@ -474,7 +487,7 @@ describe("duplex", function() { number: "456" }) - patches = jsonpatch.generate(observer, {inversible: true}) + patches = jsonpatch.generate(observer) obj2 = { lastName: "Einstein", phoneNumbers: [ @@ -508,7 +521,7 @@ describe("duplex", function() { obj.phoneNumbers[0].number = "123" obj.phoneNumbers.pop(1) - patches = jsonpatch.generate(observer, {inversible: true}) + patches = jsonpatch.generate(observer) obj2 = { lastName: "Einstein", firstName: "Albert", @@ -535,7 +548,7 @@ describe("duplex", function() { obj.items.pop() obj.items.pop() - patches = jsonpatch.generate(observer, {inversible: true}) + patches = jsonpatch.generate(observer) //array indexes must be sorted descending, otherwise there is an index collision in apply expect(patches).toReallyEqual([ @@ -574,7 +587,7 @@ describe("duplex", function() { obj.lastName = "Wester" - patches = jsonpatch.generate(observer, {inversible: true}) + patches = jsonpatch.generate(observer) expect(patches).toReallyEqual([ { op: "test", @@ -588,7 +601,7 @@ describe("duplex", function() { } ]) - patches = jsonpatch.generate(observer, {inversible: true}) + patches = jsonpatch.generate(observer) expect(patches).toReallyEqual([]) }) @@ -600,7 +613,7 @@ describe("duplex", function() { obj.firstName = "Albert" - patches = jsonpatch.generate(observer, {inversible: true}) + patches = jsonpatch.generate(observer) expect(patches).toReallyEqual([ { op: "add", @@ -609,7 +622,7 @@ describe("duplex", function() { } ]) - patches = jsonpatch.generate(observer, {inversible: true}) + patches = jsonpatch.generate(observer) expect(patches).toReallyEqual([]) }) @@ -621,7 +634,7 @@ describe("duplex", function() { delete obj.lastName - patches = jsonpatch.generate(observer, {inversible: true}) + patches = jsonpatch.generate(observer) expect(patches).toReallyEqual([ { op: "test", @@ -634,7 +647,7 @@ describe("duplex", function() { } ]) - patches = jsonpatch.generate(observer, {inversible: true}) + patches = jsonpatch.generate(observer) expect(patches).toReallyEqual([]) }) @@ -647,11 +660,11 @@ describe("duplex", function() { var observer = jsonpatch.observe(obj, undefined, true) obj.array.value = 1 - patches = jsonpatch.generate(observer, {inversible: true}) + patches = jsonpatch.generate(observer) expect(patches.length).toReallyEqual(0) obj.array.value = 2 - patches = jsonpatch.generate(observer, {inversible: true}) + patches = jsonpatch.generate(observer) expect(patches.length).toReallyEqual(0) }) @@ -670,7 +683,7 @@ describe("duplex", function() { var observer = jsonpatch.observe(obj, undefined, true) obj.b = 5 - patches = jsonpatch.generate(observer, {inversible: true}) + patches = jsonpatch.generate(observer) expect(patches.length).toReallyEqual(2) }) @@ -690,8 +703,9 @@ describe("duplex", function() { } var observer = jsonpatch.observe(outer) + observer.inversible = true outer.obj.b = 5 - patches = jsonpatch.generate(observer, {inversible: true}) + patches = jsonpatch.generate(observer) expect(patches.length).toReallyEqual(2) expect(patches[1].op).toReallyEqual("replace") @@ -724,7 +738,7 @@ describe("duplex", function() { var observer = jsonpatch.observe(obj, undefined, true) obj.foo = undefined - var patches = jsonpatch.generate(observer, {inversible: true}) + var patches = jsonpatch.generate(observer) expect(patches).toReallyEqual([ { op: "test", @@ -746,7 +760,7 @@ describe("duplex", function() { var observer = jsonpatch.observe(obj, undefined, true) obj.baz = undefined - var patches = jsonpatch.generate(observer, {inversible: true}) + var patches = jsonpatch.generate(observer) expect(patches).toReallyEqual([]) }) @@ -758,7 +772,7 @@ describe("duplex", function() { var observer = jsonpatch.observe(obj, undefined, true) obj.foo[1] = undefined - var patches = jsonpatch.generate(observer, {inversible: true}) + var patches = jsonpatch.generate(observer) expect(patches).toReallyEqual([ { op: "test", @@ -781,7 +795,7 @@ describe("duplex", function() { var observer = jsonpatch.observe(obj, undefined, true) obj.foo = "something" - var patches = jsonpatch.generate(observer, {inversible: true}) + var patches = jsonpatch.generate(observer) expect(patches).toReallyEqual([ { op: "add", @@ -798,7 +812,7 @@ describe("duplex", function() { var observer = jsonpatch.observe(obj, undefined, true) obj.foo[1] = 1 - var patches = jsonpatch.generate(observer, {inversible: true}) + var patches = jsonpatch.generate(observer) expect(patches).toReallyEqual([ { op: "test", @@ -1260,7 +1274,7 @@ describe("duplex", function() { setTimeout(function() { expect(called).toReallyEqual(0) - res = jsonpatch.generate(observer, {inversible: true}) + res = jsonpatch.generate(observer) expect(called).toReallyEqual(1) expect(lastPatches).toReallyEqual([ { @@ -1276,7 +1290,7 @@ describe("duplex", function() { ]) expect(lastPatches).toReallyEqual(res) - res = jsonpatch.generate(observer, {inversible: true}) + res = jsonpatch.generate(observer) expect(called).toReallyEqual(1) expect(lastPatches).toReallyEqual([ { diff --git a/test/spec/validateSpec.js b/test/spec/validateSpec.js index 12cdf108..5ba73922 100644 --- a/test/spec/validateSpec.js +++ b/test/spec/validateSpec.js @@ -1,77 +1,97 @@ -if(typeof jsonpatch == 'undefined') { - var jsonpatch = require('../../lib/duplex') +if (typeof jsonpatch == "undefined") { + var jsonpatch = require("../../lib/duplex") } -describe('validate', function() { - it('should return an empty array if the patch is valid', function() { +describe("validate", function() { + it("should return an empty array if the patch is valid", function() { var patch = [ { - op: 'test', - path: '/a/b/c', - value: 'foo' + op: "test", + path: "/a/b/c", + value: "foo" }, { - op: 'remove', - path: '/a/b/c' + op: "remove", + path: "/a/b/c" }, { - op: 'add', - path: '/a/b/c', - value: ['foo', 'bar'] + op: "add", + path: "/a/b/c", + value: ["foo", "bar"] }, { - op: 'replace', - path: '/a/b/c', + op: "replace", + path: "/a/b/c", value: 42 }, { - op: 'move', - from: '/a/b/c', - path: '/a/b/d' + op: "move", + from: "/a/b/c", + path: "/a/b/d" }, { - op: 'copy', - from: '/a/b/d', - path: '/a/b/e' + op: "copy", + from: "/a/b/d", + path: "/a/b/e" } - ]; - var error = jsonpatch.validate(patch); - expect(error).toBeUndefined(); - }); - - it('applyPatch should throw an error if the patch is not an array and validate is `true`', function() { - expect(() => jsonpatch.applyPatch({}, {}, true)).toThrow(new jsonpatch.JsonPatchError('Patch sequence must be an array', 'SEQUENCE_NOT_AN_ARRAY')); - }); - it('applyPatch should throw an error if the patch is not an array and validate is `true`', function() { - expect(() => jsonpatch.applyPatch({}, null, true)).toThrow(new jsonpatch.JsonPatchError('Patch sequence must be an array', 'SEQUENCE_NOT_AN_ARRAY')); - }); - it('applyPatch should throw list the index and the object of the faulty operation in the patch', function() { - expect(() => - jsonpatch.applyPatch( - {}, - [ - { op: 'add', path: '/root', value: [] }, - { op: 'add', path: '/root/2', value: 2 } // out of bounds - ], - true - ) - ).toThrow( - new jsonpatch.JsonPatchError( - 'The specified index MUST NOT be greater than the number of elements in the array', - 'OPERATION_VALUE_OUT_OF_BOUNDS', - 1, // the index of the faulty operation - { op: 'add', path: '/root/2', value: 2 }, // the faulty operation - { root: [] } // the tree after the first operation - ) - ); - }); - it('JsonPatchError should have a nice formatted message', function() { - const message = "Some error message"; - const name = "SOME_ERROR_NAME"; - const index = 1; // op index - const operation = JSON.stringify({ op: "replace", path: '/root', value: {} }, null, 2); - const tree = JSON.stringify({ root: [] }, null, 2); - - const expectedError = new jsonpatch.JsonPatchError(message, name, index, operation, tree); + ] + var error = jsonpatch.validate(patch) + expect(error).toBeUndefined() + }) + + it("applyPatch should throw an error if the patch is not an array and validate is `true`", function() { + expect(() => jsonpatch.applyPatch({}, {}, true)).toThrow( + new jsonpatch.JsonPatchError( + "Patch sequence must be an array", + "SEQUENCE_NOT_AN_ARRAY" + ) + ) + }) + it("applyPatch should throw an error if the patch is not an array and validate is `true`", function() { + expect(() => jsonpatch.applyPatch({}, null, true)).toThrow( + new jsonpatch.JsonPatchError( + "Patch sequence must be an array", + "SEQUENCE_NOT_AN_ARRAY" + ) + ) + }) + it("applyPatch should throw list the index and the object of the faulty operation in the patch", function() { + expect(() => + jsonpatch.applyPatch( + {}, + [ + {op: "add", path: "/root", value: []}, + {op: "add", path: "/root/2", value: 2} // out of bounds + ], + true + ) + ).toThrow( + new jsonpatch.JsonPatchError( + "The specified index MUST NOT be greater than the number of elements in the array", + "OPERATION_VALUE_OUT_OF_BOUNDS", + 1, // the index of the faulty operation + {op: "add", path: "/root/2", value: 2}, // the faulty operation + {root: []} // the tree after the first operation + ) + ) + }) + it("JsonPatchError should have a nice formatted message", function() { + const message = "Some error message" + const name = "SOME_ERROR_NAME" + const index = 1 // op index + const operation = JSON.stringify( + {op: "replace", path: "/root", value: {}}, + null, + 2 + ) + const tree = JSON.stringify({root: []}, null, 2) + + const expectedError = new jsonpatch.JsonPatchError( + message, + name, + index, + operation, + tree + ) /* Some error message @@ -91,543 +111,541 @@ describe('validate', function() { .concat(name, "\nindex: ") .concat(index, "\noperation: ") .concat(operation, "\ntree: ") - .concat(tree); // don't use `` to support the loveliest browser: IE - - expect(expectedError.message).toEqual(expectedFormattedErrorMessage); - }); + .concat(tree) // don't use `` to support the loveliest browser: IE + expect(expectedError.message).toEqual(expectedFormattedErrorMessage) + }) - it('should return an empty array if the operation is a valid object', function() { + it("should return an empty array if the operation is a valid object", function() { var error = jsonpatch.validate([ { - op: 'add', - value: 'foo', - path: '/bar' + op: "add", + value: "foo", + path: "/bar" } - ]); - expect(error).toBeUndefined(); - }); - - it('should return an error if the operation is null', function() { - var error = jsonpatch.validate([null]); - expect(error instanceof jsonpatch.JsonPatchError).toBe(true); - expect(error.name).toBe('OPERATION_NOT_AN_OBJECT'); - }); - - it('should return an error which is instance of Error and jsonpatch.JsonPatchError', function() { - var error = jsonpatch.validate({}); - expect(error instanceof jsonpatch.JsonPatchError).toBe(true); - expect(error instanceof Error).toBe(true); - expect(error.name).toBe('SEQUENCE_NOT_AN_ARRAY'); - }); - - it('should return an error that contains the cloned patch and the patched object', function() { + ]) + expect(error).toBeUndefined() + }) + + it("should return an error if the operation is null", function() { + var error = jsonpatch.validate([null]) + expect(error instanceof jsonpatch.JsonPatchError).toBe(true) + expect(error.name).toBe("OPERATION_NOT_AN_OBJECT") + }) + + it("should return an error which is instance of Error and jsonpatch.JsonPatchError", function() { + var error = jsonpatch.validate({}) + expect(error instanceof jsonpatch.JsonPatchError).toBe(true) + expect(error instanceof Error).toBe(true) + expect(error.name).toBe("SEQUENCE_NOT_AN_ARRAY") + }) + + it("should return an error that contains the cloned patch and the patched object", function() { var tree = { - name: 'Elvis', + name: "Elvis", cars: [] - }; + } var sequence = [ { - op: 'remove', - path: '/name/first' + op: "remove", + path: "/name/first" } - ]; - var error = jsonpatch.validate(sequence, tree); - expect(error instanceof jsonpatch.JsonPatchError).toBe(true); - expect(JSON.stringify(error.operation)).toBe(JSON.stringify(sequence[0])); - expect(JSON.stringify(error.tree)).toBe(JSON.stringify(tree)); - expect(error.name).toBe('OPERATION_PATH_UNRESOLVABLE'); - }); - - it('should return an error if the operation is undefined', function() { - var error = jsonpatch.validate([undefined]); - expect(error instanceof jsonpatch.JsonPatchError).toBe(true); - expect(error.name).toBe('OPERATION_NOT_AN_OBJECT'); - }); - - it('should return an error if the operation is an array', function() { - var error = jsonpatch.validate([[]]); - expect(error instanceof jsonpatch.JsonPatchError).toBe(true); - expect(error.name).toBe('OPERATION_NOT_AN_OBJECT'); - }); + ] + var error = jsonpatch.validate(sequence, tree) + expect(error instanceof jsonpatch.JsonPatchError).toBe(true) + expect(JSON.stringify(error.operation)).toBe(JSON.stringify(sequence[0])) + expect(JSON.stringify(error.tree)).toBe(JSON.stringify(tree)) + expect(error.name).toBe("OPERATION_PATH_UNRESOLVABLE") + }) + + it("should return an error if the operation is undefined", function() { + var error = jsonpatch.validate([undefined]) + expect(error instanceof jsonpatch.JsonPatchError).toBe(true) + expect(error.name).toBe("OPERATION_NOT_AN_OBJECT") + }) + + it("should return an error if the operation is an array", function() { + var error = jsonpatch.validate([[]]) + expect(error instanceof jsonpatch.JsonPatchError).toBe(true) + expect(error.name).toBe("OPERATION_NOT_AN_OBJECT") + }) it('should return an error if the operation "op" property is not a string', function() { var error = jsonpatch.validate([ { - path: '/a/b/c' + path: "/a/b/c" } - ]); - expect(error instanceof jsonpatch.JsonPatchError).toBe(true); - expect(error.name).toBe('OPERATION_OP_INVALID'); - }); + ]) + expect(error instanceof jsonpatch.JsonPatchError).toBe(true) + expect(error.name).toBe("OPERATION_OP_INVALID") + }) it('should return an error if the operation "path" property is not a string', function() { var error = jsonpatch.validate([ { - op: 'remove', - value: 'foo' + op: "remove", + value: "foo" } - ]); - expect(error instanceof jsonpatch.JsonPatchError).toBe(true); - expect(error.name).toBe('OPERATION_PATH_INVALID'); - }); + ]) + expect(error instanceof jsonpatch.JsonPatchError).toBe(true) + expect(error.name).toBe("OPERATION_PATH_INVALID") + }) it('should return an error if an "add" operation is missing "value" property', function() { var error = jsonpatch.validate([ { - op: 'add', - path: '/a/b/c' + op: "add", + path: "/a/b/c" } - ]); - expect(error instanceof jsonpatch.JsonPatchError).toBe(true); - expect(error.name).toBe('OPERATION_VALUE_REQUIRED'); - }); + ]) + expect(error instanceof jsonpatch.JsonPatchError).toBe(true) + expect(error.name).toBe("OPERATION_VALUE_REQUIRED") + }) it('should return an error if an "add" operation "value" property is "undefined"', function() { var error = jsonpatch.validate([ { - op: 'add', - path: '/a/b/c', + op: "add", + path: "/a/b/c", value: undefined } - ]); - expect(error instanceof jsonpatch.JsonPatchError).toBe(true); - expect(error.name).toBe('OPERATION_VALUE_REQUIRED'); - }); + ]) + expect(error instanceof jsonpatch.JsonPatchError).toBe(true) + expect(error.name).toBe("OPERATION_VALUE_REQUIRED") + }) it('should return an error if a "replace" operation is missing "value" property', function() { var error = jsonpatch.validate([ { - op: 'replace', - path: '/a/b/c' + op: "replace", + path: "/a/b/c" } - ]); - expect(error instanceof jsonpatch.JsonPatchError).toBe(true); - expect(error.name).toBe('OPERATION_VALUE_REQUIRED'); - }); + ]) + expect(error instanceof jsonpatch.JsonPatchError).toBe(true) + expect(error.name).toBe("OPERATION_VALUE_REQUIRED") + }) it('should return an error if a "replace" operation "value" property is "undefined"', function() { var error = jsonpatch.validate([ { - op: 'replace', - path: '/a/b/c', + op: "replace", + path: "/a/b/c", value: undefined } - ]); - expect(error instanceof jsonpatch.JsonPatchError).toBe(true); - expect(error.name).toBe('OPERATION_VALUE_REQUIRED'); - }); + ]) + expect(error instanceof jsonpatch.JsonPatchError).toBe(true) + expect(error.name).toBe("OPERATION_VALUE_REQUIRED") + }) it('should return an error if a "test" operation is missing "value" property', function() { var error = jsonpatch.validate([ { - op: 'test', - path: '/a/b/c' + op: "test", + path: "/a/b/c" } - ]); - expect(error instanceof jsonpatch.JsonPatchError).toBe(true); - expect(error.name).toBe('OPERATION_VALUE_REQUIRED'); - }); + ]) + expect(error instanceof jsonpatch.JsonPatchError).toBe(true) + expect(error.name).toBe("OPERATION_VALUE_REQUIRED") + }) it('should return an error if a "test" operation "value" property is "undefined"', function() { var error = jsonpatch.validate([ { - op: 'test', - path: '/a/b/c', + op: "test", + path: "/a/b/c", value: undefined } - ]); - expect(error instanceof jsonpatch.JsonPatchError).toBe(true); - expect(error.name).toBe('OPERATION_VALUE_REQUIRED'); - }); + ]) + expect(error instanceof jsonpatch.JsonPatchError).toBe(true) + expect(error.name).toBe("OPERATION_VALUE_REQUIRED") + }) it('should return an error if an "add" operation "value" contains "undefined"', function() { var error = jsonpatch.validate([ { - op: 'add', - path: '/a/b/c', + op: "add", + path: "/a/b/c", value: { foo: undefined } } - ]); - expect(error instanceof jsonpatch.JsonPatchError).toBe(true); - expect(error.name).toBe('OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED'); - }); + ]) + expect(error instanceof jsonpatch.JsonPatchError).toBe(true) + expect(error.name).toBe("OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED") + }) it('should return an error if a "replace" operation "value" contains "undefined"', function() { var error = jsonpatch.validate([ { - op: 'replace', - path: '/a/b/c', + op: "replace", + path: "/a/b/c", value: { foos: [undefined] } } - ]); - expect(error instanceof jsonpatch.JsonPatchError).toBe(true); - expect(error.name).toBe('OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED'); - }); + ]) + expect(error instanceof jsonpatch.JsonPatchError).toBe(true) + expect(error.name).toBe("OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED") + }) it('should return an error if a "test" operation "value" contains "undefined"', function() { var error = jsonpatch.validate([ { - op: 'test', - path: '/a/b/c', + op: "test", + path: "/a/b/c", value: { foo: { bars: [undefined] } } } - ]); - expect(error instanceof jsonpatch.JsonPatchError).toBe(true); - expect(error.name).toBe('OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED'); - }); + ]) + expect(error instanceof jsonpatch.JsonPatchError).toBe(true) + expect(error.name).toBe("OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED") + }) it('should return an error if a "move" operation is missing "from" property', function() { var error = jsonpatch.validate([ { - op: 'move', - path: '/a/b/c' + op: "move", + path: "/a/b/c" } - ]); - expect(error instanceof jsonpatch.JsonPatchError).toBe(true); - expect(error.name).toBe('OPERATION_FROM_REQUIRED'); - }); + ]) + expect(error instanceof jsonpatch.JsonPatchError).toBe(true) + expect(error.name).toBe("OPERATION_FROM_REQUIRED") + }) it('should return an error if a "copy" operation is missing "from" property', function() { var error = jsonpatch.validate([ { - op: 'copy', - path: '/a/b/c' + op: "copy", + path: "/a/b/c" } - ]); - expect(error instanceof jsonpatch.JsonPatchError).toBe(true); - expect(error.name).toBe('OPERATION_FROM_REQUIRED'); - }); + ]) + expect(error instanceof jsonpatch.JsonPatchError).toBe(true) + expect(error.name).toBe("OPERATION_FROM_REQUIRED") + }) it('should return an error if the "op" property is invalid', function() { var error = jsonpatch.validate([ { - op: 'foobar', - path: '/a/b/c' + op: "foobar", + path: "/a/b/c" } - ]); - expect(error instanceof jsonpatch.JsonPatchError).toBe(true); - expect(error.name).toBe('OPERATION_OP_INVALID'); - }); + ]) + expect(error instanceof jsonpatch.JsonPatchError).toBe(true) + expect(error.name).toBe("OPERATION_OP_INVALID") + }) - it('should return error replacing an unexisting path', function() { + it("should return error replacing an unexisting path", function() { var sequence, error, tree = { - '': 'empty string is a valid key', - name: 'Elvis', + "": "empty string is a valid key", + name: "Elvis", cars: [ { - brand: 'Jaguar' + brand: "Jaguar" } ], address: {} - }; + } sequence = [ { - op: 'replace', - path: '/name/first', - value: '' + op: "replace", + path: "/name/first", + value: "" } - ]; - error = jsonpatch.validate(sequence, tree); - expect(error.name).toBe('OPERATION_PATH_UNRESOLVABLE'); + ] + error = jsonpatch.validate(sequence, tree) + expect(error.name).toBe("OPERATION_PATH_UNRESOLVABLE") sequence = [ { - op: 'replace', - path: '/firstName', - value: '' + op: "replace", + path: "/firstName", + value: "" } - ]; - error = jsonpatch.validate(sequence, tree); - expect(error.name).toBe('OPERATION_PATH_UNRESOLVABLE'); + ] + error = jsonpatch.validate(sequence, tree) + expect(error.name).toBe("OPERATION_PATH_UNRESOLVABLE") sequence = [ { - op: 'replace', - path: '/cars/0/name', - value: '' + op: "replace", + path: "/cars/0/name", + value: "" } - ]; - error = jsonpatch.validate(sequence, tree); - expect(error.name).toBe('OPERATION_PATH_UNRESOLVABLE'); - }); + ] + error = jsonpatch.validate(sequence, tree) + expect(error.name).toBe("OPERATION_PATH_UNRESOLVABLE") + }) - it('should return error removing an unexisting path', function() { + it("should return error removing an unexisting path", function() { var tree = { - name: 'Elvis', + name: "Elvis", cars: [] - }; + } var sequence = [ { - op: 'remove', - path: '/name/first' + op: "remove", + path: "/name/first" } - ]; - var error = jsonpatch.validate(sequence, tree); - expect(error instanceof jsonpatch.JsonPatchError).toBe(true); - expect(error.name).toBe('OPERATION_PATH_UNRESOLVABLE'); - }); + ] + var error = jsonpatch.validate(sequence, tree) + expect(error instanceof jsonpatch.JsonPatchError).toBe(true) + expect(error.name).toBe("OPERATION_PATH_UNRESOLVABLE") + }) it('should allow adding property "b" in "a"', function() { var tree = { a: { foo: 1 } - }; + } var sequence = [ { - op: 'add', - path: '/a/b', - value: 'sample' + op: "add", + path: "/a/b", + value: "sample" } - ]; + ] - var error = jsonpatch.validate(sequence, tree); - expect(error).toBeUndefined(); - }); + var error = jsonpatch.validate(sequence, tree) + expect(error).toBeUndefined() + }) it('should report error because "a" does not exist', function() { var tree = { q: { bar: 2 } - }; + } var sequence = [ { - op: 'add', - path: '/a/b', - value: 'sample' + op: "add", + path: "/a/b", + value: "sample" } - ]; + ] - var error = jsonpatch.validate(sequence, tree); - expect(error instanceof jsonpatch.JsonPatchError).toBe(true); - expect(error.name).toBe('OPERATION_PATH_CANNOT_ADD'); - }); + var error = jsonpatch.validate(sequence, tree) + expect(error instanceof jsonpatch.JsonPatchError).toBe(true) + expect(error.name).toBe("OPERATION_PATH_CANNOT_ADD") + }) - it('should return error when replacing a removed path', function() { + it("should return error when replacing a removed path", function() { var tree = { - name: 'Elvis' - }; + name: "Elvis" + } var sequence = [ { - op: 'remove', - path: '/name' + op: "remove", + path: "/name" }, { - op: 'replace', - path: '/name', - value: 'Freddie' + op: "replace", + path: "/name", + value: "Freddie" } - ]; - var error = jsonpatch.validate(sequence, tree); - expect(error.name).toBe('OPERATION_PATH_UNRESOLVABLE'); - }); + ] + var error = jsonpatch.validate(sequence, tree) + expect(error.name).toBe("OPERATION_PATH_UNRESOLVABLE") + }) - it('should allow to override validator to add custom validation', function() { + it("should allow to override validator to add custom validation", function() { var tree = { - password: 'Elvis' - }; + password: "Elvis" + } var sequence = [ { - op: 'replace', - path: '/password', - value: 'Elvis123' + op: "replace", + path: "/password", + value: "Elvis123" }, { - op: 'replace', - path: '/password', - value: 'Presley123' + op: "replace", + path: "/password", + value: "Presley123" }, { - op: 'replace', - path: '/password' + op: "replace", + path: "/password" } - ]; - + ] const validator = function(operation, index, tree, existingPath) { throw new jsonpatch.JsonPatchError( - 'Operation `value` property must not contain the old value', - 'OPERATION_VALUE_MUST_NOT_CONTAIN_OLD_VALUE', - index, - operation, - tree - ); - } - var customError = jsonpatch.validate(sequence, tree, validator); - expect(customError.index).toBe(0); - expect(customError.name).toBe('OPERATION_VALUE_MUST_NOT_CONTAIN_OLD_VALUE'); - }); + "Operation `value` property must not contain the old value", + "OPERATION_VALUE_MUST_NOT_CONTAIN_OLD_VALUE", + index, + operation, + tree + ) + } + var customError = jsonpatch.validate(sequence, tree, validator) + expect(customError.index).toBe(0) + expect(customError.name).toBe("OPERATION_VALUE_MUST_NOT_CONTAIN_OLD_VALUE") + }) - it('should pass replacing the tree root', function() { + it("should pass replacing the tree root", function() { var tree = { - password: 'Elvis' - }; + password: "Elvis" + } var sequence = [ { - op: 'replace', - path: '', + op: "replace", + path: "", value: {} } - ]; + ] - var error = jsonpatch.validate(sequence, tree); - expect(error).toBeUndefined(); - }); + var error = jsonpatch.validate(sequence, tree) + expect(error).toBeUndefined() + }) - it('should return error moving from an unexisting path', function() { + it("should return error moving from an unexisting path", function() { var tree = { - name: 'Elvis' - }; + name: "Elvis" + } var sequence = [ { - op: 'move', - from: '/a/b/c', - path: '/name' + op: "move", + from: "/a/b/c", + path: "/name" } - ]; - var error = jsonpatch.validate(sequence, tree); - expect(error.name).toBe('OPERATION_FROM_UNRESOLVABLE'); - }); + ] + var error = jsonpatch.validate(sequence, tree) + expect(error.name).toBe("OPERATION_FROM_UNRESOLVABLE") + }) - it('should return error copying from an unexisting path', function() { + it("should return error copying from an unexisting path", function() { var tree = { - name: 'Elvis' - }; + name: "Elvis" + } var sequence = [ { - op: 'copy', - from: '/a/b/c', - path: '/name' + op: "copy", + from: "/a/b/c", + path: "/name" } - ]; - var error = jsonpatch.validate(sequence, tree); - expect(error.name).toBe('OPERATION_FROM_UNRESOLVABLE'); - }); + ] + var error = jsonpatch.validate(sequence, tree) + expect(error.name).toBe("OPERATION_FROM_UNRESOLVABLE") + }) - it('should throw OPERATION_PATH_INVALID when applying patch without path', function() { - var a = {}; - var ex = null; + it("should throw OPERATION_PATH_INVALID when applying patch without path", function() { + var a = {} + var ex = null try { jsonpatch.applyPatch( a, [ { - op: 'replace', - value: '' + op: "replace", + value: "" } ], true - ); + ) } catch (e) { - ex = e; + ex = e } - expect(ex.name).toBe('OPERATION_PATH_INVALID'); - }); + expect(ex.name).toBe("OPERATION_PATH_INVALID") + }) - it('should throw OPERATION_PATH_INVALID when applying patch with an invalid path. Issue #77.', function() { - var a = {}; - var ex = null; + it("should throw OPERATION_PATH_INVALID when applying patch with an invalid path. Issue #77.", function() { + var a = {} + var ex = null try { jsonpatch.applyPatch( a, [ { - op: 'replace', - value: '', - path: 'foo' // no preceding "/" + op: "replace", + value: "", + path: "foo" // no preceding "/" } ], true - ); + ) } catch (e) { - ex = e; + ex = e } - expect(ex.name).toBe('OPERATION_PATH_INVALID'); - }); + expect(ex.name).toBe("OPERATION_PATH_INVALID") + }) - it('should throw OPERATION_OP_INVALID when applying patch without operation', function() { - var a = {}; - var ex = null; + it("should throw OPERATION_OP_INVALID when applying patch without operation", function() { + var a = {} + var ex = null try { jsonpatch.applyPatch( a, [ { - path: '/foo', - value: '' + path: "/foo", + value: "" } ], true - ); + ) } catch (e) { - ex = e; + ex = e } - expect(ex.name).toBe('OPERATION_OP_INVALID'); - }); + expect(ex.name).toBe("OPERATION_OP_INVALID") + }) - it('should throw OPERATION_VALUE_REQUIRED when applying patch without value', function() { - var a = {}; - var ex = null; + it("should throw OPERATION_VALUE_REQUIRED when applying patch without value", function() { + var a = {} + var ex = null try { jsonpatch.applyPatch( a, [ { - path: '/foo', - op: 'add' + path: "/foo", + op: "add" } ], true - ); + ) } catch (e) { - ex = e; + ex = e } - expect(ex.name).toBe('OPERATION_VALUE_REQUIRED'); - }); + expect(ex.name).toBe("OPERATION_VALUE_REQUIRED") + }) - it('should not modify patch value of type array (issue #76)', function () { + it("should not modify patch value of type array (issue #76)", function() { var patches = [ - {op: 'add', path: '/foo', value: []}, - {op: 'add', path: '/foo/-', value: 1} - ]; - jsonpatch.validate(patches, {}); + {op: "add", path: "/foo", value: []}, + {op: "add", path: "/foo/-", value: 1} + ] + jsonpatch.validate(patches, {}) expect(patches).toEqual([ - {op: 'add', path: '/foo', value: []}, - {op: 'add', path: '/foo/-', value: 1} - ]); - }); + {op: "add", path: "/foo", value: []}, + {op: "add", path: "/foo/-", value: 1} + ]) + }) - it('should not modify patch value of type object (issue #76)', function () { + it("should not modify patch value of type object (issue #76)", function() { var patches = [ - {op: 'add', path: '/foo', value: {}}, - {op: 'add', path: '/foo/bar', value: 1} - ]; - jsonpatch.validate(patches, {}); + {op: "add", path: "/foo", value: {}}, + {op: "add", path: "/foo/bar", value: 1} + ] + jsonpatch.validate(patches, {}) expect(patches).toEqual([ - {op: 'add', path: '/foo', value: {}}, - {op: 'add', path: '/foo/bar', value: 1} - ]); - }); -}); + {op: "add", path: "/foo", value: {}}, + {op: "add", path: "/foo/bar", value: 1} + ]) + }) +}) From a47f39b3d618b91cc5534c7d4d923ac097137b29 Mon Sep 17 00:00:00 2001 From: Tom Pytleski Date: Wed, 8 May 2019 16:32:17 -0500 Subject: [PATCH 06/15] delete yarn lock file --- yarn.lock | 4097 ----------------------------------------------------- 1 file changed, 4097 deletions(-) delete mode 100644 yarn.lock diff --git a/yarn.lock b/yarn.lock deleted file mode 100644 index 99207cf4..00000000 --- a/yarn.lock +++ /dev/null @@ -1,4097 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -abab@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.4.tgz#5faad9c2c07f60dd76770f71cf025b62a63cfd4e" - integrity sha1-X6rZwsB/YN12dw9xzwJbYqY8/U4= - -abbrev@1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" - integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== - -accepts@~1.3.4: - version "1.3.7" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" - integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== - dependencies: - mime-types "~2.1.24" - negotiator "0.6.2" - -acorn-dynamic-import@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-2.0.2.tgz#c752bd210bef679501b6c6cb7fc84f8f47158cc4" - integrity sha1-x1K9IQvvZ5UBtsbLf8hPj0cVjMQ= - dependencies: - acorn "^4.0.3" - -acorn-globals@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-3.1.0.tgz#fd8270f71fbb4996b004fa880ee5d46573a731bf" - integrity sha1-/YJw9x+7SZawBPqIDuXUZXOnMb8= - dependencies: - acorn "^4.0.4" - -acorn@^4.0.3, acorn@^4.0.4: - version "4.0.13" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" - integrity sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c= - -acorn@^5.0.0: - version "5.7.3" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279" - integrity sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw== - -agent-base@^4.1.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.1.tgz#d89e5999f797875674c07d87f260fc41e83e8ca9" - integrity sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg== - dependencies: - es6-promisify "^5.0.0" - -ajv-keywords@^1.1.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c" - integrity sha1-MU3QpLM2j609/NxU7eYXG4htrzw= - -ajv@^4.7.0: - version "4.11.8" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" - integrity sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY= - dependencies: - co "^4.6.0" - json-stable-stringify "^1.0.1" - -ajv@^6.5.5: - version "6.10.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.0.tgz#90d0d54439da587cd7e843bfb7045f50bd22bdf1" - integrity sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg== - dependencies: - fast-deep-equal "^2.0.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -align-text@^0.1.1, align-text@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" - integrity sha1-DNkKVhCT810KmSVsIrcGlDP60Rc= - dependencies: - kind-of "^3.0.2" - longest "^1.0.1" - repeat-string "^1.5.2" - -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= - -ansi-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" - integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= - -ansi-styles@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" - integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= - -ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - dependencies: - color-convert "^1.9.0" - -anymatch@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" - integrity sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw== - dependencies: - micromatch "^3.1.4" - normalize-path "^2.1.1" - -aproba@^1.0.3: - version "1.2.0" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" - integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== - -are-we-there-yet@~1.1.2: - version "1.1.5" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" - integrity sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w== - dependencies: - delegates "^1.0.0" - readable-stream "^2.0.6" - -argparse@^1.0.7: - version "1.0.10" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" - integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== - dependencies: - sprintf-js "~1.0.2" - -arr-diff@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" - integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= - -arr-flatten@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" - integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== - -arr-union@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" - integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= - -array-equal@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" - integrity sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM= - -array-find-index@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" - integrity sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E= - -array-unique@^0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" - integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= - -asn1.js@^4.0.0: - version "4.10.1" - resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.10.1.tgz#b9c2bf5805f1e64aadeed6df3a2bfafb5a73f5a0" - integrity sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw== - dependencies: - bn.js "^4.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - -asn1@~0.2.3: - version "0.2.4" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" - integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg== - dependencies: - safer-buffer "~2.1.0" - -assert-plus@1.0.0, assert-plus@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" - integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= - -assert@1.4.1, assert@^1.1.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/assert/-/assert-1.4.1.tgz#99912d591836b5a6f5b345c0f07eefc08fc65d91" - integrity sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE= - dependencies: - util "0.10.3" - -assign-symbols@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" - integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= - -async-each@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" - integrity sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ== - -async-limiter@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8" - integrity sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg== - -async@^2.1.2, async@^2.6.0, async@^2.6.1: - version "2.6.2" - resolved "https://registry.yarnpkg.com/async/-/async-2.6.2.tgz#18330ea7e6e313887f5d2f2a904bac6fe4dd5381" - integrity sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg== - dependencies: - lodash "^4.17.11" - -async@~1.5.2: - version "1.5.2" - resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" - integrity sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo= - -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= - -atob@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" - integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== - -aws-sign2@~0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" - integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= - -aws4@^1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" - integrity sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ== - -babel-code-frame@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" - integrity sha1-Y/1D99weO7fONZR9uP42mj9Yx0s= - dependencies: - chalk "^1.1.3" - esutils "^2.0.2" - js-tokens "^3.0.2" - -babel-core@^6.24.1, babel-core@^6.26.0: - version "6.26.3" - resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.3.tgz#b2e2f09e342d0f0c88e2f02e067794125e75c207" - integrity sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA== - dependencies: - babel-code-frame "^6.26.0" - babel-generator "^6.26.0" - babel-helpers "^6.24.1" - babel-messages "^6.23.0" - babel-register "^6.26.0" - babel-runtime "^6.26.0" - babel-template "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - convert-source-map "^1.5.1" - debug "^2.6.9" - json5 "^0.5.1" - lodash "^4.17.4" - minimatch "^3.0.4" - path-is-absolute "^1.0.1" - private "^0.1.8" - slash "^1.0.0" - source-map "^0.5.7" - -babel-generator@^6.26.0: - version "6.26.1" - resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" - integrity sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA== - dependencies: - 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-helper-evaluate-path@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/babel-helper-evaluate-path/-/babel-helper-evaluate-path-0.1.0.tgz#95d98c4ea36150483db2e7d3ec9e1954a72629cb" - integrity sha1-ldmMTqNhUEg9sufT7J4ZVKcmKcs= - -babel-helper-flip-expressions@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/babel-helper-flip-expressions/-/babel-helper-flip-expressions-0.1.2.tgz#77f6652f9de9c42401d827bd46ebd2109e3ef18a" - integrity sha1-d/ZlL53pxCQB2Ce9RuvSEJ4+8Yo= - -babel-helper-is-nodes-equiv@^0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/babel-helper-is-nodes-equiv/-/babel-helper-is-nodes-equiv-0.0.1.tgz#34e9b300b1479ddd98ec77ea0bbe9342dfe39684" - integrity sha1-NOmzALFHnd2Y7HfqC76TQt/jloQ= - -babel-helper-is-void-0@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/babel-helper-is-void-0/-/babel-helper-is-void-0-0.1.1.tgz#72f21a3abba0bef3837f9174fca731aed9a02888" - integrity sha1-cvIaOrugvvODf5F0/KcxrtmgKIg= - -babel-helper-mark-eval-scopes@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/babel-helper-mark-eval-scopes/-/babel-helper-mark-eval-scopes-0.1.1.tgz#4554345edf9f2549427bd2098e530253f8af2992" - integrity sha1-RVQ0Xt+fJUlCe9IJjlMCU/ivKZI= - -babel-helper-remove-or-void@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/babel-helper-remove-or-void/-/babel-helper-remove-or-void-0.1.1.tgz#9d7e1856dc6fafcb41b283a416730dc1844f66d7" - integrity sha1-nX4YVtxvr8tBsoOkFnMNwYRPZtc= - -babel-helper-to-multiple-sequence-expressions@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/babel-helper-to-multiple-sequence-expressions/-/babel-helper-to-multiple-sequence-expressions-0.1.1.tgz#5f1b832b39e4acf954e9137f0251395c71196b35" - integrity sha1-XxuDKznkrPlU6RN/AlE5XHEZazU= - -babel-helpers@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" - integrity sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI= - dependencies: - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-messages@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" - integrity sha1-8830cDhYA1sqKVHG7F7fbGLyYw4= - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-minify-builtins@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/babel-plugin-minify-builtins/-/babel-plugin-minify-builtins-0.1.3.tgz#4f21a7dcb51f91a04ea71d47ff0e8e3b05fec021" - integrity sha1-TyGn3LUfkaBOpx1H/w6OOwX+wCE= - dependencies: - babel-helper-evaluate-path "^0.1.0" - -babel-plugin-minify-constant-folding@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/babel-plugin-minify-constant-folding/-/babel-plugin-minify-constant-folding-0.1.3.tgz#57bd172adf8b8d74ad7c99612eb950414ebea3ca" - integrity sha1-V70XKt+LjXStfJlhLrlQQU6+o8o= - dependencies: - babel-helper-evaluate-path "^0.1.0" - -babel-plugin-minify-dead-code-elimination@^0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/babel-plugin-minify-dead-code-elimination/-/babel-plugin-minify-dead-code-elimination-0.1.7.tgz#774f536f347b98393a27baa717872968813c342c" - integrity sha1-d09TbzR7mDk6J7qnF4cpaIE8NCw= - dependencies: - babel-helper-mark-eval-scopes "^0.1.1" - babel-helper-remove-or-void "^0.1.1" - lodash.some "^4.6.0" - -babel-plugin-minify-flip-comparisons@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/babel-plugin-minify-flip-comparisons/-/babel-plugin-minify-flip-comparisons-0.1.2.tgz#e286b40b7599b18dfea195071e4279465cfc1884" - integrity sha1-4oa0C3WZsY3+oZUHHkJ5Rlz8GIQ= - dependencies: - babel-helper-is-void-0 "^0.1.1" - -babel-plugin-minify-guarded-expressions@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/babel-plugin-minify-guarded-expressions/-/babel-plugin-minify-guarded-expressions-0.1.2.tgz#dfc3d473b0362d9605d3ce0ac1e22328c60d1007" - integrity sha1-38PUc7A2LZYF084KweIjKMYNEAc= - dependencies: - babel-helper-flip-expressions "^0.1.2" - -babel-plugin-minify-infinity@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/babel-plugin-minify-infinity/-/babel-plugin-minify-infinity-0.1.2.tgz#5f1cf67ddedcba13c8a00da832542df0091a1cd4" - integrity sha1-Xxz2fd7cuhPIoA2oMlQt8AkaHNQ= - -babel-plugin-minify-mangle-names@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/babel-plugin-minify-mangle-names/-/babel-plugin-minify-mangle-names-0.1.3.tgz#bfa24661a6794fb03833587e55828b65449e06fe" - integrity sha1-v6JGYaZ5T7A4M1h+VYKLZUSeBv4= - dependencies: - babel-helper-mark-eval-scopes "^0.1.1" - -babel-plugin-minify-numeric-literals@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/babel-plugin-minify-numeric-literals/-/babel-plugin-minify-numeric-literals-0.1.1.tgz#d4b8b0c925f874714ee33ee4b26678583d7ce7fb" - integrity sha1-1LiwySX4dHFO4z7ksmZ4WD185/s= - -babel-plugin-minify-replace@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/babel-plugin-minify-replace/-/babel-plugin-minify-replace-0.1.2.tgz#b90b9e71ab4d3b36325629a91beabe13b0b16ac1" - integrity sha1-uQuecatNOzYyVimpG+q+E7CxasE= - -babel-plugin-minify-simplify@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/babel-plugin-minify-simplify/-/babel-plugin-minify-simplify-0.1.2.tgz#a968f1658fdeb2fc759e81fe331d89829df0f6b9" - integrity sha1-qWjxZY/esvx1noH+Mx2Jgp3w9rk= - dependencies: - babel-helper-flip-expressions "^0.1.2" - babel-helper-is-nodes-equiv "^0.0.1" - babel-helper-to-multiple-sequence-expressions "^0.1.1" - -babel-plugin-minify-type-constructors@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/babel-plugin-minify-type-constructors/-/babel-plugin-minify-type-constructors-0.1.2.tgz#db53c5b76cb8e2fcd45d862f17104c78761337ee" - integrity sha1-21PFt2y44vzUXYYvFxBMeHYTN+4= - dependencies: - babel-helper-is-void-0 "^0.1.1" - -babel-plugin-transform-inline-consecutive-adds@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-inline-consecutive-adds/-/babel-plugin-transform-inline-consecutive-adds-0.1.2.tgz#5442e9f1c19c78a7899f8a4dee6fd481f61001f5" - integrity sha1-VELp8cGceKeJn4pN7m/UgfYQAfU= - -babel-plugin-transform-member-expression-literals@^6.8.4: - version "6.9.4" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-member-expression-literals/-/babel-plugin-transform-member-expression-literals-6.9.4.tgz#37039c9a0c3313a39495faac2ff3a6b5b9d038bf" - integrity sha1-NwOcmgwzE6OUlfqsL/OmtbnQOL8= - -babel-plugin-transform-merge-sibling-variables@^6.8.5: - version "6.9.4" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-merge-sibling-variables/-/babel-plugin-transform-merge-sibling-variables-6.9.4.tgz#85b422fc3377b449c9d1cde44087203532401dae" - integrity sha1-hbQi/DN3tEnJ0c3kQIcgNTJAHa4= - -babel-plugin-transform-minify-booleans@^6.8.2: - version "6.9.4" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-minify-booleans/-/babel-plugin-transform-minify-booleans-6.9.4.tgz#acbb3e56a3555dd23928e4b582d285162dd2b198" - integrity sha1-rLs+VqNVXdI5KOS1gtKFFi3SsZg= - -babel-plugin-transform-property-literals@^6.8.4: - version "6.9.4" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-property-literals/-/babel-plugin-transform-property-literals-6.9.4.tgz#98c1d21e255736573f93ece54459f6ce24985d39" - integrity sha1-mMHSHiVXNlc/k+zlRFn2ziSYXTk= - dependencies: - esutils "^2.0.2" - -babel-plugin-transform-regexp-constructors@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-regexp-constructors/-/babel-plugin-transform-regexp-constructors-0.1.1.tgz#312ab7487cc88a1c62ee25ea1b6087e89b87799c" - integrity sha1-MSq3SHzIihxi7iXqG2CH6JuHeZw= - -babel-plugin-transform-remove-console@^6.8.4: - version "6.9.4" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-remove-console/-/babel-plugin-transform-remove-console-6.9.4.tgz#b980360c067384e24b357a588d807d3c83527780" - integrity sha1-uYA2DAZzhOJLNXpYjYB9PINSd4A= - -babel-plugin-transform-remove-debugger@^6.8.4: - version "6.9.4" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-remove-debugger/-/babel-plugin-transform-remove-debugger-6.9.4.tgz#42b727631c97978e1eb2d199a7aec84a18339ef2" - integrity sha1-QrcnYxyXl44estGZp67IShgznvI= - -babel-plugin-transform-remove-undefined@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-remove-undefined/-/babel-plugin-transform-remove-undefined-0.1.2.tgz#e1ebf51110f6b1e0665f28382ef73f95e5023652" - integrity sha1-4ev1ERD2seBmXyg4Lvc/leUCNlI= - -babel-plugin-transform-simplify-comparison-operators@^6.8.4: - version "6.9.4" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-simplify-comparison-operators/-/babel-plugin-transform-simplify-comparison-operators-6.9.4.tgz#f62afe096cab0e1f68a2d753fdf283888471ceb9" - integrity sha1-9ir+CWyrDh9ootdT/fKDiIRxzrk= - -babel-plugin-transform-undefined-to-void@^6.8.2: - version "6.9.4" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-undefined-to-void/-/babel-plugin-transform-undefined-to-void-6.9.4.tgz#be241ca81404030678b748717322b89d0c8fe280" - integrity sha1-viQcqBQEAwZ4t0hxcyK4nQyP4oA= - -babel-preset-babili@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/babel-preset-babili/-/babel-preset-babili-0.1.4.tgz#ad9d6651002f5bc3f07cab300781167f54724bf2" - integrity sha1-rZ1mUQAvW8PwfKswB4EWf1RyS/I= - dependencies: - babel-plugin-minify-builtins "^0.1.3" - babel-plugin-minify-constant-folding "^0.1.3" - babel-plugin-minify-dead-code-elimination "^0.1.7" - babel-plugin-minify-flip-comparisons "^0.1.2" - babel-plugin-minify-guarded-expressions "^0.1.2" - babel-plugin-minify-infinity "^0.1.2" - babel-plugin-minify-mangle-names "^0.1.3" - babel-plugin-minify-numeric-literals "^0.1.1" - babel-plugin-minify-replace "^0.1.2" - babel-plugin-minify-simplify "^0.1.2" - babel-plugin-minify-type-constructors "^0.1.2" - babel-plugin-transform-inline-consecutive-adds "^0.1.2" - babel-plugin-transform-member-expression-literals "^6.8.4" - babel-plugin-transform-merge-sibling-variables "^6.8.5" - babel-plugin-transform-minify-booleans "^6.8.2" - babel-plugin-transform-property-literals "^6.8.4" - babel-plugin-transform-regexp-constructors "^0.1.1" - babel-plugin-transform-remove-console "^6.8.4" - babel-plugin-transform-remove-debugger "^6.8.4" - babel-plugin-transform-remove-undefined "^0.1.2" - babel-plugin-transform-simplify-comparison-operators "^6.8.4" - babel-plugin-transform-undefined-to-void "^6.8.2" - lodash.isplainobject "^4.0.6" - -babel-register@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071" - integrity sha1-btAhFz4vy0htestFxgCahW9kcHE= - dependencies: - babel-core "^6.26.0" - babel-runtime "^6.26.0" - core-js "^2.5.0" - home-or-tmp "^2.0.0" - lodash "^4.17.4" - mkdirp "^0.5.1" - source-map-support "^0.4.15" - -babel-runtime@^6.22.0, babel-runtime@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" - integrity sha1-llxwWGaOgrVde/4E/yM3vItWR/4= - dependencies: - core-js "^2.4.0" - regenerator-runtime "^0.11.0" - -babel-template@^6.24.1, babel-template@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" - integrity sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI= - dependencies: - 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@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" - integrity sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4= - dependencies: - 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-types@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" - integrity sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc= - dependencies: - babel-runtime "^6.26.0" - esutils "^2.0.2" - lodash "^4.17.4" - to-fast-properties "^1.0.3" - -babili-webpack-plugin@^0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/babili-webpack-plugin/-/babili-webpack-plugin-0.1.2.tgz#164ac03d5932f6a52143e7ffc06f2711c651b6f2" - integrity sha1-FkrAPVky9qUhQ+f/wG8nEcZRtvI= - dependencies: - babel-core "^6.24.1" - babel-preset-babili "^0.1.4" - webpack-sources "^1.0.1" - -babylon@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" - integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ== - -balanced-match@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" - integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= - -base64-js@^1.0.2: - version "1.3.0" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.0.tgz#cab1e6118f051095e58b5281aea8c1cd22bfc0e3" - integrity sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw== - -base@^0.11.1: - version "0.11.2" - resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" - integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== - dependencies: - cache-base "^1.0.1" - class-utils "^0.3.5" - component-emitter "^1.2.1" - define-property "^1.0.0" - isobject "^3.0.1" - mixin-deep "^1.2.0" - pascalcase "^0.1.1" - -basic-auth@~2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/basic-auth/-/basic-auth-2.0.1.tgz#b998279bf47ce38344b4f3cf916d4679bbf51e3a" - integrity sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg== - dependencies: - safe-buffer "5.1.2" - -batch@0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/batch/-/batch-0.6.1.tgz#dc34314f4e679318093fc760272525f94bf25c16" - integrity sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY= - -bcrypt-pbkdf@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" - integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= - dependencies: - tweetnacl "^0.14.3" - -benchmark@^2.1.2: - version "2.1.4" - resolved "https://registry.yarnpkg.com/benchmark/-/benchmark-2.1.4.tgz#09f3de31c916425d498cc2ee565a0ebf3c2a5629" - integrity sha1-CfPeMckWQl1JjMLuVloOvzwqVik= - dependencies: - lodash "^4.17.4" - platform "^1.3.3" - -big.js@^3.1.3: - version "3.2.0" - resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.2.0.tgz#a5fc298b81b9e0dca2e458824784b65c52ba588e" - integrity sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q== - -binary-extensions@^1.0.0: - version "1.13.1" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" - integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw== - -bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: - version "4.11.8" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" - integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA== - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -braces@^2.3.1, braces@^2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" - integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== - dependencies: - arr-flatten "^1.1.0" - array-unique "^0.3.2" - extend-shallow "^2.0.1" - fill-range "^4.0.0" - isobject "^3.0.1" - repeat-element "^1.1.2" - snapdragon "^0.8.1" - snapdragon-node "^2.0.1" - split-string "^3.0.2" - to-regex "^3.0.1" - -brorand@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" - integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= - -browserify-aes@^1.0.0, browserify-aes@^1.0.4: - version "1.2.0" - resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" - integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== - dependencies: - buffer-xor "^1.0.3" - cipher-base "^1.0.0" - create-hash "^1.1.0" - evp_bytestokey "^1.0.3" - inherits "^2.0.1" - safe-buffer "^5.0.1" - -browserify-cipher@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.1.tgz#8d6474c1b870bfdabcd3bcfcc1934a10e94f15f0" - integrity sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w== - dependencies: - browserify-aes "^1.0.4" - browserify-des "^1.0.0" - evp_bytestokey "^1.0.0" - -browserify-des@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.2.tgz#3af4f1f59839403572f1c66204375f7a7f703e9c" - integrity sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A== - dependencies: - cipher-base "^1.0.1" - des.js "^1.0.0" - inherits "^2.0.1" - safe-buffer "^5.1.2" - -browserify-rsa@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" - integrity sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ= - dependencies: - bn.js "^4.1.0" - randombytes "^2.0.1" - -browserify-sign@^4.0.0: - version "4.0.4" - resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.0.4.tgz#aa4eb68e5d7b658baa6bf6a57e630cbd7a93d298" - integrity sha1-qk62jl17ZYuqa/alfmMMvXqT0pg= - dependencies: - bn.js "^4.1.1" - browserify-rsa "^4.0.0" - create-hash "^1.1.0" - create-hmac "^1.1.2" - elliptic "^6.0.0" - inherits "^2.0.1" - parse-asn1 "^5.0.0" - -browserify-zlib@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.2.0.tgz#2869459d9aa3be245fe8fe2ca1f46e2e7f54d73f" - integrity sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA== - dependencies: - pako "~1.0.5" - -buffer-xor@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" - integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= - -buffer@^4.3.0: - version "4.9.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298" - integrity sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg= - dependencies: - base64-js "^1.0.2" - ieee754 "^1.1.4" - isarray "^1.0.0" - -builtin-status-codes@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" - integrity sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug= - -cache-base@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" - integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== - dependencies: - collection-visit "^1.0.0" - component-emitter "^1.2.1" - get-value "^2.0.6" - has-value "^1.0.0" - isobject "^3.0.1" - set-value "^2.0.0" - to-object-path "^0.3.0" - union-value "^1.0.0" - unset-value "^1.0.0" - -camelcase-keys@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7" - integrity sha1-MIvur/3ygRkFHvodkyITyRuPkuc= - dependencies: - camelcase "^2.0.0" - map-obj "^1.0.0" - -camelcase@^1.0.2: - version "1.2.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" - integrity sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk= - -camelcase@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" - integrity sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8= - -camelcase@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" - integrity sha1-MvxLn82vhF/N9+c7uXysImHwqwo= - -caseless@~0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" - integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= - -center-align@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" - integrity sha1-qg0yYptu6XIgBBHL1EYckHvCt60= - dependencies: - align-text "^0.1.3" - lazy-cache "^1.0.3" - -chalk@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" - integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= - dependencies: - 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" - -chalk@~2.4.1: - version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" - integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -chokidar@^2.0.2: - version "2.1.5" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.5.tgz#0ae8434d962281a5f56c72869e79cb6d9d86ad4d" - integrity sha512-i0TprVWp+Kj4WRPtInjexJ8Q+BqTE909VpH8xVhXrJkoc5QC8VO9TryGOqTr+2hljzc1sC62t22h5tZePodM/A== - dependencies: - anymatch "^2.0.0" - async-each "^1.0.1" - braces "^2.3.2" - glob-parent "^3.1.0" - inherits "^2.0.3" - is-binary-path "^1.0.0" - is-glob "^4.0.0" - normalize-path "^3.0.0" - path-is-absolute "^1.0.0" - readdirp "^2.2.1" - upath "^1.1.1" - optionalDependencies: - fsevents "^1.2.7" - -chownr@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.1.tgz#54726b8b8fff4df053c42187e801fb4412df1494" - integrity sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g== - -cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" - integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -class-utils@^0.3.5: - version "0.3.6" - resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" - integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== - dependencies: - arr-union "^3.1.0" - define-property "^0.2.5" - isobject "^3.0.0" - static-extend "^0.1.1" - -cliui@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" - integrity sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE= - dependencies: - center-align "^0.1.1" - right-align "^0.1.1" - wordwrap "0.0.2" - -cliui@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" - integrity sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0= - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - wrap-ansi "^2.0.0" - -co@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" - integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ= - -code-point-at@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" - integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= - -coffeescript@~1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/coffeescript/-/coffeescript-1.10.0.tgz#e7aa8301917ef621b35d8a39f348dcdd1db7e33e" - integrity sha1-56qDAZF+9iGzXYo580jc3R234z4= - -collection-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" - integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA= - dependencies: - map-visit "^1.0.0" - object-visit "^1.0.0" - -color-convert@^1.9.0: - version "1.9.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - dependencies: - color-name "1.1.3" - -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= - -colors@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" - integrity sha1-FopHAXVran9RoSzgyXv6KMCE7WM= - -combined-stream@^1.0.6, combined-stream@~1.0.6: - version "1.0.7" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.7.tgz#2d1d24317afb8abe95d6d2c0b07b57813539d828" - integrity sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w== - dependencies: - delayed-stream "~1.0.0" - -component-emitter@^1.2.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" - integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= - -connect-livereload@^0.6.0: - version "0.6.1" - resolved "https://registry.yarnpkg.com/connect-livereload/-/connect-livereload-0.6.1.tgz#1ac0c8bb9d9cfd5b28b629987a56a9239db9baaa" - integrity sha512-3R0kMOdL7CjJpU66fzAkCe6HNtd3AavCS4m+uW4KtJjrdGPT0SQEZieAYd+cm+lJoBznNQ4lqipYWkhBMgk00g== - -connect@^3.6.6: - version "3.6.6" - resolved "https://registry.yarnpkg.com/connect/-/connect-3.6.6.tgz#09eff6c55af7236e137135a72574858b6786f524" - integrity sha1-Ce/2xVr3I24TcTWnJXSFi2eG9SQ= - dependencies: - debug "2.6.9" - finalhandler "1.1.0" - parseurl "~1.3.2" - utils-merge "1.0.1" - -console-browserify@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" - integrity sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA= - dependencies: - date-now "^0.1.4" - -console-control-strings@^1.0.0, console-control-strings@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" - integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= - -constants-browserify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" - integrity sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U= - -content-type-parser@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/content-type-parser/-/content-type-parser-1.0.2.tgz#caabe80623e63638b2502fd4c7f12ff4ce2352e7" - integrity sha512-lM4l4CnMEwOLHAHr/P6MEZwZFPJFtAAKgL6pogbXmVZggIqXhdB6RbBtPOTsw2FcXwYhehRGERJmRrjOiIB8pQ== - -convert-source-map@^1.5.1: - version "1.6.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.6.0.tgz#51b537a8c43e0f04dec1993bffcdd504e758ac20" - integrity sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A== - dependencies: - safe-buffer "~5.1.1" - -copy-descriptor@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" - integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= - -core-js@^2.4.0, core-js@^2.5.0: - version "2.6.5" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.5.tgz#44bc8d249e7fb2ff5d00e0341a7ffb94fbf67895" - integrity sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A== - -core-util-is@1.0.2, core-util-is@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= - -create-ecdh@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.3.tgz#c9111b6f33045c4697f144787f9254cdc77c45ff" - integrity sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw== - dependencies: - bn.js "^4.1.0" - elliptic "^6.0.0" - -create-hash@^1.1.0, create-hash@^1.1.2: - version "1.2.0" - resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" - integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== - dependencies: - cipher-base "^1.0.1" - inherits "^2.0.1" - md5.js "^1.3.4" - ripemd160 "^2.0.1" - sha.js "^2.4.0" - -create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4: - version "1.1.7" - resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" - integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== - dependencies: - cipher-base "^1.0.3" - create-hash "^1.1.0" - inherits "^2.0.1" - ripemd160 "^2.0.0" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - -crypto-browserify@^3.11.0: - version "3.12.0" - resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" - integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg== - dependencies: - browserify-cipher "^1.0.0" - browserify-sign "^4.0.0" - create-ecdh "^4.0.0" - create-hash "^1.1.0" - create-hmac "^1.1.0" - diffie-hellman "^5.0.0" - inherits "^2.0.1" - pbkdf2 "^3.0.3" - public-encrypt "^4.0.0" - randombytes "^2.0.0" - randomfill "^1.0.3" - -cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0": - version "0.3.6" - resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.6.tgz#f85206cee04efa841f3c5982a74ba96ab20d65ad" - integrity sha512-DtUeseGk9/GBW0hl0vVPpU22iHL6YB5BUX7ml1hB+GMpo0NX5G4voX3kdWiMSEguFtcW3Vh3djqNF4aIe6ne0A== - -"cssstyle@>= 0.2.37 < 0.3.0": - version "0.2.37" - resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-0.2.37.tgz#541097234cb2513c83ceed3acddc27ff27987d54" - integrity sha1-VBCXI0yyUTyDzu06zdwn/yeYfVQ= - dependencies: - cssom "0.3.x" - -currently-unhandled@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" - integrity sha1-mI3zP+qxke95mmE2nddsF635V+o= - dependencies: - array-find-index "^1.0.1" - -dashdash@^1.12.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" - integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= - dependencies: - assert-plus "^1.0.0" - -date-now@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" - integrity sha1-6vQ5/U1ISK105cx9vvIAZyueNFs= - -dateformat@~1.0.12: - version "1.0.12" - resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-1.0.12.tgz#9f124b67594c937ff706932e4a642cca8dbbfee9" - integrity sha1-nxJLZ1lMk3/3BpMuSmQsyo27/uk= - dependencies: - get-stdin "^4.0.1" - meow "^3.3.0" - -debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - -debug@^3.1.0: - version "3.2.6" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" - integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== - dependencies: - ms "^2.1.1" - -debug@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" - integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== - dependencies: - ms "^2.1.1" - -decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2: - version "1.2.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" - integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= - -decode-uri-component@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" - integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= - -deep-equal@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5" - integrity sha1-9dJgKStmDghO/0zbyfCK0yR0SLU= - -deep-extend@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" - integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== - -deep-is@~0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" - integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= - -define-property@^0.2.5: - version "0.2.5" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" - integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= - dependencies: - is-descriptor "^0.1.0" - -define-property@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" - integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY= - dependencies: - is-descriptor "^1.0.0" - -define-property@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" - integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== - dependencies: - is-descriptor "^1.0.2" - isobject "^3.0.1" - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= - -delegates@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" - integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= - -depd@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" - integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= - -des.js@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.0.tgz#c074d2e2aa6a8a9a07dbd61f9a15c2cd83ec8ecc" - integrity sha1-wHTS4qpqipoH29YfmhXCzYPsjsw= - dependencies: - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - -destroy@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" - integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= - -detect-indent@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" - integrity sha1-920GQ1LN9Docts5hnE7jqUdd4gg= - dependencies: - repeating "^2.0.0" - -detect-libc@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" - integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= - -diffie-hellman@^5.0.0: - version "5.0.3" - resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" - integrity sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg== - dependencies: - bn.js "^4.1.0" - miller-rabin "^4.0.0" - randombytes "^2.0.0" - -domain-browser@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" - integrity sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA== - -duplexify@^3.5.1: - version "3.7.1" - resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.7.1.tgz#2a4df5317f6ccfd91f86d6fd25d8d8a103b88309" - integrity sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g== - dependencies: - end-of-stream "^1.0.0" - inherits "^2.0.1" - readable-stream "^2.0.0" - stream-shift "^1.0.0" - -ecc-jsbn@~0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" - integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= - dependencies: - jsbn "~0.1.0" - safer-buffer "^2.1.0" - -ee-first@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" - integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= - -elliptic@^6.0.0: - version "6.4.1" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.1.tgz#c2d0b7776911b86722c632c3c06c60f2f819939a" - integrity sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ== - dependencies: - bn.js "^4.4.0" - brorand "^1.0.1" - hash.js "^1.0.0" - hmac-drbg "^1.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.0" - -emojis-list@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" - integrity sha1-TapNnbAPmBmIDHn6RXrlsJof04k= - -encodeurl@~1.0.1, encodeurl@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" - integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= - -end-of-stream@^1.0.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.1.tgz#ed29634d19baba463b6ce6b80a37213eab71ec43" - integrity sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q== - dependencies: - once "^1.4.0" - -enhanced-resolve@^3.3.0: - version "3.4.1" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-3.4.1.tgz#0421e339fd71419b3da13d129b3979040230476e" - integrity sha1-BCHjOf1xQZs9oT0Smzl5BAIwR24= - dependencies: - graceful-fs "^4.1.2" - memory-fs "^0.4.0" - object-assign "^4.0.1" - tapable "^0.2.7" - -errno@^0.1.3: - version "0.1.7" - resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618" - integrity sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg== - dependencies: - prr "~1.0.1" - -error-ex@^1.2.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" - integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== - dependencies: - is-arrayish "^0.2.1" - -es6-promise@^4.0.3: - version "4.2.6" - resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.6.tgz#b685edd8258886365ea62b57d30de28fadcd974f" - integrity sha512-aRVgGdnmW2OiySVPUC9e6m+plolMAJKjZnQlCwNSuK5yQ0JN61DZSO1X1Ufd1foqWRAlig0rhduTCHe7sVtK5Q== - -es6-promisify@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" - integrity sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM= - dependencies: - es6-promise "^4.0.3" - -escape-html@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" - integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= - -escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= - -escodegen@^1.6.1: - version "1.11.1" - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.11.1.tgz#c485ff8d6b4cdb89e27f4a856e91f118401ca510" - integrity sha512-JwiqFD9KdGVVpeuRa68yU3zZnBEOcPs0nKW7wZzXky8Z7tffdYUHbe11bPCV5jYlK6DVdKLWLm0f5I/QlL0Kmw== - dependencies: - esprima "^3.1.3" - estraverse "^4.2.0" - esutils "^2.0.2" - optionator "^0.8.1" - optionalDependencies: - source-map "~0.6.1" - -esprima@^3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" - integrity sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM= - -esprima@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" - integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== - -estraverse@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" - integrity sha1-De4/7TH81GlhjOc0IJn8GvoL2xM= - -esutils@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" - integrity sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs= - -etag@~1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" - integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= - -eventemitter2@~0.4.13: - version "0.4.14" - resolved "https://registry.yarnpkg.com/eventemitter2/-/eventemitter2-0.4.14.tgz#8f61b75cde012b2e9eb284d4545583b5643b61ab" - integrity sha1-j2G3XN4BKy6esoTUVFWDtWQ7Yas= - -events@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924" - integrity sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ= - -events@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/events/-/events-3.0.0.tgz#9a0a0dfaf62893d92b875b8f2698ca4114973e88" - integrity sha512-Dc381HFWJzEOhQ+d8pkNon++bk9h6cdAoAj4iE6Q4y6xgTzySWXlKn05/TVNpjnfRqi/X0EpJEJohPjNI3zpVA== - -evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" - integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== - dependencies: - md5.js "^1.3.4" - safe-buffer "^5.1.1" - -exit@^0.1.2, exit@~0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" - integrity sha1-BjJjj42HfMghB9MKD/8aF8uhzQw= - -expand-brackets@^2.1.4: - version "2.1.4" - resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" - integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI= - dependencies: - debug "^2.3.3" - define-property "^0.2.5" - extend-shallow "^2.0.1" - posix-character-classes "^0.1.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -extend-shallow@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" - integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= - dependencies: - is-extendable "^0.1.0" - -extend-shallow@^3.0.0, extend-shallow@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" - integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg= - dependencies: - assign-symbols "^1.0.0" - is-extendable "^1.0.1" - -extend@^3.0.0, extend@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" - integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== - -extglob@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" - integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== - dependencies: - array-unique "^0.3.2" - define-property "^1.0.0" - expand-brackets "^2.1.4" - extend-shallow "^2.0.1" - fragment-cache "^0.2.1" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -extsprintf@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" - integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= - -extsprintf@^1.2.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" - integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= - -fast-deep-equal@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" - integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk= - -fast-json-stable-stringify@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" - integrity sha1-1RQsDK7msRifh9OnYREGT4bIu/I= - -fast-levenshtein@~2.0.4: - version "2.0.6" - resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" - integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= - -fg-lodash@0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/fg-lodash/-/fg-lodash-0.0.2.tgz#988352537f427da6af222129bb63acca49e62fa3" - integrity sha1-mINSU39CfaavIiEpu2OsyknmL6M= - dependencies: - lodash "^2.4.1" - underscore.string "~2.3.3" - -fill-range@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" - integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= - dependencies: - extend-shallow "^2.0.1" - is-number "^3.0.0" - repeat-string "^1.6.1" - to-regex-range "^2.1.0" - -finalhandler@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.0.tgz#ce0b6855b45853e791b2fcc680046d88253dd7f5" - integrity sha1-zgtoVbRYU+eRsvzGgARtiCU91/U= - dependencies: - debug "2.6.9" - encodeurl "~1.0.1" - escape-html "~1.0.3" - on-finished "~2.3.0" - parseurl "~1.3.2" - statuses "~1.3.1" - unpipe "~1.0.0" - -find-up@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" - integrity sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8= - dependencies: - path-exists "^2.0.0" - pinkie-promise "^2.0.0" - -findup-sync@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-0.3.0.tgz#37930aa5d816b777c03445e1966cc6790a4c0b16" - integrity sha1-N5MKpdgWt3fANEXhlmzGeQpMCxY= - dependencies: - glob "~5.0.0" - -for-in@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" - integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= - -forever-agent@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" - integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= - -form-data@~2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" - integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.6" - mime-types "^2.1.12" - -fragment-cache@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" - integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk= - dependencies: - map-cache "^0.2.2" - -fresh@0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" - integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= - -fs-minipass@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.5.tgz#06c277218454ec288df77ada54a03b8702aacb9d" - integrity sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ== - dependencies: - minipass "^2.2.1" - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= - -fsevents@^1.2.7: - version "1.2.9" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.9.tgz#3f5ed66583ccd6f400b5a00db6f7e861363e388f" - integrity sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw== - dependencies: - nan "^2.12.1" - node-pre-gyp "^0.12.0" - -gauge@~2.7.3: - version "2.7.4" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" - integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c= - dependencies: - aproba "^1.0.3" - console-control-strings "^1.0.0" - has-unicode "^2.0.0" - object-assign "^4.1.0" - signal-exit "^3.0.0" - string-width "^1.0.1" - strip-ansi "^3.0.1" - wide-align "^1.1.0" - -get-caller-file@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" - integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== - -get-stdin@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" - integrity sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4= - -get-value@^2.0.3, get-value@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" - integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= - -getobject@~0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/getobject/-/getobject-0.1.0.tgz#047a449789fa160d018f5486ed91320b6ec7885c" - integrity sha1-BHpEl4n6Fg0Bj1SG7ZEyC27HiFw= - -getpass@^0.1.1: - version "0.1.7" - resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" - integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= - dependencies: - assert-plus "^1.0.0" - -glob-parent@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" - integrity sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4= - dependencies: - is-glob "^3.1.0" - path-dirname "^1.0.0" - -glob@^7.0.6, glob@^7.1.3: - version "7.1.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" - integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== - dependencies: - 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" - -glob@~5.0.0: - version "5.0.15" - resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" - integrity sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E= - dependencies: - inflight "^1.0.4" - inherits "2" - minimatch "2 || 3" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@~7.0.0: - version "7.0.6" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.0.6.tgz#211bafaf49e525b8cd93260d14ab136152b3f57a" - integrity sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo= - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.2" - once "^1.3.0" - path-is-absolute "^1.0.0" - -globals@^9.18.0: - version "9.18.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" - integrity sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ== - -graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6: - version "4.1.15" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00" - integrity sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA== - -grunt-cli@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/grunt-cli/-/grunt-cli-1.2.0.tgz#562b119ebb069ddb464ace2845501be97b35b6a8" - integrity sha1-VisRnrsGndtGSs4oRVAb6Xs1tqg= - dependencies: - findup-sync "~0.3.0" - grunt-known-options "~1.1.0" - nopt "~3.0.6" - resolve "~1.1.0" - -grunt-contrib-connect@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/grunt-contrib-connect/-/grunt-contrib-connect-2.0.0.tgz#7ee86838f351f72c12186143ebc60823d8d524dd" - integrity sha512-JVjM9UDP84WbT2S7swkyuwPuxFtT+zry/RUBuP3IT8LZPEQjtzzMwiM+qimswNKQ9plh5WhcFWaaqz2ruB9/DA== - dependencies: - async "^2.6.1" - connect "^3.6.6" - connect-livereload "^0.6.0" - morgan "^1.9.0" - node-http2 "^4.0.1" - opn "^5.3.0" - portscanner "^2.2.0" - serve-index "^1.9.1" - serve-static "^1.13.2" - -grunt-known-options@~1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/grunt-known-options/-/grunt-known-options-1.1.1.tgz#6cc088107bd0219dc5d3e57d91923f469059804d" - integrity sha512-cHwsLqoighpu7TuYj5RonnEuxGVFnztcUqTqp5rXFGYL4OuPFofwC4Ycg7n9fYwvK6F5WbYgeVOwph9Crs2fsQ== - -grunt-legacy-log-utils@~2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/grunt-legacy-log-utils/-/grunt-legacy-log-utils-2.0.1.tgz#d2f442c7c0150065d9004b08fd7410d37519194e" - integrity sha512-o7uHyO/J+i2tXG8r2bZNlVk20vlIFJ9IEYyHMCQGfWYru8Jv3wTqKZzvV30YW9rWEjq0eP3cflQ1qWojIe9VFA== - dependencies: - chalk "~2.4.1" - lodash "~4.17.10" - -grunt-legacy-log@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/grunt-legacy-log/-/grunt-legacy-log-2.0.0.tgz#c8cd2c6c81a4465b9bbf2d874d963fef7a59ffb9" - integrity sha512-1m3+5QvDYfR1ltr8hjiaiNjddxGdQWcH0rw1iKKiQnF0+xtgTazirSTGu68RchPyh1OBng1bBUjLmX8q9NpoCw== - dependencies: - colors "~1.1.2" - grunt-legacy-log-utils "~2.0.0" - hooker "~0.2.3" - lodash "~4.17.5" - -grunt-legacy-util@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/grunt-legacy-util/-/grunt-legacy-util-1.1.1.tgz#e10624e7c86034e5b870c8a8616743f0a0845e42" - integrity sha512-9zyA29w/fBe6BIfjGENndwoe1Uy31BIXxTH3s8mga0Z5Bz2Sp4UCjkeyv2tI449ymkx3x26B+46FV4fXEddl5A== - dependencies: - async "~1.5.2" - exit "~0.1.1" - getobject "~0.1.0" - hooker "~0.2.3" - lodash "~4.17.10" - underscore.string "~3.3.4" - which "~1.3.0" - -grunt-saucelabs@^9.0.1: - version "9.0.1" - resolved "https://registry.yarnpkg.com/grunt-saucelabs/-/grunt-saucelabs-9.0.1.tgz#b9bfa6fe3780f81f1402de057a1360d148e77a0c" - integrity sha512-3WD5/RtSp8AyEnmtN5HK1NUkU7o/kBl6rGQILnfg7WHTe0g0uG3LtecWPwTRYrD7kop79WkDfeVQ85WjvwDUZw== - dependencies: - colors "~1.1.2" - lodash "^4.17.11" - q "~1.4.1" - requestretry "~1.9.0" - sauce-tunnel "~2.5.0" - saucelabs "^1.5.0" - -grunt@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/grunt/-/grunt-1.0.4.tgz#c799883945a53a3d07622e0737c8f70bfe19eb38" - integrity sha512-PYsMOrOC+MsdGEkFVwMaMyc6Ob7pKmq+deg1Sjr+vvMWp35sztfwKE7qoN51V+UEtHsyNuMcGdgMLFkBHvMxHQ== - dependencies: - coffeescript "~1.10.0" - dateformat "~1.0.12" - eventemitter2 "~0.4.13" - exit "~0.1.1" - findup-sync "~0.3.0" - glob "~7.0.0" - grunt-cli "~1.2.0" - grunt-known-options "~1.1.0" - grunt-legacy-log "~2.0.0" - grunt-legacy-util "~1.1.1" - iconv-lite "~0.4.13" - js-yaml "~3.13.0" - minimatch "~3.0.2" - mkdirp "~0.5.1" - nopt "~3.0.6" - path-is-absolute "~1.0.0" - rimraf "~2.6.2" - -har-schema@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" - integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= - -har-validator@~5.1.0: - version "5.1.3" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.3.tgz#1ef89ebd3e4996557675eed9893110dc350fa080" - integrity sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g== - dependencies: - ajv "^6.5.5" - har-schema "^2.0.0" - -has-ansi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" - integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= - dependencies: - ansi-regex "^2.0.0" - -has-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" - integrity sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo= - -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= - -has-unicode@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" - integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= - -has-value@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" - integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8= - dependencies: - get-value "^2.0.3" - has-values "^0.1.4" - isobject "^2.0.0" - -has-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" - integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc= - dependencies: - get-value "^2.0.6" - has-values "^1.0.0" - isobject "^3.0.0" - -has-values@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" - integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E= - -has-values@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" - integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8= - dependencies: - is-number "^3.0.0" - kind-of "^4.0.0" - -hash-base@^3.0.0: - version "3.0.4" - resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918" - integrity sha1-X8hoaEfs1zSZQDMZprCj8/auSRg= - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -hash.js@^1.0.0, hash.js@^1.0.3: - version "1.1.7" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" - integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== - dependencies: - inherits "^2.0.3" - minimalistic-assert "^1.0.1" - -hmac-drbg@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" - integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= - dependencies: - hash.js "^1.0.3" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.1" - -home-or-tmp@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" - integrity sha1-42w/LSyufXRqhX440Y1fMqeILbg= - dependencies: - os-homedir "^1.0.0" - os-tmpdir "^1.0.1" - -hooker@~0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/hooker/-/hooker-0.2.3.tgz#b834f723cc4a242aa65963459df6d984c5d3d959" - integrity sha1-uDT3I8xKJCqmWWNFnfbZhMXT2Vk= - -hosted-git-info@^2.1.4: - version "2.7.1" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047" - integrity sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w== - -html-encoding-sniffer@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz#e70d84b94da53aa375e11fe3a351be6642ca46f8" - integrity sha512-71lZziiDnsuabfdYiUeWdCVyKuqwWi23L8YeIgV9jSSZHCtb6wB1BKWooH7L3tn4/FuZJMVWyNaIDr4RGmaSYw== - dependencies: - whatwg-encoding "^1.0.1" - -http-errors@~1.6.2: - version "1.6.3" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d" - integrity sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0= - dependencies: - depd "~1.1.2" - inherits "2.0.3" - setprototypeof "1.1.0" - statuses ">= 1.4.0 < 2" - -http-signature@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" - integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= - dependencies: - assert-plus "^1.0.0" - jsprim "^1.2.2" - sshpk "^1.7.0" - -https-browserify@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-0.0.1.tgz#3f91365cabe60b77ed0ebba24b454e3e09d95a82" - integrity sha1-P5E2XKvmC3ftDruiS0VOPgnZWoI= - -https-browserify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" - integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= - -https-proxy-agent@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz#51552970fa04d723e04c56d04178c3f92592bbc0" - integrity sha512-HPCTS1LW51bcyMYbxUIOO4HEOlQ1/1qRaFWcyxvwaqUS9TY88aoEuHUY33kuAh1YhVVaDQhLZsnPd+XNARWZlQ== - dependencies: - agent-base "^4.1.0" - debug "^3.1.0" - -iconv-lite@0.4.24, iconv-lite@^0.4.4, iconv-lite@~0.4.13: - version "0.4.24" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" - integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== - dependencies: - safer-buffer ">= 2.1.2 < 3" - -ieee754@^1.1.4: - version "1.1.13" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84" - integrity sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg== - -ignore-walk@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.1.tgz#a83e62e7d272ac0e3b551aaa82831a19b69f82f8" - integrity sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ== - dependencies: - minimatch "^3.0.4" - -indent-string@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80" - integrity sha1-ji1INIdCEhtKghi3oTfppSBJ3IA= - dependencies: - repeating "^2.0.0" - -indexof@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" - integrity sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10= - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= - -inherits@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" - integrity sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE= - -ini@~1.3.0: - version "1.3.5" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" - integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== - -interpret@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.2.0.tgz#d5061a6224be58e8083985f5014d844359576296" - integrity sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw== - -invariant@^2.2.2: - version "2.2.4" - resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" - integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== - dependencies: - loose-envify "^1.0.0" - -invert-kv@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" - integrity sha1-EEqOSqym09jNFXqO+L+rLXo//bY= - -is-accessor-descriptor@^0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" - integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= - dependencies: - kind-of "^3.0.2" - -is-accessor-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" - integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== - dependencies: - kind-of "^6.0.0" - -is-arrayish@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" - integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= - -is-binary-path@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" - integrity sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg= - dependencies: - binary-extensions "^1.0.0" - -is-buffer@^1.1.5: - version "1.1.6" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" - integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== - -is-data-descriptor@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" - integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= - dependencies: - kind-of "^3.0.2" - -is-data-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" - integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== - dependencies: - kind-of "^6.0.0" - -is-descriptor@^0.1.0: - version "0.1.6" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" - integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== - dependencies: - is-accessor-descriptor "^0.1.6" - is-data-descriptor "^0.1.4" - kind-of "^5.0.0" - -is-descriptor@^1.0.0, is-descriptor@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" - integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== - dependencies: - is-accessor-descriptor "^1.0.0" - is-data-descriptor "^1.0.0" - kind-of "^6.0.2" - -is-extendable@^0.1.0, is-extendable@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" - integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= - -is-extendable@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" - integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== - dependencies: - is-plain-object "^2.0.4" - -is-extglob@^2.1.0, is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= - -is-finite@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" - integrity sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko= - dependencies: - number-is-nan "^1.0.0" - -is-fullwidth-code-point@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" - integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs= - dependencies: - number-is-nan "^1.0.0" - -is-fullwidth-code-point@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" - integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= - -is-glob@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" - integrity sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo= - dependencies: - is-extglob "^2.1.0" - -is-glob@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" - integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== - dependencies: - is-extglob "^2.1.1" - -is-number-like@^1.0.3: - version "1.0.8" - resolved "https://registry.yarnpkg.com/is-number-like/-/is-number-like-1.0.8.tgz#2e129620b50891042e44e9bbbb30593e75cfbbe3" - integrity sha512-6rZi3ezCyFcn5L71ywzz2bS5b2Igl1En3eTlZlvKjpz1n3IZLAYMbKYAIQgFmEu0GENg92ziU/faEOA/aixjbA== - dependencies: - lodash.isfinite "^3.3.2" - -is-number@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" - integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= - dependencies: - kind-of "^3.0.2" - -is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" - integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== - dependencies: - isobject "^3.0.1" - -is-typedarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" - integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= - -is-utf8@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" - integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= - -is-windows@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" - integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== - -is-wsl@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" - integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0= - -isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= - -isobject@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" - integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= - dependencies: - isarray "1.0.0" - -isobject@^3.0.0, isobject@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" - integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= - -isstream@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" - integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= - -jasmine-core@~2.99.0: - version "2.99.1" - resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-2.99.1.tgz#e6400df1e6b56e130b61c4bcd093daa7f6e8ca15" - integrity sha1-5kAN8ea1bhMLYcS80JPap/boyhU= - -jasmine@^2.99.0: - version "2.99.0" - resolved "https://registry.yarnpkg.com/jasmine/-/jasmine-2.99.0.tgz#8ca72d102e639b867c6489856e0e18a9c7aa42b7" - integrity sha1-jKctEC5jm4Z8ZImFbg4YqceqQrc= - dependencies: - exit "^0.1.2" - glob "^7.0.6" - jasmine-core "~2.99.0" - -"js-tokens@^3.0.0 || ^4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" - integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== - -js-tokens@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" - integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= - -js-yaml@~3.13.0: - version "3.13.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" - integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -jsbn@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" - integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= - -jsdom@^9.5.0: - version "9.12.0" - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-9.12.0.tgz#e8c546fffcb06c00d4833ca84410fed7f8a097d4" - integrity sha1-6MVG//ywbADUgzyoRBD+1/igl9Q= - dependencies: - abab "^1.0.3" - acorn "^4.0.4" - acorn-globals "^3.1.0" - array-equal "^1.0.0" - content-type-parser "^1.0.1" - cssom ">= 0.3.2 < 0.4.0" - cssstyle ">= 0.2.37 < 0.3.0" - escodegen "^1.6.1" - html-encoding-sniffer "^1.0.1" - nwmatcher ">= 1.3.9 < 2.0.0" - parse5 "^1.5.1" - request "^2.79.0" - sax "^1.2.1" - symbol-tree "^3.2.1" - tough-cookie "^2.3.2" - webidl-conversions "^4.0.0" - whatwg-encoding "^1.0.1" - whatwg-url "^4.3.0" - xml-name-validator "^2.0.1" - -jsesc@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" - integrity sha1-RsP+yMGJKxKwgz25vHYiF226s0s= - -json-loader@^0.5.4: - version "0.5.7" - resolved "https://registry.yarnpkg.com/json-loader/-/json-loader-0.5.7.tgz#dca14a70235ff82f0ac9a3abeb60d337a365185d" - integrity sha512-QLPs8Dj7lnf3e3QYS1zkCo+4ZwqOiF9d/nZnYozTISxXWCfNs9yuky5rJw4/W34s7POaNlbZmQGaB5NiXCbP4w== - -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" - integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - -json-schema@0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" - integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= - -json-stable-stringify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" - integrity sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8= - dependencies: - jsonify "~0.0.0" - -json-stringify-safe@~5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" - integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= - -json5@^0.5.0, json5@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" - integrity sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE= - -jsonfile@^2.3.1: - version "2.4.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" - integrity sha1-NzaitCi4e72gzIO1P6PWM6NcKug= - optionalDependencies: - graceful-fs "^4.1.6" - -jsonify@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" - integrity sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM= - -jsprim@^1.2.2: - version "1.4.1" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" - integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= - dependencies: - assert-plus "1.0.0" - extsprintf "1.3.0" - json-schema "0.2.3" - verror "1.10.0" - -kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: - version "3.2.2" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" - integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= - dependencies: - is-buffer "^1.1.5" - -kind-of@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" - integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc= - dependencies: - is-buffer "^1.1.5" - -kind-of@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" - integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== - -kind-of@^6.0.0, kind-of@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" - integrity sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA== - -lazy-cache@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" - integrity sha1-odePw6UEdMuAhF07O24dpJpEbo4= - -lcid@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" - integrity sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU= - dependencies: - invert-kv "^1.0.0" - -levn@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" - integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= - dependencies: - prelude-ls "~1.1.2" - type-check "~0.3.2" - -load-json-file@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" - integrity sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA= - dependencies: - graceful-fs "^4.1.2" - parse-json "^2.2.0" - pify "^2.0.0" - pinkie-promise "^2.0.0" - strip-bom "^2.0.0" - -loader-runner@^2.3.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.4.0.tgz#ed47066bfe534d7e84c4c7b9998c2a75607d9357" - integrity sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw== - -loader-utils@^0.2.16: - version "0.2.17" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.17.tgz#f86e6374d43205a6e6c60e9196f17c0299bfb348" - integrity sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g= - dependencies: - big.js "^3.1.3" - emojis-list "^2.0.0" - json5 "^0.5.0" - object-assign "^4.0.1" - -lodash.isfinite@^3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/lodash.isfinite/-/lodash.isfinite-3.3.2.tgz#fb89b65a9a80281833f0b7478b3a5104f898ebb3" - integrity sha1-+4m2WpqAKBgz8LdHizpRBPiY67M= - -lodash.isplainobject@^4.0.6: - version "4.0.6" - resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" - integrity sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs= - -lodash.some@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.some/-/lodash.some-4.6.0.tgz#1bb9f314ef6b8baded13b549169b2a945eb68e4d" - integrity sha1-G7nzFO9ri63tE7VJFpsqlF62jk0= - -lodash@^2.4.1: - version "2.4.2" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-2.4.2.tgz#fadd834b9683073da179b3eae6d9c0d15053f73e" - integrity sha1-+t2DS5aDBz2hebPq5tnA0VBT9z4= - -lodash@^4.17.11, lodash@^4.17.4, lodash@~4.17.10, lodash@~4.17.5: - version "4.17.11" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" - integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg== - -longest@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" - integrity sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc= - -loose-envify@^1.0.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" - integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== - dependencies: - js-tokens "^3.0.0 || ^4.0.0" - -loud-rejection@^1.0.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" - integrity sha1-W0b4AUft7leIcPCG0Eghz5mOVR8= - dependencies: - currently-unhandled "^0.4.1" - signal-exit "^3.0.0" - -map-cache@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" - integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= - -map-obj@^1.0.0, map-obj@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" - integrity sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0= - -map-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" - integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= - dependencies: - object-visit "^1.0.0" - -md5.js@^1.3.4: - version "1.3.5" - resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" - integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - safe-buffer "^5.1.2" - -memory-fs@^0.4.0, memory-fs@~0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" - integrity sha1-OpoguEYlI+RHz7x+i7gO1me/xVI= - dependencies: - errno "^0.1.3" - readable-stream "^2.0.1" - -meow@^3.3.0: - version "3.7.0" - resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" - integrity sha1-cstmi0JSKCkKu/qFaJJYcwioAfs= - dependencies: - camelcase-keys "^2.0.0" - decamelize "^1.1.2" - loud-rejection "^1.0.0" - map-obj "^1.0.1" - minimist "^1.1.3" - normalize-package-data "^2.3.4" - object-assign "^4.0.1" - read-pkg-up "^1.0.1" - redent "^1.0.0" - trim-newlines "^1.0.0" - -micromatch@^3.1.10, micromatch@^3.1.4: - version "3.1.10" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" - integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== - dependencies: - arr-diff "^4.0.0" - array-unique "^0.3.2" - braces "^2.3.1" - define-property "^2.0.2" - extend-shallow "^3.0.2" - extglob "^2.0.4" - fragment-cache "^0.2.1" - kind-of "^6.0.2" - nanomatch "^1.2.9" - object.pick "^1.3.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.2" - -miller-rabin@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" - integrity sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA== - dependencies: - bn.js "^4.0.0" - brorand "^1.0.1" - -mime-db@1.40.0: - version "1.40.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.40.0.tgz#a65057e998db090f732a68f6c276d387d4126c32" - integrity sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA== - -mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24: - version "2.1.24" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.24.tgz#b6f8d0b3e951efb77dedeca194cff6d16f676f81" - integrity sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ== - dependencies: - mime-db "1.40.0" - -mime@1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6" - integrity sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ== - -minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" - integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== - -minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" - integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= - -"minimatch@2 || 3", minimatch@^3.0.2, minimatch@^3.0.4, minimatch@~3.0.2: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== - dependencies: - brace-expansion "^1.1.7" - -minimist@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" - integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= - -minimist@^1.1.3, minimist@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" - integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= - -minipass@^2.2.1, minipass@^2.3.4: - version "2.3.5" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.5.tgz#cacebe492022497f656b0f0f51e2682a9ed2d848" - integrity sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA== - dependencies: - safe-buffer "^5.1.2" - yallist "^3.0.0" - -minizlib@^1.1.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.2.1.tgz#dd27ea6136243c7c880684e8672bb3a45fd9b614" - integrity sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA== - dependencies: - minipass "^2.2.1" - -mixin-deep@^1.2.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.1.tgz#a49e7268dce1a0d9698e45326c5626df3543d0fe" - integrity sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ== - dependencies: - for-in "^1.0.2" - is-extendable "^1.0.1" - -mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" - integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= - dependencies: - minimist "0.0.8" - -morgan@^1.9.0: - version "1.9.1" - resolved "https://registry.yarnpkg.com/morgan/-/morgan-1.9.1.tgz#0a8d16734a1d9afbc824b99df87e738e58e2da59" - integrity sha512-HQStPIV4y3afTiCYVxirakhlCfGkI161c76kKFca7Fk1JusM//Qeo1ej2XaMniiNeaZklMVrh3vTtIzpzwbpmA== - dependencies: - basic-auth "~2.0.0" - debug "2.6.9" - depd "~1.1.2" - on-finished "~2.3.0" - on-headers "~1.0.1" - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= - -ms@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" - integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== - -nan@^2.12.1: - version "2.13.2" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.13.2.tgz#f51dc7ae66ba7d5d55e1e6d4d8092e802c9aefe7" - integrity sha512-TghvYc72wlMGMVMluVo9WRJc0mB8KxxF/gZ4YYFy7V2ZQX9l7rgbPg7vjS9mt6U5HXODVFVI2bOduCzwOMv/lw== - -nanomatch@^1.2.9: - version "1.2.13" - resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" - integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== - dependencies: - arr-diff "^4.0.0" - array-unique "^0.3.2" - define-property "^2.0.2" - extend-shallow "^3.0.2" - fragment-cache "^0.2.1" - is-windows "^1.0.2" - kind-of "^6.0.2" - object.pick "^1.3.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -needle@^2.2.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/needle/-/needle-2.3.1.tgz#d272f2f4034afb9c4c9ab1379aabc17fc85c9388" - integrity sha512-CaLXV3W8Vnbps8ZANqDGz7j4x7Yj1LW4TWF/TQuDfj7Cfx4nAPTvw98qgTevtto1oHDrh3pQkaODbqupXlsWTg== - dependencies: - debug "^4.1.0" - iconv-lite "^0.4.4" - sax "^1.2.4" - -negotiator@0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" - integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== - -neo-async@^2.5.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.0.tgz#b9d15e4d71c6762908654b5183ed38b753340835" - integrity sha512-MFh0d/Wa7vkKO3Y3LlacqAEeHK0mckVqzDieUKTT+KGxi+zIpeVsFxymkIiRpbpDziHc290Xr9A1O4Om7otoRA== - -node-http2@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/node-http2/-/node-http2-4.0.1.tgz#164ff53b5dd22c84f0af142b877c5eaeb6809959" - integrity sha1-Fk/1O13SLITwrxQrh3xerraAmVk= - dependencies: - assert "1.4.1" - events "1.1.1" - https-browserify "0.0.1" - setimmediate "^1.0.5" - stream-browserify "2.0.1" - timers-browserify "2.0.2" - url "^0.11.0" - websocket-stream "^5.0.1" - -node-libs-browser@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.2.0.tgz#c72f60d9d46de08a940dedbb25f3ffa2f9bbaa77" - integrity sha512-5MQunG/oyOaBdttrL40dA7bUfPORLRWMUJLQtMg7nluxUvk5XwnLdL9twQHFAjRx/y7mIMkLKT9++qPbbk6BZA== - dependencies: - assert "^1.1.1" - browserify-zlib "^0.2.0" - buffer "^4.3.0" - console-browserify "^1.1.0" - constants-browserify "^1.0.0" - crypto-browserify "^3.11.0" - domain-browser "^1.1.1" - events "^3.0.0" - https-browserify "^1.0.0" - os-browserify "^0.3.0" - path-browserify "0.0.0" - process "^0.11.10" - punycode "^1.2.4" - querystring-es3 "^0.2.0" - readable-stream "^2.3.3" - stream-browserify "^2.0.1" - stream-http "^2.7.2" - string_decoder "^1.0.0" - timers-browserify "^2.0.4" - tty-browserify "0.0.0" - url "^0.11.0" - util "^0.11.0" - vm-browserify "0.0.4" - -node-pre-gyp@^0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.12.0.tgz#39ba4bb1439da030295f899e3b520b7785766149" - integrity sha512-4KghwV8vH5k+g2ylT+sLTjy5wmUOb9vPhnM8NHvRf9dHmnW/CndrFXy2aRPaPST6dugXSdHXfeaHQm77PIz/1A== - dependencies: - detect-libc "^1.0.2" - mkdirp "^0.5.1" - needle "^2.2.1" - nopt "^4.0.1" - npm-packlist "^1.1.6" - npmlog "^4.0.2" - rc "^1.2.7" - rimraf "^2.6.1" - semver "^5.3.0" - tar "^4" - -nopt@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" - integrity sha1-0NRoWv1UFRk8jHUFYC0NF81kR00= - dependencies: - abbrev "1" - osenv "^0.1.4" - -nopt@~3.0.6: - version "3.0.6" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" - integrity sha1-xkZdvwirzU2zWTF/eaxopkayj/k= - dependencies: - abbrev "1" - -normalize-package-data@^2.3.2, normalize-package-data@^2.3.4: - version "2.5.0" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" - integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== - dependencies: - hosted-git-info "^2.1.4" - resolve "^1.10.0" - semver "2 || 3 || 4 || 5" - validate-npm-package-license "^3.0.1" - -normalize-path@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" - integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= - dependencies: - remove-trailing-separator "^1.0.1" - -normalize-path@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" - integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== - -npm-bundled@^1.0.1: - version "1.0.6" - resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.6.tgz#e7ba9aadcef962bb61248f91721cd932b3fe6bdd" - integrity sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g== - -npm-packlist@^1.1.6: - version "1.4.1" - resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.1.tgz#19064cdf988da80ea3cee45533879d90192bbfbc" - integrity sha512-+TcdO7HJJ8peiiYhvPxsEDhF3PJFGUGRcFsGve3vxvxdcpO2Z4Z7rkosRM0kWj6LfbK/P0gu3dzk5RU1ffvFcw== - dependencies: - ignore-walk "^3.0.1" - npm-bundled "^1.0.1" - -npmlog@^4.0.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" - integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== - dependencies: - are-we-there-yet "~1.1.2" - console-control-strings "~1.1.0" - gauge "~2.7.3" - set-blocking "~2.0.0" - -number-is-nan@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" - integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= - -"nwmatcher@>= 1.3.9 < 2.0.0": - version "1.4.4" - resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.4.4.tgz#2285631f34a95f0d0395cd900c96ed39b58f346e" - integrity sha512-3iuY4N5dhgMpCUrOVnuAdGrgxVqV2cJpM+XNccjR2DKOB1RUP0aA+wGXEiNziG/UKboFyGBIoKOaNlJxx8bciQ== - -oauth-sign@~0.9.0: - version "0.9.0" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" - integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== - -object-assign@^4.0.1, object-assign@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= - -object-copy@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" - integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw= - dependencies: - copy-descriptor "^0.1.0" - define-property "^0.2.5" - kind-of "^3.0.3" - -object-visit@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" - integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= - dependencies: - isobject "^3.0.0" - -object.pick@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" - integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= - dependencies: - isobject "^3.0.1" - -on-finished@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" - integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= - dependencies: - ee-first "1.1.1" - -on-headers@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.2.tgz#772b0ae6aaa525c399e489adfad90c403eb3c28f" - integrity sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA== - -once@^1.3.0, once@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= - dependencies: - wrappy "1" - -opn@^5.3.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/opn/-/opn-5.5.0.tgz#fc7164fab56d235904c51c3b27da6758ca3b9bfc" - integrity sha512-PqHpggC9bLV0VeWcdKhkpxY+3JTzetLSqTCWL/z/tFIbI6G8JCjondXklT1JinczLz2Xib62sSp0T/gKT4KksA== - dependencies: - is-wsl "^1.1.0" - -optionator@^0.8.1: - version "0.8.2" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" - integrity sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q= - dependencies: - 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-browserify@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" - integrity sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc= - -os-homedir@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" - integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= - -os-locale@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" - integrity sha1-IPnxeuKe00XoveWDsT0gCYA8FNk= - dependencies: - lcid "^1.0.0" - -os-tmpdir@^1.0.0, os-tmpdir@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" - integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= - -osenv@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" - integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== - dependencies: - os-homedir "^1.0.0" - os-tmpdir "^1.0.0" - -pako@~1.0.5: - version "1.0.10" - resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.10.tgz#4328badb5086a426aa90f541977d4955da5c9732" - integrity sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw== - -parse-asn1@^5.0.0: - version "5.1.4" - resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.4.tgz#37f6628f823fbdeb2273b4d540434a22f3ef1fcc" - integrity sha512-Qs5duJcuvNExRfFZ99HDD3z4mAi3r9Wl/FOjEOijlxwCZs7E7mW2vjTpgQ4J8LpTF8x5v+1Vn5UQFejmWT11aw== - dependencies: - asn1.js "^4.0.0" - browserify-aes "^1.0.0" - create-hash "^1.1.0" - evp_bytestokey "^1.0.0" - pbkdf2 "^3.0.3" - safe-buffer "^5.1.1" - -parse-json@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" - integrity sha1-9ID0BDTvgHQfhGkJn43qGPVaTck= - dependencies: - error-ex "^1.2.0" - -parse5@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-1.5.1.tgz#9b7f3b0de32be78dc2401b17573ccaf0f6f59d94" - integrity sha1-m387DeMr543CQBsXVzzK8Pb1nZQ= - -parseurl@~1.3.2: - version "1.3.3" - resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" - integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== - -pascalcase@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" - integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= - -path-browserify@0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.0.tgz#a0b870729aae214005b7d5032ec2cbbb0fb4451a" - integrity sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo= - -path-dirname@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" - integrity sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA= - -path-exists@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" - integrity sha1-D+tsZPD8UY2adU3V77YscCJ2H0s= - dependencies: - pinkie-promise "^2.0.0" - -path-is-absolute@^1.0.0, path-is-absolute@^1.0.1, path-is-absolute@~1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= - -path-parse@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" - integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== - -path-type@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" - integrity sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE= - dependencies: - graceful-fs "^4.1.2" - pify "^2.0.0" - pinkie-promise "^2.0.0" - -pbkdf2@^3.0.3: - version "3.0.17" - resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.17.tgz#976c206530617b14ebb32114239f7b09336e93a6" - integrity sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA== - dependencies: - create-hash "^1.1.2" - create-hmac "^1.1.4" - ripemd160 "^2.0.1" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - -performance-now@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" - integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= - -pify@^2.0.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" - integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= - -pinkie-promise@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" - integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o= - dependencies: - pinkie "^2.0.0" - -pinkie@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" - integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= - -platform@^1.3.3: - version "1.3.5" - resolved "https://registry.yarnpkg.com/platform/-/platform-1.3.5.tgz#fb6958c696e07e2918d2eeda0f0bc9448d733444" - integrity sha512-TuvHS8AOIZNAlE77WUDiR4rySV/VMptyMfcfeoMgs4P8apaZM3JrnbzBiixKUv+XR6i+BXrQh8WAnjaSPFO65Q== - -portscanner@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/portscanner/-/portscanner-2.2.0.tgz#6059189b3efa0965c9d96a56b958eb9508411cf1" - integrity sha512-IFroCz/59Lqa2uBvzK3bKDbDDIEaAY8XJ1jFxcLWTqosrsc32//P4VuSB2vZXoHiHqOmx8B5L5hnKOxL/7FlPw== - dependencies: - async "^2.6.0" - is-number-like "^1.0.3" - -posix-character-classes@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" - integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= - -prelude-ls@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" - integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= - -private@^0.1.8: - version "0.1.8" - resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" - integrity sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg== - -process-nextick-args@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" - integrity sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw== - -process@^0.11.10: - version "0.11.10" - resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" - integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= - -prr@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" - integrity sha1-0/wRS6BplaRexok/SEzrHXj19HY= - -psl@^1.1.24, psl@^1.1.28: - version "1.1.31" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.31.tgz#e9aa86d0101b5b105cbe93ac6b784cd547276184" - integrity sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw== - -public-encrypt@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.3.tgz#4fcc9d77a07e48ba7527e7cbe0de33d0701331e0" - integrity sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q== - dependencies: - bn.js "^4.1.0" - browserify-rsa "^4.0.0" - create-hash "^1.1.0" - parse-asn1 "^5.0.0" - randombytes "^2.0.1" - safe-buffer "^5.1.2" - -punycode@1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" - integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0= - -punycode@^1.2.4, punycode@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" - integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= - -punycode@^2.1.0, punycode@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" - integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== - -q@~1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/q/-/q-1.4.1.tgz#55705bcd93c5f3673530c2c2cbc0c2b3addc286e" - integrity sha1-VXBbzZPF82c1MMLCy8DCs63cKG4= - -qs@~6.5.2: - version "6.5.2" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" - integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== - -querystring-es3@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" - integrity sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM= - -querystring@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" - integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= - -randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5: - version "2.1.0" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" - integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== - dependencies: - safe-buffer "^5.1.0" - -randomfill@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458" - integrity sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw== - dependencies: - randombytes "^2.0.5" - safe-buffer "^5.1.0" - -range-parser@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" - integrity sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4= - -rc@^1.2.7: - version "1.2.8" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" - integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== - dependencies: - deep-extend "^0.6.0" - ini "~1.3.0" - minimist "^1.2.0" - strip-json-comments "~2.0.1" - -read-pkg-up@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" - integrity sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI= - dependencies: - find-up "^1.0.0" - read-pkg "^1.0.0" - -read-pkg@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" - integrity sha1-9f+qXs0pyzHAR0vKfXVra7KePyg= - dependencies: - load-json-file "^1.0.0" - normalize-package-data "^2.3.2" - path-type "^1.0.0" - -readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.3.3, readable-stream@^2.3.6: - version "2.3.6" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" - integrity sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw== - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~2.0.0" - safe-buffer "~5.1.1" - string_decoder "~1.1.1" - util-deprecate "~1.0.1" - -readdirp@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525" - integrity sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ== - dependencies: - graceful-fs "^4.1.11" - micromatch "^3.1.10" - readable-stream "^2.0.2" - -redent@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" - integrity sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94= - dependencies: - indent-string "^2.1.0" - strip-indent "^1.0.1" - -regenerator-runtime@^0.11.0: - version "0.11.1" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" - integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== - -regex-not@^1.0.0, regex-not@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" - integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== - dependencies: - extend-shallow "^3.0.2" - safe-regex "^1.1.0" - -remove-trailing-separator@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" - integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8= - -repeat-element@^1.1.2: - version "1.1.3" - resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce" - integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g== - -repeat-string@^1.5.2, repeat-string@^1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" - integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= - -repeating@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" - integrity sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo= - dependencies: - is-finite "^1.0.0" - -request@^2.72.0, request@^2.74.x, request@^2.79.0, request@^2.88.0: - version "2.88.0" - resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef" - integrity sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg== - dependencies: - aws-sign2 "~0.7.0" - aws4 "^1.8.0" - caseless "~0.12.0" - combined-stream "~1.0.6" - extend "~3.0.2" - forever-agent "~0.6.1" - form-data "~2.3.2" - har-validator "~5.1.0" - http-signature "~1.2.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.19" - oauth-sign "~0.9.0" - performance-now "^2.1.0" - qs "~6.5.2" - safe-buffer "^5.1.2" - tough-cookie "~2.4.3" - tunnel-agent "^0.6.0" - uuid "^3.3.2" - -requestretry@~1.9.0: - version "1.9.1" - resolved "https://registry.yarnpkg.com/requestretry/-/requestretry-1.9.1.tgz#0a2a004eaf211969c4cc2cfebf3fe9e57b92c74e" - integrity sha1-CioATq8hGWnEzCz+vz/p5XuSx04= - dependencies: - extend "^3.0.0" - fg-lodash "0.0.2" - request "^2.74.x" - when "~3.7.5" - -require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= - -require-main-filename@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" - integrity sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE= - -resolve-url@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" - integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= - -resolve@^1.10.0: - version "1.10.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.10.1.tgz#664842ac960795bbe758221cdccda61fb64b5f18" - integrity sha512-KuIe4mf++td/eFb6wkaPbMDnP6kObCaEtIDuHOUED6MNUo4K670KZUHuuvYPZDxNF0WVLw49n06M2m2dXphEzA== - dependencies: - path-parse "^1.0.6" - -resolve@~1.1.0: - version "1.1.7" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" - integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= - -ret@~0.1.10: - version "0.1.15" - resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" - integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== - -right-align@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" - integrity sha1-YTObci/mo1FWiSENJOFMlhSGE+8= - dependencies: - align-text "^0.1.1" - -rimraf@^2.6.1, rimraf@~2.6.2: - version "2.6.3" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" - integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== - dependencies: - glob "^7.1.3" - -ripemd160@^2.0.0, ripemd160@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" - integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - -safe-buffer@5.1.2, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - -safe-regex@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" - integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4= - dependencies: - ret "~0.1.10" - -"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - -sauce-tunnel@~2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/sauce-tunnel/-/sauce-tunnel-2.5.0.tgz#0ee4c4ff9b47e013e8b072cbfac495b7fed8e8eb" - integrity sha1-DuTE/5tH4BPosHLL+sSVt/7Y6Os= - dependencies: - chalk "^1.1.3" - request "^2.72.0" - split "^1.0.0" - -saucelabs@^1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/saucelabs/-/saucelabs-1.5.0.tgz#9405a73c360d449b232839919a86c396d379fd9d" - integrity sha512-jlX3FGdWvYf4Q3LFfFWS1QvPg3IGCGWxIc8QBFdPTbpTJnt/v17FHXYVAn7C8sHf1yUXo2c7yIM0isDryfYtHQ== - dependencies: - https-proxy-agent "^2.2.1" - -sax@^1.2.1, sax@^1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" - integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== - -"semver@2 || 3 || 4 || 5", semver@^5.3.0: - version "5.7.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b" - integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA== - -send@0.16.2: - version "0.16.2" - resolved "https://registry.yarnpkg.com/send/-/send-0.16.2.tgz#6ecca1e0f8c156d141597559848df64730a6bbc1" - integrity sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw== - dependencies: - debug "2.6.9" - depd "~1.1.2" - destroy "~1.0.4" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - fresh "0.5.2" - http-errors "~1.6.2" - mime "1.4.1" - ms "2.0.0" - on-finished "~2.3.0" - range-parser "~1.2.0" - statuses "~1.4.0" - -serve-index@^1.9.1: - version "1.9.1" - resolved "https://registry.yarnpkg.com/serve-index/-/serve-index-1.9.1.tgz#d3768d69b1e7d82e5ce050fff5b453bea12a9239" - integrity sha1-03aNabHn2C5c4FD/9bRTvqEqkjk= - dependencies: - accepts "~1.3.4" - batch "0.6.1" - debug "2.6.9" - escape-html "~1.0.3" - http-errors "~1.6.2" - mime-types "~2.1.17" - parseurl "~1.3.2" - -serve-static@^1.13.2: - version "1.13.2" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.13.2.tgz#095e8472fd5b46237db50ce486a43f4b86c6cec1" - integrity sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw== - dependencies: - encodeurl "~1.0.2" - escape-html "~1.0.3" - parseurl "~1.3.2" - send "0.16.2" - -set-blocking@^2.0.0, set-blocking@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" - integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= - -set-value@^0.4.3: - version "0.4.3" - resolved "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1" - integrity sha1-fbCPnT0i3H945Trzw79GZuzfzPE= - dependencies: - extend-shallow "^2.0.1" - is-extendable "^0.1.1" - is-plain-object "^2.0.1" - to-object-path "^0.3.0" - -set-value@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.0.tgz#71ae4a88f0feefbbf52d1ea604f3fb315ebb6274" - integrity sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg== - dependencies: - extend-shallow "^2.0.1" - is-extendable "^0.1.1" - is-plain-object "^2.0.3" - split-string "^3.0.1" - -setimmediate@^1.0.4, setimmediate@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" - integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= - -setprototypeof@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" - integrity sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ== - -sha.js@^2.4.0, sha.js@^2.4.8: - version "2.4.11" - resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" - integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -signal-exit@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" - integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0= - -slash@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" - integrity sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU= - -snapdragon-node@^2.0.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" - integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== - dependencies: - define-property "^1.0.0" - isobject "^3.0.0" - snapdragon-util "^3.0.1" - -snapdragon-util@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" - integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== - dependencies: - kind-of "^3.2.0" - -snapdragon@^0.8.1: - version "0.8.2" - resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" - integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== - dependencies: - base "^0.11.1" - debug "^2.2.0" - define-property "^0.2.5" - extend-shallow "^2.0.1" - map-cache "^0.2.2" - source-map "^0.5.6" - source-map-resolve "^0.5.0" - use "^3.1.0" - -source-list-map@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" - integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw== - -source-map-resolve@^0.5.0: - version "0.5.2" - resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.2.tgz#72e2cc34095543e43b2c62b2c4c10d4a9054f259" - integrity sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA== - dependencies: - atob "^2.1.1" - decode-uri-component "^0.2.0" - resolve-url "^0.2.1" - source-map-url "^0.4.0" - urix "^0.1.0" - -source-map-support@^0.4.15: - version "0.4.18" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f" - integrity sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA== - dependencies: - source-map "^0.5.6" - -source-map-url@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" - integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= - -source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1: - version "0.5.7" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" - integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= - -source-map@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - -spdx-correct@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.0.tgz#fb83e504445268f154b074e218c87c003cd31df4" - integrity sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q== - dependencies: - spdx-expression-parse "^3.0.0" - spdx-license-ids "^3.0.0" - -spdx-exceptions@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz#2ea450aee74f2a89bfb94519c07fcd6f41322977" - integrity sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA== - -spdx-expression-parse@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" - integrity sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg== - dependencies: - spdx-exceptions "^2.1.0" - spdx-license-ids "^3.0.0" - -spdx-license-ids@^3.0.0: - version "3.0.4" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.4.tgz#75ecd1a88de8c184ef015eafb51b5b48bfd11bb1" - integrity sha512-7j8LYJLeY/Yb6ACbQ7F76qy5jHkp0U6jgBfJsk97bwWlVUnUWsAgpyaCvo17h0/RQGnQ036tVDomiwoI4pDkQA== - -split-string@^3.0.1, split-string@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" - integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== - dependencies: - extend-shallow "^3.0.0" - -split@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/split/-/split-1.0.1.tgz#605bd9be303aa59fb35f9229fbea0ddec9ea07d9" - integrity sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg== - dependencies: - through "2" - -sprintf-js@^1.0.3: - version "1.1.2" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.2.tgz#da1765262bf8c0f571749f2ad6c26300207ae673" - integrity sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug== - -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= - -sshpk@^1.7.0: - version "1.16.1" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877" - integrity sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg== - dependencies: - asn1 "~0.2.3" - assert-plus "^1.0.0" - bcrypt-pbkdf "^1.0.0" - dashdash "^1.12.0" - ecc-jsbn "~0.1.1" - getpass "^0.1.1" - jsbn "~0.1.0" - safer-buffer "^2.0.2" - tweetnacl "~0.14.0" - -static-extend@^0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" - integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= - dependencies: - define-property "^0.2.5" - object-copy "^0.1.0" - -"statuses@>= 1.4.0 < 2": - version "1.5.0" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" - integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= - -statuses@~1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.3.1.tgz#faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e" - integrity sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4= - -statuses@~1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087" - integrity sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew== - -stream-browserify@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.1.tgz#66266ee5f9bdb9940a4e4514cafb43bb71e5c9db" - integrity sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds= - dependencies: - inherits "~2.0.1" - readable-stream "^2.0.2" - -stream-browserify@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.2.tgz#87521d38a44aa7ee91ce1cd2a47df0cb49dd660b" - integrity sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg== - dependencies: - inherits "~2.0.1" - readable-stream "^2.0.2" - -stream-http@^2.7.2: - version "2.8.3" - resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.3.tgz#b2d242469288a5a27ec4fe8933acf623de6514fc" - integrity sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw== - dependencies: - builtin-status-codes "^3.0.0" - inherits "^2.0.1" - readable-stream "^2.3.6" - to-arraybuffer "^1.0.0" - xtend "^4.0.0" - -stream-shift@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952" - integrity sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI= - -string-width@^1.0.1, string-width@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" - integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= - dependencies: - code-point-at "^1.0.0" - is-fullwidth-code-point "^1.0.0" - strip-ansi "^3.0.0" - -"string-width@^1.0.2 || 2": - version "2.1.1" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" - integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== - dependencies: - is-fullwidth-code-point "^2.0.0" - strip-ansi "^4.0.0" - -string_decoder@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.2.0.tgz#fe86e738b19544afe70469243b2a1ee9240eae8d" - integrity sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w== - dependencies: - safe-buffer "~5.1.0" - -string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== - dependencies: - safe-buffer "~5.1.0" - -strip-ansi@^3.0.0, strip-ansi@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= - dependencies: - ansi-regex "^2.0.0" - -strip-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" - integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= - dependencies: - ansi-regex "^3.0.0" - -strip-bom@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" - integrity sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4= - dependencies: - is-utf8 "^0.2.0" - -strip-indent@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2" - integrity sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI= - dependencies: - get-stdin "^4.0.1" - -strip-json-comments@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= - -supports-color@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" - integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= - -supports-color@^3.1.0: - version "3.2.3" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" - integrity sha1-ZawFBLOVQXHYpklGsq48u4pfVPY= - dependencies: - has-flag "^1.0.0" - -supports-color@^5.3.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - dependencies: - has-flag "^3.0.0" - -symbol-tree@^3.2.1: - version "3.2.2" - resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" - integrity sha1-rifbOPZgp64uHDt9G8KQgZuFGeY= - -tapable@^0.2.7, tapable@~0.2.5: - version "0.2.9" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-0.2.9.tgz#af2d8bbc9b04f74ee17af2b4d9048f807acd18a8" - integrity sha512-2wsvQ+4GwBvLPLWsNfLCDYGsW6xb7aeC6utq2Qh0PFwgEy7K7dsma9Jsmb2zSQj7GvYAyUGSntLtsv++GmgL1A== - -tar@^4: - version "4.4.8" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.8.tgz#b19eec3fde2a96e64666df9fdb40c5ca1bc3747d" - integrity sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ== - dependencies: - chownr "^1.1.1" - fs-minipass "^1.2.5" - minipass "^2.3.4" - minizlib "^1.1.1" - mkdirp "^0.5.0" - safe-buffer "^5.1.2" - yallist "^3.0.2" - -through@2: - version "2.3.8" - resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" - integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= - -timers-browserify@2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.2.tgz#ab4883cf597dcd50af211349a00fbca56ac86b86" - integrity sha1-q0iDz1l9zVCvIRNJoA+8pWrIa4Y= - dependencies: - setimmediate "^1.0.4" - -timers-browserify@^2.0.4: - version "2.0.10" - resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.10.tgz#1d28e3d2aadf1d5a5996c4e9f95601cd053480ae" - integrity sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg== - dependencies: - setimmediate "^1.0.4" - -to-arraybuffer@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" - integrity sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M= - -to-fast-properties@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" - integrity sha1-uDVx+k2MJbguIxsG46MFXeTKGkc= - -to-object-path@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" - integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= - dependencies: - kind-of "^3.0.2" - -to-regex-range@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" - integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= - dependencies: - is-number "^3.0.0" - repeat-string "^1.6.1" - -to-regex@^3.0.1, to-regex@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" - integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== - dependencies: - define-property "^2.0.2" - extend-shallow "^3.0.2" - regex-not "^1.0.2" - safe-regex "^1.1.0" - -tough-cookie@^2.3.2: - version "2.5.0" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" - integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== - dependencies: - psl "^1.1.28" - punycode "^2.1.1" - -tough-cookie@~2.4.3: - version "2.4.3" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781" - integrity sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ== - dependencies: - psl "^1.1.24" - punycode "^1.4.1" - -tr46@~0.0.3: - version "0.0.3" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" - integrity sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o= - -trim-newlines@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" - integrity sha1-WIeWa7WCpFA6QetST301ARgVphM= - -trim-right@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" - integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= - -tty-browserify@0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" - integrity sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY= - -tunnel-agent@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" - integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= - dependencies: - safe-buffer "^5.0.1" - -tweetnacl@^0.14.3, tweetnacl@~0.14.0: - version "0.14.5" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" - integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= - -type-check@~0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" - integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I= - dependencies: - prelude-ls "~1.1.2" - -typescript@~2.0.0: - version "2.0.10" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.0.10.tgz#ccdd4ed86fd5550a407101a0814012e1b3fac3dd" - integrity sha1-zN1O2G/VVQpAcQGggUAS4bP6w90= - -uglify-js@^2.8.27: - version "2.8.29" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" - integrity sha1-KcVzMUgFe7Th913zW3qcty5qWd0= - dependencies: - source-map "~0.5.1" - yargs "~3.10.0" - optionalDependencies: - uglify-to-browserify "~1.0.0" - -uglify-to-browserify@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" - integrity sha1-bgkk1r2mta/jSeOabWMoUKD4grc= - -ultron@~1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.1.tgz#9fe1536a10a664a65266a1e3ccf85fd36302bc9c" - integrity sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og== - -underscore.string@~2.3.3: - version "2.3.3" - resolved "https://registry.yarnpkg.com/underscore.string/-/underscore.string-2.3.3.tgz#71c08bf6b428b1133f37e78fa3a21c82f7329b0d" - integrity sha1-ccCL9rQosRM/N+ePo6Icgvcymw0= - -underscore.string@~3.3.4: - version "3.3.5" - resolved "https://registry.yarnpkg.com/underscore.string/-/underscore.string-3.3.5.tgz#fc2ad255b8bd309e239cbc5816fd23a9b7ea4023" - integrity sha512-g+dpmgn+XBneLmXXo+sGlW5xQEt4ErkS3mgeN2GFbremYeMBSJKr9Wf2KJplQVaiPY/f7FN6atosWYNm9ovrYg== - dependencies: - sprintf-js "^1.0.3" - util-deprecate "^1.0.2" - -underscore@^1.9.1: - version "1.9.1" - resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.9.1.tgz#06dce34a0e68a7babc29b365b8e74b8925203961" - integrity sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg== - -union-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4" - integrity sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ= - dependencies: - arr-union "^3.1.0" - get-value "^2.0.6" - is-extendable "^0.1.1" - set-value "^0.4.3" - -unpipe@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" - integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= - -unset-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" - integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= - dependencies: - has-value "^0.3.1" - isobject "^3.0.0" - -upath@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/upath/-/upath-1.1.2.tgz#3db658600edaeeccbe6db5e684d67ee8c2acd068" - integrity sha512-kXpym8nmDmlCBr7nKdIx8P2jNBa+pBpIUFRnKJ4dr8htyYGJFokkr2ZvERRtUN+9SY+JqXouNgUPtv6JQva/2Q== - -uri-js@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" - integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ== - dependencies: - punycode "^2.1.0" - -urix@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" - integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= - -url@^0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" - integrity sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE= - dependencies: - punycode "1.3.2" - querystring "0.2.0" - -use@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" - integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== - -util-deprecate@^1.0.2, util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= - -util@0.10.3: - version "0.10.3" - resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" - integrity sha1-evsa/lCAUkZInj23/g7TeTNqwPk= - dependencies: - inherits "2.0.1" - -util@^0.11.0: - version "0.11.1" - resolved "https://registry.yarnpkg.com/util/-/util-0.11.1.tgz#3236733720ec64bb27f6e26f421aaa2e1b588d61" - integrity sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ== - dependencies: - inherits "2.0.3" - -utils-merge@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" - integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= - -uuid@^3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" - integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA== - -validate-npm-package-license@^3.0.1: - version "3.0.4" - resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" - integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== - dependencies: - spdx-correct "^3.0.0" - spdx-expression-parse "^3.0.0" - -verror@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" - integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= - dependencies: - assert-plus "^1.0.0" - core-util-is "1.0.2" - extsprintf "^1.2.0" - -vm-browserify@0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73" - integrity sha1-XX6kW7755Kb/ZflUOOCofDV9WnM= - dependencies: - indexof "0.0.1" - -watchpack@^1.3.1: - version "1.6.0" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.6.0.tgz#4bc12c2ebe8aa277a71f1d3f14d685c7b446cd00" - integrity sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA== - dependencies: - chokidar "^2.0.2" - graceful-fs "^4.1.2" - neo-async "^2.5.0" - -webidl-conversions@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" - integrity sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE= - -webidl-conversions@^4.0.0: - version "4.0.2" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" - integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== - -webpack-sources@^1.0.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.3.0.tgz#2a28dcb9f1f45fe960d8f1493252b5ee6530fa85" - integrity sha512-OiVgSrbGu7NEnEvQJJgdSFPl2qWKkWq5lHMhgiToIiN9w34EBnjYzSYs+VbL5KoYiLNtFFa7BZIKxRED3I32pA== - dependencies: - source-list-map "^2.0.0" - source-map "~0.6.1" - -webpack@^2.7.0: - version "2.7.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-2.7.0.tgz#b2a1226804373ffd3d03ea9c6bd525067034f6b1" - integrity sha512-MjAA0ZqO1ba7ZQJRnoCdbM56mmFpipOPUv/vQpwwfSI42p5PVDdoiuK2AL2FwFUVgT859Jr43bFZXRg/LNsqvg== - dependencies: - acorn "^5.0.0" - acorn-dynamic-import "^2.0.0" - ajv "^4.7.0" - ajv-keywords "^1.1.1" - async "^2.1.2" - enhanced-resolve "^3.3.0" - interpret "^1.0.0" - json-loader "^0.5.4" - json5 "^0.5.1" - loader-runner "^2.3.0" - loader-utils "^0.2.16" - memory-fs "~0.4.1" - mkdirp "~0.5.0" - node-libs-browser "^2.0.0" - source-map "^0.5.3" - supports-color "^3.1.0" - tapable "~0.2.5" - uglify-js "^2.8.27" - watchpack "^1.3.1" - webpack-sources "^1.0.1" - yargs "^6.0.0" - -websocket-stream@^5.0.1: - version "5.5.0" - resolved "https://registry.yarnpkg.com/websocket-stream/-/websocket-stream-5.5.0.tgz#9827f2846fc0d2b4dca7aab8f92980b2548b868e" - integrity sha512-EXy/zXb9kNHI07TIMz1oIUIrPZxQRA8aeJ5XYg5ihV8K4kD1DuA+FY6R96HfdIHzlSzS8HiISAfrm+vVQkZBug== - dependencies: - duplexify "^3.5.1" - inherits "^2.0.1" - readable-stream "^2.3.3" - safe-buffer "^5.1.2" - ws "^3.2.0" - xtend "^4.0.0" - -whatwg-encoding@^1.0.1: - version "1.0.5" - resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz#5abacf777c32166a51d085d6b4f3e7d27113ddb0" - integrity sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw== - dependencies: - iconv-lite "0.4.24" - -whatwg-url@^4.3.0: - version "4.8.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-4.8.0.tgz#d2981aa9148c1e00a41c5a6131166ab4683bbcc0" - integrity sha1-0pgaqRSMHgCkHFphMRZqtGg7vMA= - dependencies: - tr46 "~0.0.3" - webidl-conversions "^3.0.0" - -when@~3.7.5: - version "3.7.8" - resolved "https://registry.yarnpkg.com/when/-/when-3.7.8.tgz#c7130b6a7ea04693e842cdc9e7a1f2aa39a39f82" - integrity sha1-xxMLan6gRpPoQs3J56Hyqjmjn4I= - -which-module@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" - integrity sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8= - -which@~1.3.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" - integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== - dependencies: - isexe "^2.0.0" - -wide-align@^1.1.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" - integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== - dependencies: - string-width "^1.0.2 || 2" - -window-size@0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" - integrity sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0= - -wordwrap@0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" - integrity sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8= - -wordwrap@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" - integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= - -wrap-ansi@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" - integrity sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU= - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= - -ws@^3.2.0: - version "3.3.3" - resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.3.tgz#f1cf84fe2d5e901ebce94efaece785f187a228f2" - integrity sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA== - dependencies: - async-limiter "~1.0.0" - safe-buffer "~5.1.0" - ultron "~1.1.0" - -xml-name-validator@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-2.0.1.tgz#4d8b8f1eccd3419aa362061becef515e1e559635" - integrity sha1-TYuPHszTQZqjYgYb7O9RXh5VljU= - -xtend@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" - integrity sha1-pcbVMr5lbiPbgg77lDofBJmNY68= - -y18n@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" - integrity sha1-bRX7qITAhnnA136I53WegR4H+kE= - -yallist@^3.0.0, yallist@^3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.3.tgz#b4b049e314be545e3ce802236d6cd22cd91c3de9" - integrity sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A== - -yargs-parser@^4.2.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-4.2.1.tgz#29cceac0dc4f03c6c87b4a9f217dd18c9f74871c" - integrity sha1-KczqwNxPA8bIe0qfIX3RjJ90hxw= - dependencies: - camelcase "^3.0.0" - -yargs@^6.0.0: - version "6.6.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-6.6.0.tgz#782ec21ef403345f830a808ca3d513af56065208" - integrity sha1-eC7CHvQDNF+DCoCMo9UTr1YGUgg= - dependencies: - camelcase "^3.0.0" - cliui "^3.2.0" - decamelize "^1.1.1" - get-caller-file "^1.0.1" - os-locale "^1.4.0" - read-pkg-up "^1.0.1" - require-directory "^2.1.1" - require-main-filename "^1.0.1" - set-blocking "^2.0.0" - string-width "^1.0.2" - which-module "^1.0.0" - y18n "^3.2.1" - yargs-parser "^4.2.0" - -yargs@~3.10.0: - version "3.10.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" - integrity sha1-9+572FfdfB0tOMDnTvvWgdFDH9E= - dependencies: - camelcase "^1.0.2" - cliui "^2.1.0" - decamelize "^1.0.0" - window-size "0.1.0" From 446a1efeff55d06af1fb40c30e2ea8dc1d2526d9 Mon Sep 17 00:00:00 2001 From: Tom Pytleski Date: Thu, 9 May 2019 10:59:59 -0500 Subject: [PATCH 07/15] fix formating --- src/duplex.ts | 321 +++++++++++++++++++------------------------------- 1 file changed, 119 insertions(+), 202 deletions(-) diff --git a/src/duplex.ts b/src/duplex.ts index b2dafac3..50492ec6 100644 --- a/src/duplex.ts +++ b/src/duplex.ts @@ -3,66 +3,47 @@ * (c) 2017 Joachim Wester * MIT license */ -import { - _deepClone, - _objectKeys, - escapePathComponent, - hasOwnProperty -} from "./helpers" -import {applyPatch, Operation} from "./core" +import { _deepClone, _objectKeys, escapePathComponent, hasOwnProperty } from './helpers'; +import { applyPatch, Operation } from './core'; /* export all core functions */ -export { - applyOperation, - applyPatch, - applyReducer, - getValueByPointer, - Operation, - validate, - validator, - OperationResult -} from "./core" +export { applyOperation, applyPatch, applyReducer, getValueByPointer, Operation, validate, validator, OperationResult } from './core'; /* export some helpers */ -export { - PatchError as JsonPatchError, - _deepClone as deepClone, - escapePathComponent, - unescapePathComponent -} from "./helpers" +export { PatchError as JsonPatchError, _deepClone as deepClone, escapePathComponent, unescapePathComponent } from './helpers'; export interface Observer { - object: T - patches: Operation[] - unobserve: () => void - callback: (patches: Operation[]) => void - inversible: boolean + object: T; + patches: Operation[]; + unobserve: () => void; + callback: (patches: Operation[]) => void; + inversible: boolean; } -var beforeDict = new WeakMap() +var beforeDict = new WeakMap(); class Mirror { - obj: any - observers: Map = new Map() - value: Object | Array + obj: any; + observers : Map = new Map(); + value: Object | Array; constructor(obj: Object) { - this.obj = obj + this.obj = obj; } } class ObserverInfo { - callback: Function - observer: ObserverInfo + callback: Function; + observer: ObserverInfo; constructor(callback: Function, observer: ObserverInfo) { - this.callback = callback - this.observer = observer + this.callback = callback; + this.observer = observer; } } function getMirror(obj: Object): Mirror { - return beforeDict.get(obj) + return beforeDict.get(obj); } function getObserverFromMirror(mirror: Mirror, callback): ObserverInfo { @@ -70,245 +51,181 @@ function getObserverFromMirror(mirror: Mirror, callback): ObserverInfo { } function removeObserverFromMirror(mirror: Mirror, observer): void { - mirror.observers.delete(observer.callback) + mirror.observers.delete(observer.callback); } /** * Detach an observer from an object */ export function unobserve(root: T, observer: Observer) { - observer.unobserve() + observer.unobserve(); } /** * Observes changes made to an object, which can then be retrieved using generate */ -export function observe( - obj: Object | Array, - callback?: (patches: Operation[]) => void, - inversible: boolean = false -): Observer { - var patches = [] - var observer - var mirror = getMirror(obj) +export function observe(obj: Object|Array, callback?: (patches: Operation[]) => void, inversible: boolean = false): Observer { + var patches = []; + var observer; + var mirror = getMirror(obj); if (!mirror) { - mirror = new Mirror(obj) - beforeDict.set(obj, mirror) + mirror = new Mirror(obj); + beforeDict.set(obj, mirror); } else { - const observerInfo = getObserverFromMirror(mirror, callback) - observer = observerInfo && observerInfo.observer + const observerInfo = getObserverFromMirror(mirror, callback); + observer = observerInfo && observerInfo.observer; } if (observer) { - return observer + return observer; } - observer = { - inversible - } + observer = { inversible }; - mirror.value = _deepClone(obj) + mirror.value = _deepClone(obj); if (callback) { - observer.callback = callback - observer.next = null + observer.callback = callback; + observer.next = null; var dirtyCheck = () => { - generate(observer) - } + generate(observer); + }; var fastCheck = () => { - clearTimeout(observer.next) - observer.next = setTimeout(dirtyCheck) - } - if (typeof window !== "undefined") { - //not Node - if (window.addEventListener) { - //standards - window.addEventListener("mouseup", fastCheck) - window.addEventListener("keyup", fastCheck) - window.addEventListener("mousedown", fastCheck) - window.addEventListener("keydown", fastCheck) - window.addEventListener("change", fastCheck) - } else { - //IE8 - ;(document.documentElement).attachEvent("onmouseup", fastCheck) - ;(document.documentElement).attachEvent("onkeyup", fastCheck) - ;(document.documentElement).attachEvent("onmousedown", fastCheck) - ;(document.documentElement).attachEvent("onkeydown", fastCheck) - ;(document.documentElement).attachEvent("onchange", fastCheck) + clearTimeout(observer.next); + observer.next = setTimeout(dirtyCheck); + }; + if (typeof window !== 'undefined') { //not Node + if (window.addEventListener) { //standards + window.addEventListener('mouseup', fastCheck); + window.addEventListener('keyup', fastCheck); + window.addEventListener('mousedown', fastCheck); + window.addEventListener('keydown', fastCheck); + window.addEventListener('change', fastCheck); + } + else { //IE8 + (document.documentElement).attachEvent('onmouseup', fastCheck); + (document.documentElement).attachEvent('onkeyup', fastCheck); + (document.documentElement).attachEvent('onmousedown', fastCheck); + (document.documentElement).attachEvent('onkeydown', fastCheck); + (document.documentElement).attachEvent('onchange', fastCheck); } } } - observer.patches = patches - observer.object = obj + observer.patches = patches; + observer.object = obj; observer.unobserve = () => { - generate(observer) - clearTimeout(observer.next) - removeObserverFromMirror(mirror, observer) + generate(observer); + clearTimeout(observer.next); + removeObserverFromMirror(mirror, observer); - if (typeof window !== "undefined") { + if (typeof window !== 'undefined') { if (window.removeEventListener) { - window.removeEventListener("mouseup", fastCheck) - window.removeEventListener("keyup", fastCheck) - window.removeEventListener("mousedown", fastCheck) - window.removeEventListener("keydown", fastCheck) - } else { - ;(document.documentElement).detachEvent("onmouseup", fastCheck) - ;(document.documentElement).detachEvent("onkeyup", fastCheck) - ;(document.documentElement).detachEvent("onmousedown", fastCheck) - ;(document.documentElement).detachEvent("onkeydown", fastCheck) + window.removeEventListener('mouseup', fastCheck); + window.removeEventListener('keyup', fastCheck); + window.removeEventListener('mousedown', fastCheck); + window.removeEventListener('keydown', fastCheck); + } + else { + (document.documentElement).detachEvent('onmouseup', fastCheck); + (document.documentElement).detachEvent('onkeyup', fastCheck); + (document.documentElement).detachEvent('onmousedown', fastCheck); + (document.documentElement).detachEvent('onkeydown', fastCheck); } } - } + }; - mirror.observers.set(callback, new ObserverInfo(callback, observer)) + mirror.observers.set(callback, new ObserverInfo(callback, observer)); - return observer + return observer; } /** * Generate an array of patches from an observer - * If opts.inversible is defined, overwrite observer.inversible */ -export function generate( - observer: Observer, - opts: { - inversible?: boolean - } = {} -): Operation[] { - var mirror = beforeDict.get(observer.object) - - var inversible = - typeof opts.inversible !== "undefined" - ? opts.inversible - : observer.inversible - - _generate(mirror.value, observer.object, observer.patches, "", {inversible}) +export function generate(observer: Observer, opts: { inversible?: boolean } = {}): Operation[] { + var mirror = beforeDict.get(observer.object); + var inversible = typeof opts.inversible !== "undefined" ? opts.inversible : observer.inversible; + + _generate(mirror.value, observer.object, observer.patches, "", { inversible }); if (observer.patches.length) { - applyPatch(mirror.value, observer.patches) + applyPatch(mirror.value, observer.patches); } - var temp = observer.patches + var temp = observer.patches; if (temp.length > 0) { - observer.patches = [] + observer.patches = []; if (observer.callback) { - observer.callback(temp) + observer.callback(temp); } } - return temp + return temp; } // Dirty check if obj is different from mirror, generate patches and update mirror -function _generate( - mirror, - obj, - patches, - path, - opts = { - inversible: false - } -) { +function _generate(mirror, obj, patches, path, opts = { inversible: false }) { if (obj === mirror) { - return + return; } if (typeof obj.toJSON === "function") { - obj = obj.toJSON() + obj = obj.toJSON(); } - var newKeys = _objectKeys(obj) - var oldKeys = _objectKeys(mirror) - var changed = false - var deleted = false - var {inversible} = opts + var newKeys = _objectKeys(obj); + var oldKeys = _objectKeys(mirror); + var changed = false; + var deleted = false; + var { inversible } = opts; + //if ever "move" operation is implemented here, make sure this test runs OK: "should not generate the same patch twice (move)" for (var t = oldKeys.length - 1; t >= 0; t--) { - var key = oldKeys[t] - var oldVal = mirror[key] - - if ( - hasOwnProperty(obj, key) && - !( - obj[key] === undefined && - oldVal !== undefined && - Array.isArray(obj) === false - ) - ) { - var newVal = obj[key] - - if ( - typeof oldVal == "object" && - oldVal != null && - typeof newVal == "object" && - newVal != null - ) { - _generate( - oldVal, - newVal, - patches, - path + "/" + escapePathComponent(key), - opts - ) - } else { + var key = oldKeys[t]; + var oldVal = mirror[key]; + + if (hasOwnProperty(obj, key) && !(obj[key] === undefined && oldVal !== undefined && Array.isArray(obj) === false)) { + var newVal = obj[key]; + + if (typeof oldVal == "object" && oldVal != null && typeof newVal == "object" && newVal != null) { + _generate(oldVal, newVal, patches, path + "/" + escapePathComponent(key), opts); + } + else { if (oldVal !== newVal) { - changed = true - if (inversible) - patches.push({ - op: "test", - path: path + "/" + escapePathComponent(key), - value: _deepClone(oldVal) - }) - patches.push({ - op: "replace", - path: path + "/" + escapePathComponent(key), - value: _deepClone(newVal) - }) + changed = true; + if (inversible) patches.push({ op: "test", path: path + "/" + escapePathComponent(key), value: _deepClone(oldVal) }); + patches.push({ op: "replace", path: path + "/" + escapePathComponent(key), value: _deepClone(newVal) }); } } - } else if (Array.isArray(mirror) === Array.isArray(obj)) { - if (inversible) - patches.push({ - op: "test", - path: path + "/" + escapePathComponent(key), - value: _deepClone(oldVal) - }) - patches.push({op: "remove", path: path + "/" + escapePathComponent(key)}) - deleted = true // property has been deleted + } + else if(Array.isArray(mirror) === Array.isArray(obj)) { + if (inversible) patches.push({ op: "test", path: path + "/" + escapePathComponent(key), value: _deepClone(oldVal) }) + patches.push({ op: "remove", path: path + "/" + escapePathComponent(key) }); + deleted = true; // property has been deleted } else { - if (inversible) patches.push({op: "test", path, value: mirror}) - patches.push({op: "replace", path, value: obj}) - changed = true + if (inversible) patches.push({ op: "test", path, value: mirror }); + patches.push({ op: "replace", path, value: obj }); + changed = true; } } if (!deleted && newKeys.length == oldKeys.length) { - return + return; } for (var t = 0; t < newKeys.length; t++) { - var key = newKeys[t] + var key = newKeys[t]; if (!hasOwnProperty(mirror, key) && obj[key] !== undefined) { - patches.push({ - op: "add", - path: path + "/" + escapePathComponent(key), - value: _deepClone(obj[key]) - }) + patches.push({ op: "add", path: path + "/" + escapePathComponent(key), value: _deepClone(obj[key]) }); } } } /** * Create an array of patches from the differences in two objects */ -export function compare( - tree1: Object | Array, - tree2: Object | Array, - opts?: { - inversible: boolean - } -): Operation[] { - var patches = [] - _generate(tree1, tree2, patches, "", opts) - return patches +export function compare(tree1: Object | Array, tree2: Object | Array, opts?: { inversible: boolean }): Operation[] { + var patches = []; + _generate(tree1, tree2, patches, '', opts); + return patches; } From 4c9f3cebe074e38a763c3559f04d8df1a59405c3 Mon Sep 17 00:00:00 2001 From: Tom Pytleski Date: Thu, 9 May 2019 11:10:22 -0500 Subject: [PATCH 08/15] fixed formatting for test --- test/spec/duplexSpec.js | 2196 +++++++++++++++++---------------------- 1 file changed, 971 insertions(+), 1225 deletions(-) diff --git a/test/spec/duplexSpec.js b/test/spec/duplexSpec.js index 7271a60b..70155e34 100644 --- a/test/spec/duplexSpec.js +++ b/test/spec/duplexSpec.js @@ -1,209 +1,205 @@ -var obj, obj2, patches -if (typeof window === "undefined") { - var jsdom = require("jsdom").jsdom - var doc = jsdom(undefined, undefined) - GLOBAL.window = doc.defaultView - GLOBAL.document = doc.defaultView.document +var obj, obj2, patches; +if (typeof window === 'undefined') { + var jsdom = require('jsdom').jsdom; + var doc = jsdom(undefined, undefined); + GLOBAL.window = doc.defaultView; + GLOBAL.document = doc.defaultView.document; } -if (typeof jsonpatch === "undefined") { - jsonpatch = require("./../../lib/duplex") +if (typeof jsonpatch === 'undefined') { + jsonpatch = require('./../../lib/duplex'); } -if (typeof _ === "undefined") { - _ = require("./../lib/underscore.min.js") +if (typeof _ === 'undefined') { + _ = require('./../lib/underscore.min.js'); } function trigger(eventName, elem) { - if (typeof document !== "undefined") { - fireEvent(elem || document.documentElement, eventName) + if (typeof document !== 'undefined') { + fireEvent(elem || document.documentElement, eventName); } } function getPatchesUsingGenerate(objFactory, objChanger) { - var obj = objFactory() - var observer = jsonpatch.observe(obj, undefined, true) - objChanger(obj) - return jsonpatch.generate(observer) + var obj = objFactory(); + var observer = jsonpatch.observe(obj); + objChanger(obj); + return jsonpatch.generate(observer); } function getPatchesUsingCompare(objFactory, objChanger) { - var obj = objFactory() - var mirror = JSON.parse(JSON.stringify(obj)) - objChanger(obj) - return jsonpatch.compare(mirror, JSON.parse(JSON.stringify(obj)), { - inversible: true - }) + var obj = objFactory(); + var mirror = JSON.parse(JSON.stringify(obj)); + objChanger(obj); + return jsonpatch.compare(mirror, JSON.parse(JSON.stringify(obj))); } //http://stackoverflow.com/questions/827716/emulate-clicking-a-link-with-javascript-that-works-with-ie function fireEvent(obj, evt) { - var fireOnThis = obj + var fireOnThis = obj; if (document.createEvent) { var evObj = document.createEvent( - evt.indexOf("mouse") > -1 ? "MouseEvents" : "KeyboardEvent" - ) - evObj.initEvent(evt, true, false) - fireOnThis.dispatchEvent(evObj) + evt.indexOf('mouse') > -1 ? 'MouseEvents' : 'KeyboardEvent' + ); + evObj.initEvent(evt, true, false); + fireOnThis.dispatchEvent(evObj); } else if (document.createEventObject) { - var evObj = document.createEventObject() - fireOnThis.fireEvent("on" + evt, evObj) + var evObj = document.createEventObject(); + fireOnThis.fireEvent('on' + evt, evObj); } } var customMatchers = { /** - * This matcher is only needed in Chrome 28 (Chrome 28 cannot successfully compare observed objects immediately after they have been changed. Chrome 30 is unaffected) - * @param obj - * @returns {boolean} - */ + * This matcher is only needed in Chrome 28 (Chrome 28 cannot successfully compare observed objects immediately after they have been changed. Chrome 30 is unaffected) + * @param obj + * @returns {boolean} + */ toEqualInJson: function(util, customEqualityTesters) { return { compare: function(actual, expected) { return { pass: JSON.stringify(actual) == JSON.stringify(expected) - } + }; } - } + }; }, toReallyEqual: function(util, customEqualityTesters) { return { compare: function(actual, expected) { return { pass: _.isEqual(actual, expected) - } + }; } - } + }; } -} +}; -describe("duplex", function() { +describe('duplex', function() { beforeEach(function() { - jasmine.addMatchers(customMatchers) - }) + jasmine.addMatchers(customMatchers); + }); - describe("toReallyEqual", function() { - it("should treat deleted, undefined and null values as different", function() { + describe('toReallyEqual', function() { + it('should treat deleted, undefined and null values as different', function() { expect({ a: undefined - }).not.toReallyEqual({}) + }).not.toReallyEqual({}); expect({ a: null - }).not.toReallyEqual({}) + }).not.toReallyEqual({}); expect({}).not.toReallyEqual({ a: undefined - }) + }); expect({}).not.toReallyEqual({ a: null - }) + }); expect({ a: undefined }).not.toReallyEqual({ a: null - }) + }); expect({ a: null }).not.toReallyEqual({ a: undefined - }) - }) - }) + }); + }); + }); - describe("generate", function() { - it("should generate replace", function() { + describe('generate', function() { + it('should generate replace', function() { obj = { - firstName: "Albert", - lastName: "Einstein", + firstName: 'Albert', + lastName: 'Einstein', phoneNumbers: [ { - number: "12345" + number: '12345' }, { - number: "45353" + number: '45353' } ] - } + }; - var observer = jsonpatch.observe(obj) - observer.inversible = true + var observer = jsonpatch.observe(obj); + obj.firstName = 'Joachim'; + obj.lastName = 'Wester'; + obj.phoneNumbers[0].number = '123'; + obj.phoneNumbers[1].number = '456'; - obj.firstName = "Joachim" - obj.lastName = "Wester" - obj.phoneNumbers[0].number = "123" - obj.phoneNumbers[1].number = "456" - - var patches = jsonpatch.generate(observer) + var patches = jsonpatch.generate(observer); obj2 = { - firstName: "Albert", - lastName: "Einstein", + firstName: 'Albert', + lastName: 'Einstein', phoneNumbers: [ { - number: "12345" + number: '12345' }, { - number: "45353" + number: '45353' } ] - } + }; - jsonpatch.applyPatch(obj2, patches) - expect(obj2).toReallyEqual(obj) - }) + jsonpatch.applyPatch(obj2, patches); + expect(obj2).toReallyEqual(obj); + }); - it("should generate replace (escaped chars)", function() { + it('should generate replace (escaped chars)', function() { obj = { - "/name/first": "Albert", - "/name/last": "Einstein", - "~phone~/numbers": [ + '/name/first': 'Albert', + '/name/last': 'Einstein', + '~phone~/numbers': [ { - number: "12345" + number: '12345' }, { - number: "45353" + number: '45353' } ] - } + }; - var observer = jsonpatch.observe(obj) - obj["/name/first"] = "Joachim" - obj["/name/last"] = "Wester" - obj["~phone~/numbers"][0].number = "123" - obj["~phone~/numbers"][1].number = "456" + var observer = jsonpatch.observe(obj); + obj['/name/first'] = 'Joachim'; + obj['/name/last'] = 'Wester'; + obj['~phone~/numbers'][0].number = '123'; + obj['~phone~/numbers'][1].number = '456'; - var patches = jsonpatch.generate(observer) + var patches = jsonpatch.generate(observer); obj2 = { - "/name/first": "Albert", - "/name/last": "Einstein", - "~phone~/numbers": [ + '/name/first': 'Albert', + '/name/last': 'Einstein', + '~phone~/numbers': [ { - number: "12345" + number: '12345' }, { - number: "45353" + number: '45353' } ] - } + }; - jsonpatch.applyPatch(obj2, patches) - expect(obj2).toReallyEqual(obj) - }) + jsonpatch.applyPatch(obj2, patches); + expect(obj2).toReallyEqual(obj); + }); - it("should generate replace (2 observers)", function() { + it('should generate replace (2 observers)', function() { var person1 = { - firstName: "Alexandra", - lastName: "Galbreath" - } + firstName: 'Alexandra', + lastName: 'Galbreath' + }; var person2 = { - firstName: "Lisa", - lastName: "Mendoza" - } + firstName: 'Lisa', + lastName: 'Mendoza' + }; - var observer1 = jsonpatch.observe(person1) - var observer2 = jsonpatch.observe(person2) + var observer1 = jsonpatch.observe(person1); + var observer2 = jsonpatch.observe(person2); - person1.firstName = "Alexander" - person2.firstName = "Lucas" + person1.firstName = 'Alexander'; + person2.firstName = 'Lucas'; - var patch1 = jsonpatch.generate(observer1, {inversible: true}) - var patch2 = jsonpatch.generate(observer2, {inversible: true}) + var patch1 = jsonpatch.generate(observer1, { inversible: true }); + var patch2 = jsonpatch.generate(observer2, { inversible: true }); expect(patch1).toReallyEqual([ { @@ -212,11 +208,11 @@ describe("duplex", function() { value: "Alexandra" }, { - op: "replace", - path: "/firstName", - value: "Alexander" + op: 'replace', + path: '/firstName', + value: 'Alexander' } - ]) + ]); expect(patch2).toReallyEqual([ { op: "test", @@ -224,31 +220,31 @@ describe("duplex", function() { value: "Lisa" }, { - op: "replace", - path: "/firstName", - value: "Lucas" + op: 'replace', + path: '/firstName', + value: 'Lucas' } - ]) - }) + ]); + }); - it("should generate replace (double change, shallow object)", function() { + it('should generate replace (double change, shallow object)', function() { obj = { - firstName: "Albert", - lastName: "Einstein", + firstName: 'Albert', + lastName: 'Einstein', phoneNumbers: [ { - number: "12345" + number: '12345' }, { - number: "45353" + number: '45353' } ] - } + }; - var observer = jsonpatch.observe(obj, undefined, true) - obj.firstName = "Marcin" + var observer = jsonpatch.observe(obj, undefined, true); + obj.firstName = 'Marcin'; - var patches = jsonpatch.generate(observer) + var patches = jsonpatch.generate(observer); expect(patches).toReallyEqual([ { op: "test", @@ -256,14 +252,14 @@ describe("duplex", function() { value: "Albert" }, { - op: "replace", - path: "/firstName", - value: "Marcin" + op: 'replace', + path: '/firstName', + value: 'Marcin' } - ]) + ]); - obj.lastName = "Warp" - patches = jsonpatch.generate(observer) //first patch should NOT be reported again here + obj.lastName = 'Warp'; + patches = jsonpatch.generate(observer); //first patch should NOT be reported again here expect(patches).toReallyEqual([ { op: "test", @@ -271,44 +267,44 @@ describe("duplex", function() { value: "Einstein" }, { - op: "replace", - path: "/lastName", - value: "Warp" + op: 'replace', + path: '/lastName', + value: 'Warp' } - ]) + ]); expect(obj).toReallyEqual({ - firstName: "Marcin", - lastName: "Warp", + firstName: 'Marcin', + lastName: 'Warp', phoneNumbers: [ { - number: "12345" + number: '12345' }, { - number: "45353" + number: '45353' } ] - }) //objects should be still the same - }) + }); //objects should be still the same + }); - it("should generate replace (double change, deep object)", function() { + it('should generate replace (double change, deep object)', function() { obj = { - firstName: "Albert", - lastName: "Einstein", + firstName: 'Albert', + lastName: 'Einstein', phoneNumbers: [ { - number: "12345" + number: '12345' }, { - number: "45353" + number: '45353' } ] - } + }; - var observer = jsonpatch.observe(obj, undefined, true) - obj.phoneNumbers[0].number = "123" + var observer = jsonpatch.observe(obj, undefined, true); + obj.phoneNumbers[0].number = '123'; - var patches = jsonpatch.generate(observer) + var patches = jsonpatch.generate(observer); expect(patches).toReallyEqual([ { op: "test", @@ -316,14 +312,14 @@ describe("duplex", function() { value: "12345" }, { - op: "replace", - path: "/phoneNumbers/0/number", - value: "123" + op: 'replace', + path: '/phoneNumbers/0/number', + value: '123' } - ]) + ]); - obj.phoneNumbers[1].number = "456" - patches = jsonpatch.generate(observer) //first patch should NOT be reported again here + obj.phoneNumbers[1].number = '456'; + patches = jsonpatch.generate(observer); //first patch should NOT be reported again here expect(patches).toReallyEqual([ { op: "test", @@ -331,365 +327,314 @@ describe("duplex", function() { value: "45353" }, { - op: "replace", - path: "/phoneNumbers/1/number", - value: "456" + op: 'replace', + path: '/phoneNumbers/1/number', + value: '456' } - ]) + ]); expect(obj).toReallyEqual({ - firstName: "Albert", - lastName: "Einstein", + firstName: 'Albert', + lastName: 'Einstein', phoneNumbers: [ { - number: "123" + number: '123' }, { - number: "456" + number: '456' } ] - }) //objects should be still the same - }) + }); //objects should be still the same + }); - it("should generate replace (changes in new array cell, primitive values)", function() { - arr = [1] + it('should generate replace (changes in new array cell, primitive values)', function() { + arr = [1]; - var observer = jsonpatch.observe(arr, undefined, true) - arr.push(2) + var observer = jsonpatch.observe(arr); + arr.push(2); - var patches = jsonpatch.generate(observer) + var patches = jsonpatch.generate(observer); expect(patches).toReallyEqual([ { - op: "add", - path: "/1", + op: 'add', + path: '/1', value: 2 } - ]) + ]); - arr[0] = 3 + arr[0] = 3; - var patches = jsonpatch.generate(observer) + var patches = jsonpatch.generate(observer); expect(patches).toReallyEqual([ { - op: "test", - path: "/0", - value: 1 - }, - { - op: "replace", - path: "/0", + op: 'replace', + path: '/0', value: 3 } - ]) + ]); - arr[1] = 4 + arr[1] = 4; - var patches = jsonpatch.generate(observer) + var patches = jsonpatch.generate(observer); expect(patches).toReallyEqual([ { - op: "test", - path: "/1", - value: 2 - }, - { - op: "replace", - path: "/1", + op: 'replace', + path: '/1', value: 4 } - ]) - }) + ]); + }); - it("should generate replace (changes in new array cell, complex values)", function() { + it('should generate replace (changes in new array cell, complex values)', function() { arr = [ { id: 1, - name: "Ted" + name: 'Ted' } - ] + ]; - var observer = jsonpatch.observe(arr, undefined, true) + var observer = jsonpatch.observe(arr); arr.push({ id: 2, - name: "Jerry" - }) + name: 'Jerry' + }); - var patches = jsonpatch.generate(observer) + var patches = jsonpatch.generate(observer); expect(patches).toReallyEqual([ { - op: "add", - path: "/1", + op: 'add', + path: '/1', value: { id: 2, - name: "Jerry" + name: 'Jerry' } } - ]) + ]); - arr[0].id = 3 + arr[0].id = 3; - var patches = jsonpatch.generate(observer) + var patches = jsonpatch.generate(observer); expect(patches).toReallyEqual([ { - op: "test", - path: "/0/id", - value: 1 - }, - { - op: "replace", - path: "/0/id", + op: 'replace', + path: '/0/id', value: 3 } - ]) - - arr[0].id = 4 - // Disable test operations - var patches = jsonpatch.generate(observer, {inversible: false}) - expect(patches).toReallyEqual([ - { - op: "replace", - path: "/0/id", - value: 4 - } - ]) + ]); - arr[1].id = 4 + arr[1].id = 4; - var patches = jsonpatch.generate(observer) + var patches = jsonpatch.generate(observer); expect(patches).toReallyEqual([ { - op: "test", - path: "/1/id", - value: 2 - }, - { - op: "replace", - path: "/1/id", + op: 'replace', + path: '/1/id', value: 4 } - ]) - }) + ]); + }); - it("should generate add", function() { + it('should generate add', function() { obj = { - lastName: "Einstein", + lastName: 'Einstein', phoneNumbers: [ { - number: "12345" + number: '12345' } ] - } - var observer = jsonpatch.observe(obj, undefined, true) + }; + var observer = jsonpatch.observe(obj); - obj.firstName = "Joachim" - obj.lastName = "Wester" - obj.phoneNumbers[0].number = "123" + obj.firstName = 'Joachim'; + obj.lastName = 'Wester'; + obj.phoneNumbers[0].number = '123'; obj.phoneNumbers.push({ - number: "456" - }) + number: '456' + }); - patches = jsonpatch.generate(observer) + patches = jsonpatch.generate(observer); obj2 = { - lastName: "Einstein", + lastName: 'Einstein', phoneNumbers: [ { - number: "12345" + number: '12345' } ] - } + }; - jsonpatch.applyPatch(obj2, patches) - expect(obj2).toEqualInJson(obj) - }) + jsonpatch.applyPatch(obj2, patches); + expect(obj2).toEqualInJson(obj); + }); - it("should generate remove", function() { + it('should generate remove', function() { obj = { - lastName: "Einstein", - firstName: "Albert", + lastName: 'Einstein', + firstName: 'Albert', phoneNumbers: [ { - number: "12345" + number: '12345' }, { - number: "4234" + number: '4234' } ] - } - var observer = jsonpatch.observe(obj, undefined, true) + }; + var observer = jsonpatch.observe(obj); - delete obj.firstName - obj.lastName = "Wester" - obj.phoneNumbers[0].number = "123" - obj.phoneNumbers.pop(1) + delete obj.firstName; + obj.lastName = 'Wester'; + obj.phoneNumbers[0].number = '123'; + obj.phoneNumbers.pop(1); - patches = jsonpatch.generate(observer) + patches = jsonpatch.generate(observer); obj2 = { - lastName: "Einstein", - firstName: "Albert", + lastName: 'Einstein', + firstName: 'Albert', phoneNumbers: [ { - number: "12345" + number: '12345' }, { - number: "4234" + number: '4234' } ] - } + }; - jsonpatch.applyPatch(obj2, patches) - expect(obj2).toEqualInJson(obj) - }) + jsonpatch.applyPatch(obj2, patches); + expect(obj2).toEqualInJson(obj); + }); - it("should generate remove (array indexes should be sorted descending)", function() { + it('should generate remove (array indexes should be sorted descending)', function() { obj = { - items: ["a", "b", "c"] - } - var observer = jsonpatch.observe(obj, undefined, true) + items: ['a', 'b', 'c'] + }; + var observer = jsonpatch.observe(obj); - obj.items.pop() - obj.items.pop() + obj.items.pop(); + obj.items.pop(); - patches = jsonpatch.generate(observer) + patches = jsonpatch.generate(observer); //array indexes must be sorted descending, otherwise there is an index collision in apply expect(patches).toReallyEqual([ { - op: "test", - path: "/items/2", - value: "c" - }, - { - op: "remove", - path: "/items/2" + op: 'remove', + path: '/items/2' }, { - op: "test", - path: "/items/1", - value: "b" - }, - { - op: "remove", - path: "/items/1" + op: 'remove', + path: '/items/1' } - ]) + ]); obj2 = { - items: ["a", "b", "c"] - } - jsonpatch.applyPatch(obj2, patches) - expect(obj).toEqualInJson(obj2) - }) + items: ['a', 'b', 'c'] + }; + jsonpatch.applyPatch(obj2, patches); + expect(obj).toEqualInJson(obj2); + }); - it("should not generate the same patch twice (replace)", function() { + it('should not generate the same patch twice (replace)', function() { obj = { - lastName: "Einstein" - } - var observer = jsonpatch.observe(obj, undefined, true) + lastName: 'Einstein' + }; + var observer = jsonpatch.observe(obj); - obj.lastName = "Wester" + obj.lastName = 'Wester'; - patches = jsonpatch.generate(observer) + patches = jsonpatch.generate(observer); expect(patches).toReallyEqual([ { - op: "test", - path: "/lastName", - value: "Einstein" - }, - { - op: "replace", - path: "/lastName", - value: "Wester" + op: 'replace', + path: '/lastName', + value: 'Wester' } - ]) + ]); - patches = jsonpatch.generate(observer) - expect(patches).toReallyEqual([]) - }) + patches = jsonpatch.generate(observer); + expect(patches).toReallyEqual([]); + }); - it("should not generate the same patch twice (add)", function() { + it('should not generate the same patch twice (add)', function() { obj = { - lastName: "Einstein" - } - var observer = jsonpatch.observe(obj, undefined, true) + lastName: 'Einstein' + }; + var observer = jsonpatch.observe(obj); - obj.firstName = "Albert" + obj.firstName = 'Albert'; - patches = jsonpatch.generate(observer) + patches = jsonpatch.generate(observer); expect(patches).toReallyEqual([ { - op: "add", - path: "/firstName", - value: "Albert" + op: 'add', + path: '/firstName', + value: 'Albert' } - ]) + ]); - patches = jsonpatch.generate(observer) - expect(patches).toReallyEqual([]) - }) + patches = jsonpatch.generate(observer); + expect(patches).toReallyEqual([]); + }); - it("should not generate the same patch twice (remove)", function() { + it('should not generate the same patch twice (remove)', function() { obj = { - lastName: "Einstein" - } - var observer = jsonpatch.observe(obj, undefined, true) + lastName: 'Einstein' + }; + var observer = jsonpatch.observe(obj); - delete obj.lastName + delete obj.lastName; - patches = jsonpatch.generate(observer) + patches = jsonpatch.generate(observer); expect(patches).toReallyEqual([ { - op: "test", - path: "/lastName", - value: "Einstein" - }, - { - op: "remove", - path: "/lastName" + op: 'remove', + path: '/lastName' } - ]) + ]); - patches = jsonpatch.generate(observer) - expect(patches).toReallyEqual([]) - }) + patches = jsonpatch.generate(observer); + expect(patches).toReallyEqual([]); + }); - it("should ignore array properties", function() { + it('should ignore array properties', function() { var obj = { array: [1, 2, 3] - } + }; - var patches - var observer = jsonpatch.observe(obj, undefined, true) + var patches; + var observer = jsonpatch.observe(obj); - obj.array.value = 1 - patches = jsonpatch.generate(observer) - expect(patches.length).toReallyEqual(0) + obj.array.value = 1; + patches = jsonpatch.generate(observer); + expect(patches.length).toReallyEqual(0); - obj.array.value = 2 - patches = jsonpatch.generate(observer) - expect(patches.length).toReallyEqual(0) - }) + obj.array.value = 2; + patches = jsonpatch.generate(observer); + expect(patches.length).toReallyEqual(0); + }); - it("should respect toJSON", function() { - var a = {} - a.self = a + it('should respect toJSON', function() { + var a = {}; + a.self = a; var obj = { a: a, b: 3, toJSON: function() { return { b: this.b - } + }; } - } + }; - var observer = jsonpatch.observe(obj, undefined, true) - obj.b = 5 - patches = jsonpatch.generate(observer) - expect(patches.length).toReallyEqual(2) - }) + var observer = jsonpatch.observe(obj); + obj.b = 5; + patches = jsonpatch.generate(observer); + expect(patches.length).toReallyEqual(1); + }); - it("should respect toJSON in nested objects", function() { - var a = {} - a.self = a + it('should respect toJSON in nested objects', function() { + var a = {}; + a.self = a; var outer = { obj: { a: a, @@ -697,1364 +642,1165 @@ describe("duplex", function() { toJSON: function() { return { b: this.b - } + }; } } - } + }; - var observer = jsonpatch.observe(outer) - observer.inversible = true - outer.obj.b = 5 - patches = jsonpatch.generate(observer) + var observer = jsonpatch.observe(outer); + outer.obj.b = 5; + patches = jsonpatch.generate(observer); - expect(patches.length).toReallyEqual(2) - expect(patches[1].op).toReallyEqual("replace") - expect(patches[1].path).toReallyEqual("/obj/b") - expect(patches[1].value).toReallyEqual(5) - }) + expect(patches.length).toReallyEqual(1); + expect(patches[0].path).toReallyEqual('/obj/b'); + expect(patches[0].value).toReallyEqual(5); + }); /*it('should not generate the same patch twice (move)', function() { //"move" is not implemented yet in jsonpatch.generate obj = { lastName: {str: "Einstein"} }; - var observer = jsonpatch.observe(obj, undefined, true); + var observer = jsonpatch.observe(obj); obj.lastName2 = obj.lastName; delete obj.lastName; - patches = jsonpatch.generate(observer), { inversible: true} ; + patches = jsonpatch.generate(observer); expect(patches).toReallyEqual([ { op: 'move', from: '/lastName', to: '/lastName2' } ]); - patches = jsonpatch.generate(observer), { inversible: true} ; + patches = jsonpatch.generate(observer); expect(patches).toReallyEqual([]); });*/ - xdescribe("undefined - JS to JSON projection", function() { - it("when value is set to `undefined`, should generate remove (undefined is JSON.stringified to no value)", function() { + xdescribe('undefined - JS to JSON projection', function() { + it('when value is set to `undefined`, should generate remove (undefined is JSON.stringified to no value)', function() { var obj = { - foo: "bar" - } + foo: 'bar' + }; - var observer = jsonpatch.observe(obj, undefined, true) - obj.foo = undefined + var observer = jsonpatch.observe(obj); + obj.foo = undefined; - var patches = jsonpatch.generate(observer) + var patches = jsonpatch.generate(observer); expect(patches).toReallyEqual([ { - op: "test", - path: "/foo", - value: "bar" - }, - { - op: "remove", - path: "/foo" + op: 'remove', + path: '/foo' } - ]) - }) + ]); + }); - it("when new property is added, and set to `undefined`, nothing should be generated (undefined is JSON.stringified to no value)", function() { + it('when new property is added, and set to `undefined`, nothing should be generated (undefined is JSON.stringified to no value)', function() { var obj = { - foo: "bar" - } + foo: 'bar' + }; - var observer = jsonpatch.observe(obj, undefined, true) - obj.baz = undefined + var observer = jsonpatch.observe(obj); + obj.baz = undefined; - var patches = jsonpatch.generate(observer) - expect(patches).toReallyEqual([]) - }) + var patches = jsonpatch.generate(observer); + expect(patches).toReallyEqual([]); + }); - it("when array element is set to `undefined`, should generate replace to `null` (undefined array elements are JSON.stringified to `null`)", function() { + it('when array element is set to `undefined`, should generate replace to `null` (undefined array elements are JSON.stringified to `null`)', function() { var obj = { foo: [0, 1, 2] - } + }; - var observer = jsonpatch.observe(obj, undefined, true) - obj.foo[1] = undefined + var observer = jsonpatch.observe(obj); + obj.foo[1] = undefined; - var patches = jsonpatch.generate(observer) + var patches = jsonpatch.generate(observer); expect(patches).toReallyEqual([ { - op: "test", - path: "/foo/1", - value: 1 - }, - { - op: "replace", - path: "/foo/1", + op: 'replace', + path: '/foo/1', value: null } - ]) - }) + ]); + }); - it("when `undefined` property is set to something, should generate add (undefined is JSON.stringified to no value)", function() { + it('when `undefined` property is set to something, should generate add (undefined is JSON.stringified to no value)', function() { var obj = { foo: undefined - } + }; - var observer = jsonpatch.observe(obj, undefined, true) - obj.foo = "something" + var observer = jsonpatch.observe(obj); + obj.foo = 'something'; - var patches = jsonpatch.generate(observer) + var patches = jsonpatch.generate(observer); expect(patches).toReallyEqual([ { - op: "add", - path: "/foo", - value: "something" + op: 'add', + path: '/foo', + value: 'something' } - ]) - }) - it("when `undefined` array element is set to something, should generate replace (undefined array elements are JSON.stringified to `null`)", function() { + ]); + }); + it('when `undefined` array element is set to something, should generate replace (undefined array elements are JSON.stringified to `null`)', function() { var obj = { foo: [0, undefined, 2] - } + }; - var observer = jsonpatch.observe(obj, undefined, true) - obj.foo[1] = 1 + var observer = jsonpatch.observe(obj); + obj.foo[1] = 1; - var patches = jsonpatch.generate(observer) + var patches = jsonpatch.generate(observer); expect(patches).toReallyEqual([ { - op: "test", - path: "/foo/1", - value: null - }, - { - op: "replace", - path: "/foo/1", + op: 'replace', + path: '/foo/1', value: 1 } - ]) - }) - }) + ]); + }); + }); - describe("undefined - JSON to JS extension", function() { - describe("should generate empty patch, when", function() { - it("when new property is set to `undefined`", function() { + describe('undefined - JSON to JS extension', function() { + describe('should generate empty patch, when', function() { + it('when new property is set to `undefined`', function() { var objFactory = function() { return { - foo: "bar" - } - } + foo: 'bar' + }; + }; var objChanger = function(obj) { - obj.baz = undefined - } + obj.baz = undefined; + }; var genereatedPatches = getPatchesUsingGenerate( objFactory, objChanger - ) - var comparedPatches = getPatchesUsingCompare(objFactory, objChanger) + ); + var comparedPatches = getPatchesUsingCompare(objFactory, objChanger); - expect(genereatedPatches).toReallyEqual([]) - expect(genereatedPatches).toReallyEqual(comparedPatches) - }) + expect(genereatedPatches).toReallyEqual([]); + expect(genereatedPatches).toReallyEqual(comparedPatches); + }); - it("when an `undefined` property is deleted", function() { + it('when an `undefined` property is deleted', function() { var objFactory = function() { return { foo: undefined - } - } + }; + }; var objChanger = function(obj) { - delete obj.foo - } + delete obj.foo; + }; var genereatedPatches = getPatchesUsingGenerate( objFactory, objChanger - ) - var comparedPatches = getPatchesUsingCompare(objFactory, objChanger) + ); + var comparedPatches = getPatchesUsingCompare(objFactory, objChanger); - expect(genereatedPatches).toReallyEqual([]) - expect(genereatedPatches).toReallyEqual(comparedPatches) - }) - }) + expect(genereatedPatches).toReallyEqual([]); + expect(genereatedPatches).toReallyEqual(comparedPatches); + }); + }); - describe("should generate add, when", function() { - it("`undefined` property is set to something", function() { + describe('should generate add, when', function() { + it('`undefined` property is set to something', function() { var objFactory = function() { return { foo: undefined - } - } + }; + }; var objChanger = function(obj) { - obj.foo = "something" - } + obj.foo = 'something'; + }; var genereatedPatches = getPatchesUsingGenerate( objFactory, objChanger - ) - var comparedPatches = getPatchesUsingCompare(objFactory, objChanger) + ); + var comparedPatches = getPatchesUsingCompare(objFactory, objChanger); expect(genereatedPatches).toReallyEqual([ { - op: "add", - path: "/foo", - value: "something" + op: 'add', + path: '/foo', + value: 'something' } - ]) - expect(genereatedPatches).toReallyEqual(comparedPatches) - }) - }) + ]); + expect(genereatedPatches).toReallyEqual(comparedPatches); + }); + }); - describe("should generate remove, when", function() { - it("value is set to `undefined`", function() { + describe('should generate remove, when', function() { + it('value is set to `undefined`', function() { var objFactory = function() { return { - foo: "bar" - } - } + foo: 'bar' + }; + }; var objChanger = function(obj) { - obj.foo = undefined - } + obj.foo = undefined; + }; var genereatedPatches = getPatchesUsingGenerate( objFactory, objChanger - ) - var comparedPatches = getPatchesUsingCompare(objFactory, objChanger) + ); + var comparedPatches = getPatchesUsingCompare(objFactory, objChanger); expect(genereatedPatches).toReallyEqual([ { - op: "test", - path: "/foo", - value: "bar" - }, - { - op: "remove", - path: "/foo" + op: 'remove', + path: '/foo' } - ]) - expect(genereatedPatches).toReallyEqual(comparedPatches) - }) - }) + ]); + expect(genereatedPatches).toReallyEqual(comparedPatches); + }); + }); - describe("should generate replace, when", function() { - it("array element is set to `undefined`", function() { + describe('should generate replace, when', function() { + it('array element is set to `undefined`', function() { var objFactory = function() { return { foo: [0, 1, 2] - } - } + }; + }; var objChanger = function(obj) { - obj.foo[1] = undefined - } + obj.foo[1] = undefined; + }; var genereatedPatches = getPatchesUsingGenerate( objFactory, objChanger - ) - var comparedPatches = getPatchesUsingCompare(objFactory, objChanger) + ); + var comparedPatches = getPatchesUsingCompare(objFactory, objChanger); expect(genereatedPatches).toReallyEqual([ { - op: "test", - path: "/foo/1", - value: 1 - }, - { - op: "replace", - path: "/foo/1", + op: 'replace', + path: '/foo/1', value: null } - ]) - expect(genereatedPatches).toReallyEqual(comparedPatches) - }) - it("`undefined` array element is set to something", function() { + ]); + expect(genereatedPatches).toReallyEqual(comparedPatches); + }); + it('`undefined` array element is set to something', function() { var objFactory = function() { return { foo: [0, undefined, 2] - } - } + }; + }; var objChanger = function(obj) { - obj.foo[1] = 1 - } + obj.foo[1] = 1; + }; var genereatedPatches = getPatchesUsingGenerate( objFactory, objChanger - ) - var comparedPatches = getPatchesUsingCompare(objFactory, objChanger) + ); + var comparedPatches = getPatchesUsingCompare(objFactory, objChanger); expect(genereatedPatches).toReallyEqual([ { - op: "test", - path: "/foo/1", - value: null - }, - { - op: "replace", - path: "/foo/1", + op: 'replace', + path: '/foo/1', value: 1 } - ]) - expect(genereatedPatches).toReallyEqual(comparedPatches) - }) - }) - }) - }) + ]); + expect(genereatedPatches).toReallyEqual(comparedPatches); + }); + }); + }); + }); - describe("apply", function() { + describe('apply', function() { // https://tools.ietf.org/html/rfc6902#appendix-A.16 - it("should add an Array Value", function() { + it('should add an Array Value', function() { var obj = { - foo: ["bar"] - } + foo: ['bar'] + }; var patches = [ { - op: "add", - path: "/foo/-", - value: ["abc", "def"] + op: 'add', + path: '/foo/-', + value: ['abc', 'def'] } - ] + ]; - jsonpatch.applyPatch(obj, patches) + jsonpatch.applyPatch(obj, patches); expect(obj).toReallyEqual({ - foo: ["bar", ["abc", "def"]] - }) - }) - }) + foo: ['bar', ['abc', 'def']] + }); + }); + }); - describe("callback", function() { - it("should generate replace", function(done) { - var patches + describe('callback', function() { + it('should generate replace', function(done) { + var patches; obj = { - firstName: "Albert", - lastName: "Einstein", + firstName: 'Albert', + lastName: 'Einstein', phoneNumbers: [ { - number: "12345" + number: '12345' }, { - number: "45353" + number: '45353' } ] - } + }; - jsonpatch.observe( - obj, - function(_patches) { - patches = _patches - patchesChanged() - }, - true - ) - obj.firstName = "Joachim" - obj.lastName = "Wester" - obj.phoneNumbers[0].number = "123" - obj.phoneNumbers[1].number = "456" + jsonpatch.observe(obj, function(_patches) { + patches = _patches; + patchesChanged(); + }); + obj.firstName = 'Joachim'; + obj.lastName = 'Wester'; + obj.phoneNumbers[0].number = '123'; + obj.phoneNumbers[1].number = '456'; - trigger("keyup") + trigger('keyup'); function patchesChanged() { obj2 = { - firstName: "Albert", - lastName: "Einstein", + firstName: 'Albert', + lastName: 'Einstein', phoneNumbers: [ { - number: "12345" + number: '12345' }, { - number: "45353" + number: '45353' } ] - } + }; - jsonpatch.applyPatch(obj2, patches) - expect(obj2).toReallyEqual(obj) - done() + jsonpatch.applyPatch(obj2, patches); + expect(obj2).toReallyEqual(obj); + done(); } - }) + }); - it("should generate replace (double change, shallow object)", function(done) { - var lastPatches, - called = 0 + it('should generate replace (double change, shallow object)', function( + done + ) { + var lastPatches, called = 0; obj = { - firstName: "Albert", - lastName: "Einstein", + firstName: 'Albert', + lastName: 'Einstein', phoneNumbers: [ { - number: "12345" + number: '12345' }, { - number: "45353" + number: '45353' } ] - } + }; - jsonpatch.observe( - obj, - function(patches) { - called++ - lastPatches = patches - patchesChanged(called) - }, - true - ) - obj.firstName = "Marcin" + jsonpatch.observe(obj, function(patches) { + called++; + lastPatches = patches; + patchesChanged(called); + }); + obj.firstName = 'Marcin'; - trigger("keyup") + trigger('keyup'); // ugly migration from Jasmine 1.x to > 2.0 function patchesChanged(time) { switch (time) { case 1: - expect(called).toReallyEqual(1) + expect(called).toReallyEqual(1); expect(lastPatches).toReallyEqual([ { - op: "test", - path: "/firstName", - value: "Albert" - }, - { - op: "replace", - path: "/firstName", - value: "Marcin" + op: 'replace', + path: '/firstName', + value: 'Marcin' } - ]) + ]); - obj.lastName = "Warp" - trigger("keyup") - break + obj.lastName = 'Warp'; + trigger('keyup'); + break; case 2: - expect(called).toReallyEqual(2) + expect(called).toReallyEqual(2); expect(lastPatches).toReallyEqual([ { - op: "test", - path: "/lastName", - value: "Einstein" - }, - { - op: "replace", - path: "/lastName", - value: "Warp" + op: 'replace', + path: '/lastName', + value: 'Warp' } - ]) //first patch should NOT be reported again here + ]); //first patch should NOT be reported again here expect(obj).toReallyEqual({ - firstName: "Marcin", - lastName: "Warp", + firstName: 'Marcin', + lastName: 'Warp', phoneNumbers: [ { - number: "12345" + number: '12345' }, { - number: "45353" + number: '45353' } ] - }) //objects should be still the same + }); //objects should be still the same - done() - break + done(); + break; } } - }) + }); - it("should generate replace (double change, deep object)", function(done) { - var lastPatches, - called = 0 + it('should generate replace (double change, deep object)', function(done) { + var lastPatches, called = 0; obj = { - firstName: "Albert", - lastName: "Einstein", + firstName: 'Albert', + lastName: 'Einstein', phoneNumbers: [ { - number: "12345" + number: '12345' }, { - number: "45353" + number: '45353' } ] - } + }; - jsonpatch.observe( - obj, - function(patches) { - called++ - lastPatches = patches - patchesChanged(called) - }, - true - ) - obj.phoneNumbers[0].number = "123" + jsonpatch.observe(obj, function(patches) { + called++; + lastPatches = patches; + patchesChanged(called); + }); + obj.phoneNumbers[0].number = '123'; - trigger("keyup") + trigger('keyup'); // ugly migration from Jasmine 1.x to > 2.0 function patchesChanged(time) { switch (time) { case 1: - expect(called).toReallyEqual(1) + expect(called).toReallyEqual(1); expect(lastPatches).toReallyEqual([ { - op: "test", - path: "/phoneNumbers/0/number", - value: "12345" - }, - { - op: "replace", - path: "/phoneNumbers/0/number", - value: "123" + op: 'replace', + path: '/phoneNumbers/0/number', + value: '123' } - ]) + ]); - obj.phoneNumbers[1].number = "456" - trigger("keyup") - break + obj.phoneNumbers[1].number = '456'; + trigger('keyup'); + break; case 2: - expect(called).toReallyEqual(2) + expect(called).toReallyEqual(2); expect(lastPatches).toReallyEqual([ { - op: "test", - path: "/phoneNumbers/1/number", - value: "45353" - }, - { - op: "replace", - path: "/phoneNumbers/1/number", - value: "456" + op: 'replace', + path: '/phoneNumbers/1/number', + value: '456' } - ]) //first patch should NOT be reported again here + ]); //first patch should NOT be reported again here expect(obj).toReallyEqual({ - firstName: "Albert", - lastName: "Einstein", + firstName: 'Albert', + lastName: 'Einstein', phoneNumbers: [ { - number: "123" + number: '123' }, { - number: "456" + number: '456' } ] - }) //objects should be still the same - done() - break + }); //objects should be still the same + done(); + break; } } - }) + }); - it("generate should execute callback synchronously", function(done) { - var lastPatches, - called = 0, - res + it('generate should execute callback synchronously', function(done) { + var lastPatches, called = 0, res; obj = { - firstName: "Albert", - lastName: "Einstein", + firstName: 'Albert', + lastName: 'Einstein', phoneNumbers: [ { - number: "12345" + number: '12345' }, { - number: "45353" + number: '45353' } ] - } + }; - var observer = jsonpatch.observe( - obj, - function(patches) { - called++ - lastPatches = patches - }, - true - ) - obj.phoneNumbers[0].number = "123" + var observer = jsonpatch.observe(obj, function(patches) { + called++; + lastPatches = patches; + }); + obj.phoneNumbers[0].number = '123'; setTimeout(function() { - expect(called).toReallyEqual(0) + expect(called).toReallyEqual(0); - res = jsonpatch.generate(observer) - expect(called).toReallyEqual(1) + res = jsonpatch.generate(observer); + expect(called).toReallyEqual(1); expect(lastPatches).toReallyEqual([ { - op: "test", - path: "/phoneNumbers/0/number", - value: "12345" - }, - { - op: "replace", - path: "/phoneNumbers/0/number", - value: "123" + op: 'replace', + path: '/phoneNumbers/0/number', + value: '123' } - ]) - expect(lastPatches).toReallyEqual(res) + ]); + expect(lastPatches).toReallyEqual(res); - res = jsonpatch.generate(observer) - expect(called).toReallyEqual(1) + res = jsonpatch.generate(observer); + expect(called).toReallyEqual(1); expect(lastPatches).toReallyEqual([ { - op: "test", - path: "/phoneNumbers/0/number", - value: "12345" - }, - { - op: "replace", - path: "/phoneNumbers/0/number", - value: "123" + op: 'replace', + path: '/phoneNumbers/0/number', + value: '123' } - ]) - expect(res).toReallyEqual([]) - done() - }, 100) - }) + ]); + expect(res).toReallyEqual([]); + done(); + }, 100); + }); - it("should unobserve then observe again", function(done) { - var called = 0 + it('should unobserve then observe again', function(done) { + var called = 0; obj = { - firstName: "Albert", - lastName: "Einstein", + firstName: 'Albert', + lastName: 'Einstein', phoneNumbers: [ { - number: "12345" + number: '12345' }, { - number: "45353" + number: '45353' } ] - } + }; - var observer = jsonpatch.observe( - obj, - function(patches) { - called++ - }, - true - ) + var observer = jsonpatch.observe(obj, function(patches) { + called++; + }); - obj.firstName = "Malvin" + obj.firstName = 'Malvin'; - trigger("keyup") + trigger('keyup'); // ugly migration from Jasmine 1.x to > 2.0 setTimeout(function() { - expect(called).toReallyEqual(1) + expect(called).toReallyEqual(1); - jsonpatch.unobserve(obj, observer) + jsonpatch.unobserve(obj, observer); - obj.firstName = "Wilfred" + obj.firstName = 'Wilfred'; - trigger("keyup") + trigger('keyup'); setTimeout(function() { - expect(called).toReallyEqual(1) + expect(called).toReallyEqual(1); - observer = jsonpatch.observe( - obj, - function(patches) { - called++ - }, - true - ) + observer = jsonpatch.observe(obj, function(patches) { + called++; + }); - obj.firstName = "Megan" - trigger("keyup") + obj.firstName = 'Megan'; + trigger('keyup'); setTimeout(function() { - expect(called).toReallyEqual(2) - done() - }, 20) - }, 20) - }, 20) - }) + expect(called).toReallyEqual(2); + done(); + }, 20); + }, 20); + }, 20); + }); - it("should unobserve then observe again (deep value)", function(done) { - var called = 0 + it('should unobserve then observe again (deep value)', function(done) { + var called = 0; obj = { - firstName: "Albert", - lastName: "Einstein", + firstName: 'Albert', + lastName: 'Einstein', phoneNumbers: [ { - number: "12345" + number: '12345' }, { - number: "45353" + number: '45353' } ] - } + }; - var observer = jsonpatch.observe( - obj, - function(patches) { - called++ - }, - true - ) + var observer = jsonpatch.observe(obj, function(patches) { + called++; + }); - obj.phoneNumbers[1].number = "555" + obj.phoneNumbers[1].number = '555'; - trigger("keyup") + trigger('keyup'); // ugly migration from Jasmine 1.x to > 2.0 setTimeout(function() { - expect(called).toReallyEqual(1) + expect(called).toReallyEqual(1); - jsonpatch.unobserve(obj, observer) + jsonpatch.unobserve(obj, observer); - obj.phoneNumbers[1].number = "556" + obj.phoneNumbers[1].number = '556'; - trigger("keyup") + trigger('keyup'); setTimeout(function() { - expect(called).toReallyEqual(1) + expect(called).toReallyEqual(1); - observer = jsonpatch.observe( - obj, - function(patches) { - called++ - }, - true - ) + observer = jsonpatch.observe(obj, function(patches) { + called++; + }); - obj.phoneNumbers[1].number = "557" + obj.phoneNumbers[1].number = '557'; - trigger("keyup") + trigger('keyup'); setTimeout(function() { - expect(called).toReallyEqual(2) - done() - }, 20) - }, 20) - }, 20) - }) - - it("calling unobserve should deliver pending changes synchronously", function(done) { - var lastPatches = "" + expect(called).toReallyEqual(2); + done(); + }, 20); + }, 20); + }, 20); + }); + + it('calling unobserve should deliver pending changes synchronously', function( + done + ) { + var lastPatches = ''; obj = { - firstName: "Albert", - lastName: "Einstein", + firstName: 'Albert', + lastName: 'Einstein', phoneNumbers: [ { - number: "12345" + number: '12345' }, { - number: "45353" + number: '45353' } ] - } + }; - var observer = jsonpatch.observe( - obj, - function(patches) { - lastPatches = patches - }, - true - ) + var observer = jsonpatch.observe(obj, function(patches) { + lastPatches = patches; + }); - obj.firstName = "Malvin" + obj.firstName = 'Malvin'; - jsonpatch.unobserve(obj, observer) + jsonpatch.unobserve(obj, observer); - expect(lastPatches[1].value).toBe("Malvin") + expect(lastPatches[0].value).toBe('Malvin'); - obj.firstName = "Jonathan" + obj.firstName = 'Jonathan'; // ugly migration from Jasmine 1.x to > 2.0 setTimeout(function() { - expect(lastPatches[1].value).toBe("Malvin") - done() - }, 20) - }) - - it("should handle callbacks that calls observe() and unobserve() internally", function(done) { + expect(lastPatches[0].value).toBe('Malvin'); + done(); + }, 20); + }); + + it('should handle callbacks that calls observe() and unobserve() internally', function( + done + ) { var obj = { - foo: "bar" - } + foo: 'bar' + }; - var observer - var callbackCalled, - count = 0 + var observer; + var callbackCalled, count = 0; var callback = jasmine - .createSpy("callback", function() { - jsonpatch.unobserve(obj, observer) + .createSpy('callback', function() { + jsonpatch.unobserve(obj, observer); - jsonpatch.observe(obj, callback) - callbackCalled(++count) + jsonpatch.observe(obj, callback); + callbackCalled(++count); }) - .and.callThrough() + .and.callThrough(); - observer = jsonpatch.observe(obj, callback) + observer = jsonpatch.observe(obj, callback); - expect(callback.calls.count()).toReallyEqual(0) + expect(callback.calls.count()).toReallyEqual(0); - obj.foo = "bazz" + obj.foo = 'bazz'; - trigger("keyup") + trigger('keyup'); // ugly migration from Jasmine 1.x to > 2.0 function callbackCalled(time) { switch (time) { case 1: - expect(callback.calls.count()).toReallyEqual(1) + expect(callback.calls.count()).toReallyEqual(1); - obj.foo = "bazinga" + obj.foo = 'bazinga'; - trigger("keyup") - break + trigger('keyup'); + break; case 2: - expect(callback.calls.count()).toReallyEqual(2) - done() - break + expect(callback.calls.count()).toReallyEqual(2); + done(); + break; } } - }) + }); - it("should generate patch after `mouseup` event", function(done) { + it('should generate patch after `mouseup` event', function(done) { obj = { - lastName: "Einstein" - } - var lastPatches - var observer = jsonpatch.observe( - obj, - function(patches) { - lastPatches = patches - }, - true - ) + lastName: 'Einstein' + }; + var lastPatches; + var observer = jsonpatch.observe(obj, function(patches) { + lastPatches = patches; + }); - obj.lastName = "Hawking" + obj.lastName = 'Hawking'; - trigger("mouseup") + trigger('mouseup'); setTimeout(function() { expect(lastPatches).toEqual([ { - op: "test", - path: "/lastName", - value: "Einstein" - }, - { - op: "replace", - path: "/lastName", - value: "Hawking" + op: 'replace', + path: '/lastName', + value: 'Hawking' } - ]) - done() - }) - }) + ]); + done(); + }); + }); - it("should generate patch after `mousedown` event", function(done) { + it('should generate patch after `mousedown` event', function(done) { obj = { - lastName: "Einstein" - } - var lastPatches - var observer = jsonpatch.observe( - obj, - function(patches) { - lastPatches = patches - }, - true - ) + lastName: 'Einstein' + }; + var lastPatches; + var observer = jsonpatch.observe(obj, function(patches) { + lastPatches = patches; + }); - obj.lastName = "Hawking" - trigger("mousedown") + obj.lastName = 'Hawking'; + trigger('mousedown'); setTimeout(function() { expect(lastPatches).toEqual([ { - op: "test", - path: "/lastName", - value: "Einstein" - }, - { - op: "replace", - path: "/lastName", - value: "Hawking" + op: 'replace', + path: '/lastName', + value: 'Hawking' } - ]) - done() - }, 20) - }) + ]); + done(); + }, 20); + }); - it("should generate patch after `keydown` event", function(done) { + it('should generate patch after `keydown` event', function(done) { obj = { - lastName: "Einstein" - } - var lastPatches - var observer = jsonpatch.observe( - obj, - function(patches) { - lastPatches = patches - }, - true - ) + lastName: 'Einstein' + }; + var lastPatches; + var observer = jsonpatch.observe(obj, function(patches) { + lastPatches = patches; + }); - obj.lastName = "Hawking" - trigger("keydown") + obj.lastName = 'Hawking'; + trigger('keydown'); setTimeout(function() { expect(lastPatches).toEqual([ { - op: "test", - path: "/lastName", - value: "Einstein" - }, - { - op: "replace", - path: "/lastName", - value: "Hawking" + op: 'replace', + path: '/lastName', + value: 'Hawking' } - ]) - done() - }, 20) - }) + ]); + done(); + }, 20); + }); - it("should generate patch after `change` event", function(done) { + it('should generate patch after `change` event', function(done) { obj = { - lastName: "Einstein" - } - var lastPatches - var observer = jsonpatch.observe( - obj, - function(patches) { - lastPatches = patches - }, - true - ) + lastName: 'Einstein' + }; + var lastPatches; + var observer = jsonpatch.observe(obj, function(patches) { + lastPatches = patches; + }); - obj.lastName = "Hawking" - trigger("change") + obj.lastName = 'Hawking'; + trigger('change'); setTimeout(function() { expect(lastPatches).toEqual([ { - op: "test", - path: "/lastName", - value: "Einstein" - }, - { - op: "replace", - path: "/lastName", - value: "Hawking" + op: 'replace', + path: '/lastName', + value: 'Hawking' } - ]) - done() - }, 20) - }) - }) - describe("compare", function() { - it("Replacing a root array with an object should be handled well", function() { - const obj = {} - var patches = jsonpatch.compare(["jack"], obj, {inversible: true}) + ]); + done(); + }, 20); + }); + }); + describe('compare', function() { + it('Replacing a root array with an object should be handled well', function() { + + const obj = {}; + var patches = jsonpatch.compare(['jack'], obj); expect(patches).toEqual([ { - op: "test", - path: "", - value: ["jack"] - }, - { - op: "replace", - path: "", + op: 'replace', + path: '', value: obj } - ]) - }) - it("Replacing an array with an object should be handled well", function() { - const obj = {} - var patches = jsonpatch.compare( - {arr: ["jack"]}, - {arr: obj}, - {inversible: true} - ) + ]); + + }); + it('Replacing an array with an object should be handled well', function() { + + const obj = {}; + var patches = jsonpatch.compare({arr: ['jack']}, {arr: obj}); expect(patches).toEqual([ { - op: "test", - path: "/arr", - value: ["jack"] - }, - { - op: "replace", - path: "/arr", + op: 'replace', + path: '/arr', value: obj } - ]) - }) - it("Replacing an array that nested in an object with an object nested in an an object should be handled well", function() { - const obj = {} - var patches = jsonpatch.compare( - {arr: {deeperArray: ["jack"]}}, - {arr: {deeperArray: obj}}, - {inversible: true} - ) + ]); + + }); + it('Replacing an array that nested in an object with an object nested in an an object should be handled well', function() { + + const obj = {}; + var patches = jsonpatch.compare({arr: {deeperArray: ['jack']}}, {arr: {deeperArray: obj}}); expect(patches).toEqual([ { - op: "test", - path: "/arr/deeperArray", - value: ["jack"] - }, - { - op: "replace", - path: "/arr/deeperArray", + op: 'replace', + path: '/arr/deeperArray', value: obj } - ]) - }) - it("should return an add for a property that does not exist in the first obj", function() { + ]); + + }); + it('should return an add for a property that does not exist in the first obj', function() { var objA = { user: { - firstName: "Albert" + firstName: 'Albert' } - } + }; var objB = { user: { - firstName: "Albert", - lastName: "Einstein" + firstName: 'Albert', + lastName: 'Einstein' } - } + }; - expect(jsonpatch.compare(objA, objB, {inversible: true})).toReallyEqual([ + expect(jsonpatch.compare(objA, objB)).toReallyEqual([ { - op: "add", - path: "/user/lastName", - value: "Einstein" + op: 'add', + path: '/user/lastName', + value: 'Einstein' } - ]) - }) + ]); + }); - it("should return a remove for a property that does not exist in the second obj", function() { + it('should return a remove for a property that does not exist in the second obj', function() { var objA = { user: { - firstName: "Albert", - lastName: "Einstein" + firstName: 'Albert', + lastName: 'Einstein' } - } + }; var objB = { user: { - firstName: "Albert" + firstName: 'Albert' } - } + }; - expect(jsonpatch.compare(objA, objB, {inversible: true})).toReallyEqual([ - { - op: "test", - path: "/user/lastName", - value: "Einstein" - }, + expect(jsonpatch.compare(objA, objB)).toReallyEqual([ { - op: "remove", - path: "/user/lastName" + op: 'remove', + path: '/user/lastName' } - ]) - }) + ]); + }); - it("should return a replace for a property that exists in both", function() { + it('should return a replace for a property that exists in both', function() { var objA = { user: { - firstName: "Albert", - lastName: "Einstein" + firstName: 'Albert', + lastName: 'Einstein' } - } + }; var objB = { user: { - firstName: "Albert", - lastName: "Collins" + firstName: 'Albert', + lastName: 'Collins' } - } + }; - expect(jsonpatch.compare(objA, objB, {inversible: true})).toReallyEqual([ + expect(jsonpatch.compare(objA, objB)).toReallyEqual([ { - op: "test", - path: "/user/lastName", - value: "Einstein" - }, - { - op: "replace", - path: "/user/lastName", - value: "Collins" + op: 'replace', + path: '/user/lastName', + value: 'Collins' } - ]) - }) + ]); + }); - it("should replace null with object", function() { + it('should replace null with object', function() { var objA = { user: null - } + }; var objB = { user: {} - } + }; - expect(jsonpatch.compare(objA, objB, {inversible: true})).toReallyEqual([ - { - op: "test", - path: "/user", - value: null - }, + expect(jsonpatch.compare(objA, objB)).toReallyEqual([ { - op: "replace", - path: "/user", + op: 'replace', + path: '/user', value: {} } - ]) - }) + ]); + }); - it("should replace object with null", function() { + it('should replace object with null', function() { var objA = { user: {} - } + }; var objB = { user: null - } + }; - expect(jsonpatch.compare(objA, objB, {inversible: true})).toReallyEqual([ - { - op: "test", - path: "/user", - value: {} - }, + expect(jsonpatch.compare(objA, objB)).toReallyEqual([ { - op: "replace", - path: "/user", + op: 'replace', + path: '/user', value: null } - ]) - }) + ]); + }); - it("should not remove undefined", function() { + it('should not remove undefined', function() { var objA = { user: undefined - } + }; var objB = { user: undefined - } + }; - expect(jsonpatch.compare(objA, objB)).toReallyEqual([]) - }) + expect(jsonpatch.compare(objA, objB)).toReallyEqual([]); + }); - it("should replace 0 with empty string", function() { + it('should replace 0 with empty string', function() { var objA = { user: 0 - } + }; var objB = { - user: "" - } + user: '' + }; - expect(jsonpatch.compare(objA, objB, {inversible: true})).toReallyEqual([ - { - op: "test", - path: "/user", - value: 0 - }, + expect(jsonpatch.compare(objA, objB)).toReallyEqual([ { - op: "replace", - path: "/user", - value: "" + op: 'replace', + path: '/user', + value: '' } - ]) - }) - }) + ]); + }); + }); - describe("Registering multiple observers with the same callback", function() { - it("should register only one observer", function(done) { + describe('Registering multiple observers with the same callback', function() { + it('should register only one observer', function(done) { var obj = { - foo: "bar" - } + foo: 'bar' + }; - var callback = jasmine.createSpy("callback") + var callback = jasmine.createSpy('callback'); - jsonpatch.observe(obj, callback) - jsonpatch.observe(obj, callback) + jsonpatch.observe(obj, callback); + jsonpatch.observe(obj, callback); - expect(callback.calls.count()).toReallyEqual(0) + expect(callback.calls.count()).toReallyEqual(0); - obj.foo = "bazz" + obj.foo = 'bazz'; - trigger("keyup") + trigger('keyup'); setTimeout(function() { - expect(callback.calls.count()).toReallyEqual(1) - done() - }, 100) - }) + expect(callback.calls.count()).toReallyEqual(1); + done(); + }, 100); + }); - it("should return the same observer if callback has been already registered)", function() { + it('should return the same observer if callback has been already registered)', function() { var obj = { - foo: "bar" - } + foo: 'bar' + }; - var callback = jasmine.createSpy("callback") + var callback = jasmine.createSpy('callback'); - var observer1 = jsonpatch.observe(obj, callback) - var observer2 = jsonpatch.observe(obj, callback) + var observer1 = jsonpatch.observe(obj, callback); + var observer2 = jsonpatch.observe(obj, callback); - expect(observer1).toBe(observer2) - }) + expect(observer1).toBe(observer2); + }); - it("should return a different observer if callback has been unregistered and registered again", function() { + it('should return a different observer if callback has been unregistered and registered again', function() { var obj = { - foo: "bar" - } + foo: 'bar' + }; - var callback = jasmine.createSpy("callback") + var callback = jasmine.createSpy('callback'); - var observer1 = jsonpatch.observe(obj, callback) + var observer1 = jsonpatch.observe(obj, callback); - jsonpatch.unobserve(obj, observer1) + jsonpatch.unobserve(obj, observer1); - var observer2 = jsonpatch.observe(obj, callback) + var observer2 = jsonpatch.observe(obj, callback); - expect(observer1).not.toBe(observer2) - }) + expect(observer1).not.toBe(observer2); + }); - it("should not call callback on key and mouse events after unobserve", function(done) { - var called = 0 + it('should not call callback on key and mouse events after unobserve', function( + done + ) { + var called = 0; obj = { - firstName: "Albert", - lastName: "Einstein", + firstName: 'Albert', + lastName: 'Einstein', phoneNumbers: [ { - number: "12345" + number: '12345' }, { - number: "45353" + number: '45353' } ] - } + }; - var observer = jsonpatch.observe( - obj, - function(patches) { - called++ - }, - true - ) + var observer = jsonpatch.observe(obj, function(patches) { + called++; + }); - obj.firstName = "Malvin" + obj.firstName = 'Malvin'; - trigger("keyup") + trigger('keyup'); // ugly migration from Jasmine 1.x to > 2.0 setTimeout(function() { - expect(called).toReallyEqual(1) + expect(called).toReallyEqual(1); - jsonpatch.unobserve(obj, observer) + jsonpatch.unobserve(obj, observer); - obj.firstName = "Wilfred" + obj.firstName = 'Wilfred'; - trigger("mousedown") - trigger("mouseup") - trigger("keydown") - trigger("keyup") + trigger('mousedown'); + trigger('mouseup'); + trigger('keydown'); + trigger('keyup'); setTimeout(function() { - expect(called).toReallyEqual(1) - done() - }, 20) - }, 20) - }) - }) - - describe("compare", function() { - it("should return patch difference between objects", function() { + expect(called).toReallyEqual(1); + done(); + }, 20); + }, 20); + }); + }); + + describe('compare', function() { + it('should return patch difference between objects', function() { var obj = { - firstName: "Albert", - lastName: "Einstein", + firstName: 'Albert', + lastName: 'Einstein', phoneNumbers: [ { - number: "12345" + number: '12345' }, { - number: "45353" + number: '45353' } ] - } + }; var obj2 = { - firstName: "Joachim", - lastName: "Wester", + firstName: 'Joachim', + lastName: 'Wester', mobileNumbers: [ { - number: "12345" + number: '12345' }, { - number: "45353" + number: '45353' } ] - } + }; - var patches = jsonpatch.compare(obj, obj2, {inversible: true}) + var patches = jsonpatch.compare(obj, obj2); expect(patches).toReallyEqual([ { - op: "test", - path: "/phoneNumbers", - value: [ - { - number: "12345" - }, - { - number: "45353" - } - ] - }, - { - op: "remove", - path: "/phoneNumbers" + op: 'remove', + path: '/phoneNumbers' }, { - op: "test", - path: "/lastName", - value: "Einstein" + op: 'replace', + path: '/lastName', + value: 'Wester' }, { - op: "replace", - path: "/lastName", - value: "Wester" + op: 'replace', + path: '/firstName', + value: 'Joachim' }, { - op: "test", - path: "/firstName", - value: "Albert" - }, - { - op: "replace", - path: "/firstName", - value: "Joachim" - }, - { - op: "add", - path: "/mobileNumbers", + op: 'add', + path: '/mobileNumbers', value: [ { - number: "12345" + number: '12345' }, { - number: "45353" + number: '45353' } ] } - ]) - }) + ]); + }); - it("should not modify the source object", function() { + it('should not modify the source object', function() { var obj = { - foo: "bar" - } - jsonpatch.compare(obj, {}, {inversible: true}) - expect(obj.foo).toReallyEqual("bar") - }) - }) - - it("should work with plain objects", function() { + foo: 'bar' + }; + jsonpatch.compare(obj, {}); + expect(obj.foo).toReallyEqual('bar'); + }); + }); + + it('should work with plain objects', function() { // Objects without Object prototype - var one = Object.create(null) - var two = Object.create(null) - one.onlyOne = Object.create(null) - two.onlyTwo = Object.create(null) - one.both = Object.create(null) - two.both = Object.create(null) + var one = Object.create(null); + var two = Object.create(null); + one.onlyOne = Object.create(null); + two.onlyTwo = Object.create(null); + one.both = Object.create(null); + two.both = Object.create(null); // This must not throw - jsonpatch.compare(one, two, {inversible: true}) - }) -}) + jsonpatch.compare(one, two); + }); +}); From 5860c9235bffa2a4416759faab9e1bde1f9170c6 Mon Sep 17 00:00:00 2001 From: Tom Pytleski Date: Thu, 9 May 2019 11:13:18 -0500 Subject: [PATCH 09/15] fix formating for validate spec --- dist/fast-json-patch.js | 94 ++--- dist/fast-json-patch.min.js | 2 +- test/spec/validateSpec.js | 744 ++++++++++++++++++------------------ 3 files changed, 394 insertions(+), 446 deletions(-) diff --git a/dist/fast-json-patch.js b/dist/fast-json-patch.js index 00998223..51ecc7a9 100644 --- a/dist/fast-json-patch.js +++ b/dist/fast-json-patch.js @@ -710,9 +710,7 @@ function observe(obj, callback, inversible) { if (observer) { return observer; } - observer = { - inversible: inversible - }; + observer = { inversible: inversible }; mirror.value = helpers_1._deepClone(obj); if (callback) { observer.callback = callback; @@ -724,24 +722,20 @@ function observe(obj, callback, inversible) { clearTimeout(observer.next); observer.next = setTimeout(dirtyCheck); }; - if (typeof window !== "undefined") { - //not Node + if (typeof window !== 'undefined') { if (window.addEventListener) { - //standards - window.addEventListener("mouseup", fastCheck); - window.addEventListener("keyup", fastCheck); - window.addEventListener("mousedown", fastCheck); - window.addEventListener("keydown", fastCheck); - window.addEventListener("change", fastCheck); + window.addEventListener('mouseup', fastCheck); + window.addEventListener('keyup', fastCheck); + window.addEventListener('mousedown', fastCheck); + window.addEventListener('keydown', fastCheck); + window.addEventListener('change', fastCheck); } else { - //IE8 - ; - document.documentElement.attachEvent("onmouseup", fastCheck); - document.documentElement.attachEvent("onkeyup", fastCheck); - document.documentElement.attachEvent("onmousedown", fastCheck); - document.documentElement.attachEvent("onkeydown", fastCheck); - document.documentElement.attachEvent("onchange", fastCheck); + document.documentElement.attachEvent('onmouseup', fastCheck); + document.documentElement.attachEvent('onkeyup', fastCheck); + document.documentElement.attachEvent('onmousedown', fastCheck); + document.documentElement.attachEvent('onkeydown', fastCheck); + document.documentElement.attachEvent('onchange', fastCheck); } } } @@ -751,19 +745,18 @@ function observe(obj, callback, inversible) { generate(observer); clearTimeout(observer.next); removeObserverFromMirror(mirror, observer); - if (typeof window !== "undefined") { + if (typeof window !== 'undefined') { if (window.removeEventListener) { - window.removeEventListener("mouseup", fastCheck); - window.removeEventListener("keyup", fastCheck); - window.removeEventListener("mousedown", fastCheck); - window.removeEventListener("keydown", fastCheck); + window.removeEventListener('mouseup', fastCheck); + window.removeEventListener('keyup', fastCheck); + window.removeEventListener('mousedown', fastCheck); + window.removeEventListener('keydown', fastCheck); } else { - ; - document.documentElement.detachEvent("onmouseup", fastCheck); - document.documentElement.detachEvent("onkeyup", fastCheck); - document.documentElement.detachEvent("onmousedown", fastCheck); - document.documentElement.detachEvent("onkeydown", fastCheck); + document.documentElement.detachEvent('onmouseup', fastCheck); + document.documentElement.detachEvent('onkeyup', fastCheck); + document.documentElement.detachEvent('onmousedown', fastCheck); + document.documentElement.detachEvent('onkeydown', fastCheck); } } }; @@ -773,14 +766,11 @@ function observe(obj, callback, inversible) { exports.observe = observe; /** * Generate an array of patches from an observer - * If opts.inversible is defined, overwrite observer.inversible */ function generate(observer, opts) { if (opts === void 0) { opts = {}; } var mirror = beforeDict.get(observer.object); - var inversible = typeof opts.inversible !== "undefined" - ? opts.inversible - : observer.inversible; + var inversible = typeof opts.inversible !== "undefined" ? opts.inversible : observer.inversible; _generate(mirror.value, observer.object, observer.patches, "", { inversible: inversible }); if (observer.patches.length) { core_1.applyPatch(mirror.value, observer.patches); @@ -797,9 +787,7 @@ function generate(observer, opts) { exports.generate = generate; // Dirty check if obj is different from mirror, generate patches and update mirror function _generate(mirror, obj, patches, path, opts) { - if (opts === void 0) { opts = { - inversible: false - }; } + if (opts === void 0) { opts = { inversible: false }; } if (obj === mirror) { return; } @@ -815,41 +803,23 @@ function _generate(mirror, obj, patches, path, opts) { for (var t = oldKeys.length - 1; t >= 0; t--) { var key = oldKeys[t]; var oldVal = mirror[key]; - if (helpers_1.hasOwnProperty(obj, key) && - !(obj[key] === undefined && - oldVal !== undefined && - Array.isArray(obj) === false)) { + if (helpers_1.hasOwnProperty(obj, key) && !(obj[key] === undefined && oldVal !== undefined && Array.isArray(obj) === false)) { var newVal = obj[key]; - if (typeof oldVal == "object" && - oldVal != null && - typeof newVal == "object" && - newVal != null) { + if (typeof oldVal == "object" && oldVal != null && typeof newVal == "object" && newVal != null) { _generate(oldVal, newVal, patches, path + "/" + helpers_1.escapePathComponent(key), opts); } else { if (oldVal !== newVal) { changed = true; if (inversible) - patches.push({ - op: "test", - path: path + "/" + helpers_1.escapePathComponent(key), - value: helpers_1._deepClone(oldVal) - }); - patches.push({ - op: "replace", - path: path + "/" + helpers_1.escapePathComponent(key), - value: helpers_1._deepClone(newVal) - }); + patches.push({ op: "test", path: path + "/" + helpers_1.escapePathComponent(key), value: helpers_1._deepClone(oldVal) }); + patches.push({ op: "replace", path: path + "/" + helpers_1.escapePathComponent(key), value: helpers_1._deepClone(newVal) }); } } } else if (Array.isArray(mirror) === Array.isArray(obj)) { if (inversible) - patches.push({ - op: "test", - path: path + "/" + helpers_1.escapePathComponent(key), - value: helpers_1._deepClone(oldVal) - }); + patches.push({ op: "test", path: path + "/" + helpers_1.escapePathComponent(key), value: helpers_1._deepClone(oldVal) }); patches.push({ op: "remove", path: path + "/" + helpers_1.escapePathComponent(key) }); deleted = true; // property has been deleted } @@ -866,11 +836,7 @@ function _generate(mirror, obj, patches, path, opts) { for (var t = 0; t < newKeys.length; t++) { var key = newKeys[t]; if (!helpers_1.hasOwnProperty(mirror, key) && obj[key] !== undefined) { - patches.push({ - op: "add", - path: path + "/" + helpers_1.escapePathComponent(key), - value: helpers_1._deepClone(obj[key]) - }); + patches.push({ op: "add", path: path + "/" + helpers_1.escapePathComponent(key), value: helpers_1._deepClone(obj[key]) }); } } } @@ -879,7 +845,7 @@ function _generate(mirror, obj, patches, path, opts) { */ function compare(tree1, tree2, opts) { var patches = []; - _generate(tree1, tree2, patches, "", opts); + _generate(tree1, tree2, patches, '', opts); return patches; } exports.compare = compare; diff --git a/dist/fast-json-patch.min.js b/dist/fast-json-patch.min.js index 25772bfa..1568b3dc 100644 --- a/dist/fast-json-patch.min.js +++ b/dist/fast-json-patch.min.js @@ -1,2 +1,2 @@ /*! fast-json-patch, version: 2.1.0 */ -var jsonpatch=function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c={};return b.m=a,b.c=c,b.i=function(a){return a},b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{configurable:!1,enumerable:!0,get:d})},b.n=function(a){var c=a&&a.__esModule?function(){return a['default']}:function(){return a};return b.d(c,'a',c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p='',b(b.s=2)}([function(a,b){function c(a,b){return j.call(a,b)}function d(a){if(Array.isArray(a)){for(var b=Array(a.length),d=0;d=b){c++;continue}return!1}return!0},b.escapePathComponent=e,b.unescapePathComponent=function(a){return a.replace(/~1/g,'/').replace(/~0/g,'~')},b._getPathRecursive=f,b.getPath=function(a,b){if(a===b)return'/';var c=f(a,b);if(''===c)throw new Error('Object not found in root');return'/'+c},b.hasUndefined=g;var k=function(a){function b(b,c,d,e,f){a.call(this,h(b,{name:c,index:d,operation:e,tree:f})),this.name=c,this.index=d,this.operation=e,this.tree=f,this.message=h(b,{name:c,index:d,operation:e,tree:f})}return i(b,a),b}(Error);b.PatchError=k},function(a,b,c){function d(a,b){if(''==b)return a;var c={op:'_get',path:b};return e(a,c),c.value}function e(a,c,e,f,h,i){if(void 0===e&&(e=!1),void 0===f&&(f=!0),void 0===h&&(h=!0),void 0===i&&(i=0),e&&('function'==typeof e?e(c,0,a,c.path):g(c,0)),''===c.path){var j={newDocument:a};if('add'===c.op)return j.newDocument=c.value,j;if('replace'===c.op)return j.newDocument=c.value,j.removed=a,j;if('move'===c.op||'copy'===c.op)return j.newDocument=d(a,c.from),'move'===c.op&&(j.removed=a),j;if('test'===c.op){if(j.test=k(a,c.value),!1===j.test)throw new b.JsonPatchError('Test operation failed','TEST_OPERATION_FAILED',i,c,a);return j.newDocument=a,j}if('remove'===c.op)return j.removed=a,j.newDocument=null,j;if('_get'===c.op)return c.value=a,j;if(e)throw new b.JsonPatchError('Operation `op` property is not one of operations defined in RFC-6902','OPERATION_OP_INVALID',i,c,a);else return j}else{f||(a=l._deepClone(a));var o=c.path||'',p=o.split('/'),q=a,r=1,s=p.length,t=void 0,u=void 0,v=void 0;for(v='function'==typeof e?e:g;;){if(u=p[r],h&&'__proto__'==u)throw new TypeError('JSON-Patch: modifying `__proto__` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README');if(e&&void 0==t&&(void 0===q[u]?t=p.slice(0,r).join('/'):r==s-1&&(t=c.path),void 0!==t&&v(c,0,a,t)),r++,Array.isArray(q)){if('-'===u)u=q.length;else if(e&&!l.isInteger(u))throw new b.JsonPatchError('Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index','OPERATION_PATH_ILLEGAL_ARRAY_INDEX',i,c,a);else l.isInteger(u)&&(u=~~u);if(r>=s){if(e&&'add'===c.op&&u>q.length)throw new b.JsonPatchError('The specified index MUST NOT be greater than the number of elements in the array','OPERATION_VALUE_OUT_OF_BOUNDS',i,c,a);var j=n[c.op].call(c,q,u,a);if(!1===j.test)throw new b.JsonPatchError('Test operation failed','TEST_OPERATION_FAILED',i,c,a);return j}}else if(u&&-1!=u.indexOf('~')&&(u=l.unescapePathComponent(u)),r>=s){var j=m[c.op].call(c,q,u,a);if(!1===j.test)throw new b.JsonPatchError('Test operation failed','TEST_OPERATION_FAILED',i,c,a);return j}q=q[u]}}}function f(a,c,d,f,g){if(void 0===f&&(f=!0),void 0===g&&(g=!0),d&&!Array.isArray(c))throw new b.JsonPatchError('Patch sequence must be an array','SEQUENCE_NOT_AN_ARRAY');f||(a=l._deepClone(a));for(var h=Array(c.length),j=0,i=c.length;j=b){c++;continue}return!1}return!0},b.escapePathComponent=e,b.unescapePathComponent=function(a){return a.replace(/~1/g,'/').replace(/~0/g,'~')},b._getPathRecursive=f,b.getPath=function(a,b){if(a===b)return'/';var c=f(a,b);if(''===c)throw new Error('Object not found in root');return'/'+c},b.hasUndefined=g;var k=function(a){function b(b,c,d,e,f){a.call(this,h(b,{name:c,index:d,operation:e,tree:f})),this.name=c,this.index=d,this.operation=e,this.tree=f,this.message=h(b,{name:c,index:d,operation:e,tree:f})}return i(b,a),b}(Error);b.PatchError=k},function(a,b,c){function d(a,b){if(''==b)return a;var c={op:'_get',path:b};return e(a,c),c.value}function e(a,c,e,f,h,i){if(void 0===e&&(e=!1),void 0===f&&(f=!0),void 0===h&&(h=!0),void 0===i&&(i=0),e&&('function'==typeof e?e(c,0,a,c.path):g(c,0)),''===c.path){var j={newDocument:a};if('add'===c.op)return j.newDocument=c.value,j;if('replace'===c.op)return j.newDocument=c.value,j.removed=a,j;if('move'===c.op||'copy'===c.op)return j.newDocument=d(a,c.from),'move'===c.op&&(j.removed=a),j;if('test'===c.op){if(j.test=k(a,c.value),!1===j.test)throw new b.JsonPatchError('Test operation failed','TEST_OPERATION_FAILED',i,c,a);return j.newDocument=a,j}if('remove'===c.op)return j.removed=a,j.newDocument=null,j;if('_get'===c.op)return c.value=a,j;if(e)throw new b.JsonPatchError('Operation `op` property is not one of operations defined in RFC-6902','OPERATION_OP_INVALID',i,c,a);else return j}else{f||(a=l._deepClone(a));var o,p,q,r=c.path||'',s=r.split('/'),u=a,v=1,t=s.length;for(q='function'==typeof e?e:g;;){if(p=s[v],h&&'__proto__'==p)throw new TypeError('JSON-Patch: modifying `__proto__` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README');if(e&&void 0==o&&(void 0===u[p]?o=s.slice(0,v).join('/'):v==t-1&&(o=c.path),void 0!==o&&q(c,0,a,o)),v++,Array.isArray(u)){if('-'===p)p=u.length;else if(e&&!l.isInteger(p))throw new b.JsonPatchError('Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index','OPERATION_PATH_ILLEGAL_ARRAY_INDEX',i,c,a);else l.isInteger(p)&&(p=~~p);if(v>=t){if(e&&'add'===c.op&&p>u.length)throw new b.JsonPatchError('The specified index MUST NOT be greater than the number of elements in the array','OPERATION_VALUE_OUT_OF_BOUNDS',i,c,a);var j=n[c.op].call(c,u,p,a);if(!1===j.test)throw new b.JsonPatchError('Test operation failed','TEST_OPERATION_FAILED',i,c,a);return j}}else if(p&&-1!=p.indexOf('~')&&(p=l.unescapePathComponent(p)),v>=t){var j=m[c.op].call(c,u,p,a);if(!1===j.test)throw new b.JsonPatchError('Test operation failed','TEST_OPERATION_FAILED',i,c,a);return j}u=u[p]}}}function f(a,c,d,f,g){if(void 0===f&&(f=!0),void 0===g&&(g=!0),d&&!Array.isArray(c))throw new b.JsonPatchError('Patch sequence must be an array','SEQUENCE_NOT_AN_ARRAY');f||(a=l._deepClone(a));for(var h=Array(c.length),j=0,i=c.length;j jsonpatch.applyPatch({}, {}, true)).toThrow( - new jsonpatch.JsonPatchError( - "Patch sequence must be an array", - "SEQUENCE_NOT_AN_ARRAY" - ) - ) - }) - it("applyPatch should throw an error if the patch is not an array and validate is `true`", function() { - expect(() => jsonpatch.applyPatch({}, null, true)).toThrow( - new jsonpatch.JsonPatchError( - "Patch sequence must be an array", - "SEQUENCE_NOT_AN_ARRAY" - ) - ) - }) - it("applyPatch should throw list the index and the object of the faulty operation in the patch", function() { - expect(() => - jsonpatch.applyPatch( - {}, - [ - {op: "add", path: "/root", value: []}, - {op: "add", path: "/root/2", value: 2} // out of bounds - ], - true - ) - ).toThrow( - new jsonpatch.JsonPatchError( - "The specified index MUST NOT be greater than the number of elements in the array", - "OPERATION_VALUE_OUT_OF_BOUNDS", - 1, // the index of the faulty operation - {op: "add", path: "/root/2", value: 2}, // the faulty operation - {root: []} // the tree after the first operation - ) - ) - }) - it("JsonPatchError should have a nice formatted message", function() { - const message = "Some error message" - const name = "SOME_ERROR_NAME" - const index = 1 // op index - const operation = JSON.stringify( - {op: "replace", path: "/root", value: {}}, - null, - 2 - ) - const tree = JSON.stringify({root: []}, null, 2) - - const expectedError = new jsonpatch.JsonPatchError( - message, - name, - index, - operation, - tree - ) + ]; + var error = jsonpatch.validate(patch); + expect(error).toBeUndefined(); + }); + + it('applyPatch should throw an error if the patch is not an array and validate is `true`', function() { + expect(() => jsonpatch.applyPatch({}, {}, true)).toThrow(new jsonpatch.JsonPatchError('Patch sequence must be an array', 'SEQUENCE_NOT_AN_ARRAY')); + }); + it('applyPatch should throw an error if the patch is not an array and validate is `true`', function() { + expect(() => jsonpatch.applyPatch({}, null, true)).toThrow(new jsonpatch.JsonPatchError('Patch sequence must be an array', 'SEQUENCE_NOT_AN_ARRAY')); + }); + it('applyPatch should throw list the index and the object of the faulty operation in the patch', function() { + expect(() => + jsonpatch.applyPatch( + {}, + [ + { op: 'add', path: '/root', value: [] }, + { op: 'add', path: '/root/2', value: 2 } // out of bounds + ], + true + ) + ).toThrow( + new jsonpatch.JsonPatchError( + 'The specified index MUST NOT be greater than the number of elements in the array', + 'OPERATION_VALUE_OUT_OF_BOUNDS', + 1, // the index of the faulty operation + { op: 'add', path: '/root/2', value: 2 }, // the faulty operation + { root: [] } // the tree after the first operation + ) + ); + }); + it('JsonPatchError should have a nice formatted message', function() { + const message = "Some error message"; + const name = "SOME_ERROR_NAME"; + const index = 1; // op index + const operation = JSON.stringify({ op: "replace", path: '/root', value: {} }, null, 2); + const tree = JSON.stringify({ root: [] }, null, 2); + + const expectedError = new jsonpatch.JsonPatchError(message, name, index, operation, tree); /* Some error message @@ -111,541 +91,543 @@ describe("validate", function() { .concat(name, "\nindex: ") .concat(index, "\noperation: ") .concat(operation, "\ntree: ") - .concat(tree) // don't use `` to support the loveliest browser: IE + .concat(tree); // don't use `` to support the loveliest browser: IE + + expect(expectedError.message).toEqual(expectedFormattedErrorMessage); + }); - expect(expectedError.message).toEqual(expectedFormattedErrorMessage) - }) - it("should return an empty array if the operation is a valid object", function() { + it('should return an empty array if the operation is a valid object', function() { var error = jsonpatch.validate([ { - op: "add", - value: "foo", - path: "/bar" + op: 'add', + value: 'foo', + path: '/bar' } - ]) - expect(error).toBeUndefined() - }) - - it("should return an error if the operation is null", function() { - var error = jsonpatch.validate([null]) - expect(error instanceof jsonpatch.JsonPatchError).toBe(true) - expect(error.name).toBe("OPERATION_NOT_AN_OBJECT") - }) - - it("should return an error which is instance of Error and jsonpatch.JsonPatchError", function() { - var error = jsonpatch.validate({}) - expect(error instanceof jsonpatch.JsonPatchError).toBe(true) - expect(error instanceof Error).toBe(true) - expect(error.name).toBe("SEQUENCE_NOT_AN_ARRAY") - }) - - it("should return an error that contains the cloned patch and the patched object", function() { + ]); + expect(error).toBeUndefined(); + }); + + it('should return an error if the operation is null', function() { + var error = jsonpatch.validate([null]); + expect(error instanceof jsonpatch.JsonPatchError).toBe(true); + expect(error.name).toBe('OPERATION_NOT_AN_OBJECT'); + }); + + it('should return an error which is instance of Error and jsonpatch.JsonPatchError', function() { + var error = jsonpatch.validate({}); + expect(error instanceof jsonpatch.JsonPatchError).toBe(true); + expect(error instanceof Error).toBe(true); + expect(error.name).toBe('SEQUENCE_NOT_AN_ARRAY'); + }); + + it('should return an error that contains the cloned patch and the patched object', function() { var tree = { - name: "Elvis", + name: 'Elvis', cars: [] - } + }; var sequence = [ { - op: "remove", - path: "/name/first" + op: 'remove', + path: '/name/first' } - ] - var error = jsonpatch.validate(sequence, tree) - expect(error instanceof jsonpatch.JsonPatchError).toBe(true) - expect(JSON.stringify(error.operation)).toBe(JSON.stringify(sequence[0])) - expect(JSON.stringify(error.tree)).toBe(JSON.stringify(tree)) - expect(error.name).toBe("OPERATION_PATH_UNRESOLVABLE") - }) - - it("should return an error if the operation is undefined", function() { - var error = jsonpatch.validate([undefined]) - expect(error instanceof jsonpatch.JsonPatchError).toBe(true) - expect(error.name).toBe("OPERATION_NOT_AN_OBJECT") - }) - - it("should return an error if the operation is an array", function() { - var error = jsonpatch.validate([[]]) - expect(error instanceof jsonpatch.JsonPatchError).toBe(true) - expect(error.name).toBe("OPERATION_NOT_AN_OBJECT") - }) + ]; + var error = jsonpatch.validate(sequence, tree); + expect(error instanceof jsonpatch.JsonPatchError).toBe(true); + expect(JSON.stringify(error.operation)).toBe(JSON.stringify(sequence[0])); + expect(JSON.stringify(error.tree)).toBe(JSON.stringify(tree)); + expect(error.name).toBe('OPERATION_PATH_UNRESOLVABLE'); + }); + + it('should return an error if the operation is undefined', function() { + var error = jsonpatch.validate([undefined]); + expect(error instanceof jsonpatch.JsonPatchError).toBe(true); + expect(error.name).toBe('OPERATION_NOT_AN_OBJECT'); + }); + + it('should return an error if the operation is an array', function() { + var error = jsonpatch.validate([[]]); + expect(error instanceof jsonpatch.JsonPatchError).toBe(true); + expect(error.name).toBe('OPERATION_NOT_AN_OBJECT'); + }); it('should return an error if the operation "op" property is not a string', function() { var error = jsonpatch.validate([ { - path: "/a/b/c" + path: '/a/b/c' } - ]) - expect(error instanceof jsonpatch.JsonPatchError).toBe(true) - expect(error.name).toBe("OPERATION_OP_INVALID") - }) + ]); + expect(error instanceof jsonpatch.JsonPatchError).toBe(true); + expect(error.name).toBe('OPERATION_OP_INVALID'); + }); it('should return an error if the operation "path" property is not a string', function() { var error = jsonpatch.validate([ { - op: "remove", - value: "foo" + op: 'remove', + value: 'foo' } - ]) - expect(error instanceof jsonpatch.JsonPatchError).toBe(true) - expect(error.name).toBe("OPERATION_PATH_INVALID") - }) + ]); + expect(error instanceof jsonpatch.JsonPatchError).toBe(true); + expect(error.name).toBe('OPERATION_PATH_INVALID'); + }); it('should return an error if an "add" operation is missing "value" property', function() { var error = jsonpatch.validate([ { - op: "add", - path: "/a/b/c" + op: 'add', + path: '/a/b/c' } - ]) - expect(error instanceof jsonpatch.JsonPatchError).toBe(true) - expect(error.name).toBe("OPERATION_VALUE_REQUIRED") - }) + ]); + expect(error instanceof jsonpatch.JsonPatchError).toBe(true); + expect(error.name).toBe('OPERATION_VALUE_REQUIRED'); + }); it('should return an error if an "add" operation "value" property is "undefined"', function() { var error = jsonpatch.validate([ { - op: "add", - path: "/a/b/c", + op: 'add', + path: '/a/b/c', value: undefined } - ]) - expect(error instanceof jsonpatch.JsonPatchError).toBe(true) - expect(error.name).toBe("OPERATION_VALUE_REQUIRED") - }) + ]); + expect(error instanceof jsonpatch.JsonPatchError).toBe(true); + expect(error.name).toBe('OPERATION_VALUE_REQUIRED'); + }); it('should return an error if a "replace" operation is missing "value" property', function() { var error = jsonpatch.validate([ { - op: "replace", - path: "/a/b/c" + op: 'replace', + path: '/a/b/c' } - ]) - expect(error instanceof jsonpatch.JsonPatchError).toBe(true) - expect(error.name).toBe("OPERATION_VALUE_REQUIRED") - }) + ]); + expect(error instanceof jsonpatch.JsonPatchError).toBe(true); + expect(error.name).toBe('OPERATION_VALUE_REQUIRED'); + }); it('should return an error if a "replace" operation "value" property is "undefined"', function() { var error = jsonpatch.validate([ { - op: "replace", - path: "/a/b/c", + op: 'replace', + path: '/a/b/c', value: undefined } - ]) - expect(error instanceof jsonpatch.JsonPatchError).toBe(true) - expect(error.name).toBe("OPERATION_VALUE_REQUIRED") - }) + ]); + expect(error instanceof jsonpatch.JsonPatchError).toBe(true); + expect(error.name).toBe('OPERATION_VALUE_REQUIRED'); + }); it('should return an error if a "test" operation is missing "value" property', function() { var error = jsonpatch.validate([ { - op: "test", - path: "/a/b/c" + op: 'test', + path: '/a/b/c' } - ]) - expect(error instanceof jsonpatch.JsonPatchError).toBe(true) - expect(error.name).toBe("OPERATION_VALUE_REQUIRED") - }) + ]); + expect(error instanceof jsonpatch.JsonPatchError).toBe(true); + expect(error.name).toBe('OPERATION_VALUE_REQUIRED'); + }); it('should return an error if a "test" operation "value" property is "undefined"', function() { var error = jsonpatch.validate([ { - op: "test", - path: "/a/b/c", + op: 'test', + path: '/a/b/c', value: undefined } - ]) - expect(error instanceof jsonpatch.JsonPatchError).toBe(true) - expect(error.name).toBe("OPERATION_VALUE_REQUIRED") - }) + ]); + expect(error instanceof jsonpatch.JsonPatchError).toBe(true); + expect(error.name).toBe('OPERATION_VALUE_REQUIRED'); + }); it('should return an error if an "add" operation "value" contains "undefined"', function() { var error = jsonpatch.validate([ { - op: "add", - path: "/a/b/c", + op: 'add', + path: '/a/b/c', value: { foo: undefined } } - ]) - expect(error instanceof jsonpatch.JsonPatchError).toBe(true) - expect(error.name).toBe("OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED") - }) + ]); + expect(error instanceof jsonpatch.JsonPatchError).toBe(true); + expect(error.name).toBe('OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED'); + }); it('should return an error if a "replace" operation "value" contains "undefined"', function() { var error = jsonpatch.validate([ { - op: "replace", - path: "/a/b/c", + op: 'replace', + path: '/a/b/c', value: { foos: [undefined] } } - ]) - expect(error instanceof jsonpatch.JsonPatchError).toBe(true) - expect(error.name).toBe("OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED") - }) + ]); + expect(error instanceof jsonpatch.JsonPatchError).toBe(true); + expect(error.name).toBe('OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED'); + }); it('should return an error if a "test" operation "value" contains "undefined"', function() { var error = jsonpatch.validate([ { - op: "test", - path: "/a/b/c", + op: 'test', + path: '/a/b/c', value: { foo: { bars: [undefined] } } } - ]) - expect(error instanceof jsonpatch.JsonPatchError).toBe(true) - expect(error.name).toBe("OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED") - }) + ]); + expect(error instanceof jsonpatch.JsonPatchError).toBe(true); + expect(error.name).toBe('OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED'); + }); it('should return an error if a "move" operation is missing "from" property', function() { var error = jsonpatch.validate([ { - op: "move", - path: "/a/b/c" + op: 'move', + path: '/a/b/c' } - ]) - expect(error instanceof jsonpatch.JsonPatchError).toBe(true) - expect(error.name).toBe("OPERATION_FROM_REQUIRED") - }) + ]); + expect(error instanceof jsonpatch.JsonPatchError).toBe(true); + expect(error.name).toBe('OPERATION_FROM_REQUIRED'); + }); it('should return an error if a "copy" operation is missing "from" property', function() { var error = jsonpatch.validate([ { - op: "copy", - path: "/a/b/c" + op: 'copy', + path: '/a/b/c' } - ]) - expect(error instanceof jsonpatch.JsonPatchError).toBe(true) - expect(error.name).toBe("OPERATION_FROM_REQUIRED") - }) + ]); + expect(error instanceof jsonpatch.JsonPatchError).toBe(true); + expect(error.name).toBe('OPERATION_FROM_REQUIRED'); + }); it('should return an error if the "op" property is invalid', function() { var error = jsonpatch.validate([ { - op: "foobar", - path: "/a/b/c" + op: 'foobar', + path: '/a/b/c' } - ]) - expect(error instanceof jsonpatch.JsonPatchError).toBe(true) - expect(error.name).toBe("OPERATION_OP_INVALID") - }) + ]); + expect(error instanceof jsonpatch.JsonPatchError).toBe(true); + expect(error.name).toBe('OPERATION_OP_INVALID'); + }); - it("should return error replacing an unexisting path", function() { + it('should return error replacing an unexisting path', function() { var sequence, error, tree = { - "": "empty string is a valid key", - name: "Elvis", + '': 'empty string is a valid key', + name: 'Elvis', cars: [ { - brand: "Jaguar" + brand: 'Jaguar' } ], address: {} - } + }; sequence = [ { - op: "replace", - path: "/name/first", - value: "" + op: 'replace', + path: '/name/first', + value: '' } - ] - error = jsonpatch.validate(sequence, tree) - expect(error.name).toBe("OPERATION_PATH_UNRESOLVABLE") + ]; + error = jsonpatch.validate(sequence, tree); + expect(error.name).toBe('OPERATION_PATH_UNRESOLVABLE'); sequence = [ { - op: "replace", - path: "/firstName", - value: "" + op: 'replace', + path: '/firstName', + value: '' } - ] - error = jsonpatch.validate(sequence, tree) - expect(error.name).toBe("OPERATION_PATH_UNRESOLVABLE") + ]; + error = jsonpatch.validate(sequence, tree); + expect(error.name).toBe('OPERATION_PATH_UNRESOLVABLE'); sequence = [ { - op: "replace", - path: "/cars/0/name", - value: "" + op: 'replace', + path: '/cars/0/name', + value: '' } - ] - error = jsonpatch.validate(sequence, tree) - expect(error.name).toBe("OPERATION_PATH_UNRESOLVABLE") - }) + ]; + error = jsonpatch.validate(sequence, tree); + expect(error.name).toBe('OPERATION_PATH_UNRESOLVABLE'); + }); - it("should return error removing an unexisting path", function() { + it('should return error removing an unexisting path', function() { var tree = { - name: "Elvis", + name: 'Elvis', cars: [] - } + }; var sequence = [ { - op: "remove", - path: "/name/first" + op: 'remove', + path: '/name/first' } - ] - var error = jsonpatch.validate(sequence, tree) - expect(error instanceof jsonpatch.JsonPatchError).toBe(true) - expect(error.name).toBe("OPERATION_PATH_UNRESOLVABLE") - }) + ]; + var error = jsonpatch.validate(sequence, tree); + expect(error instanceof jsonpatch.JsonPatchError).toBe(true); + expect(error.name).toBe('OPERATION_PATH_UNRESOLVABLE'); + }); it('should allow adding property "b" in "a"', function() { var tree = { a: { foo: 1 } - } + }; var sequence = [ { - op: "add", - path: "/a/b", - value: "sample" + op: 'add', + path: '/a/b', + value: 'sample' } - ] + ]; - var error = jsonpatch.validate(sequence, tree) - expect(error).toBeUndefined() - }) + var error = jsonpatch.validate(sequence, tree); + expect(error).toBeUndefined(); + }); it('should report error because "a" does not exist', function() { var tree = { q: { bar: 2 } - } + }; var sequence = [ { - op: "add", - path: "/a/b", - value: "sample" + op: 'add', + path: '/a/b', + value: 'sample' } - ] + ]; - var error = jsonpatch.validate(sequence, tree) - expect(error instanceof jsonpatch.JsonPatchError).toBe(true) - expect(error.name).toBe("OPERATION_PATH_CANNOT_ADD") - }) + var error = jsonpatch.validate(sequence, tree); + expect(error instanceof jsonpatch.JsonPatchError).toBe(true); + expect(error.name).toBe('OPERATION_PATH_CANNOT_ADD'); + }); - it("should return error when replacing a removed path", function() { + it('should return error when replacing a removed path', function() { var tree = { - name: "Elvis" - } + name: 'Elvis' + }; var sequence = [ { - op: "remove", - path: "/name" + op: 'remove', + path: '/name' }, { - op: "replace", - path: "/name", - value: "Freddie" + op: 'replace', + path: '/name', + value: 'Freddie' } - ] - var error = jsonpatch.validate(sequence, tree) - expect(error.name).toBe("OPERATION_PATH_UNRESOLVABLE") - }) + ]; + var error = jsonpatch.validate(sequence, tree); + expect(error.name).toBe('OPERATION_PATH_UNRESOLVABLE'); + }); - it("should allow to override validator to add custom validation", function() { + it('should allow to override validator to add custom validation', function() { var tree = { - password: "Elvis" - } + password: 'Elvis' + }; var sequence = [ { - op: "replace", - path: "/password", - value: "Elvis123" + op: 'replace', + path: '/password', + value: 'Elvis123' }, { - op: "replace", - path: "/password", - value: "Presley123" + op: 'replace', + path: '/password', + value: 'Presley123' }, { - op: "replace", - path: "/password" + op: 'replace', + path: '/password' } - ] + ]; + const validator = function(operation, index, tree, existingPath) { throw new jsonpatch.JsonPatchError( - "Operation `value` property must not contain the old value", - "OPERATION_VALUE_MUST_NOT_CONTAIN_OLD_VALUE", - index, - operation, - tree - ) - } - var customError = jsonpatch.validate(sequence, tree, validator) - expect(customError.index).toBe(0) - expect(customError.name).toBe("OPERATION_VALUE_MUST_NOT_CONTAIN_OLD_VALUE") - }) + 'Operation `value` property must not contain the old value', + 'OPERATION_VALUE_MUST_NOT_CONTAIN_OLD_VALUE', + index, + operation, + tree + ); + } + var customError = jsonpatch.validate(sequence, tree, validator); + expect(customError.index).toBe(0); + expect(customError.name).toBe('OPERATION_VALUE_MUST_NOT_CONTAIN_OLD_VALUE'); + }); - it("should pass replacing the tree root", function() { + it('should pass replacing the tree root', function() { var tree = { - password: "Elvis" - } + password: 'Elvis' + }; var sequence = [ { - op: "replace", - path: "", + op: 'replace', + path: '', value: {} } - ] + ]; - var error = jsonpatch.validate(sequence, tree) - expect(error).toBeUndefined() - }) + var error = jsonpatch.validate(sequence, tree); + expect(error).toBeUndefined(); + }); - it("should return error moving from an unexisting path", function() { + it('should return error moving from an unexisting path', function() { var tree = { - name: "Elvis" - } + name: 'Elvis' + }; var sequence = [ { - op: "move", - from: "/a/b/c", - path: "/name" + op: 'move', + from: '/a/b/c', + path: '/name' } - ] - var error = jsonpatch.validate(sequence, tree) - expect(error.name).toBe("OPERATION_FROM_UNRESOLVABLE") - }) + ]; + var error = jsonpatch.validate(sequence, tree); + expect(error.name).toBe('OPERATION_FROM_UNRESOLVABLE'); + }); - it("should return error copying from an unexisting path", function() { + it('should return error copying from an unexisting path', function() { var tree = { - name: "Elvis" - } + name: 'Elvis' + }; var sequence = [ { - op: "copy", - from: "/a/b/c", - path: "/name" + op: 'copy', + from: '/a/b/c', + path: '/name' } - ] - var error = jsonpatch.validate(sequence, tree) - expect(error.name).toBe("OPERATION_FROM_UNRESOLVABLE") - }) + ]; + var error = jsonpatch.validate(sequence, tree); + expect(error.name).toBe('OPERATION_FROM_UNRESOLVABLE'); + }); - it("should throw OPERATION_PATH_INVALID when applying patch without path", function() { - var a = {} - var ex = null + it('should throw OPERATION_PATH_INVALID when applying patch without path', function() { + var a = {}; + var ex = null; try { jsonpatch.applyPatch( a, [ { - op: "replace", - value: "" + op: 'replace', + value: '' } ], true - ) + ); } catch (e) { - ex = e + ex = e; } - expect(ex.name).toBe("OPERATION_PATH_INVALID") - }) + expect(ex.name).toBe('OPERATION_PATH_INVALID'); + }); - it("should throw OPERATION_PATH_INVALID when applying patch with an invalid path. Issue #77.", function() { - var a = {} - var ex = null + it('should throw OPERATION_PATH_INVALID when applying patch with an invalid path. Issue #77.', function() { + var a = {}; + var ex = null; try { jsonpatch.applyPatch( a, [ { - op: "replace", - value: "", - path: "foo" // no preceding "/" + op: 'replace', + value: '', + path: 'foo' // no preceding "/" } ], true - ) + ); } catch (e) { - ex = e + ex = e; } - expect(ex.name).toBe("OPERATION_PATH_INVALID") - }) + expect(ex.name).toBe('OPERATION_PATH_INVALID'); + }); - it("should throw OPERATION_OP_INVALID when applying patch without operation", function() { - var a = {} - var ex = null + it('should throw OPERATION_OP_INVALID when applying patch without operation', function() { + var a = {}; + var ex = null; try { jsonpatch.applyPatch( a, [ { - path: "/foo", - value: "" + path: '/foo', + value: '' } ], true - ) + ); } catch (e) { - ex = e + ex = e; } - expect(ex.name).toBe("OPERATION_OP_INVALID") - }) + expect(ex.name).toBe('OPERATION_OP_INVALID'); + }); - it("should throw OPERATION_VALUE_REQUIRED when applying patch without value", function() { - var a = {} - var ex = null + it('should throw OPERATION_VALUE_REQUIRED when applying patch without value', function() { + var a = {}; + var ex = null; try { jsonpatch.applyPatch( a, [ { - path: "/foo", - op: "add" + path: '/foo', + op: 'add' } ], true - ) + ); } catch (e) { - ex = e + ex = e; } - expect(ex.name).toBe("OPERATION_VALUE_REQUIRED") - }) + expect(ex.name).toBe('OPERATION_VALUE_REQUIRED'); + }); - it("should not modify patch value of type array (issue #76)", function() { + it('should not modify patch value of type array (issue #76)', function () { var patches = [ - {op: "add", path: "/foo", value: []}, - {op: "add", path: "/foo/-", value: 1} - ] - jsonpatch.validate(patches, {}) + {op: 'add', path: '/foo', value: []}, + {op: 'add', path: '/foo/-', value: 1} + ]; + jsonpatch.validate(patches, {}); expect(patches).toEqual([ - {op: "add", path: "/foo", value: []}, - {op: "add", path: "/foo/-", value: 1} - ]) - }) + {op: 'add', path: '/foo', value: []}, + {op: 'add', path: '/foo/-', value: 1} + ]); + }); - it("should not modify patch value of type object (issue #76)", function() { + it('should not modify patch value of type object (issue #76)', function () { var patches = [ - {op: "add", path: "/foo", value: {}}, - {op: "add", path: "/foo/bar", value: 1} - ] - jsonpatch.validate(patches, {}) + {op: 'add', path: '/foo', value: {}}, + {op: 'add', path: '/foo/bar', value: 1} + ]; + jsonpatch.validate(patches, {}); expect(patches).toEqual([ - {op: "add", path: "/foo", value: {}}, - {op: "add", path: "/foo/bar", value: 1} - ]) - }) -}) + {op: 'add', path: '/foo', value: {}}, + {op: 'add', path: '/foo/bar', value: 1} + ]); + }); +}); From bbda85406e1c05c328bea5c5b006f63a0a1892d0 Mon Sep 17 00:00:00 2001 From: Tom Pytleski Date: Fri, 10 May 2019 12:03:10 -0500 Subject: [PATCH 10/15] remove formatting from readme --- README.md | 203 ++++++++++++++++++++++++------------------------------ 1 file changed, 91 insertions(+), 112 deletions(-) diff --git a/README.md b/README.md index 5b66bbc7..3701489a 100644 --- a/README.md +++ b/README.md @@ -1,29 +1,30 @@ -# JSON-Patch +JSON-Patch +=============== > A leaner and meaner implementation of JSON-Patch. Small footprint. High performance. [![Build Status](https://travis-ci.org/Starcounter-Jack/JSON-Patch.svg?branch=master)](https://travis-ci.org/Starcounter-Jack/JSON-Patch) With JSON-Patch, you can: - - **applyPatch** to apply patches - **applyOperation** to apply single operations - **validate** a sequence of patches - **observe** for changes (and generate patches when a change is detected) - **compare** two objects (to obtain the difference). + [![Sauce Test Status](https://saucelabs.com/browser-matrix/json-patch.svg)](https://travis-ci.org/Starcounter-Jack/JSON-Patch) + ## Why you should use JSON-Patch JSON-Patch [(RFC6902)](http://tools.ietf.org/html/rfc6902) is a standard format that allows you to update a JSON document by sending the changes rather than the whole document. JSON Patch plays well with the HTTP PATCH verb (method) and REST style programming. -Mark Nottingham has a [nice blog](http://www.mnot.net/blog/2012/09/05/patch) about it. +Mark Nottingham has a [nice blog]( http://www.mnot.net/blog/2012/09/05/patch) about it. ## Footprint - 4 KB minified and gzipped (12 KB minified) ## Performance @@ -44,13 +45,13 @@ Tested on 29.08.2018. Compared libraries: - [jiff](https://www.npmjs.com/package/jiff) 0.7.3 - [RFC6902](https://www.npmjs.com/package/rfc6902) 2.4.0 -We aim the tests to be fair. Our library puts performance as the #1 priority, while other libraries can have different priorities. If you'd like to update the benchmarks or add a library, please fork the [perf.zone](https://perf.zone) benchmarks linked above and open an issue to include new results. +We aim the tests to be fair. Our library puts performance as the #1 priority, while other libraries can have different priorities. If you'd like to update the benchmarks or add a library, please fork the [perf.zone](https://perf.zone) benchmarks linked above and open an issue to include new results. ## Features +* Allows you to apply patches on object trees for incoming traffic. +* Allows you to freely manipulate object trees and then generate patches for outgoing traffic. +* Tested in IE11, Firefox, Chrome, Safari and Node.js -- Allows you to apply patches on object trees for incoming traffic. -- Allows you to freely manipulate object trees and then generate patches for outgoing traffic. -- Tested in IE11, Firefox, Chrome, Safari and Node.js ## Install @@ -61,7 +62,6 @@ Install the current version (and save it as a dependency): ```sh $ npm install fast-json-patch --save ``` - ### bower ```sh @@ -70,6 +70,7 @@ $ bower install fast-json-patch --save ### [download as ZIP](https://github.com/Starcounter-Jack/JSON-Patch/archive/master.zip) + ## Adding to your project ### In a web browser @@ -81,19 +82,19 @@ Include `dist/fast-json-patch.js`. Call require to get the instance: ```js -var jsonpatch = require("fast-json-patch") +var jsonpatch = require('fast-json-patch') ``` Or use ES6 style: ```js -import {applyOperation} from "fast-json-patch" +import { applyOperation } from 'fast-json-patch' ``` You can also require all API functions individually, all jsonpatch functions can be used as pure functions: ```js -const {applyOperation} = require("fast-json-patch") +const { applyOperation } = require('fast-json-patch'); ``` ## Usage @@ -101,17 +102,13 @@ const {applyOperation} = require("fast-json-patch") #### Applying patches: ```js -var document = {firstName: "Albert", contactDetails: {phoneNumbers: []}} +var document = { firstName: "Albert", contactDetails: { phoneNumbers: [] } }; var patch = [ - {op: "replace", path: "/firstName", value: "Joachim"}, - {op: "add", path: "/lastName", value: "Wester"}, - { - op: "add", - path: "/contactDetails/phoneNumbers/0", - value: {number: "555-123"} - } -] -document = jsonpatch.applyPatch(document, patch).newDocument + { op: "replace", path: "/firstName", value: "Joachim" }, + { op: "add", path: "/lastName", value: "Wester" }, + { op: "add", path: "/contactDetails/phoneNumbers/0", value: { number: "555-123" } } +]; +document = jsonpatch.applyPatch(document, patch).newDocument; // document == { firstName: "Joachim", lastName: "Wester", contactDetails: { phoneNumbers: [{number:"555-123"}] } }; ``` @@ -120,9 +117,9 @@ document = jsonpatch.applyPatch(document, patch).newDocument `jsonpatch.applyOperation` accepts a single operation object instead of a sequence, and returns the object after applying the operation. It works with all the standard JSON patch operations (`add, replace, move, test, remove and copy`). ```js -var document = {firstName: "Albert", contactDetails: {phoneNumbers: []}} -var operation = {op: "replace", path: "/firstName", value: "Joachim"} -document = jsonpatch.applyOperation(document, operation).newDocument +var document = { firstName: "Albert", contactDetails: { phoneNumbers: [] } }; +var operation = { op: "replace", path: "/firstName", value: "Joachim" }; +document = jsonpatch.applyOperation(document, operation).newDocument; // document == { firstName: "Joachim", contactDetails: { phoneNumbers: [] }} ``` @@ -131,33 +128,25 @@ document = jsonpatch.applyOperation(document, operation).newDocument If you have an array of operations, you can simple reduce them using `applyReducer` as your reducer: ```js -var document = {firstName: "Albert", contactDetails: {phoneNumbers: []}} +var document = { firstName: "Albert", contactDetails: { phoneNumbers: [ ] } }; var patch = [ - {op: "replace", path: "/firstName", value: "Joachim"}, - {op: "add", path: "/lastName", value: "Wester"}, - { - op: "add", - path: "/contactDetails/phoneNumbers/0", - value: {number: "555-123"} - } -] -var updatedDocument = patch.reduce(applyReducer, document) + { op:"replace", path: "/firstName", value: "Joachim" }, + { op:"add", path: "/lastName", value: "Wester" }, + { op:"add", path: "/contactDetails/phoneNumbers/0", value: { number: "555-123" } } +]; +var updatedDocument = patch.reduce(applyReducer, document); // updatedDocument == { firstName:"Joachim", lastName:"Wester", contactDetails:{ phoneNumbers[ {number:"555-123"} ] } }; ``` -#### Generating patches +Generating patches: ```js -var document = { - firstName: "Joachim", - lastName: "Wester", - contactDetails: {phoneNumbers: [{number: "555-123"}]} -} -var observer = jsonpatch.observe(document) -document.firstName = "Albert" -document.contactDetails.phoneNumbers[0].number = "123" -document.contactDetails.phoneNumbers.push({number: "456"}) -var patch = jsonpatch.generate(observer) +var document = { firstName: "Joachim", lastName: "Wester", contactDetails: { phoneNumbers: [ { number:"555-123" }] } }; +var observer = jsonpatch.observe(document); +document.firstName = "Albert"; +document.contactDetails.phoneNumbers[0].number = "123"; +document.contactDetails.phoneNumbers.push({ number:"456" }); +var patch = jsonpatch.generate(observer); // patch == [ // { op: "replace", path: "/firstName", value: "Albert"}, // { op: "replace", path: "/contactDetails/phoneNumbers/0/number", value: "123" }, @@ -165,26 +154,15 @@ var patch = jsonpatch.generate(observer) // ]; ``` -#### Generating patches with test operations +Generating patches with test operations: ```js -var document = { - firstName: "Joachim", - lastName: "Wester", - contactDetails: {phoneNumbers: [{number: "555-123"}]} -} -var observer = jsonpatch.observe(document, undefined, true) -// Or -// var observer = jsonpatch.observe(document) -// observer.inversible = true - -document.firstName = "Albert" -document.contactDetails.phoneNumbers[0].number = "123" -document.contactDetails.phoneNumbers.push({number: "456"}) -var patch = jsonpatch.generate(observer) -// Or -// var patch = jsonpatch.generate(observer, { inversible: true }) - +var document = { firstName: "Joachim", lastName: "Wester", contactDetails: { phoneNumbers: [ { number:"555-123" }] } }; +var observer = jsonpatch.observe(document, undefined, true); +document.firstName = "Albert"; +document.contactDetails.phoneNumbers[0].number = "123"; +document.contactDetails.phoneNumbers.push({ number:"456" }); +var patch = jsonpatch.generate(observer); // patch == [ // { op: "test", path: "/firstName", value: "Joachim"}, // { op: "replace", path: "/firstName", value: "Albert"}, @@ -194,44 +172,43 @@ var patch = jsonpatch.generate(observer) // ]; ``` -#### Comparing two object trees +Comparing two object trees: ```js -var documentA = {user: {firstName: "Albert", lastName: "Einstein"}} -var documentB = {user: {firstName: "Albert", lastName: "Collins"}} -var diff = jsonpatch.compare(documentA, documentB) +var documentA = {user: {firstName: "Albert", lastName: "Einstein"}}; +var documentB = {user: {firstName: "Albert", lastName: "Collins"}}; +var diff = jsonpatch.compare(documentA, documentB); //diff == [{op: "replace", path: "/user/lastName", value: "Collins"}] ``` -#### Comparing two object trees with test operations +Comparing two object trees with test operations: ```js -var documentA = {user: {firstName: "Albert", lastName: "Einstein"}} -var documentB = {user: {firstName: "Albert", lastName: "Collins"}} -var diff = jsonpatch.compare(documentA, documentB, {inversible: true}) +var documentA = {user: {firstName: "Albert", lastName: "Einstein"}}; +var documentB = {user: {firstName: "Albert", lastName: "Collins"}}; +var diff = jsonpatch.compare(documentA, documentB, {inversible: true}); //diff == [ // {op: "test", path: "/user/lastName", value: "Einstein"}, // {op: "replace", path: "/user/lastName", value: "Collins"} // ]; ``` -#### Validating a sequence of patches +Validating a sequence of patches: ```js -var obj = {user: {firstName: "Albert"}} -var patches = [ - {op: "replace", path: "/user/firstName", value: "Albert"}, - {op: "replace", path: "/user/lastName", value: "Einstein"} -] -var errors = jsonpatch.validate(patches, obj) +var obj = {user: {firstName: "Albert"}}; +var patches = [{op: "replace", path: "/user/firstName", value: "Albert"}, {op: "replace", path: "/user/lastName", value: "Einstein"}]; +var errors = jsonpatch.validate(patches, obj); if (errors.length == 0) { - //there are no errors! -} else { - for (var i = 0; i < errors.length; i++) { + //there are no errors! +} +else { + for (var i=0; i < errors.length; i++) { if (!errors[i]) { - console.log("Valid patch at index", i, patches[i]) - } else { - console.error("Invalid patch at index", i, errors[i], patches[i]) + console.log("Valid patch at index", i, patches[i]); + } + else { + console.error("Invalid patch at index", i, errors[i], patches[i]); } } } @@ -247,7 +224,7 @@ Applies `patch` array on `obj`. - `patch` a JSON-Patch array of operations to apply - `validateOperation` Boolean for whether to validate each operation with our default validator, or to pass a validator callback - `mutateDocument` Whether to mutate the original document or clone it before applying -- `banPrototypeModifications` Whether to ban modifications to `__proto__`, defaults to `true`. +- `banPrototypeModifications` Whether to ban modifications to `__proto__`, defaults to `true`. An invalid patch results in throwing an error (see `jsonpatch.validate` for more information about the error object). @@ -256,15 +233,15 @@ If you would like to avoid touching your `patch` array values, clone them: `json Returns an array of [`OperationResult`](#operationresult-type) objects - one item for each item in `patches`, each item is an object `{newDocument: any, test?: boolean, removed?: any}`. -- `test` - boolean result of the test -- `remove`, `replace` and `move` - original object that has been removed -- `add` (only when adding to an array) - index at which item has been inserted (useful when using `-` alias) +* `test` - boolean result of the test +* `remove`, `replace` and `move` - original object that has been removed +* `add` (only when adding to an array) - index at which item has been inserted (useful when using `-` alias) -* ** Note: It throws `TEST_OPERATION_FAILED` error if `test` operation fails. ** -* ** Note II: the returned array has `newDocument` property that you can use as the final state of the patched document **. -* \*\* Note III: By default, when `banPrototypeModifications` is `true`, this method throws a `TypeError` when you attempt to modify an object's prototype. +- ** Note: It throws `TEST_OPERATION_FAILED` error if `test` operation fails. ** +- ** Note II: the returned array has `newDocument` property that you can use as the final state of the patched document **. +- ** Note III: By default, when `banPrototypeModifications` is `true`, this method throws a `TypeError` when you attempt to modify an object's prototype. -* See [Validation notes](#validation-notes). +- See [Validation notes](#validation-notes). #### `function applyOperation(document: T, operation: Operation, validateOperation: boolean | Validator = false, mutateDocument: boolean = true, banPrototypeModifications: boolean = true, index: number = 0): OperationResult` @@ -283,7 +260,7 @@ If you would like to avoid touching your values, clone them: `jsonpatch.applyOpe Returns an [`OperationResult`](#operationresult-type) object `{newDocument: any, test?: boolean, removed?: any}`. - ** Note: It throws `TEST_OPERATION_FAILED` error if `test` operation fails. ** -- \*\* Note II: By default, when `banPrototypeModifications` is `true`, this method throws a `TypeError` when you attempt to modify an object's prototype. +- ** Note II: By default, when `banPrototypeModifications` is `true`, this method throws a `TypeError` when you attempt to modify an object's prototype. - See [Validation notes](#validation-notes). @@ -317,7 +294,8 @@ Returns the value. #### `jsonpatch.observe(document: any, callback?: Function, inversible: boolean = false): Observer` -Sets up an deep observer on `document` that listens for changes in object tree. When changes are detected, the optional callback is called with the generated patches array as the parameter. If inversible is true, then observer will generate test operations. +Sets up an deep observer on `document` that listens for changes in object tree. When changes are detected, the optional +callback is called with the generated patches array as the parameter. If inversible is true, then observer will generate test operations. Returns `observer`. @@ -356,21 +334,21 @@ If there are no errors, returns undefined. If there is an errors, returns a Json Possible errors: -| Error name | Error message | -| ---------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | -| SEQUENCE_NOT_AN_ARRAY | Patch sequence must be an array | -| OPERATION_NOT_AN_OBJECT | Operation is not an object | -| OPERATION_OP_INVALID | Operation `op` property is not one of operations defined in RFC-6902 | -| OPERATION_PATH_INVALID | Operation `path` property is not a valid string | -| OPERATION_FROM_REQUIRED | Operation `from` property is not present (applicable in `move` and `copy` operations) | -| OPERATION_VALUE_REQUIRED | Operation `value` property is not present, or `undefined` (applicable in `add`, `replace` and `test` operations) | -| OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED | Operation `value` property object has at least one `undefined` value (applicable in `add`, `replace` and `test` operations) | -| OPERATION_PATH_CANNOT_ADD | Cannot perform an `add` operation at the desired path | -| OPERATION_PATH_UNRESOLVABLE | Cannot perform the operation at a path that does not exist | -| OPERATION_FROM_UNRESOLVABLE | Cannot perform the operation from a path that does not exist | -| OPERATION_PATH_ILLEGAL_ARRAY_INDEX | Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index | -| OPERATION_VALUE_OUT_OF_BOUNDS | The specified index MUST NOT be greater than the number of elements in the array | -| TEST_OPERATION_FAILED | When operation is `test` and the test fails, applies to `applyReducer`. | +Error name | Error message +------------------------------|------------ +SEQUENCE_NOT_AN_ARRAY | Patch sequence must be an array +OPERATION_NOT_AN_OBJECT | Operation is not an object +OPERATION_OP_INVALID | Operation `op` property is not one of operations defined in RFC-6902 +OPERATION_PATH_INVALID | Operation `path` property is not a valid string +OPERATION_FROM_REQUIRED | Operation `from` property is not present (applicable in `move` and `copy` operations) +OPERATION_VALUE_REQUIRED | Operation `value` property is not present, or `undefined` (applicable in `add`, `replace` and `test` operations) +OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED | Operation `value` property object has at least one `undefined` value (applicable in `add`, `replace` and `test` operations) +OPERATION_PATH_CANNOT_ADD | Cannot perform an `add` operation at the desired path +OPERATION_PATH_UNRESOLVABLE | Cannot perform the operation at a path that does not exist +OPERATION_FROM_UNRESOLVABLE | Cannot perform the operation from a path that does not exist +OPERATION_PATH_ILLEGAL_ARRAY_INDEX | Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index +OPERATION_VALUE_OUT_OF_BOUNDS | The specified index MUST NOT be greater than the number of elements in the array +TEST_OPERATION_FAILED | When operation is `test` and the test fails, applies to `applyReducer`. ## `OperationResult` Type @@ -386,6 +364,7 @@ Where: - `test`: if the operation was a `test` operation. This will be its result. - `removed`: contains the removed, moved, or replaced values from the document after a `remove`, `move` or `replace` operation. + ## Validation Notes Functions `applyPatch`, `applyOperation`, and `validate` accept a `validate`/ `validator` parameter: @@ -397,7 +376,7 @@ Functions `applyPatch`, `applyOperation`, and `validate` accept a `validate`/ `v If you pass a validator, it will be called with four parameters for each operation, `function(operation, index, tree, existingPath)` and it is expected to throw `JsonPatchError` when your conditions are not met. - `operation` The operation it self. -- `index` `operation`'s index in the patch array (if application). +- `index` `operation`'s index in the patch array (if application). - `tree` The object that is supposed to be patched. - `existingPath` the path `operation` points to. @@ -417,7 +396,7 @@ See the [ECMAScript spec](http://www.ecma-international.org/ecma-262/6.0/index.h ## Specs/tests -- [Run in browser](http://starcounter-jack.github.io/JSON-Patch/test/) + - [Run in browser](http://starcounter-jack.github.io/JSON-Patch/test/) ## [Contributing](CONTRIBUTING.md) From b210dd6a1189d5ab2c31219cad83c242804a889f Mon Sep 17 00:00:00 2001 From: Tom Pytleski Date: Mon, 13 May 2019 11:35:21 -0500 Subject: [PATCH 11/15] add benchmarks for generating test operations --- test/spec/duplexBenchmark.js | 130 +++++++++++++++++++++++++++++++++++ 1 file changed, 130 insertions(+) diff --git a/test/spec/duplexBenchmark.js b/test/spec/duplexBenchmark.js index d619f66e..ef278804 100644 --- a/test/spec/duplexBenchmark.js +++ b/test/spec/duplexBenchmark.js @@ -145,6 +145,136 @@ suite.add('compare operation same but deep objects', { } }); +// Benchmark generating test operations +suite.add('generate operation, with inversible set to true', { + setup: function() { + var obj = { + firstName: 'Albert', + lastName: 'Einstein', + phoneNumbers: [ + { + number: '12345' + }, + { + number: '45353' + } + ] + }; + var observer = jsonpatch.observe(obj, undefined, true); + }, + fn: function() { + obj.firstName = 'Joachim'; + obj.lastName = 'Wester'; + obj.phoneNumbers[0].number = '123'; + obj.phoneNumbers[1].number = '456'; + + var patches = jsonpatch.generate(observer); + } +}); +suite.add('generate operation and re-apply, with inversible set to true', { + setup: function() { + var obj = { + firstName: 'Albert', + lastName: 'Einstein', + phoneNumbers: [ + { + number: '12345' + }, + { + number: '45353' + } + ] + }; + var observer = jsonpatch.observe(obj, undefined, true); + }, + fn: function() { + obj.firstName = 'Joachim'; + obj.lastName = 'Wester'; + obj.phoneNumbers[0].number = '123'; + obj.phoneNumbers[1].number = '456'; + + var patches = jsonpatch.generate(observer); + obj2 = { + firstName: 'Albert', + lastName: 'Einstein', + phoneNumbers: [ + { + number: '12345' + }, + { + number: '45353' + } + ] + }; + + jsonpatch.applyPatch(obj2, patches); + } +}); +suite.add('compare operation, with inversible set to true', { + setup: function() { + var obj = { + firstName: 'Albert', + lastName: 'Einstein', + phoneNumbers: [ + { + number: '12345' + }, + { + number: '45353' + } + ] + }; + var obj2 = { + firstName: 'Joachim', + lastName: 'Wester', + mobileNumbers: [ + { + number: '12345' + }, + { + number: '45353' + } + ] + }; + }, + fn: function() { + var patches = jsonpatch.compare(obj, obj2, { inversible: true }); + } +}); + +suite.add('compare operation same but deep objects, with inversible set to true', { + setup: function() { + var depth = 10; + + function shallowObj() { + return { + shallow: { + firstName: 'Tomek', + lastName: 'Wytrebowicz', + mobileNumbers: [ + { + number: '12345' + }, + { + number: '45353' + } + ] + } + }; + } + var obj = shallowObj(); + var node = obj; + while (depth-- > 0) { + node.nested = shallowObj(); + node = node.nested; + } + var obj2 = obj; + }, + fn: function() { + var patches = jsonpatch.compare(obj, obj2, { inversible: true }); + } +}); + // if we are in the browser with benchmark < 2.1.2 if (typeof benchmarkReporter !== 'undefined') { benchmarkReporter(suite); From 15d4e8e145501afc7b202cce7fda38f9e35bc38e Mon Sep 17 00:00:00 2001 From: Tom Pytleski Date: Thu, 23 May 2019 16:20:57 -0500 Subject: [PATCH 12/15] - export all operations --- dist/fast-json-patch.js | 2 +- src/duplex.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/fast-json-patch.js b/dist/fast-json-patch.js index 51ecc7a9..64971300 100644 --- a/dist/fast-json-patch.js +++ b/dist/fast-json-patch.js @@ -646,7 +646,7 @@ exports.validate = validate; */ var helpers_1 = __webpack_require__(0); var core_1 = __webpack_require__(1); -/* export all core functions */ +/* export all core functions and types */ var core_2 = __webpack_require__(1); exports.applyOperation = core_2.applyOperation; exports.applyPatch = core_2.applyPatch; diff --git a/src/duplex.ts b/src/duplex.ts index 50492ec6..16a52267 100644 --- a/src/duplex.ts +++ b/src/duplex.ts @@ -6,8 +6,8 @@ import { _deepClone, _objectKeys, escapePathComponent, hasOwnProperty } from './helpers'; import { applyPatch, Operation } from './core'; -/* export all core functions */ -export { applyOperation, applyPatch, applyReducer, getValueByPointer, Operation, validate, validator, OperationResult } from './core'; +/* export all core functions and types */ +export { applyOperation, applyPatch, applyReducer, getValueByPointer, Operation, AddOperation, RemoveOperation, ReplaceOperation, MoveOperation, CopyOperation, TestOperation, GetOperation, validate, validator, OperationResult } from './core'; /* export some helpers */ export { PatchError as JsonPatchError, _deepClone as deepClone, escapePathComponent, unescapePathComponent } from './helpers'; From 1498c09661f7855048f6ea91fba31a131213236c Mon Sep 17 00:00:00 2001 From: Marcin Warpechowski Date: Tue, 2 Jul 2019 11:17:34 +0200 Subject: [PATCH 13/15] change the API for generating test operations was: extra boolean argument on "observe" and extra object argument on "generate" and "compare" is: extra boolean argument "generate" and "compare" also this commit adds way more tests for test operation generation --- README.md | 24 +-- src/duplex.ts | 25 ++-- test/spec/duplexBenchmark.js | 20 +-- test/spec/duplexSpec.js | 275 +++++++++++++++++++++++++++++++---- 4 files changed, 279 insertions(+), 65 deletions(-) diff --git a/README.md b/README.md index 3701489a..e1e9f262 100644 --- a/README.md +++ b/README.md @@ -154,15 +154,15 @@ var patch = jsonpatch.generate(observer); // ]; ``` -Generating patches with test operations: +Generating patches with test operations for values in the first object: ```js var document = { firstName: "Joachim", lastName: "Wester", contactDetails: { phoneNumbers: [ { number:"555-123" }] } }; -var observer = jsonpatch.observe(document, undefined, true); +var observer = jsonpatch.observe(document); document.firstName = "Albert"; document.contactDetails.phoneNumbers[0].number = "123"; document.contactDetails.phoneNumbers.push({ number:"456" }); -var patch = jsonpatch.generate(observer); +var patch = jsonpatch.generate(observer, true); // patch == [ // { op: "test", path: "/firstName", value: "Joachim"}, // { op: "replace", path: "/firstName", value: "Albert"}, @@ -181,12 +181,12 @@ var diff = jsonpatch.compare(documentA, documentB); //diff == [{op: "replace", path: "/user/lastName", value: "Collins"}] ``` -Comparing two object trees with test operations: +Comparing two object trees with test operations for values in the first object: ```js var documentA = {user: {firstName: "Albert", lastName: "Einstein"}}; var documentB = {user: {firstName: "Albert", lastName: "Collins"}}; -var diff = jsonpatch.compare(documentA, documentB, {inversible: true}); +var diff = jsonpatch.compare(documentA, documentB, true); //diff == [ // {op: "test", path: "/user/lastName", value: "Einstein"}, // {op: "replace", path: "/user/lastName", value: "Collins"} @@ -292,17 +292,17 @@ Retrieves a value from a JSON document by a JSON pointer. Returns the value. -#### `jsonpatch.observe(document: any, callback?: Function, inversible: boolean = false): Observer` +#### `jsonpatch.observe(document: any, callback?: Function): Observer` Sets up an deep observer on `document` that listens for changes in object tree. When changes are detected, the optional -callback is called with the generated patches array as the parameter. If inversible is true, then observer will generate test operations. +callback is called with the generated patches array as the parameter. Returns `observer`. -#### `jsonpatch.generate(document: any, observer: Observer, opts?: { inversible: boolean }): Operation[]` +#### `jsonpatch.generate(document: any, observer: Observer, invertible = false): Operation[]` If there are pending changes in `obj`, returns them synchronously. If a `callback` was defined in `observe` -method, it will be triggered synchronously as well. If opts.inversible is undefined then fallback to observer.inversible. +method, it will be triggered synchronously as well. If `invertible` is true, then each change will be preceded by a test operation of the value before the change. If there are no pending changes in `obj`, returns an empty array (length 0). @@ -312,9 +312,9 @@ Destroys the observer set up on `document`. Any remaining changes are delivered synchronously (as in `jsonpatch.generate`). Note: this is different that ES6/7 `Object.unobserve`, which delivers remaining changes asynchronously. -#### `jsonpatch.compare(document1: any, document2: any, opts?: { inversible: boolean }): Operation[]` +#### `jsonpatch.compare(document1: any, document2: any, invertible = false): Operation[]` -Compares object trees `document1` and `document2` and returns the difference relative to `document1` as a patches array. If opts.inversible is true, test operations will be generated. +Compares object trees `document1` and `document2` and returns the difference relative to `document1` as a patches array. If `invertible` is true, then each change will be preceded by a test operation of the value in `document1`. If there are no differences, returns an empty array (length 0). @@ -376,7 +376,7 @@ Functions `applyPatch`, `applyOperation`, and `validate` accept a `validate`/ `v If you pass a validator, it will be called with four parameters for each operation, `function(operation, index, tree, existingPath)` and it is expected to throw `JsonPatchError` when your conditions are not met. - `operation` The operation it self. -- `index` `operation`'s index in the patch array (if application). +- `index` `operation`'s index in the patch array (if application). - `tree` The object that is supposed to be patched. - `existingPath` the path `operation` points to. diff --git a/src/duplex.ts b/src/duplex.ts index 16a52267..8a3e28ef 100644 --- a/src/duplex.ts +++ b/src/duplex.ts @@ -17,7 +17,6 @@ export interface Observer { patches: Operation[]; unobserve: () => void; callback: (patches: Operation[]) => void; - inversible: boolean; } var beforeDict = new WeakMap(); @@ -64,7 +63,7 @@ export function unobserve(root: T, observer: Observer) { /** * Observes changes made to an object, which can then be retrieved using generate */ -export function observe(obj: Object|Array, callback?: (patches: Operation[]) => void, inversible: boolean = false): Observer { +export function observe(obj: Object|Array, callback?: (patches: Operation[]) => void): Observer { var patches = []; var observer; var mirror = getMirror(obj); @@ -81,7 +80,7 @@ export function observe(obj: Object|Array, callback?: (patches: Operation[ return observer; } - observer = { inversible }; + observer = {}; mirror.value = _deepClone(obj); @@ -145,11 +144,10 @@ export function observe(obj: Object|Array, callback?: (patches: Operation[ /** * Generate an array of patches from an observer */ -export function generate(observer: Observer, opts: { inversible?: boolean } = {}): Operation[] { +export function generate(observer: Observer, invertible = false): Operation[] { var mirror = beforeDict.get(observer.object); - var inversible = typeof opts.inversible !== "undefined" ? opts.inversible : observer.inversible; - _generate(mirror.value, observer.object, observer.patches, "", { inversible }); + _generate(mirror.value, observer.object, observer.patches, "", invertible); if (observer.patches.length) { applyPatch(mirror.value, observer.patches); } @@ -164,7 +162,7 @@ export function generate(observer: Observer, opts: { inversible?: boo } // Dirty check if obj is different from mirror, generate patches and update mirror -function _generate(mirror, obj, patches, path, opts = { inversible: false }) { +function _generate(mirror, obj, patches, path, invertible) { if (obj === mirror) { return; } @@ -177,7 +175,6 @@ function _generate(mirror, obj, patches, path, opts = { inversible: false }) { var oldKeys = _objectKeys(mirror); var changed = false; var deleted = false; - var { inversible } = opts; //if ever "move" operation is implemented here, make sure this test runs OK: "should not generate the same patch twice (move)" @@ -189,22 +186,22 @@ function _generate(mirror, obj, patches, path, opts = { inversible: false }) { var newVal = obj[key]; if (typeof oldVal == "object" && oldVal != null && typeof newVal == "object" && newVal != null) { - _generate(oldVal, newVal, patches, path + "/" + escapePathComponent(key), opts); + _generate(oldVal, newVal, patches, path + "/" + escapePathComponent(key), invertible); } else { if (oldVal !== newVal) { changed = true; - if (inversible) patches.push({ op: "test", path: path + "/" + escapePathComponent(key), value: _deepClone(oldVal) }); + if (invertible) patches.push({ op: "test", path: path + "/" + escapePathComponent(key), value: _deepClone(oldVal) }); patches.push({ op: "replace", path: path + "/" + escapePathComponent(key), value: _deepClone(newVal) }); } } } else if(Array.isArray(mirror) === Array.isArray(obj)) { - if (inversible) patches.push({ op: "test", path: path + "/" + escapePathComponent(key), value: _deepClone(oldVal) }) + if (invertible) patches.push({ op: "test", path: path + "/" + escapePathComponent(key), value: _deepClone(oldVal) }) patches.push({ op: "remove", path: path + "/" + escapePathComponent(key) }); deleted = true; // property has been deleted } else { - if (inversible) patches.push({ op: "test", path, value: mirror }); + if (invertible) patches.push({ op: "test", path, value: mirror }); patches.push({ op: "replace", path, value: obj }); changed = true; } @@ -224,8 +221,8 @@ function _generate(mirror, obj, patches, path, opts = { inversible: false }) { /** * Create an array of patches from the differences in two objects */ -export function compare(tree1: Object | Array, tree2: Object | Array, opts?: { inversible: boolean }): Operation[] { +export function compare(tree1: Object | Array, tree2: Object | Array, invertible = false): Operation[] { var patches = []; - _generate(tree1, tree2, patches, '', opts); + _generate(tree1, tree2, patches, '', invertible); return patches; } diff --git a/test/spec/duplexBenchmark.js b/test/spec/duplexBenchmark.js index 4a1edb1f..7e583793 100644 --- a/test/spec/duplexBenchmark.js +++ b/test/spec/duplexBenchmark.js @@ -146,7 +146,7 @@ suite.add('compare operation same but deep objects', { }); // Benchmark generating test operations -suite.add('generate operation, with inversible set to true', { +suite.add('generate operation, invertible = true', { setup: function() { var obj = { firstName: 'Albert', @@ -160,7 +160,7 @@ suite.add('generate operation, with inversible set to true', { } ] }; - var observer = jsonpatch.observe(obj, undefined, true); + var observer = jsonpatch.observe(obj); }, fn: function() { obj.firstName = 'Joachim'; @@ -168,10 +168,10 @@ suite.add('generate operation, with inversible set to true', { obj.phoneNumbers[0].number = '123'; obj.phoneNumbers[1].number = '456'; - var patches = jsonpatch.generate(observer); + var patches = jsonpatch.generate(observer, true); } }); -suite.add('generate operation and re-apply, with inversible set to true', { +suite.add('generate operation and re-apply, invertible = true', { setup: function() { var obj = { firstName: 'Albert', @@ -185,7 +185,7 @@ suite.add('generate operation and re-apply, with inversible set to true', { } ] }; - var observer = jsonpatch.observe(obj, undefined, true); + var observer = jsonpatch.observe(obj); }, fn: function() { obj.firstName = 'Joachim'; @@ -193,7 +193,7 @@ suite.add('generate operation and re-apply, with inversible set to true', { obj.phoneNumbers[0].number = '123'; obj.phoneNumbers[1].number = '456'; - var patches = jsonpatch.generate(observer); + var patches = jsonpatch.generate(observer, true); obj2 = { firstName: 'Albert', lastName: 'Einstein', @@ -210,7 +210,7 @@ suite.add('generate operation and re-apply, with inversible set to true', { jsonpatch.applyPatch(obj2, patches); } }); -suite.add('compare operation, with inversible set to true', { +suite.add('compare operation, invertible = true', { setup: function() { var obj = { firstName: 'Albert', @@ -238,11 +238,11 @@ suite.add('compare operation, with inversible set to true', { }; }, fn: function() { - var patches = jsonpatch.compare(obj, obj2, { inversible: true }); + var patches = jsonpatch.compare(obj, obj2, true); } }); -suite.add('compare operation same but deep objects, with inversible set to true', { +suite.add('compare operation same but deep objects, invertible = true', { setup: function() { var depth = 10; @@ -271,7 +271,7 @@ suite.add('compare operation same but deep objects, with inversible set to true' var obj2 = obj; }, fn: function() { - var patches = jsonpatch.compare(obj, obj2, { inversible: true }); + var patches = jsonpatch.compare(obj, obj2, true); } }); diff --git a/test/spec/duplexSpec.js b/test/spec/duplexSpec.js index ff6f1351..496b8214 100644 --- a/test/spec/duplexSpec.js +++ b/test/spec/duplexSpec.js @@ -199,8 +199,43 @@ describe('duplex', function() { person1.firstName = 'Alexander'; person2.firstName = 'Lucas'; - var patch1 = jsonpatch.generate(observer1, { inversible: true }); - var patch2 = jsonpatch.generate(observer2, { inversible: true }); + var patch1 = jsonpatch.generate(observer1); + var patch2 = jsonpatch.generate(observer2); + + expect(patch1).toReallyEqual([ + { + op: 'replace', + path: '/firstName', + value: 'Alexander' + } + ]); + expect(patch2).toReallyEqual([ + { + op: 'replace', + path: '/firstName', + value: 'Lucas' + } + ]); + }); + + it('should generate test and replace (2 observers, invertible = true)', function() { + var person1 = { + firstName: 'Alexandra', + lastName: 'Galbreath' + }; + var person2 = { + firstName: 'Lisa', + lastName: 'Mendoza' + }; + + var observer1 = jsonpatch.observe(person1); + var observer2 = jsonpatch.observe(person2); + + person1.firstName = 'Alexander'; + person2.firstName = 'Lucas'; + + var patch1 = jsonpatch.generate(observer1, true); + var patch2 = jsonpatch.generate(observer2, true); expect(patch1).toReallyEqual([ { @@ -242,10 +277,60 @@ describe('duplex', function() { ] }; - var observer = jsonpatch.observe(obj, undefined, true); + var observer = jsonpatch.observe(obj); obj.firstName = 'Marcin'; var patches = jsonpatch.generate(observer); + expect(patches).toReallyEqual([ + { + op: 'replace', + path: '/firstName', + value: 'Marcin' + } + ]); + + obj.lastName = 'Warp'; + patches = jsonpatch.generate(observer); //first patch should NOT be reported again here + expect(patches).toReallyEqual([ + { + op: 'replace', + path: '/lastName', + value: 'Warp' + } + ]); + + expect(obj).toReallyEqual({ + firstName: 'Marcin', + lastName: 'Warp', + phoneNumbers: [ + { + number: '12345' + }, + { + number: '45353' + } + ] + }); //objects should be still the same + }); + + it('should generate test and replace (double change, shallow object, invertible = true)', function() { + obj = { + firstName: 'Albert', + lastName: 'Einstein', + phoneNumbers: [ + { + number: '12345' + }, + { + number: '45353' + } + ] + }; + + var observer = jsonpatch.observe(obj); + obj.firstName = 'Marcin'; + + var patches = jsonpatch.generate(observer, true); expect(patches).toReallyEqual([ { op: "test", @@ -260,7 +345,7 @@ describe('duplex', function() { ]); obj.lastName = 'Warp'; - patches = jsonpatch.generate(observer); //first patch should NOT be reported again here + patches = jsonpatch.generate(observer, true); //first patch should NOT be reported again here expect(patches).toReallyEqual([ { op: "test", @@ -302,10 +387,60 @@ describe('duplex', function() { ] }; - var observer = jsonpatch.observe(obj, undefined, true); + var observer = jsonpatch.observe(obj); obj.phoneNumbers[0].number = '123'; var patches = jsonpatch.generate(observer); + expect(patches).toReallyEqual([ + { + op: 'replace', + path: '/phoneNumbers/0/number', + value: '123' + } + ]); + + obj.phoneNumbers[1].number = '456'; + patches = jsonpatch.generate(observer); //first patch should NOT be reported again here + expect(patches).toReallyEqual([ + { + op: 'replace', + path: '/phoneNumbers/1/number', + value: '456' + } + ]); + + expect(obj).toReallyEqual({ + firstName: 'Albert', + lastName: 'Einstein', + phoneNumbers: [ + { + number: '123' + }, + { + number: '456' + } + ] + }); //objects should be still the same + }); + + it('should generate replace (double change, deep object, invertible = true)', function() { + obj = { + firstName: 'Albert', + lastName: 'Einstein', + phoneNumbers: [ + { + number: '12345' + }, + { + number: '45353' + } + ] + }; + + var observer = jsonpatch.observe(obj); + obj.phoneNumbers[0].number = '123'; + + var patches = jsonpatch.generate(observer, true); expect(patches).toReallyEqual([ { op: "test", @@ -320,7 +455,7 @@ describe('duplex', function() { ]); obj.phoneNumbers[1].number = '456'; - patches = jsonpatch.generate(observer); //first patch should NOT be reported again here + patches = jsonpatch.generate(observer, true); //first patch should NOT be reported again here expect(patches).toReallyEqual([ { op: "test", @@ -505,7 +640,7 @@ describe('duplex', function() { expect(obj2).toEqualInJson(obj); }); - it('should generate remove (array indexes should be sorted descending)', function() { + it('should generate remove (array indexes should be sorted descending, invertible = true)', function() { obj = { items: ['a', 'b', 'c'] }; @@ -514,18 +649,28 @@ describe('duplex', function() { obj.items.pop(); obj.items.pop(); - patches = jsonpatch.generate(observer); + patches = jsonpatch.generate(observer, true); //array indexes must be sorted descending, otherwise there is an index collision in apply expect(patches).toReallyEqual([ + { + op: 'test', + path: '/items/2', + value: 'c' + }, { op: 'remove', path: '/items/2' }, + { + op: 'test', + path: '/items/1', + value: 'b' + }, { op: 'remove', path: '/items/1' - } + }, ]); obj2 = { @@ -1460,45 +1605,91 @@ describe('duplex', function() { describe('compare', function() { it('Replacing a root array with an object should be handled well', function() { - const obj = {}; - var patches = jsonpatch.compare(['jack'], obj); + const objA = ['jack']; + const objB = {}; + var patches = jsonpatch.compare(objA, objB); expect(patches).toEqual([ { op: 'replace', path: '', - value: obj + value: objB + } + ]); + + }); + it('Replacing a root array with an object should be handled well (invertible = true)', function() { + + const objA = ['jack']; + const objB = {}; + var patches = jsonpatch.compare(objA, objB, true); + expect(patches).toEqual([ + { + op: 'test', + path: '', + value: objA + }, + { + op: 'replace', + path: '', + value: objB } ]); }); it('Replacing an array with an object should be handled well', function() { + const arr = ['jack']; + const obj = {}; + var patches = jsonpatch.compare({arr: arr}, {arr: obj}); + expect(patches).toEqual([ + { + op: 'replace', + path: '/arr', + value: obj + } + ]); + + }); + it('Replacing an array with an object should be handled well (invertible = true)', function() { + + const arr = ['jack']; const obj = {}; - var patches = jsonpatch.compare({arr: ['jack']}, {arr: obj}); + var patches = jsonpatch.compare({arr: arr}, {arr: obj}, true); expect(patches).toEqual([ + { + op: 'test', + path: '/arr', + value: arr + }, { op: 'replace', path: '/arr', value: obj } ]); - + }); it('Replacing an array that nested in an object with an object nested in an an object should be handled well', function() { + const arr = ['jack']; const obj = {}; - var patches = jsonpatch.compare({arr: {deeperArray: ['jack']}}, {arr: {deeperArray: obj}}); + var patches = jsonpatch.compare({arr: {deeperArray: arr}}, {arr: {deeperArray: obj}}, true); expect(patches).toEqual([ + { + op: 'test', + path: '/arr/deeperArray', + value: arr + }, { op: 'replace', path: '/arr/deeperArray', value: obj } ]); - + }); - it('should return an add for a property that does not exist in the first obj', function() { + it('should return an add for a property that does not exist in the first obj, without a test operation (invertible = true)', function() { var objA = { user: { firstName: 'Albert' @@ -1511,7 +1702,8 @@ describe('duplex', function() { } }; - expect(jsonpatch.compare(objA, objB)).toReallyEqual([ + expect(jsonpatch.compare(objA, objB, true)).toReallyEqual([ + // no test operation, because undefined values are not serialized to JSON { op: 'add', path: '/user/lastName', @@ -1520,7 +1712,7 @@ describe('duplex', function() { ]); }); - it('should return a remove for a property that does not exist in the second obj', function() { + it('should return test and remove for a property that does not exist in the second obj (invertible = true)', function() { var objA = { user: { firstName: 'Albert', @@ -1533,7 +1725,12 @@ describe('duplex', function() { } }; - expect(jsonpatch.compare(objA, objB)).toReallyEqual([ + expect(jsonpatch.compare(objA, objB, true)).toReallyEqual([ + { + op: 'test', + path: '/user/lastName', + value: 'Einstein' + }, { op: 'remove', path: '/user/lastName' @@ -1541,7 +1738,7 @@ describe('duplex', function() { ]); }); - it('should return a replace for a property that exists in both', function() { + it('should return test and replace for a property that exists in both (invertible = true)', function() { var objA = { user: { firstName: 'Albert', @@ -1555,7 +1752,12 @@ describe('duplex', function() { } }; - expect(jsonpatch.compare(objA, objB)).toReallyEqual([ + expect(jsonpatch.compare(objA, objB, true)).toReallyEqual([ + { + op: 'test', + path: '/user/lastName', + value: 'Einstein' + }, { op: 'replace', path: '/user/lastName', @@ -1564,7 +1766,7 @@ describe('duplex', function() { ]); }); - it('should replace null with object', function() { + it('should replace null with object (invertible = true)', function() { var objA = { user: null }; @@ -1572,7 +1774,12 @@ describe('duplex', function() { user: {} }; - expect(jsonpatch.compare(objA, objB)).toReallyEqual([ + expect(jsonpatch.compare(objA, objB, true)).toReallyEqual([ + { + op: 'test', + path: '/user', + value: null + }, { op: 'replace', path: '/user', @@ -1581,7 +1788,7 @@ describe('duplex', function() { ]); }); - it('should replace object with null', function() { + it('should replace object with null (invertible = true)', function() { var objA = { user: {} }; @@ -1589,7 +1796,12 @@ describe('duplex', function() { user: null }; - expect(jsonpatch.compare(objA, objB)).toReallyEqual([ + expect(jsonpatch.compare(objA, objB, true)).toReallyEqual([ + { + op: 'test', + path: '/user', + value: {} + }, { op: 'replace', path: '/user', @@ -1598,7 +1810,7 @@ describe('duplex', function() { ]); }); - it('should not remove undefined', function() { + it('should not remove undefined (invertible = true)', function() { var objA = { user: undefined }; @@ -1606,7 +1818,7 @@ describe('duplex', function() { user: undefined }; - expect(jsonpatch.compare(objA, objB)).toReallyEqual([]); + expect(jsonpatch.compare(objA, objB, true)).toReallyEqual([]); }); it('should replace 0 with empty string', function() { @@ -1617,7 +1829,12 @@ describe('duplex', function() { user: '' }; - expect(jsonpatch.compare(objA, objB)).toReallyEqual([ + expect(jsonpatch.compare(objA, objB, true)).toReallyEqual([ + { + op: 'test', + path: '/user', + value: 0 + }, { op: 'replace', path: '/user', From c6e963f3becfb01d77a5b8de0743cdd8ba3472f5 Mon Sep 17 00:00:00 2001 From: Marcin Warpechowski Date: Tue, 2 Jul 2019 11:44:15 +0200 Subject: [PATCH 14/15] change Sauce tests to local because we have run out of minutes --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4b8f518a..7c35fe92 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,4 +5,4 @@ before_script: - npm install - npm run serve & script: - - npm run test-sauce + - npm run test From fe852122c12056f9389b1ac1520b63f71f9c3b64 Mon Sep 17 00:00:00 2001 From: warpech Date: Tue, 9 Jul 2019 15:48:30 +0200 Subject: [PATCH 15/15] for all tests that check invertible=true, also check invertible=false because this was requested by @tomalec in https://github.com/Starcounter-Jack/JSON-Patch/pull/228#discussion_r299420002 --- src/duplex.ts | 12 +- test/spec/duplexSpec.js | 955 ++++++++++++++++++---------------------- 2 files changed, 443 insertions(+), 524 deletions(-) diff --git a/src/duplex.ts b/src/duplex.ts index 8a3e28ef..150859cd 100644 --- a/src/duplex.ts +++ b/src/duplex.ts @@ -191,17 +191,23 @@ function _generate(mirror, obj, patches, path, invertible) { else { if (oldVal !== newVal) { changed = true; - if (invertible) patches.push({ op: "test", path: path + "/" + escapePathComponent(key), value: _deepClone(oldVal) }); + if (invertible) { + patches.push({ op: "test", path: path + "/" + escapePathComponent(key), value: _deepClone(oldVal) }); + } patches.push({ op: "replace", path: path + "/" + escapePathComponent(key), value: _deepClone(newVal) }); } } } else if(Array.isArray(mirror) === Array.isArray(obj)) { - if (invertible) patches.push({ op: "test", path: path + "/" + escapePathComponent(key), value: _deepClone(oldVal) }) + if (invertible) { + patches.push({ op: "test", path: path + "/" + escapePathComponent(key), value: _deepClone(oldVal) }); + } patches.push({ op: "remove", path: path + "/" + escapePathComponent(key) }); deleted = true; // property has been deleted } else { - if (invertible) patches.push({ op: "test", path, value: mirror }); + if (invertible) { + patches.push({ op: "test", path, value: mirror }); + } patches.push({ op: "replace", path, value: obj }); changed = true; } diff --git a/test/spec/duplexSpec.js b/test/spec/duplexSpec.js index 496b8214..223d3c3a 100644 --- a/test/spec/duplexSpec.js +++ b/test/spec/duplexSpec.js @@ -74,6 +74,16 @@ var customMatchers = { } }; +function variantIt(name, variants, fn) { + variants.forEach(variant => { + it(`${name} | variant: ${variant[0]}`, fn(...variant.slice(1))); + }); +} + +function insertIf(condition, ...elements) { + return condition ? elements : []; +} + describe('duplex', function() { beforeEach(function() { jasmine.addMatchers(customMatchers); @@ -183,304 +193,184 @@ describe('duplex', function() { expect(obj2).toReallyEqual(obj); }); - it('should generate replace (2 observers)', function() { - var person1 = { - firstName: 'Alexandra', - lastName: 'Galbreath' - }; - var person2 = { - firstName: 'Lisa', - lastName: 'Mendoza' - }; - - var observer1 = jsonpatch.observe(person1); - var observer2 = jsonpatch.observe(person2); - - person1.firstName = 'Alexander'; - person2.firstName = 'Lucas'; - - var patch1 = jsonpatch.generate(observer1); - var patch2 = jsonpatch.generate(observer2); - - expect(patch1).toReallyEqual([ - { - op: 'replace', - path: '/firstName', - value: 'Alexander' - } - ]); - expect(patch2).toReallyEqual([ - { - op: 'replace', - path: '/firstName', - value: 'Lucas' - } - ]); - }); - - it('should generate test and replace (2 observers, invertible = true)', function() { - var person1 = { - firstName: 'Alexandra', - lastName: 'Galbreath' - }; - var person2 = { - firstName: 'Lisa', - lastName: 'Mendoza' - }; + variantIt('should generate replace (2 observers)', [ + ['invertible = FALSE', false], + ['invertible = TRUE', true] + ], function (testInvertible) { + return function () { + var person1 = { + firstName: 'Alexandra', + lastName: 'Galbreath' + }; + var person2 = { + firstName: 'Lisa', + lastName: 'Mendoza' + }; - var observer1 = jsonpatch.observe(person1); - var observer2 = jsonpatch.observe(person2); + var observer1 = jsonpatch.observe(person1); + var observer2 = jsonpatch.observe(person2); - person1.firstName = 'Alexander'; - person2.firstName = 'Lucas'; + person1.firstName = 'Alexander'; + person2.firstName = 'Lucas'; - var patch1 = jsonpatch.generate(observer1, true); - var patch2 = jsonpatch.generate(observer2, true); + var patch1 = jsonpatch.generate(observer1, testInvertible); + var patch2 = jsonpatch.generate(observer2, testInvertible); - expect(patch1).toReallyEqual([ - { - op: "test", - path: "/firstName", - value: "Alexandra" - }, - { - op: 'replace', - path: '/firstName', - value: 'Alexander' - } - ]); - expect(patch2).toReallyEqual([ - { - op: "test", - path: "/firstName", - value: "Lisa" - }, - { - op: 'replace', - path: '/firstName', - value: 'Lucas' - } - ]); - }); - - it('should generate replace (double change, shallow object)', function() { - obj = { - firstName: 'Albert', - lastName: 'Einstein', - phoneNumbers: [ - { - number: '12345' - }, + expect(patch1).toReallyEqual([ + ...insertIf(testInvertible, { + op: "test", + path: "/firstName", + value: "Alexandra" + }), { - number: '45353' + op: 'replace', + path: '/firstName', + value: 'Alexander' } - ] - }; - - var observer = jsonpatch.observe(obj); - obj.firstName = 'Marcin'; - - var patches = jsonpatch.generate(observer); - expect(patches).toReallyEqual([ - { - op: 'replace', - path: '/firstName', - value: 'Marcin' - } - ]); - - obj.lastName = 'Warp'; - patches = jsonpatch.generate(observer); //first patch should NOT be reported again here - expect(patches).toReallyEqual([ - { - op: 'replace', - path: '/lastName', - value: 'Warp' - } - ]); - - expect(obj).toReallyEqual({ - firstName: 'Marcin', - lastName: 'Warp', - phoneNumbers: [ - { - number: '12345' - }, + ]); + expect(patch2).toReallyEqual([ + ...insertIf(testInvertible, { + op: "test", + path: "/firstName", + value: "Lisa" + }), { - number: '45353' + op: 'replace', + path: '/firstName', + value: 'Lucas' } - ] - }); //objects should be still the same + ]); + } }); - it('should generate test and replace (double change, shallow object, invertible = true)', function() { - obj = { - firstName: 'Albert', - lastName: 'Einstein', - phoneNumbers: [ - { - number: '12345' - }, - { - number: '45353' - } - ] - }; - - var observer = jsonpatch.observe(obj); - obj.firstName = 'Marcin'; - - var patches = jsonpatch.generate(observer, true); - expect(patches).toReallyEqual([ - { - op: "test", - path: "/firstName", - value: "Albert" - }, - { - op: 'replace', - path: '/firstName', - value: 'Marcin' - } - ]); + variantIt('should generate test and replace (double change, shallow object)', [ + ['invertible = FALSE', false], + ['invertible = TRUE', true] + ], function (testInvertible) { + return function () { + obj = { + firstName: 'Albert', + lastName: 'Einstein', + phoneNumbers: [ + { + number: '12345' + }, + { + number: '45353' + } + ] + }; - obj.lastName = 'Warp'; - patches = jsonpatch.generate(observer, true); //first patch should NOT be reported again here - expect(patches).toReallyEqual([ - { - op: "test", - path: "/lastName", - value: "Einstein" - }, - { - op: 'replace', - path: '/lastName', - value: 'Warp' - } - ]); + var observer = jsonpatch.observe(obj); + obj.firstName = 'Marcin'; - expect(obj).toReallyEqual({ - firstName: 'Marcin', - lastName: 'Warp', - phoneNumbers: [ - { - number: '12345' - }, + var patches = jsonpatch.generate(observer, testInvertible); + expect(patches).toReallyEqual([ + ...insertIf(testInvertible, { + op: "test", + path: "/firstName", + value: "Albert" + }), { - number: '45353' + op: 'replace', + path: '/firstName', + value: 'Marcin' } - ] - }); //objects should be still the same - }); + ]); - it('should generate replace (double change, deep object)', function() { - obj = { - firstName: 'Albert', - lastName: 'Einstein', - phoneNumbers: [ - { - number: '12345' - }, + obj.lastName = 'Warp'; + patches = jsonpatch.generate(observer, testInvertible); //first patch should NOT be reported again here + expect(patches).toReallyEqual([ + ...insertIf(testInvertible, { + op: "test", + path: "/lastName", + value: "Einstein" + }), { - number: '45353' + op: 'replace', + path: '/lastName', + value: 'Warp' } - ] - }; + ]); - var observer = jsonpatch.observe(obj); - obj.phoneNumbers[0].number = '123'; + expect(obj).toReallyEqual({ + firstName: 'Marcin', + lastName: 'Warp', + phoneNumbers: [ + { + number: '12345' + }, + { + number: '45353' + } + ] + }); //objects should be still the same + } + }); - var patches = jsonpatch.generate(observer); - expect(patches).toReallyEqual([ - { - op: 'replace', - path: '/phoneNumbers/0/number', - value: '123' - } - ]); + variantIt('should generate test and replace (double change, shallow object)', [ + ['invertible = FALSE', false], + ['invertible = TRUE', true] + ], function (testInvertible) { + return function () { + obj = { + firstName: 'Albert', + lastName: 'Einstein', + phoneNumbers: [ + { + number: '12345' + }, + { + number: '45353' + } + ] + }; - obj.phoneNumbers[1].number = '456'; - patches = jsonpatch.generate(observer); //first patch should NOT be reported again here - expect(patches).toReallyEqual([ - { - op: 'replace', - path: '/phoneNumbers/1/number', - value: '456' - } - ]); + var observer = jsonpatch.observe(obj); + obj.phoneNumbers[0].number = '123'; - expect(obj).toReallyEqual({ - firstName: 'Albert', - lastName: 'Einstein', - phoneNumbers: [ - { - number: '123' - }, + var patches = jsonpatch.generate(observer, testInvertible); + expect(patches).toReallyEqual([ + ...insertIf(testInvertible, { + op: "test", + path: "/phoneNumbers/0/number", + value: "12345" + }), { - number: '456' + op: 'replace', + path: '/phoneNumbers/0/number', + value: '123' } - ] - }); //objects should be still the same - }); + ]); - it('should generate replace (double change, deep object, invertible = true)', function() { - obj = { - firstName: 'Albert', - lastName: 'Einstein', - phoneNumbers: [ - { - number: '12345' - }, + obj.phoneNumbers[1].number = '456'; + patches = jsonpatch.generate(observer, testInvertible); //first patch should NOT be reported again here + expect(patches).toReallyEqual([ + ...insertIf(testInvertible, { + op: "test", + path: "/phoneNumbers/1/number", + value: "45353" + }), { - number: '45353' + op: 'replace', + path: '/phoneNumbers/1/number', + value: '456' } - ] - }; - - var observer = jsonpatch.observe(obj); - obj.phoneNumbers[0].number = '123'; - - var patches = jsonpatch.generate(observer, true); - expect(patches).toReallyEqual([ - { - op: "test", - path: "/phoneNumbers/0/number", - value: "12345" - }, - { - op: 'replace', - path: '/phoneNumbers/0/number', - value: '123' - } - ]); - - obj.phoneNumbers[1].number = '456'; - patches = jsonpatch.generate(observer, true); //first patch should NOT be reported again here - expect(patches).toReallyEqual([ - { - op: "test", - path: "/phoneNumbers/1/number", - value: "45353" - }, - { - op: 'replace', - path: '/phoneNumbers/1/number', - value: '456' - } - ]); + ]); - expect(obj).toReallyEqual({ - firstName: 'Albert', - lastName: 'Einstein', - phoneNumbers: [ - { - number: '123' - }, - { - number: '456' - } - ] - }); //objects should be still the same + expect(obj).toReallyEqual({ + firstName: 'Albert', + lastName: 'Einstein', + phoneNumbers: [ + { + number: '123' + }, + { + number: '456' + } + ] + }); //objects should be still the same + } }); it('should generate replace (changes in new array cell, primitive values)', function() { @@ -640,44 +530,49 @@ describe('duplex', function() { expect(obj2).toEqualInJson(obj); }); - it('should generate remove (array indexes should be sorted descending, invertible = true)', function() { - obj = { - items: ['a', 'b', 'c'] - }; - var observer = jsonpatch.observe(obj); + variantIt('should generate test and replace (double change, shallow object)', [ + ['invertible = FALSE', false], + ['invertible = TRUE', true] + ], function (testInvertible) { + return function () { + obj = { + items: ['a', 'b', 'c'] + }; + var observer = jsonpatch.observe(obj); - obj.items.pop(); - obj.items.pop(); + obj.items.pop(); + obj.items.pop(); - patches = jsonpatch.generate(observer, true); + patches = jsonpatch.generate(observer, testInvertible); - //array indexes must be sorted descending, otherwise there is an index collision in apply - expect(patches).toReallyEqual([ - { - op: 'test', - path: '/items/2', - value: 'c' - }, - { - op: 'remove', - path: '/items/2' - }, - { - op: 'test', - path: '/items/1', - value: 'b' - }, - { - op: 'remove', - path: '/items/1' - }, - ]); + //array indexes must be sorted descending, otherwise there is an index collision in apply + expect(patches).toReallyEqual([ + ...insertIf(testInvertible, { + op: 'test', + path: '/items/2', + value: 'c' + }), + { + op: 'remove', + path: '/items/2' + }, + ...insertIf(testInvertible, { + op: 'test', + path: '/items/1', + value: 'b' + }), + { + op: 'remove', + path: '/items/1' + }, + ]); - obj2 = { - items: ['a', 'b', 'c'] - }; - jsonpatch.applyPatch(obj2, patches); - expect(obj).toEqualInJson(obj2); + obj2 = { + items: ['a', 'b', 'c'] + }; + jsonpatch.applyPatch(obj2, patches); + expect(obj).toEqualInJson(obj2); + } }); it('should not generate the same patch twice (replace)', function() { @@ -1603,244 +1498,262 @@ describe('duplex', function() { }); }); describe('compare', function() { - it('Replacing a root array with an object should be handled well', function() { - - const objA = ['jack']; - const objB = {}; - var patches = jsonpatch.compare(objA, objB); - expect(patches).toEqual([ - { - op: 'replace', - path: '', - value: objB - } - ]); - + variantIt('Replacing a root array with an object should be handled well', [ + ['invertible = FALSE', false], + ['invertible = TRUE', true] + ], function (testInvertible) { + return function () { + + const objA = ['jack']; + const objB = {}; + var patches = jsonpatch.compare(objA, objB, testInvertible); + expect(patches).toEqual([ + ...insertIf(testInvertible, { + op: 'test', + path: '', + value: objA + }), + { + op: 'replace', + path: '', + value: objB + } + ]); + } }); - it('Replacing a root array with an object should be handled well (invertible = true)', function() { - - const objA = ['jack']; - const objB = {}; - var patches = jsonpatch.compare(objA, objB, true); - expect(patches).toEqual([ - { - op: 'test', - path: '', - value: objA - }, - { - op: 'replace', - path: '', - value: objB - } - ]); - + variantIt('Replacing an array with an object should be handled well', [ + ['invertible = FALSE', false], + ['invertible = TRUE', true] + ], function (testInvertible) { + return function () { + const arr = ['jack']; + const obj = {}; + var patches = jsonpatch.compare({ arr: arr }, { arr: obj }, testInvertible); + expect(patches).toEqual([ + ...insertIf(testInvertible, { + op: 'test', + path: '/arr', + value: arr + }), + { + op: 'replace', + path: '/arr', + value: obj + } + ]); + } }); - it('Replacing an array with an object should be handled well', function() { - - const arr = ['jack']; - const obj = {}; - var patches = jsonpatch.compare({arr: arr}, {arr: obj}); - expect(patches).toEqual([ - { - op: 'replace', - path: '/arr', - value: obj - } - ]); - + variantIt('Replacing an array that nested in an object with an object nested in an an object should be handled well', [ + ['invertible = FALSE', false], + ['invertible = TRUE', true] + ], function (testInvertible) { + return function () { + + const arr = ['jack']; + const obj = {}; + var patches = jsonpatch.compare({ arr: { deeperArray: arr } }, { arr: { deeperArray: obj } }, testInvertible); + + expect(patches).toEqual([ + ...insertIf(testInvertible, { + op: 'test', + path: '/arr/deeperArray', + value: arr + }), + { + op: 'replace', + path: '/arr/deeperArray', + value: obj + } + ]); + } }); - it('Replacing an array with an object should be handled well (invertible = true)', function() { - - const arr = ['jack']; - const obj = {}; - var patches = jsonpatch.compare({arr: arr}, {arr: obj}, true); - expect(patches).toEqual([ - { - op: 'test', - path: '/arr', - value: arr - }, - { - op: 'replace', - path: '/arr', - value: obj - } - ]); + variantIt('should return an add for a property that does not exist in the first obj, without a test operation', [ + ['invertible = FALSE', false], + ['invertible = TRUE', true] + ], function (testInvertible) { + return function () { + var objA = { + user: { + firstName: 'Albert' + } + }; + var objB = { + user: { + firstName: 'Albert', + lastName: 'Einstein' + } + }; + expect(jsonpatch.compare(objA, objB, testInvertible)).toReallyEqual([ + // no test operation, because undefined values are not serialized to JSON + { + op: 'add', + path: '/user/lastName', + value: 'Einstein' + } + ]); + } }); - it('Replacing an array that nested in an object with an object nested in an an object should be handled well', function() { - - const arr = ['jack']; - const obj = {}; - var patches = jsonpatch.compare({arr: {deeperArray: arr}}, {arr: {deeperArray: obj}}, true); - expect(patches).toEqual([ - { - op: 'test', - path: '/arr/deeperArray', - value: arr - }, - { - op: 'replace', - path: '/arr/deeperArray', - value: obj - } - ]); - - }); - it('should return an add for a property that does not exist in the first obj, without a test operation (invertible = true)', function() { - var objA = { - user: { - firstName: 'Albert' - } - }; - var objB = { - user: { - firstName: 'Albert', - lastName: 'Einstein' - } - }; + variantIt('should return test and remove for a property that does not exist in the second obj', [ + ['invertible = FALSE', false], + ['invertible = TRUE', true] + ], function (testInvertible) { + return function () { + var objA = { + user: { + firstName: 'Albert', + lastName: 'Einstein' + } + }; + var objB = { + user: { + firstName: 'Albert' + } + }; - expect(jsonpatch.compare(objA, objB, true)).toReallyEqual([ - // no test operation, because undefined values are not serialized to JSON - { - op: 'add', - path: '/user/lastName', - value: 'Einstein' - } - ]); + expect(jsonpatch.compare(objA, objB, testInvertible)).toReallyEqual([ + ...insertIf(testInvertible, { + op: 'test', + path: '/user/lastName', + value: 'Einstein' + }), + { + op: 'remove', + path: '/user/lastName' + } + ]); + } }); - it('should return test and remove for a property that does not exist in the second obj (invertible = true)', function() { - var objA = { - user: { - firstName: 'Albert', - lastName: 'Einstein' - } - }; - var objB = { - user: { - firstName: 'Albert' - } - }; + variantIt('should return test and replace for a property that exists in both', [ + ['invertible = FALSE', false], + ['invertible = TRUE', true] + ], function (testInvertible) { + return function () { + var objA = { + user: { + firstName: 'Albert', + lastName: 'Einstein' + } + }; + var objB = { + user: { + firstName: 'Albert', + lastName: 'Collins' + } + }; - expect(jsonpatch.compare(objA, objB, true)).toReallyEqual([ - { - op: 'test', - path: '/user/lastName', - value: 'Einstein' - }, - { - op: 'remove', - path: '/user/lastName' - } - ]); + expect(jsonpatch.compare(objA, objB, testInvertible)).toReallyEqual([ + ...insertIf(testInvertible, { + op: 'test', + path: '/user/lastName', + value: 'Einstein' + }), + { + op: 'replace', + path: '/user/lastName', + value: 'Collins' + } + ]); + } }); - it('should return test and replace for a property that exists in both (invertible = true)', function() { - var objA = { - user: { - firstName: 'Albert', - lastName: 'Einstein' - } - }; - var objB = { - user: { - firstName: 'Albert', - lastName: 'Collins' - } - }; + variantIt('should replace null with object', [ + ['invertible = FALSE', false], + ['invertible = TRUE', true] + ], function (testInvertible) { + return function () { + var objA = { + user: null + }; + var objB = { + user: {} + }; - expect(jsonpatch.compare(objA, objB, true)).toReallyEqual([ - { - op: 'test', - path: '/user/lastName', - value: 'Einstein' - }, - { - op: 'replace', - path: '/user/lastName', - value: 'Collins' - } - ]); - }); + expect(jsonpatch.compare(objA, objB, testInvertible)).toReallyEqual([ + ...insertIf(testInvertible, { + op: 'test', + path: '/user', + value: null + }), + { + op: 'replace', + path: '/user', + value: {} + } + ]); + } + }); - it('should replace null with object (invertible = true)', function() { - var objA = { - user: null - }; - var objB = { - user: {} - }; + variantIt('should replace object with null', [ + ['invertible = FALSE', false], + ['invertible = TRUE', true] + ], function (testInvertible) { + return function () { + var objA = { + user: {} + }; + var objB = { + user: null + }; - expect(jsonpatch.compare(objA, objB, true)).toReallyEqual([ - { - op: 'test', - path: '/user', - value: null - }, - { - op: 'replace', - path: '/user', - value: {} - } - ]); + expect(jsonpatch.compare(objA, objB, testInvertible)).toReallyEqual([ + ...insertIf(testInvertible, { + op: 'test', + path: '/user', + value: {} + }), + { + op: 'replace', + path: '/user', + value: null + } + ]); + } }); - it('should replace object with null (invertible = true)', function() { - var objA = { - user: {} - }; - var objB = { - user: null - }; + variantIt('should not remove undefined', [ + ['invertible = FALSE', false], + ['invertible = TRUE', true] + ], function (testInvertible) { + return function () { + var objA = { + user: undefined + }; + var objB = { + user: undefined + }; - expect(jsonpatch.compare(objA, objB, true)).toReallyEqual([ - { - op: 'test', - path: '/user', - value: {} - }, - { - op: 'replace', - path: '/user', - value: null - } - ]); + expect(jsonpatch.compare(objA, objB, testInvertible)).toReallyEqual([]); + } }); - it('should not remove undefined (invertible = true)', function() { - var objA = { - user: undefined - }; - var objB = { - user: undefined - }; - - expect(jsonpatch.compare(objA, objB, true)).toReallyEqual([]); - }); + variantIt('should replace 0 with empty string', [ + ['invertible = FALSE', false], + ['invertible = TRUE', true] + ], function (testInvertible) { + return function () { + var objA = { + user: 0 + }; + var objB = { + user: '' + }; - it('should replace 0 with empty string', function() { - var objA = { - user: 0 - }; - var objB = { - user: '' + expect(jsonpatch.compare(objA, objB, testInvertible)).toReallyEqual([ + ...insertIf(testInvertible, { + op: 'test', + path: '/user', + value: 0 + }), + { + op: 'replace', + path: '/user', + value: '' + } + ]); }; - - expect(jsonpatch.compare(objA, objB, true)).toReallyEqual([ - { - op: 'test', - path: '/user', - value: 0 - }, - { - op: 'replace', - path: '/user', - value: '' - } - ]); }); });