Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove check for WeakMap, WeakSet and symbols #12388

Open
wants to merge 14 commits into
base: release-4.0
Choose a base branch
from

Conversation

jerelmiller
Copy link
Member

@jerelmiller jerelmiller commented Feb 21, 2025

Closes #12188

Removes some of the checks for WeakMap, WeakSet and symbols and enforces that Apollo Client is running in a more modern environment.

This PR also removes our custom useSyncExternalStore implementation in favor of the official shim.

Copy link

changeset-bot bot commented Feb 21, 2025

🦋 Changeset detected

Latest commit: 2f2727c

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 Major

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

@svc-apollo-docs
Copy link

svc-apollo-docs commented Feb 21, 2025

⚠️ Docs preview not attached to branch

The preview was not built because the PR's base branch release-4.0 is not in the list of sources.

An Apollo team member can comment one of the following commands to dictate which branch to attach the preview to:

  • !docs set-base-branch version-2.6
  • !docs set-base-branch main

Build ID: a0a5631e2eb9841afb83b86f

@jerelmiller jerelmiller added this to the Release 4.0 milestone Feb 21, 2025
Copy link

pkg-pr-new bot commented Feb 21, 2025

npm i https://pkg.pr.new/@apollo/client@12388

commit: 2f2727c

Copy link

netlify bot commented Feb 21, 2025

Deploy Preview for apollo-client-docs ready!

Name Link
🔨 Latest commit 2f2727c
🔍 Latest deploy log https://app.netlify.com/sites/apollo-client-docs/deploys/67b8fb4ede7d260008357618
😎 Deploy Preview https://deploy-preview-12388--apollo-client-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

github-actions bot commented Feb 21, 2025

size-limit report 📦

Path Size
import { ApolloClient, InMemoryCache, HttpLink } from "dist/__cjs/index.cjs" 43.66 KB (-0.74% 🔽)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/__cjs/index.cjs" (production) 41.2 KB (-0.76% 🔽)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/index.js" 32.81 KB (-0.6% 🔽)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/index.js" (production) 30.37 KB (-0.55% 🔽)
import { ApolloProvider } from "dist/react/index.js" 1.04 KB (-10.88% 🔽)
import { ApolloProvider } from "dist/react/index.js" (production) 1.02 KB (-11.3% 🔽)
import { useQuery } from "dist/react/index.js" 4.81 KB (+5.06% 🔺)
import { useQuery } from "dist/react/index.js" (production) 4 KB (+6.94% 🔺)
import { useLazyQuery } from "dist/react/index.js" 5.21 KB (+5.01% 🔺)
import { useLazyQuery } from "dist/react/index.js" (production) 4.41 KB (+6.72% 🔺)
import { useMutation } from "dist/react/index.js" 3.2 KB (-3.19% 🔽)
import { useMutation } from "dist/react/index.js" (production) 2.5 KB (-4.13% 🔽)
import { useSubscription } from "dist/react/index.js" 4.43 KB (+6.04% 🔺)
import { useSubscription } from "dist/react/index.js" (production) 3.57 KB (+8.46% 🔺)
import { useSuspenseQuery } from "dist/react/index.js" 5.31 KB (-2.36% 🔽)
import { useSuspenseQuery } from "dist/react/index.js" (production) 4.08 KB (-3.23% 🔽)
import { useBackgroundQuery } from "dist/react/index.js" 4.79 KB (-2.68% 🔽)
import { useBackgroundQuery } from "dist/react/index.js" (production) 3.54 KB (-3.75% 🔽)
import { useLoadableQuery } from "dist/react/index.js" 4.85 KB (-2.52% 🔽)
import { useLoadableQuery } from "dist/react/index.js" (production) 3.6 KB (-3.59% 🔽)
import { useReadQuery } from "dist/react/index.js" 2.38 KB (+10.02% 🔺)
import { useReadQuery } from "dist/react/index.js" (production) 2.36 KB (+12.08% 🔺)
import { useFragment } from "dist/react/index.js" 2.09 KB (+11.9% 🔺)
import { useFragment } from "dist/react/index.js" (production) 2.08 KB (+13.88% 🔺)

return true;
}
}
export { useSyncExternalStore } from "use-sync-external-store/shim/index.js";
Copy link
Member

Choose a reason for hiding this comment

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

I'd prefer it if we wouldn't have to point at a specific file as an implementation detail. Can we keep this change out of this PR? I generally have an idea to tackle this differently, so I'd try that first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants