k?new ga(h):new ga(h,k)};a.parseMarbles=function(a,c,e,f,g){var b=this;void 0===f&&(f=!1);void 0===g&&(g=!1);if(-1!==a.indexOf("!"))throw Error('conventional marble diagrams cannot have the unsubscription marker "!"');for(var d=a.length,h=[],k=g?a.replace(/^[ ]+/,"").indexOf("^"):a.indexOf("^"),m=-1===k?0:k*-this.frameTimeFactor,n="object"!==typeof c?function(a){return a}:function(a){return f&&c[a]instanceof Ka?c[a].messages:c[a]},p=-1,k=function(c){var d=
+m,f=function(a){d+=a*b.frameTimeFactor},l=void 0,k=a[c];switch(k){case " ":g||f(1);break;case "-":f(1);break;case "(":p=m;f(1);break;case ")":p=-1;f(1);break;case "|":l=w.createComplete();f(1);break;case "^":f(1);break;case "#":l=w.createError(e||"error");f(1);break;default:if(g&&k.match(/^[0-9]$/)&&(0===c||" "===a[c-1])){var u=a.slice(c).match(/^([0-9]+(?:\.[0-9]+)?)(ms|s|m) /);if(u){c+=u[0].length-1;var k=parseFloat(u[1]),r=void 0;switch(u[2]){case "ms":r=k;break;case "s":r=1E3*k;break;case "m":r=
+6E4*k}f(r/q.frameTimeFactor);break}}l=w.createNext(n(k));f(1)}l&&h.push({frame:-1d;d++)try{b=c[d];new z.ActiveXObject(b);break}catch(r){}a=new z.ActiveXObject(b)}catch(r){throw Error("XMLHttpRequest is not supported by your browser");
+}}return a},crossDomain:!0,withCredentials:!1,headers:{},method:"GET",responseType:"json",timeout:0};if("string"===typeof a)e.url=a;else for(var f in a)a.hasOwnProperty(f)&&(e[f]=a[f]);b.request=e;return b}h(a,c);a.prototype._subscribe=function(a){return new Bf(a,this.request)};a.create=function(){var b=function(b){return new a(b)};b.get=Fc;b.post=Gc;b.delete=Hc;b.put=Ic;b.patch=Jc;b.getJSON=Kc;return b}();return a}(n),Bf=function(c){function a(a,d){a=c.call(this,a)||this;a.request=d;a.done=!1;var b=
+d.headers=d.headers||{};d.crossDomain||a.getHeader(b,"X-Requested-With")||(b["X-Requested-With"]="XMLHttpRequest");a.getHeader(b,"Content-Type")||z.FormData&&d.body instanceof z.FormData||"undefined"===typeof d.body||(b["Content-Type"]="application/x-www-form-urlencoded; charset\x3dUTF-8");d.body=a.serializeBody(d.body,a.getHeader(d.headers,"Content-Type"));a.send();return a}h(a,c);a.prototype.next=function(a){this.done=!0;var b=this.xhr,c=this.request,f=this.destination,g;try{g=new Jb(a,b,c)}catch(l){return f.error(l)}f.next(g)};
+a.prototype.send=function(){var a=this.request,c=this.request,e=c.user,f=c.method,g=c.url,h=c.async,k=c.password,m=c.headers,c=c.body;try{var r=this.xhr=a.createXHR();this.setupEvents(r,a);e?r.open(f,g,h,e,k):r.open(f,g,h);h&&(r.timeout=a.timeout,r.responseType=a.responseType);"withCredentials"in r&&(r.withCredentials=!!a.withCredentials);this.setHeaders(r,m);c?r.send(c):r.send()}catch(Zb){this.error(Zb)}};a.prototype.serializeBody=function(a,c){if(!a||"string"===typeof a||z.FormData&&a instanceof
+z.FormData)return a;if(c){var b=c.indexOf(";");-1!==b&&(c=c.substring(0,b))}switch(c){case "application/x-www-form-urlencoded":return Object.keys(a).map(function(b){return encodeURIComponent(b)+"\x3d"+encodeURIComponent(a[b])}).join("\x26");case "application/json":return JSON.stringify(a);default:return a}};a.prototype.setHeaders=function(a,c){for(var b in c)c.hasOwnProperty(b)&&a.setRequestHeader(b,c[b])};a.prototype.getHeader=function(a,c){for(var b in a)if(b.toLowerCase()===c.toLowerCase())return a[b]};
+a.prototype.setupEvents=function(a,c){function b(a){var c=b.subscriber,d=b.progressSubscriber,e=b.request;d&&d.error(a);var f;try{f=new Kb(this,e)}catch(La){f=La}c.error(f)}function d(a){}function g(a){var b=g.subscriber,c=g.progressSubscriber,d=g.request;if(4===this.readyState){var e=1223===this.status?204:this.status,f="text"===this.responseType?this.response||this.responseText:this.response;0===e&&(e=f?200:0);if(400>e)c&&c.complete(),b.next(a),b.complete();else{c&&c.error(a);a=void 0;try{a=new ra("ajax error "+
+e,this,d)}catch(wf){a=wf}b.error(a)}}}var h=c.progressSubscriber;a.ontimeout=b;b.request=c;b.subscriber=this;b.progressSubscriber=h;if(a.upload&&"withCredentials"in a){if(h){var k;k=function(a){k.progressSubscriber.next(a)};z.XDomainRequest?a.onprogress=k:a.upload.onprogress=k;k.progressSubscriber=h}var m;m=function(a){var b=m.progressSubscriber,c=m.subscriber,d=m.request;b&&b.error(a);var e;try{e=new ra("ajax error",this,d)}catch(La){e=La}c.error(e)};a.onerror=m;m.request=c;m.subscriber=this;m.progressSubscriber=
+h}a.onreadystatechange=d;d.subscriber=this;d.progressSubscriber=h;d.request=c;a.onload=g;g.subscriber=this;g.progressSubscriber=h;g.request=c};a.prototype.unsubscribe=function(){var a=this.xhr;!this.done&&a&&4!==a.readyState&&"function"===typeof a.abort&&a.abort();c.prototype.unsubscribe.call(this)};return a}(m),Jb=function(){return function(c,a,b){this.originalEvent=c;this.xhr=a;this.request=b;this.status=a.status;this.responseType=a.responseType||b.responseType;this.response=rb(this.responseType,
+a)}}();qb.prototype=Object.create(Error.prototype);var ra=qb,Kb=function(c,a){ra.call(this,"ajax timeout",c,a);this.name="AjaxTimeoutError";return this},Cf=Object.freeze({ajax:O.create,AjaxResponse:Jb,AjaxError:ra,AjaxTimeoutError:Kb}),Df={url:"",deserializer:function(c){return JSON.parse(c.data)},serializer:function(c){return JSON.stringify(c)}},Lb=function(c){function a(a,d){var b=c.call(this)||this;if(a instanceof n)b.destination=d,b.source=a;else{d=b._config=Mc({},Df);b._output=new v;if("string"===
+typeof a)d.url=a;else for(var f in a)a.hasOwnProperty(f)&&(d[f]=a[f]);if(!d.WebSocketCtor&&WebSocket)d.WebSocketCtor=WebSocket;else if(!d.WebSocketCtor)throw Error("no WebSocket constructor can be found");b.destination=new X}return b}h(a,c);a.prototype.lift=function(b){var c=new a(this._config,this.destination);c.operator=b;c.source=this;return c};a.prototype._resetState=function(){this._socket=null;this.source||(this.destination=new X);this._output=new v};a.prototype.multiplex=function(a,c,e){var b=
+this;return new n(function(d){try{b.next(a())}catch(u){d.error(u)}var f=b.subscribe(function(a){try{e(a)&&d.next(a)}catch(L){d.error(L)}},function(a){return d.error(a)},function(){return d.complete()});return function(){try{b.next(c())}catch(u){d.error(u)}f.unsubscribe()}})};a.prototype._connectSocket=function(){var a=this,c=this._config,e=c.WebSocketCtor,f=c.protocol,g=c.url,c=c.binaryType,h=this._output,k=null;try{this._socket=k=f?new e(g,f):new e(g),c&&(this._socket.binaryType=c)}catch(r){h.error(r);
+return}var n=new t(function(){a._socket=null;k&&1===k.readyState&&k.close()});k.onopen=function(b){if(a._socket){var c=a._config.openObserver;c&&c.next(b);b=a.destination;a.destination=m.create(function(b){if(1===k.readyState)try{var c=a._config.serializer;k.send(c(b))}catch(ac){a.destination.error(ac)}},function(b){var c=a._config.closingObserver;c&&c.next(void 0);b&&b.code?k.close(b.code,b.reason):h.error(new TypeError("WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }"));
+a._resetState()},function(){var b=a._config.closingObserver;b&&b.next(void 0);k.close();a._resetState()});b&&b instanceof X&&n.add(b.subscribe(a.destination))}else k.close(),a._resetState()};k.onerror=function(b){a._resetState();h.error(b)};k.onclose=function(b){a._resetState();var c=a._config.closeObserver;c&&c.next(b);b.wasClean?h.complete():h.error(b)};k.onmessage=function(b){try{var c=a._config.deserializer;h.next(c(b))}catch($b){h.error($b)}}};a.prototype._subscribe=function(a){var b=this,c=
+this.source;if(c)return c.subscribe(a);this._socket||this._connectSocket();this._output.subscribe(a);a.add(function(){var a=b._socket;0===b._output.observers.length&&(a&&1===a.readyState&&a.close(),b._resetState())});return a};a.prototype.unsubscribe=function(){var a=this._socket;a&&1===a.readyState&&a.close();this._resetState();c.prototype.unsubscribe.call(this)};return a}(Ea),Ef=Object.freeze({webSocket:function(c){return new Lb(c)},WebSocketSubject:Lb}),Ff=Object.freeze({fromFetch:function(c,a){return new n(function(b){var d=
+new AbortController,e=d.signal,f=!0,g=!1;a?(a.signal&&a.signal.addEventListener("abort",function(){e.aborted||d.abort()}),a.signal=e):a={signal:e};fetch(c,a).then(function(a){f=!1;b.next(a);b.complete()}).catch(function(a){f=!1;g||b.error(a)});return function(){g=!0;f&&d.abort()}})}});k.operators=vf;k.testing=yf;k.ajax=Cf;k.webSocket=Ef;k.fetch=Ff;k.Observable=n;k.ConnectableObservable=vb;k.GroupedObservable=Fa;k.observable=V;k.Subject=v;k.BehaviorSubject=wb;k.ReplaySubject=X;k.AsyncSubject=U;k.asapScheduler=
+qa;k.asyncScheduler=y;k.queueScheduler=xb;k.animationFrameScheduler=$c;k.VirtualTimeScheduler=Ab;k.VirtualAction=Ia;k.Scheduler=Ga;k.Subscription=t;k.Subscriber=m;k.Notification=w;k.pipe=ua;k.noop=D;k.identity=J;k.isObservable=function(c){return!!c&&(c instanceof n||"function"===typeof c.lift&&"function"===typeof c.subscribe)};k.ArgumentOutOfRangeError=K;k.EmptyError=ca;k.ObjectUnsubscribedError=E;k.UnsubscriptionError=Y;k.TimeoutError=ya;k.bindCallback=Sa;k.bindNodeCallback=Ta;k.combineLatest=function(){for(var c=
+[],a=0;ac)c=0;a&&"function"===typeof a.schedule||(a=y);return new n(function(b){b.add(a.schedule(cc,c,{subscriber:b,counter:0,period:c}));return b})};k.merge=
+bb;k.never=function(){return Cb};k.of=ha;k.onErrorResumeNext=Ba;k.pairs=function(c,a){return a?new n(function(b){var d=Object.keys(c),e=new t;e.add(a.schedule(dc,0,{keys:d,index:0,subscriber:b,subscription:e,obj:c}));return e}):new n(function(a){for(var b=Object.keys(c),e=0;e=a){d.complete();break}d.next(f++);if(d.closed)break}while(1)})};k.throwError=xa;k.timer=eb;k.using=function(c,a){return new n(function(b){var d;try{d=c()}catch(g){b.error(g);return}var e;try{e=a(d)}catch(g){b.error(g);return}var f=(e?G(e):T).subscribe(b);return function(){f.unsubscribe();d&&d.unsubscribe()}})};k.zip=fb;k.scheduled=Wa;k.EMPTY=T;k.NEVER=Cb;k.config=
+C;Object.defineProperty(k,"__esModule",{value:!0})});
//# sourceMappingURL=rxjs.umd.min.js.map
diff --git a/tools/node_modules/eslint/node_modules/rxjs/fetch/index.js b/tools/node_modules/eslint/node_modules/rxjs/fetch/index.js
new file mode 100644
index 00000000000000..ca5d62f1a3dd60
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/rxjs/fetch/index.js
@@ -0,0 +1,5 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var fetch_1 = require("../internal/observable/dom/fetch");
+exports.fromFetch = fetch_1.fromFetch;
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/rxjs/index.js b/tools/node_modules/eslint/node_modules/rxjs/index.js
index f6d4852ff54d52..042b7e6e719a16 100644
--- a/tools/node_modules/eslint/node_modules/rxjs/index.js
+++ b/tools/node_modules/eslint/node_modules/rxjs/index.js
@@ -35,6 +35,7 @@ var Subscriber_1 = require("./internal/Subscriber");
exports.Subscriber = Subscriber_1.Subscriber;
var Notification_1 = require("./internal/Notification");
exports.Notification = Notification_1.Notification;
+exports.NotificationKind = Notification_1.NotificationKind;
var pipe_1 = require("./internal/util/pipe");
exports.pipe = pipe_1.pipe;
var noop_1 = require("./internal/util/noop");
@@ -89,6 +90,8 @@ var onErrorResumeNext_1 = require("./internal/observable/onErrorResumeNext");
exports.onErrorResumeNext = onErrorResumeNext_1.onErrorResumeNext;
var pairs_1 = require("./internal/observable/pairs");
exports.pairs = pairs_1.pairs;
+var partition_1 = require("./internal/observable/partition");
+exports.partition = partition_1.partition;
var race_1 = require("./internal/observable/race");
exports.race = race_1.race;
var range_1 = require("./internal/observable/range");
@@ -101,6 +104,8 @@ var using_1 = require("./internal/observable/using");
exports.using = using_1.using;
var zip_1 = require("./internal/observable/zip");
exports.zip = zip_1.zip;
+var scheduled_1 = require("./internal/scheduled/scheduled");
+exports.scheduled = scheduled_1.scheduled;
var empty_2 = require("./internal/observable/empty");
exports.EMPTY = empty_2.EMPTY;
var never_2 = require("./internal/observable/never");
diff --git a/tools/node_modules/eslint/node_modules/rxjs/internal/Notification.js b/tools/node_modules/eslint/node_modules/rxjs/internal/Notification.js
index fdd6c74933ee24..dc3eeb68968547 100644
--- a/tools/node_modules/eslint/node_modules/rxjs/internal/Notification.js
+++ b/tools/node_modules/eslint/node_modules/rxjs/internal/Notification.js
@@ -14,26 +14,26 @@ var Notification = (function () {
this.kind = kind;
this.value = value;
this.error = error;
- this.hasValue = kind === "N";
+ this.hasValue = kind === 'N';
}
Notification.prototype.observe = function (observer) {
switch (this.kind) {
- case "N":
+ case 'N':
return observer.next && observer.next(this.value);
- case "E":
+ case 'E':
return observer.error && observer.error(this.error);
- case "C":
+ case 'C':
return observer.complete && observer.complete();
}
};
Notification.prototype.do = function (next, error, complete) {
var kind = this.kind;
switch (kind) {
- case "N":
+ case 'N':
return next && next(this.value);
- case "E":
+ case 'E':
return error && error(this.error);
- case "C":
+ case 'C':
return complete && complete();
}
};
@@ -48,29 +48,29 @@ var Notification = (function () {
Notification.prototype.toObservable = function () {
var kind = this.kind;
switch (kind) {
- case "N":
+ case 'N':
return of_1.of(this.value);
- case "E":
+ case 'E':
return throwError_1.throwError(this.error);
- case "C":
+ case 'C':
return empty_1.empty();
}
throw new Error('unexpected notification kind value');
};
Notification.createNext = function (value) {
if (typeof value !== 'undefined') {
- return new Notification("N", value);
+ return new Notification('N', value);
}
return Notification.undefinedValueNotification;
};
Notification.createError = function (err) {
- return new Notification("E", undefined, err);
+ return new Notification('E', undefined, err);
};
Notification.createComplete = function () {
return Notification.completeNotification;
};
- Notification.completeNotification = new Notification("C");
- Notification.undefinedValueNotification = new Notification("N", undefined);
+ Notification.completeNotification = new Notification('C');
+ Notification.undefinedValueNotification = new Notification('N', undefined);
return Notification;
}());
exports.Notification = Notification;
diff --git a/tools/node_modules/eslint/node_modules/rxjs/internal/Observable.js b/tools/node_modules/eslint/node_modules/rxjs/internal/Observable.js
index 7764db0c87aae0..780998b85774f0 100644
--- a/tools/node_modules/eslint/node_modules/rxjs/internal/Observable.js
+++ b/tools/node_modules/eslint/node_modules/rxjs/internal/Observable.js
@@ -2,7 +2,7 @@
Object.defineProperty(exports, "__esModule", { value: true });
var canReportError_1 = require("./util/canReportError");
var toSubscriber_1 = require("./util/toSubscriber");
-var observable_1 = require("../internal/symbol/observable");
+var observable_1 = require("./symbol/observable");
var pipe_1 = require("./util/pipe");
var config_1 = require("./config");
var Observable = (function () {
diff --git a/tools/node_modules/eslint/node_modules/rxjs/internal/Subscriber.js b/tools/node_modules/eslint/node_modules/rxjs/internal/Subscriber.js
index 607b7055c9d211..08a57fd69940a1 100644
--- a/tools/node_modules/eslint/node_modules/rxjs/internal/Subscriber.js
+++ b/tools/node_modules/eslint/node_modules/rxjs/internal/Subscriber.js
@@ -97,14 +97,12 @@ var Subscriber = (function (_super) {
this.unsubscribe();
};
Subscriber.prototype._unsubscribeAndRecycle = function () {
- var _a = this, _parent = _a._parent, _parents = _a._parents;
- this._parent = null;
- this._parents = null;
+ var _parentOrParents = this._parentOrParents;
+ this._parentOrParents = null;
this.unsubscribe();
this.closed = false;
this.isStopped = false;
- this._parent = _parent;
- this._parents = _parents;
+ this._parentOrParents = _parentOrParents;
return this;
};
return Subscriber;
diff --git a/tools/node_modules/eslint/node_modules/rxjs/internal/Subscription.js b/tools/node_modules/eslint/node_modules/rxjs/internal/Subscription.js
index 8902082e744e5f..d2d68a5a45f1e5 100644
--- a/tools/node_modules/eslint/node_modules/rxjs/internal/Subscription.js
+++ b/tools/node_modules/eslint/node_modules/rxjs/internal/Subscription.js
@@ -7,42 +7,41 @@ var UnsubscriptionError_1 = require("./util/UnsubscriptionError");
var Subscription = (function () {
function Subscription(unsubscribe) {
this.closed = false;
- this._parent = null;
- this._parents = null;
+ this._parentOrParents = null;
this._subscriptions = null;
if (unsubscribe) {
this._unsubscribe = unsubscribe;
}
}
Subscription.prototype.unsubscribe = function () {
- var hasErrors = false;
var errors;
if (this.closed) {
return;
}
- var _a = this, _parent = _a._parent, _parents = _a._parents, _unsubscribe = _a._unsubscribe, _subscriptions = _a._subscriptions;
+ var _a = this, _parentOrParents = _a._parentOrParents, _unsubscribe = _a._unsubscribe, _subscriptions = _a._subscriptions;
this.closed = true;
- this._parent = null;
- this._parents = null;
+ this._parentOrParents = null;
this._subscriptions = null;
- var index = -1;
- var len = _parents ? _parents.length : 0;
- while (_parent) {
- _parent.remove(this);
- _parent = ++index < len && _parents[index] || null;
+ if (_parentOrParents instanceof Subscription) {
+ _parentOrParents.remove(this);
+ }
+ else if (_parentOrParents !== null) {
+ for (var index = 0; index < _parentOrParents.length; ++index) {
+ var parent_1 = _parentOrParents[index];
+ parent_1.remove(this);
+ }
}
if (isFunction_1.isFunction(_unsubscribe)) {
try {
_unsubscribe.call(this);
}
catch (e) {
- hasErrors = true;
errors = e instanceof UnsubscriptionError_1.UnsubscriptionError ? flattenUnsubscriptionErrors(e.errors) : [e];
}
}
if (isArray_1.isArray(_subscriptions)) {
- index = -1;
- len = _subscriptions.length;
+ var index = -1;
+ var len = _subscriptions.length;
while (++index < len) {
var sub = _subscriptions[index];
if (isObject_1.isObject(sub)) {
@@ -50,7 +49,6 @@ var Subscription = (function () {
sub.unsubscribe();
}
catch (e) {
- hasErrors = true;
errors = errors || [];
if (e instanceof UnsubscriptionError_1.UnsubscriptionError) {
errors = errors.concat(flattenUnsubscriptionErrors(e.errors));
@@ -62,12 +60,15 @@ var Subscription = (function () {
}
}
}
- if (hasErrors) {
+ if (errors) {
throw new UnsubscriptionError_1.UnsubscriptionError(errors);
}
};
Subscription.prototype.add = function (teardown) {
var subscription = teardown;
+ if (!teardown) {
+ return Subscription.EMPTY;
+ }
switch (typeof teardown) {
case 'function':
subscription = new Subscription(teardown);
@@ -86,20 +87,31 @@ var Subscription = (function () {
}
break;
default: {
- if (!teardown) {
- return Subscription.EMPTY;
- }
throw new Error('unrecognized teardown ' + teardown + ' added to Subscription.');
}
}
- if (subscription._addParent(this)) {
- var subscriptions = this._subscriptions;
- if (subscriptions) {
- subscriptions.push(subscription);
- }
- else {
- this._subscriptions = [subscription];
+ var _parentOrParents = subscription._parentOrParents;
+ if (_parentOrParents === null) {
+ subscription._parentOrParents = this;
+ }
+ else if (_parentOrParents instanceof Subscription) {
+ if (_parentOrParents === this) {
+ return subscription;
}
+ subscription._parentOrParents = [_parentOrParents, this];
+ }
+ else if (_parentOrParents.indexOf(this) === -1) {
+ _parentOrParents.push(this);
+ }
+ else {
+ return subscription;
+ }
+ var subscriptions = this._subscriptions;
+ if (subscriptions === null) {
+ this._subscriptions = [subscription];
+ }
+ else {
+ subscriptions.push(subscription);
}
return subscription;
};
@@ -112,25 +124,6 @@ var Subscription = (function () {
}
}
};
- Subscription.prototype._addParent = function (parent) {
- var _a = this, _parent = _a._parent, _parents = _a._parents;
- if (_parent === parent) {
- return false;
- }
- else if (!_parent) {
- this._parent = parent;
- return true;
- }
- else if (!_parents) {
- this._parents = [parent];
- return true;
- }
- else if (_parents.indexOf(parent) === -1) {
- _parents.push(parent);
- return true;
- }
- return false;
- };
Subscription.EMPTY = (function (empty) {
empty.closed = true;
return empty;
diff --git a/tools/node_modules/eslint/node_modules/rxjs/internal/observable/ConnectableObservable.js b/tools/node_modules/eslint/node_modules/rxjs/internal/observable/ConnectableObservable.js
index 668868bce0c073..8ffe3f2f1cbc6e 100644
--- a/tools/node_modules/eslint/node_modules/rxjs/internal/observable/ConnectableObservable.js
+++ b/tools/node_modules/eslint/node_modules/rxjs/internal/observable/ConnectableObservable.js
@@ -49,9 +49,6 @@ var ConnectableObservable = (function (_super) {
this._connection = null;
connection = Subscription_1.Subscription.EMPTY;
}
- else {
- this._connection = connection;
- }
}
return connection;
};
diff --git a/tools/node_modules/eslint/node_modules/rxjs/internal/observable/dom/fetch.js b/tools/node_modules/eslint/node_modules/rxjs/internal/observable/dom/fetch.js
new file mode 100644
index 00000000000000..97a04d90f18ba2
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/rxjs/internal/observable/dom/fetch.js
@@ -0,0 +1,44 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var Observable_1 = require("../../Observable");
+function fromFetch(input, init) {
+ return new Observable_1.Observable(function (subscriber) {
+ var controller = new AbortController();
+ var signal = controller.signal;
+ var outerSignalHandler;
+ var abortable = true;
+ var unsubscribed = false;
+ if (init) {
+ if (init.signal) {
+ outerSignalHandler = function () {
+ if (!signal.aborted) {
+ controller.abort();
+ }
+ };
+ init.signal.addEventListener('abort', outerSignalHandler);
+ }
+ init.signal = signal;
+ }
+ else {
+ init = { signal: signal };
+ }
+ fetch(input, init).then(function (response) {
+ abortable = false;
+ subscriber.next(response);
+ subscriber.complete();
+ }).catch(function (err) {
+ abortable = false;
+ if (!unsubscribed) {
+ subscriber.error(err);
+ }
+ });
+ return function () {
+ unsubscribed = true;
+ if (abortable) {
+ controller.abort();
+ }
+ };
+ });
+}
+exports.fromFetch = fromFetch;
+//# sourceMappingURL=fetch.js.map
\ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/rxjs/internal/observable/empty.js b/tools/node_modules/eslint/node_modules/rxjs/internal/observable/empty.js
index 401f0759f0ef6b..cfa90b64264bed 100644
--- a/tools/node_modules/eslint/node_modules/rxjs/internal/observable/empty.js
+++ b/tools/node_modules/eslint/node_modules/rxjs/internal/observable/empty.js
@@ -9,5 +9,4 @@ exports.empty = empty;
function emptyScheduled(scheduler) {
return new Observable_1.Observable(function (subscriber) { return scheduler.schedule(function () { return subscriber.complete(); }); });
}
-exports.emptyScheduled = emptyScheduled;
//# sourceMappingURL=empty.js.map
\ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/rxjs/internal/observable/forkJoin.js b/tools/node_modules/eslint/node_modules/rxjs/internal/observable/forkJoin.js
index c115df29be21b2..40870ad6c4c743 100644
--- a/tools/node_modules/eslint/node_modules/rxjs/internal/observable/forkJoin.js
+++ b/tools/node_modules/eslint/node_modules/rxjs/internal/observable/forkJoin.js
@@ -1,88 +1,71 @@
"use strict";
-var __extends = (this && this.__extends) || (function () {
- var extendStatics = function (d, b) {
- extendStatics = Object.setPrototypeOf ||
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
- return extendStatics(d, b);
- }
- return function (d, b) {
- extendStatics(d, b);
- function __() { this.constructor = d; }
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
- };
-})();
Object.defineProperty(exports, "__esModule", { value: true });
var Observable_1 = require("../Observable");
var isArray_1 = require("../util/isArray");
-var empty_1 = require("./empty");
-var subscribeToResult_1 = require("../util/subscribeToResult");
-var OuterSubscriber_1 = require("../OuterSubscriber");
var map_1 = require("../operators/map");
+var isObject_1 = require("../util/isObject");
+var from_1 = require("./from");
function forkJoin() {
var sources = [];
for (var _i = 0; _i < arguments.length; _i++) {
sources[_i] = arguments[_i];
}
- var resultSelector;
- if (typeof sources[sources.length - 1] === 'function') {
- resultSelector = sources.pop();
- }
- if (sources.length === 1 && isArray_1.isArray(sources[0])) {
- sources = sources[0];
- }
- if (sources.length === 0) {
- return empty_1.EMPTY;
+ if (sources.length === 1) {
+ var first_1 = sources[0];
+ if (isArray_1.isArray(first_1)) {
+ return forkJoinInternal(first_1, null);
+ }
+ if (isObject_1.isObject(first_1) && Object.getPrototypeOf(first_1) === Object.prototype) {
+ var keys = Object.keys(first_1);
+ return forkJoinInternal(keys.map(function (key) { return first_1[key]; }), keys);
+ }
}
- if (resultSelector) {
- return forkJoin(sources).pipe(map_1.map(function (args) { return resultSelector.apply(void 0, args); }));
+ if (typeof sources[sources.length - 1] === 'function') {
+ var resultSelector_1 = sources.pop();
+ sources = (sources.length === 1 && isArray_1.isArray(sources[0])) ? sources[0] : sources;
+ return forkJoinInternal(sources, null).pipe(map_1.map(function (args) { return resultSelector_1.apply(void 0, args); }));
}
- return new Observable_1.Observable(function (subscriber) {
- return new ForkJoinSubscriber(subscriber, sources);
- });
+ return forkJoinInternal(sources, null);
}
exports.forkJoin = forkJoin;
-var ForkJoinSubscriber = (function (_super) {
- __extends(ForkJoinSubscriber, _super);
- function ForkJoinSubscriber(destination, sources) {
- var _this = _super.call(this, destination) || this;
- _this.sources = sources;
- _this.completed = 0;
- _this.haveValues = 0;
+function forkJoinInternal(sources, keys) {
+ return new Observable_1.Observable(function (subscriber) {
var len = sources.length;
- _this.values = new Array(len);
- for (var i = 0; i < len; i++) {
- var source = sources[i];
- var innerSubscription = subscribeToResult_1.subscribeToResult(_this, source, null, i);
- if (innerSubscription) {
- _this.add(innerSubscription);
- }
- }
- return _this;
- }
- ForkJoinSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
- this.values[outerIndex] = innerValue;
- if (!innerSub._hasValue) {
- innerSub._hasValue = true;
- this.haveValues++;
- }
- };
- ForkJoinSubscriber.prototype.notifyComplete = function (innerSub) {
- var _a = this, destination = _a.destination, haveValues = _a.haveValues, values = _a.values;
- var len = values.length;
- if (!innerSub._hasValue) {
- destination.complete();
+ if (len === 0) {
+ subscriber.complete();
return;
}
- this.completed++;
- if (this.completed !== len) {
- return;
- }
- if (haveValues === len) {
- destination.next(values);
+ var values = new Array(len);
+ var completed = 0;
+ var emitted = 0;
+ var _loop_1 = function (i) {
+ var source = from_1.from(sources[i]);
+ var hasValue = false;
+ subscriber.add(source.subscribe({
+ next: function (value) {
+ if (!hasValue) {
+ hasValue = true;
+ emitted++;
+ }
+ values[i] = value;
+ },
+ error: function (err) { return subscriber.error(err); },
+ complete: function () {
+ completed++;
+ if (completed === len || !hasValue) {
+ if (emitted === len) {
+ subscriber.next(keys ?
+ keys.reduce(function (result, key, i) { return (result[key] = values[i], result); }, {}) :
+ values);
+ }
+ subscriber.complete();
+ }
+ }
+ }));
+ };
+ for (var i = 0; i < len; i++) {
+ _loop_1(i);
}
- destination.complete();
- };
- return ForkJoinSubscriber;
-}(OuterSubscriber_1.OuterSubscriber));
+ });
+}
//# sourceMappingURL=forkJoin.js.map
\ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/rxjs/internal/observable/from.js b/tools/node_modules/eslint/node_modules/rxjs/internal/observable/from.js
index a0d02d0ab30a30..4f6069f6245146 100644
--- a/tools/node_modules/eslint/node_modules/rxjs/internal/observable/from.js
+++ b/tools/node_modules/eslint/node_modules/rxjs/internal/observable/from.js
@@ -1,15 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Observable_1 = require("../Observable");
-var isPromise_1 = require("../util/isPromise");
-var isArrayLike_1 = require("../util/isArrayLike");
-var isInteropObservable_1 = require("../util/isInteropObservable");
-var isIterable_1 = require("../util/isIterable");
-var fromArray_1 = require("./fromArray");
-var fromPromise_1 = require("./fromPromise");
-var fromIterable_1 = require("./fromIterable");
-var fromObservable_1 = require("./fromObservable");
var subscribeTo_1 = require("../util/subscribeTo");
+var scheduled_1 = require("../scheduled/scheduled");
function from(input, scheduler) {
if (!scheduler) {
if (input instanceof Observable_1.Observable) {
@@ -17,21 +10,9 @@ function from(input, scheduler) {
}
return new Observable_1.Observable(subscribeTo_1.subscribeTo(input));
}
- if (input != null) {
- if (isInteropObservable_1.isInteropObservable(input)) {
- return fromObservable_1.fromObservable(input, scheduler);
- }
- else if (isPromise_1.isPromise(input)) {
- return fromPromise_1.fromPromise(input, scheduler);
- }
- else if (isArrayLike_1.isArrayLike(input)) {
- return fromArray_1.fromArray(input, scheduler);
- }
- else if (isIterable_1.isIterable(input) || typeof input === 'string') {
- return fromIterable_1.fromIterable(input, scheduler);
- }
+ else {
+ return scheduled_1.scheduled(input, scheduler);
}
- throw new TypeError((input !== null && typeof input || input) + ' is not observable');
}
exports.from = from;
//# sourceMappingURL=from.js.map
\ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/rxjs/internal/observable/fromArray.js b/tools/node_modules/eslint/node_modules/rxjs/internal/observable/fromArray.js
index 98ca7460c35069..545e58742f34a9 100644
--- a/tools/node_modules/eslint/node_modules/rxjs/internal/observable/fromArray.js
+++ b/tools/node_modules/eslint/node_modules/rxjs/internal/observable/fromArray.js
@@ -1,28 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Observable_1 = require("../Observable");
-var Subscription_1 = require("../Subscription");
var subscribeToArray_1 = require("../util/subscribeToArray");
+var scheduleArray_1 = require("../scheduled/scheduleArray");
function fromArray(input, scheduler) {
if (!scheduler) {
return new Observable_1.Observable(subscribeToArray_1.subscribeToArray(input));
}
else {
- return new Observable_1.Observable(function (subscriber) {
- var sub = new Subscription_1.Subscription();
- var i = 0;
- sub.add(scheduler.schedule(function () {
- if (i === input.length) {
- subscriber.complete();
- return;
- }
- subscriber.next(input[i++]);
- if (!subscriber.closed) {
- sub.add(this.schedule());
- }
- }));
- return sub;
- });
+ return scheduleArray_1.scheduleArray(input, scheduler);
}
}
exports.fromArray = fromArray;
diff --git a/tools/node_modules/eslint/node_modules/rxjs/internal/observable/fromIterable.js b/tools/node_modules/eslint/node_modules/rxjs/internal/observable/fromIterable.js
index 25766ba057cec8..8d319a47cbf73e 100644
--- a/tools/node_modules/eslint/node_modules/rxjs/internal/observable/fromIterable.js
+++ b/tools/node_modules/eslint/node_modules/rxjs/internal/observable/fromIterable.js
@@ -1,9 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Observable_1 = require("../Observable");
-var Subscription_1 = require("../Subscription");
-var iterator_1 = require("../symbol/iterator");
var subscribeToIterable_1 = require("../util/subscribeToIterable");
+var scheduleIterable_1 = require("../scheduled/scheduleIterable");
function fromIterable(input, scheduler) {
if (!input) {
throw new Error('Iterable cannot be null');
@@ -12,42 +11,7 @@ function fromIterable(input, scheduler) {
return new Observable_1.Observable(subscribeToIterable_1.subscribeToIterable(input));
}
else {
- return new Observable_1.Observable(function (subscriber) {
- var sub = new Subscription_1.Subscription();
- var iterator;
- sub.add(function () {
- if (iterator && typeof iterator.return === 'function') {
- iterator.return();
- }
- });
- sub.add(scheduler.schedule(function () {
- iterator = input[iterator_1.iterator]();
- sub.add(scheduler.schedule(function () {
- if (subscriber.closed) {
- return;
- }
- var value;
- var done;
- try {
- var result = iterator.next();
- value = result.value;
- done = result.done;
- }
- catch (err) {
- subscriber.error(err);
- return;
- }
- if (done) {
- subscriber.complete();
- }
- else {
- subscriber.next(value);
- this.schedule();
- }
- }));
- }));
- return sub;
- });
+ return scheduleIterable_1.scheduleIterable(input, scheduler);
}
}
exports.fromIterable = fromIterable;
diff --git a/tools/node_modules/eslint/node_modules/rxjs/internal/observable/fromObservable.js b/tools/node_modules/eslint/node_modules/rxjs/internal/observable/fromObservable.js
deleted file mode 100644
index 1fc2396adce305..00000000000000
--- a/tools/node_modules/eslint/node_modules/rxjs/internal/observable/fromObservable.js
+++ /dev/null
@@ -1,27 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-var Observable_1 = require("../Observable");
-var Subscription_1 = require("../Subscription");
-var observable_1 = require("../symbol/observable");
-var subscribeToObservable_1 = require("../util/subscribeToObservable");
-function fromObservable(input, scheduler) {
- if (!scheduler) {
- return new Observable_1.Observable(subscribeToObservable_1.subscribeToObservable(input));
- }
- else {
- return new Observable_1.Observable(function (subscriber) {
- var sub = new Subscription_1.Subscription();
- sub.add(scheduler.schedule(function () {
- var observable = input[observable_1.observable]();
- sub.add(observable.subscribe({
- next: function (value) { sub.add(scheduler.schedule(function () { return subscriber.next(value); })); },
- error: function (err) { sub.add(scheduler.schedule(function () { return subscriber.error(err); })); },
- complete: function () { sub.add(scheduler.schedule(function () { return subscriber.complete(); })); },
- }));
- }));
- return sub;
- });
- }
-}
-exports.fromObservable = fromObservable;
-//# sourceMappingURL=fromObservable.js.map
\ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/rxjs/internal/observable/fromPromise.js b/tools/node_modules/eslint/node_modules/rxjs/internal/observable/fromPromise.js
index 07763b9d755186..2d15d4ca66691c 100644
--- a/tools/node_modules/eslint/node_modules/rxjs/internal/observable/fromPromise.js
+++ b/tools/node_modules/eslint/node_modules/rxjs/internal/observable/fromPromise.js
@@ -1,25 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Observable_1 = require("../Observable");
-var Subscription_1 = require("../Subscription");
var subscribeToPromise_1 = require("../util/subscribeToPromise");
+var schedulePromise_1 = require("../scheduled/schedulePromise");
function fromPromise(input, scheduler) {
if (!scheduler) {
return new Observable_1.Observable(subscribeToPromise_1.subscribeToPromise(input));
}
else {
- return new Observable_1.Observable(function (subscriber) {
- var sub = new Subscription_1.Subscription();
- sub.add(scheduler.schedule(function () { return input.then(function (value) {
- sub.add(scheduler.schedule(function () {
- subscriber.next(value);
- sub.add(scheduler.schedule(function () { return subscriber.complete(); }));
- }));
- }, function (err) {
- sub.add(scheduler.schedule(function () { return subscriber.error(err); }));
- }); }));
- return sub;
- });
+ return schedulePromise_1.schedulePromise(input, scheduler);
}
}
exports.fromPromise = fromPromise;
diff --git a/tools/node_modules/eslint/node_modules/rxjs/internal/observable/of.js b/tools/node_modules/eslint/node_modules/rxjs/internal/observable/of.js
index e48882edd2a206..05ab045bd48fb9 100644
--- a/tools/node_modules/eslint/node_modules/rxjs/internal/observable/of.js
+++ b/tools/node_modules/eslint/node_modules/rxjs/internal/observable/of.js
@@ -2,8 +2,7 @@
Object.defineProperty(exports, "__esModule", { value: true });
var isScheduler_1 = require("../util/isScheduler");
var fromArray_1 = require("./fromArray");
-var empty_1 = require("./empty");
-var scalar_1 = require("./scalar");
+var scheduleArray_1 = require("../scheduled/scheduleArray");
function of() {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
@@ -12,17 +11,10 @@ function of() {
var scheduler = args[args.length - 1];
if (isScheduler_1.isScheduler(scheduler)) {
args.pop();
+ return scheduleArray_1.scheduleArray(args, scheduler);
}
else {
- scheduler = undefined;
- }
- switch (args.length) {
- case 0:
- return empty_1.empty(scheduler);
- case 1:
- return scheduler ? fromArray_1.fromArray(args, scheduler) : scalar_1.scalar(args[0]);
- default:
- return fromArray_1.fromArray(args, scheduler);
+ return fromArray_1.fromArray(args);
}
}
exports.of = of;
diff --git a/tools/node_modules/eslint/node_modules/rxjs/internal/observable/partition.js b/tools/node_modules/eslint/node_modules/rxjs/internal/observable/partition.js
new file mode 100644
index 00000000000000..dc33aff9d3669a
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/rxjs/internal/observable/partition.js
@@ -0,0 +1,14 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var not_1 = require("../util/not");
+var subscribeTo_1 = require("../util/subscribeTo");
+var filter_1 = require("../operators/filter");
+var Observable_1 = require("../Observable");
+function partition(source, predicate, thisArg) {
+ return [
+ filter_1.filter(predicate, thisArg)(new Observable_1.Observable(subscribeTo_1.subscribeTo(source))),
+ filter_1.filter(not_1.not(predicate, thisArg))(new Observable_1.Observable(subscribeTo_1.subscribeTo(source)))
+ ];
+}
+exports.partition = partition;
+//# sourceMappingURL=partition.js.map
\ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/rxjs/internal/observable/scalar.js b/tools/node_modules/eslint/node_modules/rxjs/internal/observable/scalar.js
deleted file mode 100644
index 15c1f46e71338e..00000000000000
--- a/tools/node_modules/eslint/node_modules/rxjs/internal/observable/scalar.js
+++ /dev/null
@@ -1,14 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-var Observable_1 = require("../Observable");
-function scalar(value) {
- var result = new Observable_1.Observable(function (subscriber) {
- subscriber.next(value);
- subscriber.complete();
- });
- result._isScalar = true;
- result.value = value;
- return result;
-}
-exports.scalar = scalar;
-//# sourceMappingURL=scalar.js.map
\ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/rxjs/internal/operators/endWith.js b/tools/node_modules/eslint/node_modules/rxjs/internal/operators/endWith.js
index 602f8bdc4136a6..028bd4e6655783 100644
--- a/tools/node_modules/eslint/node_modules/rxjs/internal/operators/endWith.js
+++ b/tools/node_modules/eslint/node_modules/rxjs/internal/operators/endWith.js
@@ -1,34 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-var fromArray_1 = require("../observable/fromArray");
-var scalar_1 = require("../observable/scalar");
-var empty_1 = require("../observable/empty");
var concat_1 = require("../observable/concat");
-var isScheduler_1 = require("../util/isScheduler");
+var of_1 = require("../observable/of");
function endWith() {
var array = [];
for (var _i = 0; _i < arguments.length; _i++) {
array[_i] = arguments[_i];
}
- return function (source) {
- var scheduler = array[array.length - 1];
- if (isScheduler_1.isScheduler(scheduler)) {
- array.pop();
- }
- else {
- scheduler = null;
- }
- var len = array.length;
- if (len === 1 && !scheduler) {
- return concat_1.concat(source, scalar_1.scalar(array[0]));
- }
- else if (len > 0) {
- return concat_1.concat(source, fromArray_1.fromArray(array, scheduler));
- }
- else {
- return concat_1.concat(source, empty_1.empty(scheduler));
- }
- };
+ return function (source) { return concat_1.concat(source, of_1.of.apply(void 0, array)); };
}
exports.endWith = endWith;
//# sourceMappingURL=endWith.js.map
\ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/rxjs/internal/operators/pairwise.js b/tools/node_modules/eslint/node_modules/rxjs/internal/operators/pairwise.js
index 72484a66f445a4..1311dfef4288d9 100644
--- a/tools/node_modules/eslint/node_modules/rxjs/internal/operators/pairwise.js
+++ b/tools/node_modules/eslint/node_modules/rxjs/internal/operators/pairwise.js
@@ -34,13 +34,17 @@ var PairwiseSubscriber = (function (_super) {
return _this;
}
PairwiseSubscriber.prototype._next = function (value) {
+ var pair;
if (this.hasPrev) {
- this.destination.next([this.prev, value]);
+ pair = [this.prev, value];
}
else {
this.hasPrev = true;
}
this.prev = value;
+ if (pair) {
+ this.destination.next(pair);
+ }
};
return PairwiseSubscriber;
}(Subscriber_1.Subscriber));
diff --git a/tools/node_modules/eslint/node_modules/rxjs/internal/operators/startWith.js b/tools/node_modules/eslint/node_modules/rxjs/internal/operators/startWith.js
index dda6719c84594b..fd72f0c6ff7c25 100644
--- a/tools/node_modules/eslint/node_modules/rxjs/internal/operators/startWith.js
+++ b/tools/node_modules/eslint/node_modules/rxjs/internal/operators/startWith.js
@@ -1,8 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-var fromArray_1 = require("../observable/fromArray");
-var scalar_1 = require("../observable/scalar");
-var empty_1 = require("../observable/empty");
var concat_1 = require("../observable/concat");
var isScheduler_1 = require("../util/isScheduler");
function startWith() {
@@ -10,25 +7,14 @@ function startWith() {
for (var _i = 0; _i < arguments.length; _i++) {
array[_i] = arguments[_i];
}
- return function (source) {
- var scheduler = array[array.length - 1];
- if (isScheduler_1.isScheduler(scheduler)) {
- array.pop();
- }
- else {
- scheduler = null;
- }
- var len = array.length;
- if (len === 1 && !scheduler) {
- return concat_1.concat(scalar_1.scalar(array[0]), source);
- }
- else if (len > 0) {
- return concat_1.concat(fromArray_1.fromArray(array, scheduler), source);
- }
- else {
- return concat_1.concat(empty_1.empty(scheduler), source);
- }
- };
+ var scheduler = array[array.length - 1];
+ if (isScheduler_1.isScheduler(scheduler)) {
+ array.pop();
+ return function (source) { return concat_1.concat(array, source, scheduler); };
+ }
+ else {
+ return function (source) { return concat_1.concat(array, source); };
+ }
}
exports.startWith = startWith;
//# sourceMappingURL=startWith.js.map
\ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/rxjs/internal/operators/throttleTime.js b/tools/node_modules/eslint/node_modules/rxjs/internal/operators/throttleTime.js
index b8b734ca1b9bc4..156c44b9a9769d 100644
--- a/tools/node_modules/eslint/node_modules/rxjs/internal/operators/throttleTime.js
+++ b/tools/node_modules/eslint/node_modules/rxjs/internal/operators/throttleTime.js
@@ -58,6 +58,10 @@ var ThrottleTimeSubscriber = (function (_super) {
if (this.leading) {
this.destination.next(value);
}
+ else if (this.trailing) {
+ this._trailingValue = value;
+ this._hasTrailingValue = true;
+ }
}
};
ThrottleTimeSubscriber.prototype._complete = function () {
diff --git a/tools/node_modules/eslint/node_modules/rxjs/internal/operators/throwIfEmpty.js b/tools/node_modules/eslint/node_modules/rxjs/internal/operators/throwIfEmpty.js
index 6896351e16248e..7722c349bcb390 100644
--- a/tools/node_modules/eslint/node_modules/rxjs/internal/operators/throwIfEmpty.js
+++ b/tools/node_modules/eslint/node_modules/rxjs/internal/operators/throwIfEmpty.js
@@ -1,19 +1,65 @@
"use strict";
+var __extends = (this && this.__extends) || (function () {
+ var extendStatics = function (d, b) {
+ extendStatics = Object.setPrototypeOf ||
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
+ return extendStatics(d, b);
+ }
+ return function (d, b) {
+ extendStatics(d, b);
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+})();
Object.defineProperty(exports, "__esModule", { value: true });
-var tap_1 = require("./tap");
var EmptyError_1 = require("../util/EmptyError");
-exports.throwIfEmpty = function (errorFactory) {
+var Subscriber_1 = require("../Subscriber");
+function throwIfEmpty(errorFactory) {
if (errorFactory === void 0) { errorFactory = defaultErrorFactory; }
- return tap_1.tap({
- hasValue: false,
- next: function () { this.hasValue = true; },
- complete: function () {
- if (!this.hasValue) {
- throw errorFactory();
+ return function (source) {
+ return source.lift(new ThrowIfEmptyOperator(errorFactory));
+ };
+}
+exports.throwIfEmpty = throwIfEmpty;
+var ThrowIfEmptyOperator = (function () {
+ function ThrowIfEmptyOperator(errorFactory) {
+ this.errorFactory = errorFactory;
+ }
+ ThrowIfEmptyOperator.prototype.call = function (subscriber, source) {
+ return source.subscribe(new ThrowIfEmptySubscriber(subscriber, this.errorFactory));
+ };
+ return ThrowIfEmptyOperator;
+}());
+var ThrowIfEmptySubscriber = (function (_super) {
+ __extends(ThrowIfEmptySubscriber, _super);
+ function ThrowIfEmptySubscriber(destination, errorFactory) {
+ var _this = _super.call(this, destination) || this;
+ _this.errorFactory = errorFactory;
+ _this.hasValue = false;
+ return _this;
+ }
+ ThrowIfEmptySubscriber.prototype._next = function (value) {
+ this.hasValue = true;
+ this.destination.next(value);
+ };
+ ThrowIfEmptySubscriber.prototype._complete = function () {
+ if (!this.hasValue) {
+ var err = void 0;
+ try {
+ err = this.errorFactory();
+ }
+ catch (e) {
+ err = e;
}
+ this.destination.error(err);
+ }
+ else {
+ return this.destination.complete();
}
- });
-};
+ };
+ return ThrowIfEmptySubscriber;
+}(Subscriber_1.Subscriber));
function defaultErrorFactory() {
return new EmptyError_1.EmptyError();
}
diff --git a/tools/node_modules/eslint/node_modules/rxjs/internal/scheduled/scheduleArray.js b/tools/node_modules/eslint/node_modules/rxjs/internal/scheduled/scheduleArray.js
new file mode 100644
index 00000000000000..31938d2353322f
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/rxjs/internal/scheduled/scheduleArray.js
@@ -0,0 +1,23 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var Observable_1 = require("../Observable");
+var Subscription_1 = require("../Subscription");
+function scheduleArray(input, scheduler) {
+ return new Observable_1.Observable(function (subscriber) {
+ var sub = new Subscription_1.Subscription();
+ var i = 0;
+ sub.add(scheduler.schedule(function () {
+ if (i === input.length) {
+ subscriber.complete();
+ return;
+ }
+ subscriber.next(input[i++]);
+ if (!subscriber.closed) {
+ sub.add(this.schedule());
+ }
+ }));
+ return sub;
+ });
+}
+exports.scheduleArray = scheduleArray;
+//# sourceMappingURL=scheduleArray.js.map
\ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/rxjs/internal/scheduled/scheduleIterable.js b/tools/node_modules/eslint/node_modules/rxjs/internal/scheduled/scheduleIterable.js
new file mode 100644
index 00000000000000..3cf6bc097c0c7b
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/rxjs/internal/scheduled/scheduleIterable.js
@@ -0,0 +1,48 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var Observable_1 = require("../Observable");
+var Subscription_1 = require("../Subscription");
+var iterator_1 = require("../symbol/iterator");
+function scheduleIterable(input, scheduler) {
+ if (!input) {
+ throw new Error('Iterable cannot be null');
+ }
+ return new Observable_1.Observable(function (subscriber) {
+ var sub = new Subscription_1.Subscription();
+ var iterator;
+ sub.add(function () {
+ if (iterator && typeof iterator.return === 'function') {
+ iterator.return();
+ }
+ });
+ sub.add(scheduler.schedule(function () {
+ iterator = input[iterator_1.iterator]();
+ sub.add(scheduler.schedule(function () {
+ if (subscriber.closed) {
+ return;
+ }
+ var value;
+ var done;
+ try {
+ var result = iterator.next();
+ value = result.value;
+ done = result.done;
+ }
+ catch (err) {
+ subscriber.error(err);
+ return;
+ }
+ if (done) {
+ subscriber.complete();
+ }
+ else {
+ subscriber.next(value);
+ this.schedule();
+ }
+ }));
+ }));
+ return sub;
+ });
+}
+exports.scheduleIterable = scheduleIterable;
+//# sourceMappingURL=scheduleIterable.js.map
\ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/rxjs/internal/scheduled/scheduleObservable.js b/tools/node_modules/eslint/node_modules/rxjs/internal/scheduled/scheduleObservable.js
new file mode 100644
index 00000000000000..83e49c8a2f703e
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/rxjs/internal/scheduled/scheduleObservable.js
@@ -0,0 +1,21 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var Observable_1 = require("../Observable");
+var Subscription_1 = require("../Subscription");
+var observable_1 = require("../symbol/observable");
+function scheduleObservable(input, scheduler) {
+ return new Observable_1.Observable(function (subscriber) {
+ var sub = new Subscription_1.Subscription();
+ sub.add(scheduler.schedule(function () {
+ var observable = input[observable_1.observable]();
+ sub.add(observable.subscribe({
+ next: function (value) { sub.add(scheduler.schedule(function () { return subscriber.next(value); })); },
+ error: function (err) { sub.add(scheduler.schedule(function () { return subscriber.error(err); })); },
+ complete: function () { sub.add(scheduler.schedule(function () { return subscriber.complete(); })); },
+ }));
+ }));
+ return sub;
+ });
+}
+exports.scheduleObservable = scheduleObservable;
+//# sourceMappingURL=scheduleObservable.js.map
\ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/rxjs/internal/scheduled/schedulePromise.js b/tools/node_modules/eslint/node_modules/rxjs/internal/scheduled/schedulePromise.js
new file mode 100644
index 00000000000000..826910d5dc37ef
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/rxjs/internal/scheduled/schedulePromise.js
@@ -0,0 +1,20 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var Observable_1 = require("../Observable");
+var Subscription_1 = require("../Subscription");
+function schedulePromise(input, scheduler) {
+ return new Observable_1.Observable(function (subscriber) {
+ var sub = new Subscription_1.Subscription();
+ sub.add(scheduler.schedule(function () { return input.then(function (value) {
+ sub.add(scheduler.schedule(function () {
+ subscriber.next(value);
+ sub.add(scheduler.schedule(function () { return subscriber.complete(); }));
+ }));
+ }, function (err) {
+ sub.add(scheduler.schedule(function () { return subscriber.error(err); }));
+ }); }));
+ return sub;
+ });
+}
+exports.schedulePromise = schedulePromise;
+//# sourceMappingURL=schedulePromise.js.map
\ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/rxjs/internal/scheduled/scheduled.js b/tools/node_modules/eslint/node_modules/rxjs/internal/scheduled/scheduled.js
new file mode 100644
index 00000000000000..4fd1554a93a846
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/rxjs/internal/scheduled/scheduled.js
@@ -0,0 +1,29 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var scheduleObservable_1 = require("./scheduleObservable");
+var schedulePromise_1 = require("./schedulePromise");
+var scheduleArray_1 = require("./scheduleArray");
+var scheduleIterable_1 = require("./scheduleIterable");
+var isInteropObservable_1 = require("../util/isInteropObservable");
+var isPromise_1 = require("../util/isPromise");
+var isArrayLike_1 = require("../util/isArrayLike");
+var isIterable_1 = require("../util/isIterable");
+function scheduled(input, scheduler) {
+ if (input != null) {
+ if (isInteropObservable_1.isInteropObservable(input)) {
+ return scheduleObservable_1.scheduleObservable(input, scheduler);
+ }
+ else if (isPromise_1.isPromise(input)) {
+ return schedulePromise_1.schedulePromise(input, scheduler);
+ }
+ else if (isArrayLike_1.isArrayLike(input)) {
+ return scheduleArray_1.scheduleArray(input, scheduler);
+ }
+ else if (isIterable_1.isIterable(input) || typeof input === 'string') {
+ return scheduleIterable_1.scheduleIterable(input, scheduler);
+ }
+ }
+ throw new TypeError((input !== null && typeof input || input) + ' is not observable');
+}
+exports.scheduled = scheduled;
+//# sourceMappingURL=scheduled.js.map
\ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/rxjs/internal/util/hostReportError.js b/tools/node_modules/eslint/node_modules/rxjs/internal/util/hostReportError.js
index ffc06b01f5f448..2fb7fa5accc4d0 100644
--- a/tools/node_modules/eslint/node_modules/rxjs/internal/util/hostReportError.js
+++ b/tools/node_modules/eslint/node_modules/rxjs/internal/util/hostReportError.js
@@ -1,7 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function hostReportError(err) {
- setTimeout(function () { throw err; });
+ setTimeout(function () { throw err; }, 0);
}
exports.hostReportError = hostReportError;
//# sourceMappingURL=hostReportError.js.map
\ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/rxjs/internal/util/subscribeTo.js b/tools/node_modules/eslint/node_modules/rxjs/internal/util/subscribeTo.js
index b1a0e6c123d2ac..b5ffb5764733ea 100644
--- a/tools/node_modules/eslint/node_modules/rxjs/internal/util/subscribeTo.js
+++ b/tools/node_modules/eslint/node_modules/rxjs/internal/util/subscribeTo.js
@@ -1,6 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-var Observable_1 = require("../Observable");
var subscribeToArray_1 = require("./subscribeToArray");
var subscribeToPromise_1 = require("./subscribeToPromise");
var subscribeToIterable_1 = require("./subscribeToIterable");
@@ -11,19 +10,7 @@ var isObject_1 = require("./isObject");
var iterator_1 = require("../symbol/iterator");
var observable_1 = require("../symbol/observable");
exports.subscribeTo = function (result) {
- if (result instanceof Observable_1.Observable) {
- return function (subscriber) {
- if (result._isScalar) {
- subscriber.next(result.value);
- subscriber.complete();
- return undefined;
- }
- else {
- return result.subscribe(subscriber);
- }
- };
- }
- else if (!!result && typeof result[observable_1.observable] === 'function') {
+ if (!!result && typeof result[observable_1.observable] === 'function') {
return subscribeToObservable_1.subscribeToObservable(result);
}
else if (isArrayLike_1.isArrayLike(result)) {
diff --git a/tools/node_modules/eslint/node_modules/rxjs/internal/util/subscribeToArray.js b/tools/node_modules/eslint/node_modules/rxjs/internal/util/subscribeToArray.js
index 381192a255740b..029c2327570bdb 100644
--- a/tools/node_modules/eslint/node_modules/rxjs/internal/util/subscribeToArray.js
+++ b/tools/node_modules/eslint/node_modules/rxjs/internal/util/subscribeToArray.js
@@ -4,8 +4,6 @@ exports.subscribeToArray = function (array) { return function (subscriber) {
for (var i = 0, len = array.length; i < len && !subscriber.closed; i++) {
subscriber.next(array[i]);
}
- if (!subscriber.closed) {
- subscriber.complete();
- }
+ subscriber.complete();
}; };
//# sourceMappingURL=subscribeToArray.js.map
\ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/rxjs/internal/util/subscribeToResult.js b/tools/node_modules/eslint/node_modules/rxjs/internal/util/subscribeToResult.js
index a7950ce4e9af20..721d64049d4228 100644
--- a/tools/node_modules/eslint/node_modules/rxjs/internal/util/subscribeToResult.js
+++ b/tools/node_modules/eslint/node_modules/rxjs/internal/util/subscribeToResult.js
@@ -2,10 +2,14 @@
Object.defineProperty(exports, "__esModule", { value: true });
var InnerSubscriber_1 = require("../InnerSubscriber");
var subscribeTo_1 = require("./subscribeTo");
+var Observable_1 = require("../Observable");
function subscribeToResult(outerSubscriber, result, outerValue, outerIndex, destination) {
if (destination === void 0) { destination = new InnerSubscriber_1.InnerSubscriber(outerSubscriber, outerValue, outerIndex); }
if (destination.closed) {
- return;
+ return undefined;
+ }
+ if (result instanceof Observable_1.Observable) {
+ return result.subscribe(destination);
}
return subscribeTo_1.subscribeTo(result)(destination);
}
diff --git a/tools/node_modules/eslint/node_modules/rxjs/package.json b/tools/node_modules/eslint/node_modules/rxjs/package.json
index fc352d891ab946..dd576ea6764e38 100644
--- a/tools/node_modules/eslint/node_modules/rxjs/package.json
+++ b/tools/node_modules/eslint/node_modules/rxjs/package.json
@@ -66,6 +66,7 @@
"danger": "1.1.0",
"dependency-cruiser": "2.13.0",
"doctoc": "1.3.0",
+ "dtslint": "0.6.1",
"escape-string-regexp": "1.0.5",
"esdoc": "0.4.7",
"eslint": "4.17.0",
@@ -177,5 +178,5 @@
},
"sideEffects": false,
"typings": "./index.d.ts",
- "version": "6.4.0"
+ "version": "6.5.2"
}
\ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/rxjs/src/BUILD.bazel b/tools/node_modules/eslint/node_modules/rxjs/src/BUILD.bazel
deleted file mode 100644
index 75a58ae0bc4df4..00000000000000
--- a/tools/node_modules/eslint/node_modules/rxjs/src/BUILD.bazel
+++ /dev/null
@@ -1,43 +0,0 @@
-package(default_visibility = ["//visibility:public"])
-
-exports_files(["tsconfig.json"])
-
-load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
-
-ts_library(
- name = "lib",
- srcs = glob(
- ["internal/**/*.ts"],
- # exclude all backwards compatibility code because we don't have a bazel target setup for that
- exclude = [
- "internal/Rx.ts",
- "internal-compatibility/**",
- "internal/patching/**",
- "internal/umd.ts",
- ],
- ),
- # Specify the compile-time dependencies to run the compilation (eg. typescript)
- # The default value assumes that the end-user has a target //:node_modules
- # but not all users do.
- # This also makes the build more reproducible, in case the user's TypeScript
- # version isn't compatible.
- node_modules = "@build_bazel_rules_typescript_tsc_wrapped_deps//:node_modules",
- tsconfig = "tsconfig.json",
-)
-
-ts_library(
- name = "rxjs",
- srcs = ["index.ts"],
- module_name = "rxjs",
- module_root = "index.d.ts",
- # See comment above
- node_modules = "@build_bazel_rules_typescript_tsc_wrapped_deps//:node_modules",
- tsconfig = "tsconfig.json",
- deps = [
- ":lib",
- "//ajax",
- "//operators",
- "//testing",
- "//webSocket",
- ],
-)
diff --git a/tools/node_modules/eslint/node_modules/rxjs/src/README.md b/tools/node_modules/eslint/node_modules/rxjs/src/README.md
index df22c904342017..20e4d8bcba3f0e 100644
--- a/tools/node_modules/eslint/node_modules/rxjs/src/README.md
+++ b/tools/node_modules/eslint/node_modules/rxjs/src/README.md
@@ -27,7 +27,7 @@ Reactive Extensions Library for JavaScript. This is a rewrite of [Reactive-Exten
- [Contribution Guidelines](CONTRIBUTING.md)
- [Maintainer Guidelines](doc/maintainer-guidelines.md)
- [Creating Operators](doc/operator-creation.md)
-- [API Documentation (WIP)](https://rxjs-dev.firebaseapp.com/)
+- [API Documentation (WIP)](https://rxjs.dev/)
## Versions In This Repository
diff --git a/tools/node_modules/eslint/node_modules/rxjs/src/WORKSPACE b/tools/node_modules/eslint/node_modules/rxjs/src/WORKSPACE
deleted file mode 100644
index 034c99e579fd2f..00000000000000
--- a/tools/node_modules/eslint/node_modules/rxjs/src/WORKSPACE
+++ /dev/null
@@ -1 +0,0 @@
-workspace(name = "rxjs")
diff --git a/tools/node_modules/eslint/node_modules/rxjs/src/ajax/BUILD.bazel b/tools/node_modules/eslint/node_modules/rxjs/src/ajax/BUILD.bazel
deleted file mode 100644
index ec2cf4988a39e7..00000000000000
--- a/tools/node_modules/eslint/node_modules/rxjs/src/ajax/BUILD.bazel
+++ /dev/null
@@ -1,13 +0,0 @@
-package(default_visibility = ["//visibility:public"])
-
-load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
-
-ts_library(
- name = "ajax",
- srcs = ["index.ts"],
- module_name = "rxjs/ajax",
- module_root = "index.d.ts",
- node_modules = "@build_bazel_rules_typescript_tsc_wrapped_deps//:node_modules",
- tsconfig = "//:tsconfig.json",
- deps = ["//:lib"],
-)
diff --git a/tools/node_modules/eslint/node_modules/rxjs/src/fetch/package.json b/tools/node_modules/eslint/node_modules/rxjs/src/fetch/package.json
new file mode 100644
index 00000000000000..dff5519633b960
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/rxjs/src/fetch/package.json
@@ -0,0 +1,8 @@
+{
+ "name": "rxjs/fetch",
+ "typings": "./index.d.ts",
+ "main": "./index.js",
+ "module": "../_esm5/fetch/index.js",
+ "es2015": "../_esm2015/fetch/index.js",
+ "sideEffects": false
+}
diff --git a/tools/node_modules/eslint/node_modules/rxjs/src/operators/BUILD.bazel b/tools/node_modules/eslint/node_modules/rxjs/src/operators/BUILD.bazel
deleted file mode 100644
index 19066843078577..00000000000000
--- a/tools/node_modules/eslint/node_modules/rxjs/src/operators/BUILD.bazel
+++ /dev/null
@@ -1,13 +0,0 @@
-package(default_visibility = ["//visibility:public"])
-
-load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
-
-ts_library(
- name = "operators",
- srcs = ["index.ts"],
- module_name = "rxjs/operators",
- module_root = "index.d.ts",
- node_modules = "@build_bazel_rules_typescript_tsc_wrapped_deps//:node_modules",
- tsconfig = "//:tsconfig.json",
- deps = ["//:lib"],
-)
diff --git a/tools/node_modules/eslint/node_modules/rxjs/src/webSocket/BUILD.bazel b/tools/node_modules/eslint/node_modules/rxjs/src/webSocket/BUILD.bazel
deleted file mode 100644
index d95d8be5dbec55..00000000000000
--- a/tools/node_modules/eslint/node_modules/rxjs/src/webSocket/BUILD.bazel
+++ /dev/null
@@ -1,13 +0,0 @@
-package(default_visibility = ["//visibility:public"])
-
-load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
-
-ts_library(
- name = "webSocket",
- srcs = ["index.ts"],
- module_name = "rxjs/webSocket",
- module_root = "index.d.ts",
- node_modules = "@build_bazel_rules_typescript_tsc_wrapped_deps//:node_modules",
- tsconfig = "//:tsconfig.json",
- deps = ["//:lib"],
-)
diff --git a/tools/node_modules/eslint/node_modules/state-toggle/index.js b/tools/node_modules/eslint/node_modules/state-toggle/index.js
index 8fda5118165b00..aceee00d1db789 100644
--- a/tools/node_modules/eslint/node_modules/state-toggle/index.js
+++ b/tools/node_modules/eslint/node_modules/state-toggle/index.js
@@ -2,9 +2,9 @@
module.exports = factory
-/* Construct a state `toggler`: a function which inverses
- * `property` in context based on its current value.
- * The by `toggler` returned function restores that value. */
+// Construct a state `toggler`: a function which inverses `property` in context
+// based on its current value.
+// The by `toggler` returned function restores that value.
function factory(key, state, ctx) {
return enter
diff --git a/tools/node_modules/eslint/node_modules/state-toggle/LICENSE b/tools/node_modules/eslint/node_modules/state-toggle/license
similarity index 100%
rename from tools/node_modules/eslint/node_modules/state-toggle/LICENSE
rename to tools/node_modules/eslint/node_modules/state-toggle/license
diff --git a/tools/node_modules/eslint/node_modules/state-toggle/package.json b/tools/node_modules/eslint/node_modules/state-toggle/package.json
index 40aabaa8e132bf..19cb1446496178 100644
--- a/tools/node_modules/eslint/node_modules/state-toggle/package.json
+++ b/tools/node_modules/eslint/node_modules/state-toggle/package.json
@@ -2,7 +2,7 @@
"author": {
"name": "Titus Wormer",
"email": "tituswormer@gmail.com",
- "url": "http://wooorm.com"
+ "url": "https://wooorm.com"
},
"bugs": {
"url": "https://github.com/wooorm/state-toggle/issues"
@@ -12,7 +12,7 @@
{
"name": "Titus Wormer",
"email": "tituswormer@gmail.com",
- "url": "http://wooorm.com"
+ "url": "https://wooorm.com"
}
],
"dependencies": {},
@@ -20,13 +20,13 @@
"description": "Enter/exit a state",
"devDependencies": {
"browserify": "^16.0.0",
- "esmangle": "^1.0.1",
- "nyc": "^11.0.0",
+ "nyc": "^14.0.0",
"prettier": "^1.12.1",
- "remark-cli": "^5.0.0",
+ "remark-cli": "^6.0.0",
"remark-preset-wooorm": "^4.0.0",
"tape": "^4.0.0",
- "xo": "^0.20.0"
+ "tinyify": "^2.5.0",
+ "xo": "^0.24.0"
},
"files": [
"index.js"
@@ -64,21 +64,17 @@
},
"scripts": {
"build": "npm run build-bundle && npm run build-mangle",
- "build-bundle": "browserify index.js --bare -s stateToggle > state-toggle.js",
- "build-mangle": "esmangle < state-toggle.js > state-toggle.min.js",
- "format": "remark . -qfo && prettier --write '**/*.js' && xo --fix",
+ "build-bundle": "browserify . -s stateToggle -o state-toggle.js",
+ "build-mangle": "browserify . -s stateToggle -p tinyify -o state-toggle.min.js",
+ "format": "remark . -qfo && prettier --write \"**/*.js\" && xo --fix",
"test": "npm run format && npm run build && npm run test-coverage",
"test-api": "node test",
"test-coverage": "nyc --reporter lcov tape test.js"
},
- "version": "1.0.1",
+ "version": "1.0.2",
"xo": {
"prettier": true,
"esnext": false,
- "rules": {
- "no-var": "off",
- "prefer-arrow-callback": "off"
- },
"ignores": [
"state-toggle.js"
]
diff --git a/tools/node_modules/eslint/node_modules/state-toggle/readme.md b/tools/node_modules/eslint/node_modules/state-toggle/readme.md
index 071a022123e447..30e5ea96c77b9b 100644
--- a/tools/node_modules/eslint/node_modules/state-toggle/readme.md
+++ b/tools/node_modules/eslint/node_modules/state-toggle/readme.md
@@ -1,4 +1,9 @@
-# state-toggle [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov]
+# state-toggle
+
+[![Build][build-badge]][build]
+[![Coverage][coverage-badge]][coverage]
+[![Downloads][downloads-badge]][downloads]
+[![Size][size-badge]][size]
Enter/exit a state.
@@ -63,19 +68,27 @@ Exit the state, reverting `key` to the value it had before entering.
-[travis-badge]: https://img.shields.io/travis/wooorm/state-toggle.svg
+[build-badge]: https://img.shields.io/travis/wooorm/state-toggle.svg
+
+[build]: https://travis-ci.org/wooorm/state-toggle
+
+[coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/state-toggle.svg
+
+[coverage]: https://codecov.io/github/wooorm/state-toggle
+
+[downloads-badge]: https://img.shields.io/npm/dm/state-toggle.svg
-[travis]: https://travis-ci.org/wooorm/state-toggle
+[downloads]: https://www.npmjs.com/package/state-toggle
-[codecov-badge]: https://img.shields.io/codecov/c/github/wooorm/state-toggle.svg
+[size-badge]: https://img.shields.io/bundlephobia/minzip/state-toggle.svg
-[codecov]: https://codecov.io/github/wooorm/state-toggle
+[size]: https://bundlephobia.com/result?p=state-toggle
[npm]: https://docs.npmjs.com/cli/install
-[license]: LICENSE
+[license]: license
-[author]: http://wooorm.com
+[author]: https://wooorm.com
[enter]: #enter
diff --git a/tools/node_modules/eslint/node_modules/table/README.md b/tools/node_modules/eslint/node_modules/table/README.md
index 1e47185c170563..b64dbd20e18441 100644
--- a/tools/node_modules/eslint/node_modules/table/README.md
+++ b/tools/node_modules/eslint/node_modules/table/README.md
@@ -1,6 +1,7 @@
# Table
+[![GitSpo Mentions](https://gitspo.com/badges/mentions/gajus/table?style=flat-square)](https://gitspo.com/mentions/gajus/table)
[![Travis build status](http://img.shields.io/travis/gajus/table/master.svg?style=flat-square)](https://travis-ci.org/gajus/table)
[![Coveralls](https://img.shields.io/coveralls/gajus/table.svg?style=flat-square)](https://coveralls.io/github/gajus/table)
[![NPM version](http://img.shields.io/npm/v/table.svg?style=flat-square)](https://www.npmjs.org/package/table)
@@ -9,11 +10,13 @@
* [Table](#table)
* [Features](#table-features)
+ * [Install](#table-install)
* [Usage](#table-usage)
* [Cell Content Alignment](#table-usage-cell-content-alignment)
* [Column Width](#table-usage-column-width)
* [Custom Border](#table-usage-custom-border)
* [Draw Horizontal Line](#table-usage-draw-horizontal-line)
+ * [Single Line Mode](#table-usage-single-line-mode)
* [Padding Cell Content](#table-usage-padding-cell-content)
* [Predefined Border Templates](#table-usage-predefined-border-templates)
* [Streaming](#table-usage-streaming)
@@ -36,6 +39,17 @@ Produces a string that represents array data in a text table.
* Configurable column width.
* Text wrapping.
+
+## Install
+
+```bash
+npm install table
+
+```
+
+[![Buy Me A Coffee](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/gajus)
+[![Become a Patron](https://c5.patreon.com/external/logo/become_a_patron_button.png)](https://www.patreon.com/gajus)
+
## Usage
@@ -132,6 +146,7 @@ console.log(output);
╟────┼────┼────╢
║ 2A │ 2B │ 2C ║
╚════╧════╧════╝
+
```
@@ -144,30 +159,30 @@ Valid values are: "left", "right" and "center".
```js
let config,
- data,
- output;
+ data,
+ output;
data = [
- ['0A', '0B', '0C'],
- ['1A', '1B', '1C'],
- ['2A', '2B', '2C']
+ ['0A', '0B', '0C'],
+ ['1A', '1B', '1C'],
+ ['2A', '2B', '2C']
];
config = {
- columns: {
- 0: {
- alignment: 'left',
- minWidth: 10
- },
- 1: {
- alignment: 'center',
- minWidth: 10
- },
- 2: {
- alignment: 'right',
- minWidth: 10
- }
+ columns: {
+ 0: {
+ alignment: 'left',
+ minWidth: 10
+ },
+ 1: {
+ alignment: 'center',
+ minWidth: 10
+ },
+ 2: {
+ alignment: 'right',
+ minWidth: 10
}
+ }
};
output = table(data, config);
@@ -192,21 +207,21 @@ console.log(output);
```js
let data,
- output,
- options;
+ output,
+ options;
data = [
- ['0A', '0B', '0C'],
- ['1A', '1B', '1C'],
- ['2A', '2B', '2C']
+ ['0A', '0B', '0C'],
+ ['1A', '1B', '1C'],
+ ['2A', '2B', '2C']
];
options = {
- columns: {
- 1: {
- width: 10
- }
+ columns: {
+ 1: {
+ width: 10
}
+ }
};
output = table(data, options);
@@ -231,36 +246,36 @@ console.log(output);
```js
let config,
- data,
- output;
+ data,
+ output;
data = [
- ['0A', '0B', '0C'],
- ['1A', '1B', '1C'],
- ['2A', '2B', '2C']
+ ['0A', '0B', '0C'],
+ ['1A', '1B', '1C'],
+ ['2A', '2B', '2C']
];
config = {
- border: {
- topBody: `─`,
- topJoin: `┬`,
- topLeft: `┌`,
- topRight: `┐`,
-
- bottomBody: `─`,
- bottomJoin: `┴`,
- bottomLeft: `└`,
- bottomRight: `┘`,
-
- bodyLeft: `│`,
- bodyRight: `│`,
- bodyJoin: `│`,
-
- joinBody: `─`,
- joinLeft: `├`,
- joinRight: `┤`,
- joinJoin: `┼`
- }
+ border: {
+ topBody: `─`,
+ topJoin: `┬`,
+ topLeft: `┌`,
+ topRight: `┐`,
+
+ bottomBody: `─`,
+ bottomJoin: `┴`,
+ bottomLeft: `└`,
+ bottomRight: `┘`,
+
+ bodyLeft: `│`,
+ bodyRight: `│`,
+ bodyJoin: `│`,
+
+ joinBody: `─`,
+ joinLeft: `├`,
+ joinRight: `┤`,
+ joinJoin: `┼`
+ }
};
output = table(data, config);
@@ -285,27 +300,27 @@ console.log(output);
```js
let data,
- output,
- options;
+ output,
+ options;
data = [
- ['0A', '0B', '0C'],
- ['1A', '1B', '1C'],
- ['2A', '2B', '2C'],
- ['3A', '3B', '3C'],
- ['4A', '4B', '4C']
+ ['0A', '0B', '0C'],
+ ['1A', '1B', '1C'],
+ ['2A', '2B', '2C'],
+ ['3A', '3B', '3C'],
+ ['4A', '4B', '4C']
];
options = {
- /**
- * @typedef {function} drawHorizontalLine
- * @param {number} index
- * @param {number} size
- * @return {boolean}
- */
- drawHorizontalLine: (index, size) => {
- return index === 0 || index === 1 || index === size - 1 || index === size;
- }
+ /**
+ * @typedef {function} drawHorizontalLine
+ * @param {number} index
+ * @param {number} size
+ * @return {boolean}
+ */
+ drawHorizontalLine: (index, size) => {
+ return index === 0 || index === 1 || index === size - 1 || index === size;
+ }
};
output = table(data, options);
@@ -327,6 +342,49 @@ console.log(output);
```
+
+### Single Line Mode
+
+Horizontal lines inside the table are not drawn.
+
+```js
+import {
+ table,
+ getBorderCharacters
+} from 'table';
+
+const data = [
+ ['-rw-r--r--', '1', 'pandorym', 'staff', '1529', 'May 23 11:25', 'LICENSE'],
+ ['-rw-r--r--', '1', 'pandorym', 'staff', '16327', 'May 23 11:58', 'README.md'],
+ ['drwxr-xr-x', '76', 'pandorym', 'staff', '2432', 'May 23 12:02', 'dist'],
+ ['drwxr-xr-x', '634', 'pandorym', 'staff', '20288', 'May 23 11:54', 'node_modules'],
+ ['-rw-r--r--', '1,', 'pandorym', 'staff', '525688', 'May 23 11:52', 'package-lock.json'],
+ ['-rw-r--r--@', '1', 'pandorym', 'staff', '2440', 'May 23 11:25', 'package.json'],
+ ['drwxr-xr-x', '27', 'pandorym', 'staff', '864', 'May 23 11:25', 'src'],
+ ['drwxr-xr-x', '20', 'pandorym', 'staff', '640', 'May 23 11:25', 'test'],
+];
+
+const config = {
+ singleLine: true
+};
+
+const output = table(data, config);
+console.log(output);
+```
+
+```
+╔═════════════╤═════╤══════════╤═══════╤════════╤══════════════╤═══════════════════╗
+║ -rw-r--r-- │ 1 │ pandorym │ staff │ 1529 │ May 23 11:25 │ LICENSE ║
+║ -rw-r--r-- │ 1 │ pandorym │ staff │ 16327 │ May 23 11:58 │ README.md ║
+║ drwxr-xr-x │ 76 │ pandorym │ staff │ 2432 │ May 23 12:02 │ dist ║
+║ drwxr-xr-x │ 634 │ pandorym │ staff │ 20288 │ May 23 11:54 │ node_modules ║
+║ -rw-r--r-- │ 1, │ pandorym │ staff │ 525688 │ May 23 11:52 │ package-lock.json ║
+║ -rw-r--r--@ │ 1 │ pandorym │ staff │ 2440 │ May 23 11:25 │ package.json ║
+║ drwxr-xr-x │ 27 │ pandorym │ staff │ 864 │ May 23 11:25 │ src ║
+║ drwxr-xr-x │ 20 │ pandorym │ staff │ 640 │ May 23 11:25 │ test ║
+╚═════════════╧═════╧══════════╧═══════╧════════╧══════════════╧═══════════════════╝
+```
+
### Padding Cell Content
@@ -334,25 +392,25 @@ console.log(output);
```js
let config,
- data,
- output;
+ data,
+ output;
data = [
- ['0A', 'AABBCC', '0C'],
- ['1A', '1B', '1C'],
- ['2A', '2B', '2C']
+ ['0A', 'AABBCC', '0C'],
+ ['1A', '1B', '1C'],
+ ['2A', '2B', '2C']
];
config = {
- columns: {
- 0: {
- paddingLeft: 3
- },
- 1: {
- width: 2,
- paddingRight: 3
- }
+ columns: {
+ 0: {
+ paddingLeft: 3
+ },
+ 1: {
+ width: 2,
+ paddingRight: 3
}
+ }
};
output = table(data, config);
@@ -379,21 +437,21 @@ You can load one of the predefined border templates using `getBorderCharacters`
```js
import {
- table,
- getBorderCharacters
+ table,
+ getBorderCharacters
} from 'table';
let config,
- data;
+ data;
data = [
- ['0A', '0B', '0C'],
- ['1A', '1B', '1C'],
- ['2A', '2B', '2C']
+ ['0A', '0B', '0C'],
+ ['1A', '1B', '1C'],
+ ['2A', '2B', '2C']
];
config = {
- border: getBorderCharacters(`name of the template`)
+ border: getBorderCharacters(`name of the template`)
};
table(data, config);
@@ -481,23 +539,23 @@ console.log(output);
```js
import {
- createStream
+ createStream
} from 'table';
let config,
- stream;
+ stream;
config = {
- columnDefault: {
- width: 50
- },
- columnCount: 1
+ columnDefault: {
+ width: 50
+ },
+ columnCount: 1
};
stream = createStream(config);
setInterval(() => {
- stream.write([new Date()]);
+ stream.write([new Date()]);
}, 500);
```
@@ -505,38 +563,38 @@ setInterval(() => {
`table` package uses ANSI escape codes to overwrite the output of the last line when a new row is printed.
-The underlying implementation is explained in this [Stack Overflow answer](http://stackoverflow.com/a/32938658/368691).
+The underlying implementation is explained in this [Stack Overflow answer](http://stackoverflow.com/a/32938658/368691).
Streaming supports all of the configuration properties and functionality of a static table (such as auto text wrapping, alignment and padding), e.g.
```js
import {
- createStream
+ createStream
} from 'table';
import _ from 'lodash';
let config,
- stream,
- i;
+ stream,
+ i;
config = {
- columnDefault: {
- width: 50
+ columnDefault: {
+ width: 50
+ },
+ columnCount: 3,
+ columns: {
+ 0: {
+ width: 10,
+ alignment: 'right'
+ },
+ 1: {
+ alignment: 'center',
},
- columnCount: 3,
- columns: {
- 0: {
- width: 10,
- alignment: 'right'
- },
- 1: {
- alignment: 'center',
- },
- 2: {
- width: 10
- }
+ 2: {
+ width: 10
}
+ }
};
stream = createStream(config);
@@ -544,15 +602,16 @@ stream = createStream(config);
i = 0;
setInterval(() => {
- let random;
+ let random;
- random = _.sample('abcdefghijklmnopqrstuvwxyz', _.random(1, 30)).join('');
+ random = _.sample('abcdefghijklmnopqrstuvwxyz', _.random(1, 30)).join('');
- stream.write([i++, new Date(), random]);
+ stream.write([i++, new Date(), random]);
}, 500);
```
![Streaming random data.](./.README/streaming-random.gif)
+
### Text Truncation
@@ -562,20 +621,20 @@ To handle a content that overflows the container width, `table` package implemen
```js
let config,
- data,
- output;
+ data,
+ output;
data = [
- ['Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pulvinar nibh sed mauris convallis dapibus. Nunc venenatis tempus nulla sit amet viverra.']
+ ['Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pulvinar nibh sed mauris convallis dapibus. Nunc venenatis tempus nulla sit amet viverra.']
];
config = {
- columns: {
- 0: {
- width: 20,
- truncate: 100
- }
+ columns: {
+ 0: {
+ width: 20,
+ truncate: 100
}
+ }
};
output = table(data, config);
@@ -600,19 +659,19 @@ console.log(output);
```js
let config,
- data,
- output;
+ data,
+ output;
data = [
['Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pulvinar nibh sed mauris convallis dapibus. Nunc venenatis tempus nulla sit amet viverra.']
];
config = {
- columns: {
- 0: {
- width: 20
- }
+ columns: {
+ 0: {
+ width: 20
}
+ }
};
output = table(data, config);
@@ -637,20 +696,20 @@ When `wrapWord` is `true` the text is broken at the nearest space or one of the
```js
let config,
- data,
- output;
+ data,
+ output;
data = [
- ['Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pulvinar nibh sed mauris convallis dapibus. Nunc venenatis tempus nulla sit amet viverra.']
+ ['Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pulvinar nibh sed mauris convallis dapibus. Nunc venenatis tempus nulla sit amet viverra.']
];
config = {
- columns: {
- 0: {
- width: 20,
- wrapWord: true
- }
+ columns: {
+ 0: {
+ width: 20,
+ wrapWord: true
}
+ }
};
output = table(data, config);
@@ -671,5 +730,6 @@ console.log(output);
║ tempus nulla sit ║
║ amet viverra. ║
╚══════════════════════╝
+
```
diff --git a/tools/node_modules/eslint/node_modules/table/dist/drawTable.js b/tools/node_modules/eslint/node_modules/table/dist/drawTable.js
index 5585af888f6612..fbfdc2016138d8 100644
--- a/tools/node_modules/eslint/node_modules/table/dist/drawTable.js
+++ b/tools/node_modules/eslint/node_modules/table/dist/drawTable.js
@@ -17,9 +17,10 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
* @param {Array} columnSizeIndex
* @param {Array} rowSpanIndex
* @param {Function} drawHorizontalLine
+ * @param {boolean} singleLine
* @returns {string}
*/
-const drawTable = (rows, border, columnSizeIndex, rowSpanIndex, drawHorizontalLine) => {
+const drawTable = (rows, border, columnSizeIndex, rowSpanIndex, drawHorizontalLine, singleLine) => {
let output;
let realRowIndex;
let rowHeight;
@@ -41,7 +42,7 @@ const drawTable = (rows, border, columnSizeIndex, rowSpanIndex, drawHorizontalLi
rowHeight--;
- if (rowHeight === 0 && index0 !== rowCount - 1 && drawHorizontalLine(realRowIndex, rowCount)) {
+ if (!singleLine && rowHeight === 0 && index0 !== rowCount - 1 && drawHorizontalLine(realRowIndex, rowCount)) {
output += (0, _drawBorder.drawBorderJoin)(columnSizeIndex, border);
}
});
diff --git a/tools/node_modules/eslint/node_modules/table/dist/drawTable.js.flow b/tools/node_modules/eslint/node_modules/table/dist/drawTable.js.flow
index 15ad14cfa2ba12..cffe956f2009dd 100644
--- a/tools/node_modules/eslint/node_modules/table/dist/drawTable.js.flow
+++ b/tools/node_modules/eslint/node_modules/table/dist/drawTable.js.flow
@@ -11,9 +11,10 @@ import drawRow from './drawRow';
* @param {Array} columnSizeIndex
* @param {Array} rowSpanIndex
* @param {Function} drawHorizontalLine
+ * @param {boolean} singleLine
* @returns {string}
*/
-export default (rows, border, columnSizeIndex, rowSpanIndex, drawHorizontalLine) => {
+export default (rows, border, columnSizeIndex, rowSpanIndex, drawHorizontalLine, singleLine) => {
let output;
let realRowIndex;
let rowHeight;
@@ -39,7 +40,7 @@ export default (rows, border, columnSizeIndex, rowSpanIndex, drawHorizontalLine)
rowHeight--;
- if (rowHeight === 0 && index0 !== rowCount - 1 && drawHorizontalLine(realRowIndex, rowCount)) {
+ if (!singleLine && rowHeight === 0 && index0 !== rowCount - 1 && drawHorizontalLine(realRowIndex, rowCount)) {
output += drawBorderJoin(columnSizeIndex, border);
}
});
diff --git a/tools/node_modules/eslint/node_modules/table/dist/makeConfig.js b/tools/node_modules/eslint/node_modules/table/dist/makeConfig.js
index 0ec93b8628161b..2828e453d93933 100644
--- a/tools/node_modules/eslint/node_modules/table/dist/makeConfig.js
+++ b/tools/node_modules/eslint/node_modules/table/dist/makeConfig.js
@@ -82,6 +82,10 @@ const makeConfig = (rows, userConfig = {}) => {
};
}
+ if (config.singleLine === undefined) {
+ config.singleLine = false;
+ }
+
return config;
};
diff --git a/tools/node_modules/eslint/node_modules/table/dist/makeConfig.js.flow b/tools/node_modules/eslint/node_modules/table/dist/makeConfig.js.flow
index 9a0ee0afade046..1471afc57f47ca 100644
--- a/tools/node_modules/eslint/node_modules/table/dist/makeConfig.js.flow
+++ b/tools/node_modules/eslint/node_modules/table/dist/makeConfig.js.flow
@@ -68,5 +68,9 @@ export default (rows, userConfig = {}) => {
};
}
+ if (config.singleLine === undefined) {
+ config.singleLine = false;
+ }
+
return config;
};
diff --git a/tools/node_modules/eslint/node_modules/table/dist/table.js b/tools/node_modules/eslint/node_modules/table/dist/table.js
index b4aac0167e3deb..bd4e8055b17018 100644
--- a/tools/node_modules/eslint/node_modules/table/dist/table.js
+++ b/tools/node_modules/eslint/node_modules/table/dist/table.js
@@ -81,6 +81,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
* @property {table~columns[]} columns Column specific configuration.
* @property {table~columns} columnDefault Default values for all columns. Column specific settings overwrite the default values.
* @property {table~drawHorizontalLine} drawHorizontalLine
+ * @property {table~singleLine} singleLine Horizontal lines inside the table are not drawn.
*/
/**
@@ -101,7 +102,7 @@ const table = (data, userConfig = {}) => {
rows = (0, _alignTableData.default)(rows, config);
rows = (0, _padTableData.default)(rows, config);
const cellWidthIndex = (0, _calculateCellWidthIndex.default)(rows[0]);
- return (0, _drawTable.default)(rows, config.border, cellWidthIndex, rowHeightIndex, config.drawHorizontalLine);
+ return (0, _drawTable.default)(rows, config.border, cellWidthIndex, rowHeightIndex, config.drawHorizontalLine, config.singleLine);
};
var _default = table;
diff --git a/tools/node_modules/eslint/node_modules/table/dist/table.js.flow b/tools/node_modules/eslint/node_modules/table/dist/table.js.flow
index 1b68a51a29488e..86af744bd1eafe 100644
--- a/tools/node_modules/eslint/node_modules/table/dist/table.js.flow
+++ b/tools/node_modules/eslint/node_modules/table/dist/table.js.flow
@@ -63,6 +63,7 @@ import truncateTableData from './truncateTableData';
* @property {table~columns[]} columns Column specific configuration.
* @property {table~columns} columnDefault Default values for all columns. Column specific settings overwrite the default values.
* @property {table~drawHorizontalLine} drawHorizontalLine
+ * @property {table~singleLine} singleLine Horizontal lines inside the table are not drawn.
*/
/**
@@ -91,5 +92,5 @@ export default (data, userConfig = {}) => {
const cellWidthIndex = calculateCellWidthIndex(rows[0]);
- return drawTable(rows, config.border, cellWidthIndex, rowHeightIndex, config.drawHorizontalLine);
+ return drawTable(rows, config.border, cellWidthIndex, rowHeightIndex, config.drawHorizontalLine, config.singleLine);
};
diff --git a/tools/node_modules/eslint/node_modules/table/dist/validateTableData.js b/tools/node_modules/eslint/node_modules/table/dist/validateTableData.js
index 7fbd5ec1f561ae..bbd51ffb0775e9 100644
--- a/tools/node_modules/eslint/node_modules/table/dist/validateTableData.js
+++ b/tools/node_modules/eslint/node_modules/table/dist/validateTableData.js
@@ -56,7 +56,7 @@ const validateTableData = rows => {
const cell = _step2.value;
// eslint-disable-next-line no-control-regex
- if (/[\u0001-\u0009\u000B-\u001A]/.test(cell)) {
+ if (/[\u0001-\u0006\u0008-\u0009\u000B-\u001A]/.test(cell)) {
throw new Error('Table data must not contain control characters.');
}
}
diff --git a/tools/node_modules/eslint/node_modules/table/dist/validateTableData.js.flow b/tools/node_modules/eslint/node_modules/table/dist/validateTableData.js.flow
index 4100f3773c5af7..304ab0dd05b995 100644
--- a/tools/node_modules/eslint/node_modules/table/dist/validateTableData.js.flow
+++ b/tools/node_modules/eslint/node_modules/table/dist/validateTableData.js.flow
@@ -36,7 +36,7 @@ export default (rows) => {
for (const cell of cells) {
// eslint-disable-next-line no-control-regex
- if (/[\u0001-\u0009\u000B-\u001A]/.test(cell)) {
+ if (/[\u0001-\u0006\u0008-\u0009\u000B-\u001A]/.test(cell)) {
throw new Error('Table data must not contain control characters.');
}
}
diff --git a/tools/node_modules/eslint/node_modules/table/package.json b/tools/node_modules/eslint/node_modules/table/package.json
index 0068c152dc0f5f..25c326b40fdee4 100644
--- a/tools/node_modules/eslint/node_modules/table/package.json
+++ b/tools/node_modules/eslint/node_modules/table/package.json
@@ -85,5 +85,5 @@
"lint": "npm run build && eslint ./src ./test && flow",
"test": "mocha --require @babel/register"
},
- "version": "5.2.3"
+ "version": "5.4.0"
}
\ No newline at end of file
diff --git a/tools/node_modules/eslint/node_modules/trim-trailing-lines/index.js b/tools/node_modules/eslint/node_modules/trim-trailing-lines/index.js
index ad536dd0c46211..0f2d48b52fc567 100644
--- a/tools/node_modules/eslint/node_modules/trim-trailing-lines/index.js
+++ b/tools/node_modules/eslint/node_modules/trim-trailing-lines/index.js
@@ -4,13 +4,13 @@ module.exports = trimTrailingLines
var line = '\n'
-/* Remove final newline characters from `value`. */
+// Remove final newline characters from `value`.
function trimTrailingLines(value) {
var val = String(value)
var index = val.length
while (val.charAt(--index) === line) {
- /* Empty */
+ // Empty
}
return val.slice(0, index + 1)
diff --git a/tools/node_modules/eslint/node_modules/trim-trailing-lines/LICENSE b/tools/node_modules/eslint/node_modules/trim-trailing-lines/license
similarity index 100%
rename from tools/node_modules/eslint/node_modules/trim-trailing-lines/LICENSE
rename to tools/node_modules/eslint/node_modules/trim-trailing-lines/license
diff --git a/tools/node_modules/eslint/node_modules/trim-trailing-lines/package.json b/tools/node_modules/eslint/node_modules/trim-trailing-lines/package.json
index ef58090d0f2a3e..c9920df6d31922 100644
--- a/tools/node_modules/eslint/node_modules/trim-trailing-lines/package.json
+++ b/tools/node_modules/eslint/node_modules/trim-trailing-lines/package.json
@@ -2,7 +2,7 @@
"author": {
"name": "Titus Wormer",
"email": "tituswormer@gmail.com",
- "url": "http://wooorm.com"
+ "url": "https://wooorm.com"
},
"bugs": {
"url": "https://github.com/wooorm/trim-trailing-lines/issues"
@@ -12,7 +12,7 @@
{
"name": "Titus Wormer",
"email": "tituswormer@gmail.com",
- "url": "http://wooorm.com"
+ "url": "https://wooorm.com"
}
],
"dependencies": {},
@@ -20,13 +20,13 @@
"description": "Remove final newline characters from a string",
"devDependencies": {
"browserify": "^16.0.0",
- "esmangle": "^1.0.0",
- "nyc": "^11.0.0",
+ "nyc": "^14.0.0",
"prettier": "^1.12.1",
- "remark-cli": "^5.0.0",
+ "remark-cli": "^6.0.0",
"remark-preset-wooorm": "^4.0.0",
"tape": "^4.6.3",
- "xo": "^0.20.0"
+ "tinyify": "^2.5.0",
+ "xo": "^0.24.0"
},
"files": [
"index.js"
@@ -66,21 +66,17 @@
},
"scripts": {
"build": "npm run build-bundle && npm run build-mangle",
- "build-bundle": "browserify index.js -s trimTrailingLines > trim-trailing-lines.js",
- "build-mangle": "esmangle trim-trailing-lines.js > trim-trailing-lines.min.js",
- "format": "remark . -qfo && prettier --write '**/*.js' && xo --fix",
+ "build-bundle": "browserify . -s trimTrailingLines -o trim-trailing-lines.js",
+ "build-mangle": "browserify . -s trimTrailingLines -p tinyify -o trim-trailing-lines.min.js",
+ "format": "remark . -qfo && prettier --write \"**/*.js\" && xo --fix",
"test": "npm run format && npm run build && npm run test-coverage",
"test-api": "node test",
"test-coverage": "nyc --reporter lcov tape test.js"
},
- "version": "1.1.1",
+ "version": "1.1.2",
"xo": {
"prettier": true,
"esnext": false,
- "rules": {
- "no-var": "off",
- "prefer-arrow-callback": "off"
- },
"ignores": [
"trim-trailing-lines.js"
]
diff --git a/tools/node_modules/eslint/node_modules/trim-trailing-lines/readme.md b/tools/node_modules/eslint/node_modules/trim-trailing-lines/readme.md
index e8e9d3798f9af8..813a0b5344bca1 100644
--- a/tools/node_modules/eslint/node_modules/trim-trailing-lines/readme.md
+++ b/tools/node_modules/eslint/node_modules/trim-trailing-lines/readme.md
@@ -1,4 +1,9 @@
-# trim-trailing-lines [![Build Status][travtrim-trailing-lines]][travis] [![Coverage Status][codecov-badge]][codecov]
+# trim-trailing-lines
+
+[![Build][build-badge]][build]
+[![Coverage][coverage-badge]][coverage]
+[![Downloads][downloads-badge]][downloads]
+[![Size][size-badge]][size]
Remove final newline characters from a string.
@@ -40,16 +45,24 @@ Remove final newline characters from `value`.
-[travtrim-trailing-lines]: https://img.shields.io/travis/wooorm/trim-trailing-lines.svg
+[build-badge]: https://img.shields.io/travis/wooorm/trim-trailing-lines.svg
+
+[build]: https://travis-ci.org/wooorm/trim-trailing-lines
+
+[coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/trim-trailing-lines.svg
+
+[coverage]: https://codecov.io/github/wooorm/trim-trailing-lines
+
+[downloads-badge]: https://img.shields.io/npm/dm/trim-trailing-lines.svg
-[travis]: https://travis-ci.org/wooorm/trim-trailing-lines
+[downloads]: https://www.npmjs.com/package/trim-trailing-lines
-[codecov-badge]: https://img.shields.io/codecov/c/github/wooorm/trim-trailing-lines.svg
+[size-badge]: https://img.shields.io/bundlephobia/minzip/trim-trailing-lines.svg
-[codecov]: https://codecov.io/github/wooorm/trim-trailing-lines
+[size]: https://bundlephobia.com/result?p=trim-trailing-lines
[npm]: https://docs.npmjs.com/cli/install
-[license]: LICENSE
+[license]: license
-[author]: http://wooorm.com
+[author]: https://wooorm.com
diff --git a/tools/node_modules/eslint/node_modules/trough/index.js b/tools/node_modules/eslint/node_modules/trough/index.js
index 9b60e3c8a87cef..2b73d868056525 100644
--- a/tools/node_modules/eslint/node_modules/trough/index.js
+++ b/tools/node_modules/eslint/node_modules/trough/index.js
@@ -8,7 +8,7 @@ trough.wrap = wrap
var slice = [].slice
-/* Create new middleware. */
+// Create new middleware.
function trough() {
var fns = []
var middleware = {}
@@ -18,8 +18,7 @@ function trough() {
return middleware
- /* Run `fns`. Last argument must be
- * a completion handler. */
+ // Run `fns`. Last argument must be a completion handler.
function run() {
var index = -1
var input = slice.call(arguments, 0, -1)
@@ -31,7 +30,7 @@ function trough() {
next.apply(null, [null].concat(input))
- /* Run the next `fn`, if any. */
+ // Run the next `fn`, if any.
function next(err) {
var fn = fns[++index]
var params = slice.call(arguments, 0)
@@ -44,7 +43,7 @@ function trough() {
return
}
- /* Copy non-nully input into values. */
+ // Copy non-nully input into values.
while (++pos < length) {
if (values[pos] === null || values[pos] === undefined) {
values[pos] = input[pos]
@@ -53,7 +52,7 @@ function trough() {
input = values
- /* Next or done. */
+ // Next or done.
if (fn) {
wrap(fn, next).apply(null, input)
} else {
@@ -62,7 +61,7 @@ function trough() {
}
}
- /* Add `fn` to the list. */
+ // Add `fn` to the list.
function use(fn) {
if (typeof fn !== 'function') {
throw new Error('Expected `fn` to be a function, not ' + fn)
diff --git a/tools/node_modules/eslint/node_modules/trough/LICENSE b/tools/node_modules/eslint/node_modules/trough/license
similarity index 100%
rename from tools/node_modules/eslint/node_modules/trough/LICENSE
rename to tools/node_modules/eslint/node_modules/trough/license
diff --git a/tools/node_modules/eslint/node_modules/trough/package.json b/tools/node_modules/eslint/node_modules/trough/package.json
index dd5bea77dbc333..ad3a3f7081df46 100644
--- a/tools/node_modules/eslint/node_modules/trough/package.json
+++ b/tools/node_modules/eslint/node_modules/trough/package.json
@@ -2,7 +2,7 @@
"author": {
"name": "Titus Wormer",
"email": "tituswormer@gmail.com",
- "url": "http://wooorm.com"
+ "url": "https://wooorm.com"
},
"bugs": {
"url": "https://github.com/wooorm/trough/issues"
@@ -12,7 +12,7 @@
{
"name": "Titus Wormer",
"email": "tituswormer@gmail.com",
- "url": "http://wooorm.com"
+ "url": "https://wooorm.com"
}
],
"dependencies": {},
@@ -20,13 +20,13 @@
"description": "Middleware: a channel used to convey a liquid",
"devDependencies": {
"browserify": "^16.0.0",
- "nyc": "^11.0.0",
+ "nyc": "^14.0.0",
"prettier": "^1.12.0",
- "remark-cli": "^5.0.0",
+ "remark-cli": "^6.0.0",
"remark-preset-wooorm": "^4.0.0",
"tape": "^4.4.0",
"tinyify": "^2.4.3",
- "xo": "^0.20.0"
+ "xo": "^0.24.0"
},
"files": [
"index.js",
@@ -66,20 +66,18 @@
"build": "npm run build-bundle && npm run build-mangle",
"build-bundle": "browserify index.js -s trough > trough.js",
"build-mangle": "browserify index.js -s trough -p tinyify > trough.min.js",
- "format": "remark . -qfo && prettier --write '**/*.js' && xo --fix",
+ "format": "remark . -qfo && prettier --write \"**/*.js\" && xo --fix",
"test": "npm run format && npm run build && npm run test-coverage",
"test-api": "node test",
"test-coverage": "nyc --reporter lcov tape test.js"
},
- "version": "1.0.3",
+ "version": "1.0.4",
"xo": {
"prettier": true,
"esnext": false,
"rules": {
"guard-for-in": "off",
- "unicorn/prefer-type-error": "off",
- "no-var": "off",
- "prefer-arrow-callback": "off"
+ "unicorn/prefer-type-error": "off"
},
"ignores": [
"trough.js"
diff --git a/tools/node_modules/eslint/node_modules/trough/readme.md b/tools/node_modules/eslint/node_modules/trough/readme.md
index c4a96c5ba60e55..f91e814a0a2f9e 100644
--- a/tools/node_modules/eslint/node_modules/trough/readme.md
+++ b/tools/node_modules/eslint/node_modules/trough/readme.md
@@ -1,4 +1,9 @@
-# trough [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov]
+# trough
+
+[![Build][build-badge]][build]
+[![Coverage][coverage-badge]][coverage]
+[![Downloads][downloads-badge]][downloads]
+[![Size][size-badge]][size]
> **trough** /trôf/ — a channel used to convey a liquid.
@@ -289,19 +294,27 @@ null 'some' 'values'
-[travis-badge]: https://img.shields.io/travis/wooorm/trough.svg
+[build-badge]: https://img.shields.io/travis/wooorm/trough.svg
+
+[build]: https://travis-ci.org/wooorm/trough
+
+[coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/trough.svg
+
+[coverage]: https://codecov.io/github/wooorm/trough
+
+[downloads-badge]: https://img.shields.io/npm/dm/trough.svg
-[travis]: https://travis-ci.org/wooorm/trough
+[downloads]: https://www.npmjs.com/package/trough
-[codecov-badge]: https://img.shields.io/codecov/c/github/wooorm/trough.svg
+[size-badge]: https://img.shields.io/bundlephobia/minzip/trough.svg
-[codecov]: https://codecov.io/github/wooorm/trough
+[size]: https://bundlephobia.com/result?p=trough
[npm]: https://docs.npmjs.com/cli/install
-[license]: LICENSE
+[license]: license
-[author]: http://wooorm.com
+[author]: https://wooorm.com
[ware]: https://github.com/segmentio/ware
diff --git a/tools/node_modules/eslint/node_modules/trough/wrap.js b/tools/node_modules/eslint/node_modules/trough/wrap.js
index febdc98cd3fbab..cf568c07adfa34 100644
--- a/tools/node_modules/eslint/node_modules/trough/wrap.js
+++ b/tools/node_modules/eslint/node_modules/trough/wrap.js
@@ -4,9 +4,9 @@ var slice = [].slice
module.exports = wrap
-/* Wrap `fn`. Can be sync or async; return a promise,
- * receive a completion handler, return new values and
- * errors. */
+// Wrap `fn`.
+// Can be sync or async; return a promise, receive a completion handler, return
+// new values and errors.
function wrap(fn, callback) {
var invoked
@@ -23,18 +23,17 @@ function wrap(fn, callback) {
try {
result = fn.apply(null, params)
- } catch (err) {
- /* Well, this is quite the pickle. `fn` received
- * a callback and invoked it (thus continuing the
- * pipeline), but later also threw an error.
- * We’re not about to restart the pipeline again,
- * so the only thing left to do is to throw the
- * thing instea. */
+ } catch (error) {
+ // Well, this is quite the pickle.
+ // `fn` received a callback and invoked it (thus continuing the pipeline),
+ // but later also threw an error.
+ // We’re not about to restart the pipeline again, so the only thing left
+ // to do is to throw the thing instead.
if (callback && invoked) {
- throw err
+ throw error
}
- return done(err)
+ return done(error)
}
if (!callback) {
@@ -48,7 +47,7 @@ function wrap(fn, callback) {
}
}
- /* Invoke `next`, only once. */
+ // Invoke `next`, only once.
function done() {
if (!invoked) {
invoked = true
@@ -57,8 +56,8 @@ function wrap(fn, callback) {
}
}
- /* Invoke `done` with one value.
- * Tracks if an error is passed, too. */
+ // Invoke `done` with one value.
+ // Tracks if an error is passed, too.
function then(value) {
done(null, value)
}
diff --git a/tools/node_modules/eslint/node_modules/unherit/index.js b/tools/node_modules/eslint/node_modules/unherit/index.js
index e156c6197482ea..32ead7770fa2c9 100644
--- a/tools/node_modules/eslint/node_modules/unherit/index.js
+++ b/tools/node_modules/eslint/node_modules/unherit/index.js
@@ -5,8 +5,8 @@ var inherits = require('inherits')
module.exports = unherit
-/* Create a custom constructor which can be modified
- * without affecting the original class. */
+// Create a custom constructor which can be modified without affecting the
+// original class.
function unherit(Super) {
var result
var key
@@ -15,7 +15,7 @@ function unherit(Super) {
inherits(Of, Super)
inherits(From, Of)
- /* Clone values. */
+ // Clone values.
result = Of.prototype
for (key in result) {
@@ -28,13 +28,13 @@ function unherit(Super) {
return Of
- /* Constructor accepting a single argument,
- * which itself is an `arguments` object. */
+ // Constructor accepting a single argument, which itself is an `arguments`
+ // object.
function From(parameters) {
return Super.apply(this, parameters)
}
- /* Constructor accepting variadic arguments. */
+ // Constructor accepting variadic arguments.
function Of() {
if (!(this instanceof Of)) {
return new From(arguments)
diff --git a/tools/node_modules/eslint/node_modules/unherit/LICENSE b/tools/node_modules/eslint/node_modules/unherit/license
similarity index 100%
rename from tools/node_modules/eslint/node_modules/unherit/LICENSE
rename to tools/node_modules/eslint/node_modules/unherit/license
diff --git a/tools/node_modules/eslint/node_modules/unherit/package.json b/tools/node_modules/eslint/node_modules/unherit/package.json
index 00ae793ec86e25..c0aaa416d83563 100644
--- a/tools/node_modules/eslint/node_modules/unherit/package.json
+++ b/tools/node_modules/eslint/node_modules/unherit/package.json
@@ -2,7 +2,7 @@
"author": {
"name": "Titus Wormer",
"email": "tituswormer@gmail.com",
- "url": "http://wooorm.com"
+ "url": "https://wooorm.com"
},
"bugs": {
"url": "https://github.com/wooorm/unherit/issues"
@@ -12,7 +12,7 @@
{
"name": "Titus Wormer",
"email": "tituswormer@gmail.com",
- "url": "http://wooorm.com"
+ "url": "https://wooorm.com"
}
],
"dependencies": {
@@ -23,13 +23,13 @@
"description": "Clone a constructor without affecting the super-class",
"devDependencies": {
"browserify": "^16.0.0",
- "esmangle": "^1.0.1",
- "nyc": "^11.0.0",
+ "nyc": "^14.0.0",
"prettier": "^1.12.1",
- "remark-cli": "^5.0.0",
+ "remark-cli": "^6.0.0",
"remark-preset-wooorm": "^4.0.0",
"tape": "^4.0.0",
- "xo": "^0.20.0"
+ "tinyify": "^2.5.0",
+ "xo": "^0.24.0"
},
"files": [
"index.js"
@@ -62,20 +62,18 @@
},
"scripts": {
"build": "npm run build-bundle && npm run build-mangle",
- "build-bundle": "browserify index.js --bare -s unherit > unherit.js",
- "build-mangle": "esmangle unherit.js > unherit.min.js",
- "format": "remark . -qfo && prettier --write '**/*.js' && xo --fix",
+ "build-bundle": "browserify . -s unherit -o unherit.js",
+ "build-mangle": "browserify . -s unherit -p tinyify -o unherit.min.js",
+ "format": "remark . -qfo && prettier --write \"**/*.js\" && xo --fix",
"test": "npm run format && npm run build && npm run test-coverage",
"test-api": "node test",
"test-coverage": "nyc --reporter lcov tape test.js"
},
- "version": "1.1.1",
+ "version": "1.1.2",
"xo": {
"prettier": true,
"esnext": false,
"rules": {
- "no-var": "off",
- "prefer-arrow-callback": "off",
"guard-for-in": "off"
},
"ignores": [
diff --git a/tools/node_modules/eslint/node_modules/unherit/readme.md b/tools/node_modules/eslint/node_modules/unherit/readme.md
index 3b5091d5c284e2..674a2092d5b710 100644
--- a/tools/node_modules/eslint/node_modules/unherit/readme.md
+++ b/tools/node_modules/eslint/node_modules/unherit/readme.md
@@ -1,4 +1,9 @@
-# unherit [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov]
+# unherit
+
+[![Build][build-badge]][build]
+[![Coverage][coverage-badge]][coverage]
+[![Downloads][downloads-badge]][downloads]
+[![Size][size-badge]][size]
Create a custom constructor which can be modified without affecting the
original class.
@@ -17,13 +22,12 @@ npm install unherit
var EventEmitter = require('events').EventEmitter
var unherit = require('unherit')
-/* Create a private class which acts just like
- * `EventEmitter`. */
+// Create a private class which acts just like `EventEmitter`.
var Emitter = unherit(EventEmitter)
Emitter.prototype.defaultMaxListeners = 0
-/* Now, all instances of `Emitter` have no maximum
- * listeners, without affecting other `EventEmitter`s. */
+// Now, all instances of `Emitter` have no maximum listeners, without affecting
+// other `EventEmitter`s.
new Emitter().defaultMaxListeners === 0 // => true
new EventEmitter().defaultMaxListeners === undefined // => true
@@ -52,16 +56,24 @@ without affecting the original class.
-[travis-badge]: https://img.shields.io/travis/wooorm/unherit.svg
+[build-badge]: https://img.shields.io/travis/wooorm/unherit.svg
+
+[build]: https://travis-ci.org/wooorm/unherit
+
+[coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/unherit.svg
+
+[coverage]: https://codecov.io/github/wooorm/unherit
+
+[downloads-badge]: https://img.shields.io/npm/dm/unherit.svg
-[travis]: https://travis-ci.org/wooorm/unherit
+[downloads]: https://www.npmjs.com/package/unherit
-[codecov-badge]: https://img.shields.io/codecov/c/github/wooorm/unherit.svg
+[size-badge]: https://img.shields.io/bundlephobia/minzip/unherit.svg
-[codecov]: https://codecov.io/github/wooorm/unherit
+[size]: https://bundlephobia.com/result?p=unherit
[npm-install]: https://docs.npmjs.com/cli/install
-[license]: LICENSE
+[license]: license
-[author]: http://wooorm.com
+[author]: https://wooorm.com
diff --git a/tools/node_modules/eslint/node_modules/unist-util-is/index.js b/tools/node_modules/eslint/node_modules/unist-util-is/index.js
index 775cf252f97f27..184115024c1f58 100644
--- a/tools/node_modules/eslint/node_modules/unist-util-is/index.js
+++ b/tools/node_modules/eslint/node_modules/unist-util-is/index.js
@@ -1,12 +1,10 @@
'use strict'
-/* eslint-disable max-params */
-
-/* Expose. */
module.exports = is
-/* Assert if `test` passes for `node`.
- * When a `parent` node is known the `index` of node */
+// Assert if `test` passes for `node`. When a `parent` node is known the
+// `index` of node.
+// eslint-disable-next-line max-params
function is(test, node, index, parent, context) {
var hasParent = parent !== null && parent !== undefined
var hasIndex = index !== null && index !== undefined
@@ -66,8 +64,8 @@ function convertAll(tests) {
return results
}
-/* Utility assert each property in `test` is represented
- * in `node`, and each values are strictly equal. */
+// Utility assert each property in `test` is represented in `node`, and each
+// values are strictly equal.
function matchesFactory(test) {
return matches
@@ -103,8 +101,8 @@ function anyFactory(tests) {
}
}
-/* Utility to convert a string into a function which checks
- * a given node’s type for said string. */
+// Utility to convert a string into a function which checks a given node’s type
+// for said string.
function typeFactory(test) {
return type
@@ -113,7 +111,7 @@ function typeFactory(test) {
}
}
-/* Utility to return true. */
+// Utility to return true.
function ok() {
return true
}
diff --git a/tools/node_modules/eslint/node_modules/unist-util-visit/LICENSE b/tools/node_modules/eslint/node_modules/unist-util-is/license
similarity index 98%
rename from tools/node_modules/eslint/node_modules/unist-util-visit/LICENSE
rename to tools/node_modules/eslint/node_modules/unist-util-is/license
index 32e7a3d93ca5a2..cfa79e66cfc072 100644
--- a/tools/node_modules/eslint/node_modules/unist-util-visit/LICENSE
+++ b/tools/node_modules/eslint/node_modules/unist-util-is/license
@@ -1,4 +1,4 @@
-(The MIT License)
+(The MIT license)
Copyright (c) 2015 Titus Wormer
diff --git a/tools/node_modules/eslint/node_modules/unist-util-is/package.json b/tools/node_modules/eslint/node_modules/unist-util-is/package.json
index e841568f7e0c4c..eea876c97270a3 100644
--- a/tools/node_modules/eslint/node_modules/unist-util-is/package.json
+++ b/tools/node_modules/eslint/node_modules/unist-util-is/package.json
@@ -2,7 +2,7 @@
"author": {
"name": "Titus Wormer",
"email": "tituswormer@gmail.com",
- "url": "http://wooorm.com"
+ "url": "https://wooorm.com"
},
"bugs": {
"url": "https://github.com/syntax-tree/hast-util-to-html/issues"
@@ -12,7 +12,7 @@
{
"name": "Titus Wormer",
"email": "tituswormer@gmail.com",
- "url": "http://wooorm.com"
+ "url": "https://wooorm.com"
}
],
"dependencies": {},
@@ -20,13 +20,13 @@
"description": "Utility to check if a node passes a test",
"devDependencies": {
"browserify": "^16.0.0",
- "esmangle": "^1.0.1",
- "nyc": "^11.0.0",
- "prettier": "^1.12.1",
- "remark-cli": "^5.0.0",
- "remark-preset-wooorm": "^4.0.0",
+ "nyc": "^14.0.0",
+ "prettier": "^1.0.0",
+ "remark-cli": "^6.0.0",
+ "remark-preset-wooorm": "^5.0.0",
"tape": "^4.0.0",
- "xo": "^0.20.0"
+ "tinyify": "^2.0.0",
+ "xo": "^0.24.0"
},
"files": [
"index.js"
@@ -69,21 +69,18 @@
},
"scripts": {
"build": "npm run build-bundle && npm run build-mangle",
- "build-bundle": "browserify index.js --bare -s unistUtilIs > unist-util-is.js",
- "build-mangle": "esmangle < unist-util-is.js > unist-util-is.min.js",
- "format": "remark . -qfo && prettier --write '**/*.js' && xo --fix",
+ "build-bundle": "browserify . -s unistUtilIs > unist-util-is.js",
+ "build-mangle": "browserify . -s unistUtilIs -p tinyify > unist-util-is.min.js",
+ "format": "remark . -qfo && prettier --write \"**/*.js\" && xo --fix",
"test": "npm run format && npm run build && npm run test-coverage",
"test-api": "node test",
"test-coverage": "nyc --reporter lcov tape test.js"
},
- "version": "2.1.2",
+ "version": "2.1.3",
"xo": {
"prettier": true,
"esnext": false,
"rules": {
- "guard-for-in": "off",
- "no-var": "off",
- "prefer-arrow-callback": "off",
"unicorn/prefer-type-error": "off"
},
"ignore": [
diff --git a/tools/node_modules/eslint/node_modules/unist-util-is/readme.md b/tools/node_modules/eslint/node_modules/unist-util-is/readme.md
index 88fa6d396ce01b..3ed2fce8dfb012 100644
--- a/tools/node_modules/eslint/node_modules/unist-util-is/readme.md
+++ b/tools/node_modules/eslint/node_modules/unist-util-is/readme.md
@@ -1,12 +1,20 @@
-# unist-util-is [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov]
+# unist-util-is
-[**Unist**][unist] utility to check if a node passes a test.
+[![Build][build-badge]][build]
+[![Coverage][coverage-badge]][coverage]
+[![Downloads][downloads-badge]][downloads]
+[![Size][size-badge]][size]
+[![Sponsors][sponsors-badge]][collective]
+[![Backers][backers-badge]][collective]
+[![Chat][chat-badge]][chat]
-## Installation
+[**unist**][unist] utility to check if a node passes a test.
+
+## Install
[npm][]:
-```bash
+```sh
npm install unist-util-is
```
@@ -45,20 +53,19 @@ is(test, node, 5, parent) // => true
* `test` ([`Function`][test], `string`, `Object`, or `Array.`, optional)
— When not given, checks if `node` is a [`Node`][node].
- When `string`, works like passing `function (node) {return
- node.type === test}`.
- When `array`, checks any one of the subtests pass.
+ When `string`, works like passing `node => node.type === test`.
+ When `array`, checks if any one of the subtests pass.
When `object`, checks that all keys in `test` are in `node`,
- and that they have (strictly) equal values
+ and that they have strictly equal values
* `node` ([`Node`][node]) — Node to check. `false` is returned
-* `index` (`number`, optional) — Position of `node` in `parent`
-* `parent` (`Node`, optional) — Parent of `node`
+* `index` (`number`, optional) — [Index][] of `node` in `parent`
+* `parent` ([`Node`][node], optional) — [Parent][] of `node`
* `context` (`*`, optional) — Context object to invoke `test` with
###### Returns
-`boolean` — Whether `test` passed _and_ `node` is a [`Node`][node] (object
-with `type` set to non-empty `string`).
+`boolean` — Whether `test` passed *and* `node` is a [`Node`][node] (object
+with `type` set to a non-empty `string`).
#### `function test(node[, index, parent])`
@@ -97,11 +104,13 @@ with `type` set to non-empty `string`).
## Contribute
-See [`contributing.md` in `syntax-tree/unist`][contributing] for ways to get
+See [`contributing.md` in `syntax-tree/.github`][contributing] for ways to get
started.
+See [`support.md`][support] for ways to get help.
-This organisation has a [Code of Conduct][coc]. By interacting with this
-repository, organisation, or community you agree to abide by its terms.
+This project has a [Code of Conduct][coc].
+By interacting with this repository, organisation, or community you agree to
+abide by its terms.
## License
@@ -109,26 +118,50 @@ repository, organisation, or community you agree to abide by its terms.
-[travis-badge]: https://img.shields.io/travis/syntax-tree/unist-util-is.svg
+[build-badge]: https://img.shields.io/travis/syntax-tree/unist-util-is.svg
+
+[build]: https://travis-ci.org/syntax-tree/unist-util-is
+
+[coverage-badge]: https://img.shields.io/codecov/c/github/syntax-tree/unist-util-is.svg
+
+[coverage]: https://codecov.io/github/syntax-tree/unist-util-is
+
+[downloads-badge]: https://img.shields.io/npm/dm/unist-util-is.svg
+
+[downloads]: https://www.npmjs.com/package/unist-util-is
+
+[size-badge]: https://img.shields.io/bundlephobia/minzip/unist-util-is.svg
+
+[size]: https://bundlephobia.com/result?p=unist-util-is
-[travis]: https://travis-ci.org/syntax-tree/unist-util-is
+[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
-[codecov-badge]: https://img.shields.io/codecov/c/github/syntax-tree/unist-util-is.svg
+[backers-badge]: https://opencollective.com/unified/backers/badge.svg
-[codecov]: https://codecov.io/github/syntax-tree/unist-util-is
+[collective]: https://opencollective.com/unified
+
+[chat-badge]: https://img.shields.io/badge/join%20the%20community-on%20spectrum-7b16ff.svg
+
+[chat]: https://spectrum.chat/unified/syntax-tree
[npm]: https://docs.npmjs.com/cli/install
-[license]: LICENSE
+[license]: license
+
+[author]: https://wooorm.com
+
+[contributing]: https://github.com/syntax-tree/.github/blob/master/contributing.md
-[author]: http://wooorm.com
+[support]: https://github.com/syntax-tree/.github/blob/master/support.md
+
+[coc]: https://github.com/syntax-tree/.github/blob/master/code-of-conduct.md
[unist]: https://github.com/syntax-tree/unist
[node]: https://github.com/syntax-tree/unist#node
-[test]: #function-testnode-index-parent
+[parent]: https://github.com/syntax-tree/unist#parent-1
-[contributing]: https://github.com/syntax-tree/unist/blob/master/contributing.md
+[index]: https://github.com/syntax-tree/unist#index
-[coc]: https://github.com/syntax-tree/unist/blob/master/code-of-conduct.md
+[test]: #function-testnode-index-parent
diff --git a/tools/node_modules/eslint/node_modules/unist-util-remove-position/index.js b/tools/node_modules/eslint/node_modules/unist-util-remove-position/index.js
index fbb0c2fcc68884..096395981793d9 100644
--- a/tools/node_modules/eslint/node_modules/unist-util-remove-position/index.js
+++ b/tools/node_modules/eslint/node_modules/unist-util-remove-position/index.js
@@ -4,7 +4,6 @@ var visit = require('unist-util-visit')
module.exports = removePosition
-/* Remove `position`s from `tree`. */
function removePosition(node, force) {
visit(node, force ? hard : soft)
return node
diff --git a/tools/node_modules/eslint/node_modules/unist-util-remove-position/LICENSE b/tools/node_modules/eslint/node_modules/unist-util-remove-position/license
similarity index 100%
rename from tools/node_modules/eslint/node_modules/unist-util-remove-position/LICENSE
rename to tools/node_modules/eslint/node_modules/unist-util-remove-position/license
diff --git a/tools/node_modules/eslint/node_modules/unist-util-remove-position/package.json b/tools/node_modules/eslint/node_modules/unist-util-remove-position/package.json
index e62c5e513eb51b..671af505b33478 100644
--- a/tools/node_modules/eslint/node_modules/unist-util-remove-position/package.json
+++ b/tools/node_modules/eslint/node_modules/unist-util-remove-position/package.json
@@ -2,7 +2,7 @@
"author": {
"name": "Titus Wormer",
"email": "tituswormer@gmail.com",
- "url": "http://wooorm.com"
+ "url": "https://wooorm.com"
},
"bugs": {
"url": "https://github.com/syntax-tree/unist-util-remove-position/issues"
@@ -12,7 +12,7 @@
{
"name": "Titus Wormer",
"email": "tituswormer@gmail.com",
- "url": "http://wooorm.com"
+ "url": "https://wooorm.com"
}
],
"dependencies": {
@@ -22,15 +22,15 @@
"description": "Remove `position`s from a unist tree",
"devDependencies": {
"browserify": "^16.0.0",
- "esmangle": "^1.0.1",
- "nyc": "^11.0.0",
- "prettier": "^1.12.1",
- "remark": "^9.0.0",
- "remark-cli": "^5.0.0",
- "remark-preset-wooorm": "^4.0.0",
+ "nyc": "^14.0.0",
+ "prettier": "^1.0.0",
+ "remark": "^10.0.0",
+ "remark-cli": "^6.0.0",
+ "remark-preset-wooorm": "^5.0.0",
"tape": "^4.0.0",
- "unist-builder": "^1.0.2",
- "xo": "^0.20.0"
+ "tinyify": "^2.0.0",
+ "unist-builder": "^1.0.0",
+ "xo": "^0.24.0"
},
"files": [
"index.js"
@@ -70,22 +70,17 @@
},
"scripts": {
"build": "npm run build-bundle && npm run build-mangle",
- "build-bundle": "browserify index.js --bare -s unistUtilRemovePosition > unist-util-remove-position.js",
- "build-mangle": "esmangle < unist-util-remove-position.js > unist-util-remove-position.min.js",
- "format": "remark . -qfo && prettier --write '**/*.js' && xo --fix",
+ "build-bundle": "browserify . -s unistUtilRemovePosition > unist-util-remove-position.js",
+ "build-mangle": "browserify . -s unistUtilRemovePosition -p tinyify > unist-util-remove-position.min.js",
+ "format": "remark . -qfo && prettier --write \"**/*.js\" && xo --fix",
"test": "npm run format && npm run build && npm run test-coverage",
"test-api": "node test",
"test-coverage": "nyc --reporter lcov tape test.js"
},
- "version": "1.1.2",
+ "version": "1.1.3",
"xo": {
"prettier": true,
"esnext": false,
- "rules": {
- "guard-for-in": "off",
- "no-var": "off",
- "prefer-arrow-callback": "off"
- },
"ignores": [
"unist-util-remove-position.js"
]
diff --git a/tools/node_modules/eslint/node_modules/unist-util-remove-position/readme.md b/tools/node_modules/eslint/node_modules/unist-util-remove-position/readme.md
index 40ccfa1ce7e087..e79ed14b35084f 100644
--- a/tools/node_modules/eslint/node_modules/unist-util-remove-position/readme.md
+++ b/tools/node_modules/eslint/node_modules/unist-util-remove-position/readme.md
@@ -1,50 +1,70 @@
-# unist-util-remove-position [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov]
+# unist-util-remove-position
-Remove [`position`][position]s from a [Unist][] tree.
+[![Build][build-badge]][build]
+[![Coverage][coverage-badge]][coverage]
+[![Downloads][downloads-badge]][downloads]
+[![Size][size-badge]][size]
+[![Sponsors][sponsors-badge]][collective]
+[![Backers][backers-badge]][collective]
+[![Chat][chat-badge]][chat]
-## Installation
+[**unist**][unist] utility to remove [`position`][position]s from tree.
+
+## Install
[npm][]:
-```bash
+```sh
npm install unist-util-remove-position
```
## Usage
-```javascript
+```js
var remark = require('remark')
var removePosition = require('unist-util-remove-position')
var tree = remark().parse('Some _emphasis_, **importance**, and `code`.')
-console.dir(removePosition(tree, true), {depth: null})
+removePosition(tree, true)
+
+console.dir(tree, {depth: null})
```
Yields:
```js
-{ type: 'root',
- children:
- [ { type: 'paragraph',
- children:
- [ { type: 'text', value: 'Some ' },
- { type: 'emphasis',
- children: [ { type: 'text', value: 'emphasis' } ] },
- { type: 'text', value: ', ' },
- { type: 'strong',
- children: [ { type: 'text', value: 'importance' } ] },
- { type: 'text', value: ', and ' },
- { type: 'inlineCode', value: 'code' },
- { type: 'text', value: '.' } ] } ] }
+{
+ type: 'root',
+ children: [
+ {
+ type: 'paragraph',
+ children: [
+ { type: 'text', value: 'Some ' },
+ {
+ type: 'emphasis',
+ children: [ { type: 'text', value: 'emphasis' } ]
+ },
+ { type: 'text', value: ', ' },
+ {
+ type: 'strong',
+ children: [ { type: 'text', value: 'importance' } ]
+ },
+ { type: 'text', value: ', and ' },
+ { type: 'inlineCode', value: 'code' },
+ { type: 'text', value: '.' }
+ ]
+ }
+ ]
+}
```
## API
### `removePosition(node[, force])`
-Remove [`position`][position]s from [`node`][node]. If `force` is given,
-uses `delete`, otherwise, sets `position`s to `undefined`.
+Remove [`position`][position]s from [`node`][node].
+If `force` is given, uses `delete`, otherwise, sets `position`s to `undefined`.
###### Returns
@@ -52,11 +72,13 @@ The given `node`.
## Contribute
-See [`contributing.md` in `syntax-tree/unist`][contributing] for ways to get
+See [`contributing.md` in `syntax-tree/.github`][contributing] for ways to get
started.
+See [`support.md`][support] for ways to get help.
-This organisation has a [Code of Conduct][coc]. By interacting with this
-repository, organisation, or community you agree to abide by its terms.
+This project has a [Code of Conduct][coc].
+By interacting with this repository, organisation, or community you agree to
+abide by its terms.
## License
@@ -64,26 +86,46 @@ repository, organisation, or community you agree to abide by its terms.
-[travis-badge]: https://img.shields.io/travis/syntax-tree/unist-util-remove-position.svg
+[build-badge]: https://img.shields.io/travis/syntax-tree/unist-util-remove-position.svg
+
+[build]: https://travis-ci.org/syntax-tree/unist-util-remove-position
+
+[coverage-badge]: https://img.shields.io/codecov/c/github/syntax-tree/unist-util-remove-position.svg
+
+[coverage]: https://codecov.io/github/syntax-tree/unist-util-remove-position
+
+[downloads-badge]: https://img.shields.io/npm/dm/unist-util-remove-position.svg
+
+[downloads]: https://www.npmjs.com/package/unist-util-remove-position
+
+[size-badge]: https://img.shields.io/bundlephobia/minzip/unist-util-remove-position.svg
-[travis]: https://travis-ci.org/syntax-tree/unist-util-remove-position
+[size]: https://bundlephobia.com/result?p=unist-util-remove-position
-[codecov-badge]: https://img.shields.io/codecov/c/github/syntax-tree/unist-util-remove-position.svg
+[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
-[codecov]: https://codecov.io/github/syntax-tree/unist-util-remove-position
+[backers-badge]: https://opencollective.com/unified/backers/badge.svg
+
+[collective]: https://opencollective.com/unified
+
+[chat-badge]: https://img.shields.io/badge/join%20the%20community-on%20spectrum-7b16ff.svg
+
+[chat]: https://spectrum.chat/unified/syntax-tree
[npm]: https://docs.npmjs.com/cli/install
-[license]: LICENSE
+[license]: license
+
+[author]: https://wooorm.com
-[author]: http://wooorm.com
+[contributing]: https://github.com/syntax-tree/.github/blob/master/contributing.md
+
+[support]: https://github.com/syntax-tree/.github/blob/master/support.md
+
+[coc]: https://github.com/syntax-tree/.github/blob/master/code-of-conduct.md
[unist]: https://github.com/syntax-tree/unist
[position]: https://github.com/syntax-tree/unist#position
[node]: https://github.com/syntax-tree/unist#node
-
-[contributing]: https://github.com/syntax-tree/unist/blob/master/contributing.md
-
-[coc]: https://github.com/syntax-tree/unist/blob/master/code-of-conduct.md
diff --git a/tools/node_modules/eslint/node_modules/unist-util-visit-parents/index.js b/tools/node_modules/eslint/node_modules/unist-util-visit-parents/index.js
index 39e5b9bafec08e..1f2270f6c99d28 100644
--- a/tools/node_modules/eslint/node_modules/unist-util-visit-parents/index.js
+++ b/tools/node_modules/eslint/node_modules/unist-util-visit-parents/index.js
@@ -23,18 +23,20 @@ function visitParents(tree, test, visitor, reverse) {
// Visit a single node.
function one(node, index, parents) {
- var result
+ var result = []
+ var subresult
if (!test || is(test, node, index, parents[parents.length - 1] || null)) {
- result = visitor(node, parents)
+ result = toResult(visitor(node, parents))
- if (result === EXIT) {
+ if (result[0] === EXIT) {
return result
}
}
- if (node.children && result !== SKIP) {
- return all(node.children, parents.concat(node)) === EXIT ? EXIT : result
+ if (node.children && result[0] !== SKIP) {
+ subresult = toResult(all(node.children, parents.concat(node)))
+ return subresult[0] === EXIT ? subresult : result
}
return result
@@ -45,18 +47,28 @@ function visitParents(tree, test, visitor, reverse) {
var min = -1
var step = reverse ? -1 : 1
var index = (reverse ? children.length : min) + step
- var child
var result
while (index > min && index < children.length) {
- child = children[index]
- result = child && one(child, index, parents)
+ result = one(children[index], index, parents)
- if (result === EXIT) {
+ if (result[0] === EXIT) {
return result
}
- index = typeof result === 'number' ? result : index + step
+ index = typeof result[1] === 'number' ? result[1] : index + step
}
}
}
+
+function toResult(value) {
+ if (value !== null && typeof value === 'object' && 'length' in value) {
+ return value
+ }
+
+ if (typeof value === 'number') {
+ return [CONTINUE, value]
+ }
+
+ return [value]
+}
diff --git a/tools/node_modules/eslint/node_modules/unist-util-visit-parents/LICENSE b/tools/node_modules/eslint/node_modules/unist-util-visit-parents/license
similarity index 100%
rename from tools/node_modules/eslint/node_modules/unist-util-visit-parents/LICENSE
rename to tools/node_modules/eslint/node_modules/unist-util-visit-parents/license
diff --git a/tools/node_modules/eslint/node_modules/unist-util-visit-parents/package.json b/tools/node_modules/eslint/node_modules/unist-util-visit-parents/package.json
index 777057ad57fd2d..bd8d72f2d4a174 100644
--- a/tools/node_modules/eslint/node_modules/unist-util-visit-parents/package.json
+++ b/tools/node_modules/eslint/node_modules/unist-util-visit-parents/package.json
@@ -2,7 +2,7 @@
"author": {
"name": "Titus Wormer",
"email": "tituswormer@gmail.com",
- "url": "http://wooorm.com"
+ "url": "https://wooorm.com"
},
"bugs": {
"url": "https://github.com/syntax-tree/unist-util-visit-parents/issues"
@@ -12,7 +12,7 @@
{
"name": "Titus Wormer",
"email": "tituswormer@gmail.com",
- "url": "http://wooorm.com"
+ "url": "https://wooorm.com"
}
],
"dependencies": {
@@ -22,14 +22,14 @@
"description": "Recursively walk over unist nodes, with ancestral information",
"devDependencies": {
"browserify": "^16.0.0",
- "nyc": "^12.0.0",
- "prettier": "^1.12.1",
- "remark": "^9.0.0",
- "remark-cli": "^5.0.0",
- "remark-preset-wooorm": "^4.0.0",
- "tape": "^4.5.1",
- "tinyify": "^2.4.3",
- "xo": "^0.21.0"
+ "nyc": "^14.0.0",
+ "prettier": "^1.0.0",
+ "remark": "^10.0.0",
+ "remark-cli": "^6.0.0",
+ "remark-preset-wooorm": "^5.0.0",
+ "tape": "^4.0.0",
+ "tinyify": "^2.0.0",
+ "xo": "^0.24.0"
},
"files": [
"index.js"
@@ -70,20 +70,15 @@
"build": "npm run build-bundle && npm run build-mangle",
"build-bundle": "browserify index.js -s unistUtilVisitParents > unist-util-visit-parents.js",
"build-mangle": "browserify index.js -s unistUtilVisitParents -p tinyify > unist-util-visit-parents.min.js",
- "format": "remark . -qfo && prettier --write '**/*.js' && xo --fix",
+ "format": "remark . -qfo && prettier --write \"**/*.js\" && xo --fix",
"test": "npm run format && npm run build && npm run test-coverage",
"test-api": "node test",
"test-coverage": "nyc --reporter lcov tape test.js"
},
- "version": "2.0.1",
+ "version": "2.1.1",
"xo": {
"prettier": true,
"esnext": false,
- "rules": {
- "guard-for-in": "off",
- "no-var": "off",
- "prefer-arrow-callback": "off"
- },
"ignores": [
"unist-util-visit-parents.js"
]
diff --git a/tools/node_modules/eslint/node_modules/unist-util-visit-parents/readme.md b/tools/node_modules/eslint/node_modules/unist-util-visit-parents/readme.md
index 02ad0a1d726824..ec7efc7bd03402 100644
--- a/tools/node_modules/eslint/node_modules/unist-util-visit-parents/readme.md
+++ b/tools/node_modules/eslint/node_modules/unist-util-visit-parents/readme.md
@@ -1,18 +1,26 @@
-# unist-util-visit-parents [![Build Status][build-badge]][build-page] [![Coverage Status][coverage-badge]][coverage-page]
+# unist-util-visit-parents
-[Unist][] node visitor, with ancestral information.
+[![Build][build-badge]][build]
+[![Coverage][coverage-badge]][coverage]
+[![Downloads][downloads-badge]][downloads]
+[![Size][size-badge]][size]
+[![Sponsors][sponsors-badge]][collective]
+[![Backers][backers-badge]][collective]
+[![Chat][chat-badge]][chat]
-## Installation
+[**unist**][unist] utility to visit nodes, with ancestral information.
+
+## Install
[npm][]:
-```bash
+```sh
npm install unist-util-visit-parents
```
## Usage
-```javascript
+```js
var remark = require('remark')
var visit = require('unist-util-visit-parents')
@@ -49,9 +57,9 @@ ancestral information. Optionally filtering nodes. Optionally in reverse.
###### Parameters
-* `tree` ([`Node`][node]) — Tree to traverse
+* `tree` ([`Node`][node]) — [Tree][] to traverse
* `test` ([`Test`][is], optional) — [`is`][is]-compatible test (such as a
- node type)
+ [type][])
* `visitor` ([Function][visitor]) — Function invoked when a node is found
that passes `test`
* `reverse` (`boolean`, default: `false`) — The tree is walked in [preorder][]
@@ -80,20 +88,36 @@ traversed.
* `node` ([`Node`][node]) — Found node
* `ancestors` (`Array.`) — [Ancestor][]s of `node`
-###### Returns
+##### Returns
+
+The return value can have the following forms:
+
+* [`index`][index] (`number`) — Treated as a tuple of `[CONTINUE, index]`
+* `action` (`*`) — Treated as a tuple of `[action]`
+* `tuple` (`Array.<*>`) — List with one or two values, the first an `action`,
+ the second and `index`.
+ Note that passing a tuple only makes sense if the `action` is `SKIP`.
+ If the `action` is `EXIT`, that action can be returned.
+ If the `action` is `CONTINUE`, `index` can be returned.
+
+###### `action`
+
+An action can have the following values:
* `visit.EXIT` (`false`) — Stop traversing immediately
* `visit.CONTINUE` (`true`) — Continue traversing as normal (same behaviour
as not returning anything)
* `visit.SKIP` (`'skip'`) — Do not traverse this node’s children; continue
- with the next sibling
-* [`index`][index] (`number`) — Move to the sibling at `index` next (after
- `node` itself is completely traversed).
- Useful if mutating the tree, such as removing the node the visitor is
- currently on, or any of its previous siblings (or next siblings, in case of
- `reverse`)
- Results less than `0` or greater than or equal to `children.length` stop
- traversing the parent
+ with the specified index
+
+###### `index`
+
+[`index`][index] (`number`) — Move to the sibling at `index` next (after `node`
+itself is completely traversed).
+Useful if mutating the tree, such as removing the node the visitor is currently
+on, or any of its previous siblings (or next siblings, in case of `reverse`)
+Results less than `0` or greater than or equal to `children.length` stop
+traversing the parent
## Related
@@ -113,11 +137,13 @@ traversed.
## Contribute
-See [`contributing.md` in `syntax-tree/unist`][contributing] for ways to get
+See [`contributing.md` in `syntax-tree/.github`][contributing] for ways to get
started.
+See [`support.md`][support] for ways to get help.
-This organisation has a [Code of Conduct][coc]. By interacting with this
-repository, organisation, or community you agree to abide by its terms.
+This project has a [Code of Conduct][coc].
+By interacting with this repository, organisation, or community you agree to
+abide by its terms.
## License
@@ -127,17 +153,35 @@ repository, organisation, or community you agree to abide by its terms.
[build-badge]: https://img.shields.io/travis/syntax-tree/unist-util-visit-parents.svg
-[build-page]: https://travis-ci.org/syntax-tree/unist-util-visit-parents
+[build]: https://travis-ci.org/syntax-tree/unist-util-visit-parents
[coverage-badge]: https://img.shields.io/codecov/c/github/syntax-tree/unist-util-visit-parents.svg
-[coverage-page]: https://codecov.io/github/syntax-tree/unist-util-visit-parents?branch=master
+[coverage]: https://codecov.io/github/syntax-tree/unist-util-visit-parents
+
+[downloads-badge]: https://img.shields.io/npm/dm/unist-util-visit-parents.svg
+
+[downloads]: https://www.npmjs.com/package/unist-util-visit-parents
+
+[size-badge]: https://img.shields.io/bundlephobia/minzip/unist-util-visit-parents.svg
+
+[size]: https://bundlephobia.com/result?p=unist-util-visit-parents
+
+[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
+
+[backers-badge]: https://opencollective.com/unified/backers/badge.svg
+
+[collective]: https://opencollective.com/unified
+
+[chat-badge]: https://img.shields.io/badge/join%20the%20community-on%20spectrum-7b16ff.svg
+
+[chat]: https://spectrum.chat/unified/syntax-tree
[npm]: https://docs.npmjs.com/cli/install
-[license]: LICENSE
+[license]: license
-[author]: http://wooorm.com
+[author]: https://wooorm.com
[unist]: https://github.com/syntax-tree/unist
@@ -145,9 +189,11 @@ repository, organisation, or community you agree to abide by its terms.
[visitor]: #next--visitornode-ancestors
-[contributing]: https://github.com/syntax-tree/unist/blob/master/contributing.md
+[contributing]: https://github.com/syntax-tree/.github/blob/master/contributing.md
-[coc]: https://github.com/syntax-tree/unist/blob/master/code-of-conduct.md
+[support]: https://github.com/syntax-tree/.github/blob/master/support.md
+
+[coc]: https://github.com/syntax-tree/.github/blob/master/code-of-conduct.md
[is]: https://github.com/syntax-tree/unist-util-is
@@ -168,3 +214,5 @@ repository, organisation, or community you agree to abide by its terms.
[ancestor]: https://github.com/syntax-tree/unist#ancestor
[tree]: https://github.com/syntax-tree/unist#tree
+
+[type]: https://github.com/syntax-tree/unist#type
diff --git a/tools/node_modules/eslint/node_modules/unist-util-is/LICENSE b/tools/node_modules/eslint/node_modules/unist-util-visit/license
similarity index 100%
rename from tools/node_modules/eslint/node_modules/unist-util-is/LICENSE
rename to tools/node_modules/eslint/node_modules/unist-util-visit/license
diff --git a/tools/node_modules/eslint/node_modules/unist-util-visit/package.json b/tools/node_modules/eslint/node_modules/unist-util-visit/package.json
index f420edafd25e0b..a0ef4a3cc172d3 100644
--- a/tools/node_modules/eslint/node_modules/unist-util-visit/package.json
+++ b/tools/node_modules/eslint/node_modules/unist-util-visit/package.json
@@ -2,7 +2,7 @@
"author": {
"name": "Titus Wormer",
"email": "tituswormer@gmail.com",
- "url": "http://wooorm.com"
+ "url": "https://wooorm.com"
},
"bugs": {
"url": "https://github.com/syntax-tree/unist-util-visit/issues"
@@ -12,7 +12,7 @@
{
"name": "Titus Wormer",
"email": "tituswormer@gmail.com",
- "url": "http://wooorm.com"
+ "url": "https://wooorm.com"
},
{
"name": "Eugene Sharygin",
@@ -30,14 +30,14 @@
"description": "Recursively walk over unist nodes",
"devDependencies": {
"browserify": "^16.0.0",
- "nyc": "^12.0.0",
- "prettier": "^1.12.1",
- "remark": "^9.0.0",
- "remark-cli": "^5.0.0",
- "remark-preset-wooorm": "^4.0.0",
- "tape": "^4.5.1",
- "tinyify": "^2.4.3",
- "xo": "^0.21.0"
+ "nyc": "^14.0.0",
+ "prettier": "^1.0.0",
+ "remark": "^10.0.0",
+ "remark-cli": "^6.0.0",
+ "remark-preset-wooorm": "^5.0.0",
+ "tape": "^4.0.0",
+ "tinyify": "^2.0.0",
+ "xo": "^0.24.0"
},
"files": [
"index.js"
@@ -85,20 +85,15 @@
"build": "npm run build-bundle && npm run build-mangle",
"build-bundle": "browserify . -s unistUtilVisit > unist-util-visit.js",
"build-mangle": "browserify . -s unistUtilVisit -p tinyify > unist-util-visit.min.js",
- "format": "remark . -qfo && prettier --write '**/*.js' && xo --fix",
+ "format": "remark . -qfo && prettier --write \"**/*.js\" && xo --fix",
"test": "npm run format && npm run build && npm run test-coverage",
"test-api": "node test",
"test-coverage": "nyc --reporter lcov tape test.js"
},
- "version": "1.4.0",
+ "version": "1.4.1",
"xo": {
"prettier": true,
"esnext": false,
- "rules": {
- "guard-for-in": "off",
- "no-var": "off",
- "prefer-arrow-callback": "off"
- },
"ignores": [
"unist-util-visit.js"
]
diff --git a/tools/node_modules/eslint/node_modules/unist-util-visit/readme.md b/tools/node_modules/eslint/node_modules/unist-util-visit/readme.md
index 36fa46e3efa6a6..25808a27a543e5 100644
--- a/tools/node_modules/eslint/node_modules/unist-util-visit/readme.md
+++ b/tools/node_modules/eslint/node_modules/unist-util-visit/readme.md
@@ -1,9 +1,13 @@
-# unist-util-visit [![Build Status][build-badge]][build-page] [![Coverage Status][coverage-badge]][coverage-page]
+# unist-util-visit
-[unist][] node visitor. Useful when working with [**remark**][remark],
-[**retext**][retext], or [**rehype**][rehype].
+[![Build][build-badge]][build]
+[![Coverage][coverage-badge]][coverage]
+[![Downloads][downloads-badge]][downloads]
+[![Size][size-badge]][size]
-## Installation
+[**unist**][unist] utility to visit nodes.
+
+## Install
[npm][]:
@@ -14,27 +18,27 @@ npm install unist-util-visit
## Usage
```javascript
-var remark = require('remark')
+var u = require('unist-builder')
var visit = require('unist-util-visit')
-var tree = remark().parse('Some _emphasis_, **importance**, and `code`.')
-
-visit(tree, 'text', visitor)
+var tree = u('tree', [
+ u('leaf', '1'),
+ u('node', [u('leaf', '2')]),
+ u('void'),
+ u('leaf', '3')
+])
-function visitor(node) {
+visit(tree, 'leaf', function(node) {
console.log(node)
-}
+})
```
Yields:
```js
-{type: 'text', value: 'Some '}
-{type: 'text', value: 'emphasis'}
-{type: 'text', value: ', '}
-{type: 'text', value: 'importance'}
-{type: 'text', value: ', and '}
-{type: 'text', value: '.'}
+{ type: 'leaf', value: '1' }
+{ type: 'leaf', value: '2' }
+{ type: 'leaf', value: '3' }
```
## API
@@ -66,11 +70,13 @@ Otherwise the same as [`unist-util-visit-parents`][vp].
## Contribute
-See [`contributing.md` in `syntax-tree/unist`][contributing] for ways to get
+See [`contributing.md` in `syntax-tree/.github`][contributing] for ways to get
started.
+See [`support.md`][support] for ways to get help.
-This organisation has a [Code of Conduct][coc]. By interacting with this
-repository, organisation, or community you agree to abide by its terms.
+This project has a [Code of Conduct][coc].
+By interacting with this repository, organisation, or community you agree to
+abide by its terms.
## License
@@ -80,29 +86,33 @@ repository, organisation, or community you agree to abide by its terms.
[build-badge]: https://img.shields.io/travis/syntax-tree/unist-util-visit.svg
-[build-page]: https://travis-ci.org/syntax-tree/unist-util-visit
+[build]: https://travis-ci.org/syntax-tree/unist-util-visit
[coverage-badge]: https://img.shields.io/codecov/c/github/syntax-tree/unist-util-visit.svg
-[coverage-page]: https://codecov.io/github/syntax-tree/unist-util-visit?branch=master
+[coverage]: https://codecov.io/github/syntax-tree/unist-util-visit
-[npm]: https://docs.npmjs.com/cli/install
+[downloads-badge]: https://img.shields.io/npm/dm/unist-util-visit.svg
-[license]: LICENSE
+[downloads]: https://www.npmjs.com/package/unist-util-visit
-[author]: http://wooorm.com
+[size-badge]: https://img.shields.io/bundlephobia/minzip/unist-util-visit.svg
-[unist]: https://github.com/syntax-tree/unist
+[size]: https://bundlephobia.com/result?p=unist-util-visit
-[retext]: https://github.com/retextjs/retext
+[npm]: https://docs.npmjs.com/cli/install
+
+[license]: license
-[remark]: https://github.com/remarkjs/remark
+[author]: https://wooorm.com
-[rehype]: https://github.com/rehypejs/rehype
+[contributing]: https://github.com/syntax-tree/.github/blob/master/contributing.md
-[contributing]: https://github.com/syntax-tree/unist/blob/master/contributing.md
+[support]: https://github.com/syntax-tree/.github/blob/master/support.md
-[coc]: https://github.com/syntax-tree/unist/blob/master/code-of-conduct.md
+[coc]: https://github.com/syntax-tree/.github/blob/master/code-of-conduct.md
+
+[unist]: https://github.com/syntax-tree/unist
[vp]: https://github.com/syntax-tree/unist-util-visit-parents
diff --git a/tools/node_modules/eslint/node_modules/vfile-location/LICENSE b/tools/node_modules/eslint/node_modules/vfile-location/license
similarity index 100%
rename from tools/node_modules/eslint/node_modules/vfile-location/LICENSE
rename to tools/node_modules/eslint/node_modules/vfile-location/license
diff --git a/tools/node_modules/eslint/node_modules/vfile-message/LICENSE b/tools/node_modules/eslint/node_modules/vfile-message/license
similarity index 100%
rename from tools/node_modules/eslint/node_modules/vfile-message/LICENSE
rename to tools/node_modules/eslint/node_modules/vfile-message/license
diff --git a/tools/node_modules/eslint/package.json b/tools/node_modules/eslint/package.json
index 92267e9c4bfd21..68df20c7687b9f 100644
--- a/tools/node_modules/eslint/package.json
+++ b/tools/node_modules/eslint/package.json
@@ -12,7 +12,7 @@
"bundleDependencies": false,
"dependencies": {
"@babel/code-frame": "^7.0.0",
- "ajv": "^6.9.1",
+ "ajv": "^6.10.0",
"chalk": "^2.1.0",
"cross-spawn": "^6.0.5",
"debug": "^4.0.1",
@@ -21,18 +21,19 @@
"eslint-scope": "^4.0.3",
"eslint-utils": "^1.3.1",
"eslint-visitor-keys": "^1.0.0",
- "espree": "^5.0.1",
+ "espree": "^6.0.0-alpha.0",
"esquery": "^1.0.1",
"esutils": "^2.0.2",
"file-entry-cache": "^5.0.1",
"functional-red-black-tree": "^1.0.1",
- "glob": "^7.1.2",
+ "glob-parent": "^3.1.0",
"globals": "^11.7.0",
"ignore": "^4.0.6",
"import-fresh": "^3.0.0",
"imurmurhash": "^0.1.4",
"inquirer": "^6.2.2",
- "js-yaml": "^3.13.0",
+ "is-glob": "^4.0.0",
+ "js-yaml": "^3.13.1",
"json-stable-stringify-without-jsonify": "^1.0.1",
"levn": "^0.3.0",
"lodash": "^4.17.11",
@@ -40,7 +41,6 @@
"mkdirp": "^0.5.1",
"natural-compare": "^1.4.0",
"optionator": "^0.8.2",
- "path-is-inside": "^1.0.2",
"progress": "^2.0.0",
"regexpp": "^2.0.1",
"semver": "^5.5.1",
@@ -52,49 +52,56 @@
"deprecated": false,
"description": "An AST-based pattern checker for JavaScript.",
"devDependencies": {
- "@babel/core": "^7.2.2",
- "@babel/polyfill": "^7.2.5",
- "@babel/preset-env": "^7.3.1",
+ "@babel/core": "^7.4.3",
+ "@babel/polyfill": "^7.4.3",
+ "@babel/preset-env": "^7.4.3",
+ "acorn": "^6.1.1",
"babel-loader": "^8.0.5",
"beefy": "^2.1.8",
- "brfs": "^2.0.0",
+ "brfs": "^2.0.2",
"chai": "^4.0.1",
"cheerio": "^0.22.0",
"common-tags": "^1.8.0",
- "coveralls": "^3.0.1",
+ "coveralls": "^3.0.3",
"dateformat": "^3.0.3",
"ejs": "^2.6.1",
+ "eslint": "file:.",
"eslint-config-eslint": "file:packages/eslint-config-eslint",
"eslint-plugin-eslint-plugin": "^2.0.1",
"eslint-plugin-internal-rules": "file:tools/internal-rules",
- "eslint-plugin-node": "^8.0.0",
+ "eslint-plugin-node": "^9.0.0",
"eslint-release": "^1.2.0",
"eslump": "^2.0.0",
"esprima": "^4.0.1",
+ "glob": "^7.1.3",
"jsdoc": "^3.5.5",
- "karma": "^3.1.4",
+ "karma": "^4.0.1",
"karma-chrome-launcher": "^2.2.0",
"karma-mocha": "^1.3.0",
"karma-mocha-reporter": "^2.2.3",
"karma-webpack": "^4.0.0-rc.6",
"leche": "^2.2.3",
+ "lint-staged": "^8.1.5",
"load-perf": "^0.2.0",
- "markdownlint": "^0.12.0",
- "mocha": "^5.0.5",
- "mock-fs": "^4.8.0",
+ "markdownlint": "^0.13.0",
+ "markdownlint-cli": "^0.15.0",
+ "metro-memory-fs": "^0.53.1",
+ "mocha": "^6.1.2",
"npm-license": "^0.3.3",
"nyc": "^13.3.0",
"proxyquire": "^2.0.1",
- "puppeteer": "^1.12.2",
+ "puppeteer": "^1.14.0",
+ "recast": "^0.17.6",
"shelljs": "^0.8.2",
"sinon": "^3.3.0",
"temp": "^0.9.0",
"through": "^2.3.8",
- "webpack": "^4.29.3",
- "webpack-cli": "^3.2.3"
+ "webpack": "^4.29.6",
+ "webpack-cli": "^3.3.0",
+ "yorkie": "^2.0.0"
},
"engines": {
- "node": "^6.14.0 || ^8.10.0 || >=9.10.0"
+ "node": "^8.10.0 || ^10.13.0 || >=11.10.1"
},
"files": [
"LICENSE",
@@ -104,6 +111,9 @@
"lib",
"messages"
],
+ "gitHooks": {
+ "pre-commit": "lint-staged"
+ },
"homepage": "https://eslint.org",
"keywords": [
"ast",
@@ -113,6 +123,13 @@
"espree"
],
"license": "MIT",
+ "lint-staged": {
+ "*.js": [
+ "eslint --fix",
+ "git add"
+ ],
+ "*.md": "markdownlint"
+ },
"main": "./lib/api.js",
"name": "eslint",
"repository": {
@@ -135,5 +152,5 @@
"test": "node Makefile.js test",
"webpack": "node Makefile.js webpack"
},
- "version": "5.16.0"
+ "version": "6.0.0-alpha.2"
}
\ No newline at end of file
diff --git a/tools/update-eslint.sh b/tools/update-eslint.sh
index f877c0a9e48259..ca1e3299b520a2 100755
--- a/tools/update-eslint.sh
+++ b/tools/update-eslint.sh
@@ -13,7 +13,7 @@ mkdir eslint-tmp
cd eslint-tmp
npm init --yes
-npm install --global-style --no-bin-links --production --no-package-lock eslint@latest
+npm install --global-style --no-bin-links --production --no-package-lock eslint@next
cd node_modules/eslint
npm install --no-bin-links --production --no-package-lock eslint-plugin-markdown@latest