Skip to content

Conversation

phryneas
Copy link
Member

@phryneas phryneas commented Jul 19, 2023

This was triggered over in reduxjs/react-redux#2053

TLDR: AliPay mini widgets deliberately remove anything that is global in their runtime: window, self, global, globalThis, you name it, it's gone.
This doesn't impact the globalThis.DEV, as that can be removed by a compiler, but it does impact situations where we attempt to write to globalThis - so I am rolling back this change to the 3.8 behaviour.. (for reference, see https://github.com/apollographql/apollo-client/blob/27fbdb3f9003cc304d26987cb38daf10910f2da6/src/react/context/ApolloContext.ts )

Checklist:

  • If this PR contains changes to the library itself (not necessary for e.g. docs updates), please include a changeset (see CONTRIBUTING.md)
  • If this PR is a new feature, please reference an issue where a consensus about the design was reached (not necessary for small changes)
  • Make sure all of the significant new logic is covered by tests

@changeset-bot
Copy link

changeset-bot bot commented Jul 19, 2023

🦋 Changeset detected

Latest commit: a34050e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@apollo/client Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Jul 19, 2023

size-limit report 📦

Path Size
dist/apollo-client.min.cjs 37.11 KB (+0.03% 🔺)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/main.cjs" 43.67 KB (-0.02% 🔽)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/main.cjs" (production) 42.27 KB (-0.04% 🔽)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/index.js" 32.39 KB (0%)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/index.js" (production) 31.22 KB (0%)
import { ApolloProvider } from "dist/react/index.js" 1.21 KB (+0.25% 🔺)
import { ApolloProvider } from "dist/react/index.js" (production) 1.2 KB (+0.25% 🔺)
import { useQuery } from "dist/react/index.js" 4.26 KB (+0.14% 🔺)
import { useQuery } from "dist/react/index.js" (production) 4.08 KB (+0.05% 🔺)
import { useLazyQuery } from "dist/react/index.js" 4.58 KB (+0.07% 🔺)
import { useLazyQuery } from "dist/react/index.js" (production) 4.39 KB (+0.03% 🔺)
import { useMutation } from "dist/react/index.js" 2.5 KB (+0.04% 🔺)
import { useMutation } from "dist/react/index.js" (production) 2.48 KB (+0.08% 🔺)
import { useSubscription } from "dist/react/index.js" 2.24 KB (+0.14% 🔺)
import { useSubscription } from "dist/react/index.js" (production) 2.2 KB (+0.14% 🔺)
import { useSuspenseQuery } from "dist/react/index.js" 4.71 KB (-0.25% 🔽)
import { useSuspenseQuery } from "dist/react/index.js" (production) 4.14 KB (-0.17% 🔽)
import { useBackgroundQuery } from "dist/react/index.js" 4.2 KB (-0.03% 🔽)
import { useBackgroundQuery } from "dist/react/index.js" (production) 3.63 KB (-0.06% 🔽)
import { useReadQuery } from "dist/react/index.js" 2.69 KB (0%)
import { useReadQuery } from "dist/react/index.js" (production) 2.67 KB (0%)
import { useFragment } from "dist/react/index.js" 2.05 KB (+0.15% 🔺)
import { useFragment } from "dist/react/index.js" (production) 2 KB (+0.15% 🔺)

Copy link
Member

@jerelmiller jerelmiller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Glad you found this before release! Thanks!

Copy link
Contributor

@alessbell alessbell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙌

@phryneas phryneas merged commit 0f1cde3 into release-3.8 Jul 24, 2023
@github-actions github-actions bot mentioned this pull request Jul 24, 2023
@phryneas phryneas deleted the pr/rollback-getApolloContext branch July 24, 2023 14:36
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants