@apollo/client 3.8.3 → 3.8.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -6
- package/apollo-client.cjs +57 -73
- package/apollo-client.cjs.map +1 -1
- package/apollo-client.min.cjs +1 -1
- package/config/jest/setup.js +10 -0
- package/config/jest/setup.js.map +1 -1
- package/core/ObservableQuery.d.ts.map +1 -1
- package/core/ObservableQuery.js +5 -6
- package/core/ObservableQuery.js.map +1 -1
- package/core/QueryInfo.d.ts +0 -2
- package/core/QueryInfo.d.ts.map +1 -1
- package/core/QueryInfo.js +0 -2
- package/core/QueryInfo.js.map +1 -1
- package/core/QueryManager.d.ts +1 -1
- package/core/QueryManager.d.ts.map +1 -1
- package/core/QueryManager.js +2 -2
- package/core/QueryManager.js.map +1 -1
- package/core/core.cjs +8 -11
- package/core/core.cjs.map +1 -1
- package/core/core.cjs.native.js +8 -11
- package/dev/dev.cjs +30 -16
- package/dev/dev.cjs.map +1 -1
- package/dev/dev.cjs.native.js +30 -16
- package/dev/loadErrorMessageHandler.js +1 -1
- package/dev/loadErrorMessageHandler.js.map +1 -1
- package/package.json +30 -23
- package/react/cache/index.d.ts +0 -4
- package/react/cache/index.d.ts.map +1 -1
- package/react/cache/index.js +0 -14
- package/react/cache/index.js.map +1 -1
- package/react/index.d.ts +0 -1
- package/react/index.d.ts.map +1 -1
- package/react/index.js +0 -1
- package/react/index.js.map +1 -1
- package/react/react.cjs +1 -218
- package/react/react.cjs.map +1 -1
- package/react/react.cjs.native.js +1 -218
- package/react/types/types.d.ts +0 -3
- package/react/types/types.d.ts.map +1 -1
- package/react/types/types.js.map +1 -1
- package/testing/core/withConsoleSpy.d.ts.map +1 -1
- package/testing/core/withConsoleSpy.js.map +1 -1
- package/testing/internal/ObservableStream.d.ts +26 -0
- package/testing/internal/ObservableStream.d.ts.map +1 -0
- package/testing/internal/ObservableStream.js +101 -0
- package/testing/internal/ObservableStream.js.map +1 -0
- package/testing/internal/disposables/index.d.ts +3 -0
- package/testing/internal/disposables/index.d.ts.map +1 -0
- package/testing/internal/disposables/index.js +3 -0
- package/testing/internal/disposables/index.js.map +1 -0
- package/testing/internal/disposables/spyOnConsole.d.ts +10 -0
- package/testing/internal/disposables/spyOnConsole.d.ts.map +1 -0
- package/testing/internal/disposables/spyOnConsole.js +33 -0
- package/testing/internal/disposables/spyOnConsole.js.map +1 -0
- package/testing/internal/disposables/withCleanup.d.ts +3 -0
- package/testing/internal/disposables/withCleanup.d.ts.map +1 -0
- package/testing/internal/disposables/withCleanup.js +11 -0
- package/testing/internal/disposables/withCleanup.js.map +1 -0
- package/testing/internal/index.d.ts +4 -0
- package/testing/internal/index.d.ts.map +1 -0
- package/testing/internal/index.js +4 -0
- package/testing/internal/index.js.map +1 -0
- package/testing/internal/profile/Render.d.ts +140 -0
- package/testing/internal/profile/Render.d.ts.map +1 -0
- package/testing/internal/profile/Render.js +132 -0
- package/testing/internal/profile/Render.js.map +1 -0
- package/testing/internal/profile/index.d.ts +4 -0
- package/testing/internal/profile/index.d.ts.map +1 -0
- package/testing/internal/profile/index.js +2 -0
- package/testing/internal/profile/index.js.map +1 -0
- package/testing/internal/profile/profile.d.ts +55 -0
- package/testing/internal/profile/profile.d.ts.map +1 -0
- package/testing/internal/profile/profile.js +222 -0
- package/testing/internal/profile/profile.js.map +1 -0
- package/testing/internal/profile/traces.d.ts +3 -0
- package/testing/internal/profile/traces.d.ts.map +1 -0
- package/testing/internal/profile/traces.js +26 -0
- package/testing/internal/profile/traces.js.map +1 -0
- package/testing/matchers/ProfiledComponent.d.ts +8 -0
- package/testing/matchers/ProfiledComponent.d.ts.map +1 -0
- package/testing/matchers/ProfiledComponent.js +107 -0
- package/testing/matchers/ProfiledComponent.js.map +1 -0
- package/testing/matchers/index.js +3 -0
- package/testing/matchers/index.js.map +1 -1
- package/utilities/globals/globals.cjs +31 -16
- package/utilities/globals/globals.cjs.map +1 -1
- package/utilities/globals/globals.cjs.native.js +31 -16
- package/utilities/globals/invariantWrappers.d.ts.map +1 -1
- package/utilities/globals/invariantWrappers.js +30 -15
- package/utilities/globals/invariantWrappers.js.map +1 -1
- package/utilities/observables/asyncMap.d.ts.map +1 -1
- package/utilities/observables/asyncMap.js +17 -34
- package/utilities/observables/asyncMap.js.map +1 -1
- package/utilities/utilities.cjs +17 -34
- package/utilities/utilities.cjs.map +1 -1
- package/utilities/utilities.cjs.native.js +17 -34
- package/version.js +1 -1
package/utilities/utilities.cjs
CHANGED
|
@@ -1249,48 +1249,31 @@ function iterateObserversSafely(observers, method, argument) {
|
|
|
1249
1249
|
|
|
1250
1250
|
function asyncMap(observable, mapFn, catchFn) {
|
|
1251
1251
|
return new zenObservableTs.Observable(function (observer) {
|
|
1252
|
-
var next = observer.next, error = observer.error, complete = observer.complete;
|
|
1253
|
-
var activeCallbackCount = 0;
|
|
1254
|
-
var completed = false;
|
|
1255
1252
|
var promiseQueue = {
|
|
1256
1253
|
then: function (callback) {
|
|
1257
1254
|
return new Promise(function (resolve) { return resolve(callback()); });
|
|
1258
1255
|
},
|
|
1259
1256
|
};
|
|
1260
|
-
function makeCallback(examiner,
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
--activeCallbackCount;
|
|
1275
|
-
throw error;
|
|
1276
|
-
})
|
|
1277
|
-
.catch(function (caught) {
|
|
1278
|
-
error && error.call(observer, caught);
|
|
1279
|
-
});
|
|
1280
|
-
};
|
|
1281
|
-
}
|
|
1282
|
-
else {
|
|
1283
|
-
return function (arg) { return delegate && delegate.call(observer, arg); };
|
|
1284
|
-
}
|
|
1257
|
+
function makeCallback(examiner, key) {
|
|
1258
|
+
return function (arg) {
|
|
1259
|
+
if (examiner) {
|
|
1260
|
+
var both = function () {
|
|
1261
|
+
return observer.closed
|
|
1262
|
+
? 0
|
|
1263
|
+
: examiner(arg);
|
|
1264
|
+
};
|
|
1265
|
+
promiseQueue = promiseQueue.then(both, both).then(function (result) { return observer.next(result); }, function (error) { return observer.error(error); });
|
|
1266
|
+
}
|
|
1267
|
+
else {
|
|
1268
|
+
observer[key](arg);
|
|
1269
|
+
}
|
|
1270
|
+
};
|
|
1285
1271
|
}
|
|
1286
1272
|
var handler = {
|
|
1287
|
-
next: makeCallback(mapFn, next),
|
|
1288
|
-
error: makeCallback(catchFn, error),
|
|
1273
|
+
next: makeCallback(mapFn, "next"),
|
|
1274
|
+
error: makeCallback(catchFn, "error"),
|
|
1289
1275
|
complete: function () {
|
|
1290
|
-
|
|
1291
|
-
if (!activeCallbackCount) {
|
|
1292
|
-
complete && complete.call(observer);
|
|
1293
|
-
}
|
|
1276
|
+
promiseQueue.then(function () { return observer.complete(); });
|
|
1294
1277
|
},
|
|
1295
1278
|
};
|
|
1296
1279
|
var sub = observable.subscribe(handler);
|