@apollo/client
Advanced tools
Comparing version 0.0.0-pr-11969-20240723020017 to 0.0.0-pr-11984-20240801210716
@@ -74,6 +74,3 @@ import { __assign } from "tslib"; | ||
if (this.devtoolsConfig.enabled === undefined) { | ||
this.devtoolsConfig.enabled = | ||
typeof window === "object" && | ||
!window.__APOLLO_CLIENT__ && | ||
globalThis.__DEV__ !== false; | ||
this.devtoolsConfig.enabled = globalThis.__DEV__ !== false; | ||
} | ||
@@ -129,9 +126,10 @@ if (ssrForceFetchDelay) { | ||
ApolloClient.prototype.connectToDevTools = function () { | ||
if (typeof window === "object") { | ||
var windowWithDevTools = window; | ||
var devtoolsSymbol = Symbol.for("apollo.devtools"); | ||
(windowWithDevTools[devtoolsSymbol] = | ||
windowWithDevTools[devtoolsSymbol] || []).push(this); | ||
windowWithDevTools.__APOLLO_CLIENT__ = this; | ||
if (typeof window === "undefined") { | ||
return; | ||
} | ||
var windowWithDevTools = window; | ||
var devtoolsSymbol = Symbol.for("apollo.devtools"); | ||
(windowWithDevTools[devtoolsSymbol] = | ||
windowWithDevTools[devtoolsSymbol] || []).push(this); | ||
windowWithDevTools.__APOLLO_CLIENT__ = this; | ||
/** | ||
@@ -142,28 +140,28 @@ * Suggest installing the devtools for developers who don't have them | ||
hasSuggestedDevtools = true; | ||
setTimeout(function () { | ||
if (typeof window !== "undefined" && | ||
window.document && | ||
window.top === window.self && | ||
!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__ && | ||
/^(https?|file):$/.test(window.location.protocol)) { | ||
var nav = window.navigator; | ||
var ua = nav && nav.userAgent; | ||
var url = void 0; | ||
if (typeof ua === "string") { | ||
if (ua.indexOf("Chrome/") > -1) { | ||
url = | ||
"https://chrome.google.com/webstore/detail/" + | ||
"apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm"; | ||
if (window.document && | ||
window.top === window.self && | ||
/^(https?|file):$/.test(window.location.protocol)) { | ||
setTimeout(function () { | ||
if (!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__) { | ||
var nav = window.navigator; | ||
var ua = nav && nav.userAgent; | ||
var url = void 0; | ||
if (typeof ua === "string") { | ||
if (ua.indexOf("Chrome/") > -1) { | ||
url = | ||
"https://chrome.google.com/webstore/detail/" + | ||
"apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm"; | ||
} | ||
else if (ua.indexOf("Firefox/") > -1) { | ||
url = | ||
"https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/"; | ||
} | ||
} | ||
else if (ua.indexOf("Firefox/") > -1) { | ||
url = | ||
"https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/"; | ||
if (url) { | ||
globalThis.__DEV__ !== false && invariant.log("Download the Apollo DevTools for a better development " + | ||
"experience: %s", url); | ||
} | ||
} | ||
if (url) { | ||
globalThis.__DEV__ !== false && invariant.log("Download the Apollo DevTools for a better development " + | ||
"experience: %s", url); | ||
} | ||
} | ||
}, 10000); | ||
}, 10000); | ||
} | ||
} | ||
@@ -170,0 +168,0 @@ }; |
@@ -751,6 +751,7 @@ import { __assign, __awaiter, __generator } from "tslib"; | ||
var hasErrors = graphQLErrors.length > 0; | ||
var errorPolicy = options.errorPolicy; | ||
// If we interrupted this request by calling getResultsFromLink again | ||
// with the same QueryInfo object, we ignore the old results. | ||
if (requestId >= queryInfo.lastRequestId) { | ||
if (hasErrors && options.errorPolicy === "none") { | ||
if (hasErrors && errorPolicy === "none") { | ||
// Throwing here effectively calls observer.error. | ||
@@ -772,3 +773,10 @@ throw queryInfo.markError(new ApolloError({ | ||
}; | ||
if (hasErrors && options.errorPolicy !== "ignore") { | ||
// In the case we start multiple network requests simulatenously, we | ||
// want to ensure we properly set `data` if we're reporting on an old | ||
// result which will not be caught by the conditional above that ends up | ||
// throwing the markError result. | ||
if (hasErrors && errorPolicy === "none") { | ||
aqr.data = void 0; | ||
} | ||
if (hasErrors && errorPolicy !== "ignore") { | ||
aqr.errors = graphQLErrors; | ||
@@ -775,0 +783,0 @@ aqr.networkStatus = NetworkStatus.error; |
@@ -442,3 +442,3 @@ 'use strict'; | ||
var version = "0.0.0-pr-11969-20240723020017"; | ||
var version = "0.0.0-pr-11984-20240801210716"; | ||
@@ -445,0 +445,0 @@ function maybe(thunk) { |
{ | ||
"name": "@apollo/client", | ||
"version": "0.0.0-pr-11969-20240723020017", | ||
"version": "0.0.0-pr-11984-20240801210716", | ||
"description": "A fully-featured caching GraphQL client.", | ||
@@ -71,3 +71,3 @@ "private": false, | ||
"@arethetypeswrong/cli": "0.15.3", | ||
"@babel/parser": "7.24.8", | ||
"@babel/parser": "7.25.0", | ||
"@changesets/changelog-github": "0.5.0", | ||
@@ -99,7 +99,7 @@ "@changesets/cli": "2.27.7", | ||
"@types/use-sync-external-store": "0.0.6", | ||
"@typescript-eslint/eslint-plugin": "7.16.1", | ||
"@typescript-eslint/parser": "7.16.1", | ||
"@typescript-eslint/rule-tester": "7.16.1", | ||
"@typescript-eslint/types": "7.16.1", | ||
"@typescript-eslint/utils": "7.16.1", | ||
"@typescript-eslint/eslint-plugin": "7.18.0", | ||
"@typescript-eslint/parser": "7.18.0", | ||
"@typescript-eslint/rule-tester": "7.18.0", | ||
"@typescript-eslint/types": "7.18.0", | ||
"@typescript-eslint/utils": "7.18.0", | ||
"acorn": "8.12.1", | ||
@@ -106,0 +106,0 @@ "ajv": "8.17.1", |
@@ -786,3 +786,3 @@ 'use strict'; | ||
: fallbackResult; | ||
}); | ||
}, function () { return fallbackResult; }); | ||
return React__namespace.useMemo(function () { return (tslib.__assign(tslib.__assign({}, ret), { restart: function () { | ||
@@ -789,0 +789,0 @@ globals.invariant(!optionsRef.current.skip, 56); |
@@ -236,3 +236,3 @@ import { __assign } from "tslib"; | ||
: fallbackResult; | ||
}); | ||
}, function () { return fallbackResult; }); | ||
return React.useMemo(function () { return (__assign(__assign({}, ret), { restart: function () { | ||
@@ -239,0 +239,0 @@ invariant(!optionsRef.current.skip, 56); |
@@ -11,3 +11,3 @@ 'use strict'; | ||
var version = "0.0.0-pr-11969-20240723020017"; | ||
var version = "0.0.0-pr-11984-20240801210716"; | ||
@@ -14,0 +14,0 @@ function maybe(thunk) { |
@@ -7,3 +7,3 @@ 'use strict'; | ||
var version = "0.0.0-pr-11969-20240723020017"; | ||
var version = "0.0.0-pr-11984-20240801210716"; | ||
@@ -10,0 +10,0 @@ function maybe(thunk) { |
@@ -1,2 +0,2 @@ | ||
export var version = "0.0.0-pr-11969-20240723020017"; | ||
export var version = "0.0.0-pr-11984-20240801210716"; | ||
//# sourceMappingURL=version.js.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
6983744
60718