Skip to content

Commit 0a27476

Browse files
committed
Merge remote-tracking branch 'origin/main' into release-4.3
2 parents e1dc412 + 8426bee commit 0a27476

5 files changed

Lines changed: 40 additions & 36 deletions

File tree

.github/workflows/close-stale-issues.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020

2121
steps:
2222
- name: Close Stale Issues
23-
uses: actions/stale@eb5cf3af3ac0a1aa4c9c45633dd1ae542a27a899 # v10.3.0
23+
uses: actions/stale@1e223db275d687790206a7acac4d1a11bd6fe629 # v10.4.0
2424
with:
2525
# # Token for the repository. Can be passed in using `{{ secrets.GITHUB_TOKEN }}`.
2626
# repo-token: # optional, default is ${{ github.token }}

.size-limits.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\" (CJS)": 51043,
3-
"import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\" (production) (CJS)": 45303,
4-
"import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\"": 38378,
5-
"import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\" (production)": 31815
2+
"import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\" (CJS)": 50956,
3+
"import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\" (production) (CJS)": 45247,
4+
"import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\"": 38399,
5+
"import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\" (production)": 31789
66
}

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,12 @@
314314
> [!NOTE]
315315
> Setting a cache type enforces that cache type in the `cache` option for the `ApolloClient` constructor.
316316

317+
## 4.2.8
318+
319+
### Patch Changes
320+
321+
- [#13349](https://github.com/apollographql/apollo-client/pull/13349) [`501a33b`](https://github.com/apollographql/apollo-client/commit/501a33bba831828da0398c994662582054272743) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Prevent the `setTimeout` in `connectToDevtools` that shows the devtools suggestion from firing when the user agent does not match Chrome or Firefox. This check was previously done inside the `setTimeout` which meant the timer was scheduled for environments where we'd never show the message anyways. For test environments, this could cause flaky tests when that `setTimeout` outlived the tests and ran after any virtual DOM was torn down and removed.
322+
317323
## 4.2.7
318324

319325
### Patch Changes

README.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,9 @@ We regularly update our [public roadmap](https://github.com/apollographql/apollo
9393

9494
Join these live events to meet other GraphQL users and learn more:
9595

96-
🎪 [**GraphQL Summit 2025**](https://summit.graphql.com?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme)
97-
Oct 6-8, 2025 • San Francisco
98-
_1000+ engineers, talks, workshops, and office hours_
99-
100-
🌟 [**GraphQLConf 2025**](https://graphql.org/conf/2025)
101-
Sep 8-10, 2025 • Amsterdam
102-
_Celebrating 10 Years of GraphQL_
96+
🎪 [**Apollo Summit 2026**](https://apollosummit.dev/)
97+
Oct 6-8, 2026 • San Francisco
98+
_1000+ engineers, talks, workshops, and office hours_
10399

104100
[**View All Events →**](https://www.apollographql.com/events?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme)
105101

src/core/ApolloClient.ts

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,33 +1171,35 @@ export class ApolloClient {
11711171
*/
11721172
if (!hasSuggestedDevtools && __DEV__) {
11731173
hasSuggestedDevtools = true;
1174+
const win = window;
1175+
1176+
const ua = win.navigator.userAgent;
1177+
let url: string | undefined;
1178+
1179+
if (typeof ua === "string") {
1180+
if (ua.indexOf("Chrome/") > -1) {
1181+
url =
1182+
"https://chrome.google.com/webstore/detail/" +
1183+
"apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm";
1184+
} else if (ua.indexOf("Firefox/") > -1) {
1185+
url =
1186+
"https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/";
1187+
}
1188+
}
1189+
11741190
if (
1175-
window.document &&
1176-
window.top === window.self &&
1177-
/^(https?|file):$/.test(window.location.protocol)
1191+
win.document &&
1192+
win.top === win.self &&
1193+
/^(https?|file):$/.test(win.location.protocol) &&
1194+
url
11781195
) {
11791196
setTimeout(() => {
1180-
if (!(window as any).__APOLLO_DEVTOOLS_GLOBAL_HOOK__) {
1181-
const nav = window.navigator;
1182-
const ua = nav && nav.userAgent;
1183-
let url: string | undefined;
1184-
if (typeof ua === "string") {
1185-
if (ua.indexOf("Chrome/") > -1) {
1186-
url =
1187-
"https://chrome.google.com/webstore/detail/" +
1188-
"apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm";
1189-
} else if (ua.indexOf("Firefox/") > -1) {
1190-
url =
1191-
"https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/";
1192-
}
1193-
}
1194-
if (url) {
1195-
invariant.log(
1196-
"Download the Apollo DevTools for a better development " +
1197-
"experience: %s",
1198-
url
1199-
);
1200-
}
1197+
if (!(win as any).__APOLLO_DEVTOOLS_GLOBAL_HOOK__) {
1198+
invariant.log(
1199+
"Download the Apollo DevTools for a better development " +
1200+
"experience: %s",
1201+
url
1202+
);
12011203
}
12021204
}, 10000);
12031205
}

0 commit comments

Comments
 (0)