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

Make React 19 the default version for development #12177

Merged
merged 14 commits into from
Dec 6, 2024
Merged

Conversation

jerelmiller
Copy link
Member

Updates our dependencies and types so that React 19 is the default version

Copy link

changeset-bot bot commented Dec 5, 2024

⚠️ No Changeset found

Latest commit: 554b45f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@svc-apollo-docs
Copy link

svc-apollo-docs commented Dec 5, 2024

✅ Docs Preview Ready

No new or changed pages found.

Copy link

pkg-pr-new bot commented Dec 5, 2024

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

commit: 554b45f

Copy link

netlify bot commented Dec 5, 2024

Deploy Preview for apollo-client-docs ready!

Name Link
🔨 Latest commit 554b45f
🔍 Latest deploy log https://app.netlify.com/sites/apollo-client-docs/deploys/6752cf3a492d900008b11791
😎 Deploy Preview https://deploy-preview-12177--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 Dec 5, 2024

size-limit report 📦

Path Size
dist/apollo-client.min.cjs 40.64 KB (+0.01% 🔺)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/main.cjs" 50.02 KB (+0.01% 🔺)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/main.cjs" (production) 47.14 KB (+0.01% 🔺)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/index.js" 36.14 KB (0%)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/index.js" (production) 33.54 KB (0%)
import { ApolloProvider } from "dist/react/index.js" 1.26 KB (0%)
import { ApolloProvider } from "dist/react/index.js" (production) 1.24 KB (0%)
import { useQuery } from "dist/react/index.js" 5.21 KB (0%)
import { useQuery } from "dist/react/index.js" (production) 4.29 KB (0%)
import { useLazyQuery } from "dist/react/index.js" 5.7 KB (+0.02% 🔺)
import { useLazyQuery } from "dist/react/index.js" (production) 4.78 KB (+0.03% 🔺)
import { useMutation } from "dist/react/index.js" 3.62 KB (0%)
import { useMutation } from "dist/react/index.js" (production) 2.84 KB (0%)
import { useSubscription } from "dist/react/index.js" 4.42 KB (+0.05% 🔺)
import { useSubscription } from "dist/react/index.js" (production) 3.48 KB (+0.06% 🔺)
import { useSuspenseQuery } from "dist/react/index.js" 5.51 KB (+0.04% 🔺)
import { useSuspenseQuery } from "dist/react/index.js" (production) 4.17 KB (+0.05% 🔺)
import { useBackgroundQuery } from "dist/react/index.js" 5.01 KB (+0.02% 🔺)
import { useBackgroundQuery } from "dist/react/index.js" (production) 3.66 KB (+0.06% 🔺)
import { useLoadableQuery } from "dist/react/index.js" 5.09 KB (+0.04% 🔺)
import { useLoadableQuery } from "dist/react/index.js" (production) 3.74 KB (+0.06% 🔺)
import { useReadQuery } from "dist/react/index.js" 3.41 KB (0%)
import { useReadQuery } from "dist/react/index.js" (production) 3.35 KB (0%)
import { useFragment } from "dist/react/index.js" 2.36 KB (+0.05% 🔺)
import { useFragment } from "dist/react/index.js" (production) 2.31 KB (+0.09% 🔺)

@@ -0,0 +1,15 @@
// Shim for React 17 react-dom/client entrypoint imported by React Testing
Copy link
Member Author

Choose a reason for hiding this comment

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

Turns out that react-dom/client was imported by RTL in our v17 tests which actually used the v18 import. When upgrading to v19, that import no longer works, presumably because its using the React 19 react-dom/client file, but with React 17 core.

This shim adds an entrypoint for react-dom/client that doesn't exist in 17 to satisfy the import path and avoid using the React 19 version. We throw to ensure the legacyRoot option is set in the tests though, which should be covered by the patch.

Copy link
Member

Choose a reason for hiding this comment

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

Very good call!

@jerelmiller jerelmiller marked this pull request as ready for review December 5, 2024 23:33
@jerelmiller jerelmiller requested a review from phryneas December 5, 2024 23:33
@phryneas phryneas merged commit 8e2a9d6 into main Dec 6, 2024
50 checks passed
@phryneas phryneas deleted the jerel/more-react-19 branch December 6, 2024 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants