Skip to content

Commit 68520ca

Browse files
committed
Set version to 2021.06.02-0
1 parent d45d89c commit 68520ca

10 files changed

+659
-359
lines changed

CHANGES.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog #
22

3+
## Version 2021.06.02-0 ##
4+
5+
- Update bundled rxjs to 7.1.0
6+
- Add missing ^js metadata.
7+
8+
39
## Version 2021.04.29-0 ##
410

511
- Add the ability to pass config to `throttle`.

assets/rxjs/rxjs.main.bundle.js

+82-38
Original file line numberDiff line numberDiff line change
@@ -162,23 +162,26 @@ function __asyncValues(o) {
162162
if (!this.closed) {
163163
this.closed = true;
164164
var _parentage = this._parentage;
165-
if (Array.isArray(_parentage)) {
166-
try {
167-
for (var _parentage_1 = __values(_parentage), _parentage_1_1 = _parentage_1.next(); !_parentage_1_1.done; _parentage_1_1 = _parentage_1.next()) {
168-
var parent_1 = _parentage_1_1.value;
169-
parent_1.remove(this);
170-
}
171-
}
172-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
173-
finally {
165+
if (_parentage) {
166+
this._parentage = null;
167+
if (Array.isArray(_parentage)) {
174168
try {
175-
if (_parentage_1_1 && !_parentage_1_1.done && (_a = _parentage_1.return)) _a.call(_parentage_1);
169+
for (var _parentage_1 = __values(_parentage), _parentage_1_1 = _parentage_1.next(); !_parentage_1_1.done; _parentage_1_1 = _parentage_1.next()) {
170+
var parent_1 = _parentage_1_1.value;
171+
parent_1.remove(this);
172+
}
173+
}
174+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
175+
finally {
176+
try {
177+
if (_parentage_1_1 && !_parentage_1_1.done && (_a = _parentage_1.return)) _a.call(_parentage_1);
178+
}
179+
finally { if (e_1) throw e_1.error; }
176180
}
177-
finally { if (e_1) throw e_1.error; }
178181
}
179-
}
180-
else {
181-
_parentage === null || _parentage === void 0 ? void 0 : _parentage.remove(this);
182+
else {
183+
_parentage.remove(this);
184+
}
182185
}
183186
var initialTeardown = this.initialTeardown;
184187
if (isFunction(initialTeardown)) {
@@ -496,26 +499,50 @@ function pipeFromArray(fns) {
496499
};
497500
Observable.prototype.subscribe = function (observerOrNext, error, complete) {
498501
var subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete);
499-
var _a = this, operator = _a.operator, source = _a.source;
500-
var dest = subscriber;
501502
if (config.useDeprecatedSynchronousErrorHandling) {
502-
dest._syncErrorHack_isSubscribing = true;
503+
this._deprecatedSyncErrorSubscribe(subscriber);
503504
}
504-
subscriber.add(operator
505-
? operator.call(subscriber, source)
506-
: source || config.useDeprecatedSynchronousErrorHandling
507-
? this._subscribe(subscriber)
508-
: this._trySubscribe(subscriber));
509-
if (config.useDeprecatedSynchronousErrorHandling) {
510-
dest._syncErrorHack_isSubscribing = false;
511-
while (dest) {
512-
if (dest.__syncError) {
505+
else {
506+
var _a = this, operator = _a.operator, source = _a.source;
507+
subscriber.add(operator
508+
?
509+
operator.call(subscriber, source)
510+
: source
511+
?
512+
this._subscribe(subscriber)
513+
:
514+
this._trySubscribe(subscriber));
515+
}
516+
return subscriber;
517+
};
518+
Observable.prototype._deprecatedSyncErrorSubscribe = function (subscriber) {
519+
var localSubscriber = subscriber;
520+
localSubscriber._syncErrorHack_isSubscribing = true;
521+
var operator = this.operator;
522+
if (operator) {
523+
subscriber.add(operator.call(subscriber, this.source));
524+
}
525+
else {
526+
try {
527+
subscriber.add(this._subscribe(subscriber));
528+
}
529+
catch (err) {
530+
localSubscriber.__syncError = err;
531+
}
532+
}
533+
var dest = localSubscriber;
534+
while (dest) {
535+
if ('__syncError' in dest) {
536+
try {
513537
throw dest.__syncError;
514538
}
515-
dest = dest.destination;
539+
finally {
540+
subscriber.unsubscribe();
541+
}
516542
}
543+
dest = dest.destination;
517544
}
518-
return subscriber;
545+
localSubscriber._syncErrorHack_isSubscribing = false;
519546
};
520547
Observable.prototype._trySubscribe = function (sink) {
521548
try {
@@ -845,6 +872,14 @@ var DEFAULT_ANIMATION_FRAMES = animationFramesFactory();var ObjectUnsubscribedEr
845872
this.isStopped = this.closed = true;
846873
this.observers = null;
847874
};
875+
Object.defineProperty(Subject.prototype, "observed", {
876+
get: function () {
877+
var _a;
878+
return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0;
879+
},
880+
enumerable: false,
881+
configurable: true
882+
});
848883
Subject.prototype._trySubscribe = function (subscriber) {
849884
this._throwIfClosed();
850885
return _super.prototype._trySubscribe.call(this, subscriber);
@@ -1376,12 +1411,12 @@ var animationFrame = animationFrameScheduler;var VirtualTimeScheduler = (functio
13761411
while ((action = actions[0]) && action.delay <= maxFrames) {
13771412
actions.shift();
13781413
this.frame = action.delay;
1379-
if (error = action.execute(action.state, action.delay)) {
1414+
if ((error = action.execute(action.state, action.delay))) {
13801415
break;
13811416
}
13821417
}
13831418
if (error) {
1384-
while (action = actions.shift()) {
1419+
while ((action = actions.shift())) {
13851420
action.unsubscribe();
13861421
}
13871422
throw error;
@@ -1393,7 +1428,7 @@ var animationFrame = animationFrameScheduler;var VirtualTimeScheduler = (functio
13931428
var VirtualAction = (function (_super) {
13941429
__extends(VirtualAction, _super);
13951430
function VirtualAction(scheduler, work, index) {
1396-
if (index === void 0) { index = scheduler.index += 1; }
1431+
if (index === void 0) { index = (scheduler.index += 1); }
13971432
var _this = _super.call(this, scheduler, work) || this;
13981433
_this.scheduler = scheduler;
13991434
_this.work = work;
@@ -1819,7 +1854,7 @@ var Notification = (function () {
18191854
:
18201855
kind === 'E'
18211856
?
1822-
throwError(error)
1857+
throwError(function () { return error; })
18231858
:
18241859
kind === 'C'
18251860
?
@@ -1979,13 +2014,13 @@ function mapOneOrManyArgs(fn) {
19792014
.pipe(subscribeOn(scheduler), observeOn(scheduler));
19802015
};
19812016
}
1982-
var subject = new AsyncSubject();
19832017
return function () {
19842018
var _this = this;
19852019
var args = [];
19862020
for (var _i = 0; _i < arguments.length; _i++) {
19872021
args[_i] = arguments[_i];
19882022
}
2023+
var subject = new AsyncSubject();
19892024
var uninitialized = true;
19902025
return new Observable(function (subscriber) {
19912026
var subs = subject.subscribe(subscriber);
@@ -2181,15 +2216,24 @@ function maybeSchedule(scheduler, execute, subscription) {
21812216
return new Observable(function (subscriber) {
21822217
innerFrom(observableFactory()).subscribe(subscriber);
21832218
});
2184-
}function connectable(source, connector) {
2185-
if (connector === void 0) { connector = new Subject(); }
2219+
}var DEFAULT_CONFIG = {
2220+
connector: function () { return new Subject(); },
2221+
resetOnDisconnect: true,
2222+
};
2223+
function connectable(source, config) {
2224+
if (config === void 0) { config = DEFAULT_CONFIG; }
21862225
var connection = null;
2226+
var connector = config.connector, _a = config.resetOnDisconnect, resetOnDisconnect = _a === void 0 ? true : _a;
2227+
var subject = connector();
21872228
var result = new Observable(function (subscriber) {
2188-
return connector.subscribe(subscriber);
2229+
return subject.subscribe(subscriber);
21892230
});
21902231
result.connect = function () {
2191-
if (!connection) {
2192-
connection = defer(function () { return source; }).subscribe(connector);
2232+
if (!connection || connection.closed) {
2233+
connection = defer(function () { return source; }).subscribe(subject);
2234+
if (resetOnDisconnect) {
2235+
connection.add(function () { return (subject = connector()); });
2236+
}
21932237
}
21942238
return connection;
21952239
};

assets/rxjs/rxjs.main.bundle.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)