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

add React 19 RC to peerDependencies #11951

Merged
merged 4 commits into from
Jul 15, 2024
Merged

Conversation

phryneas
Copy link
Member

@phryneas phryneas commented Jul 11, 2024

This adds the React 19 Release Candidates as valid peer dependencies.

This will allow usage with React 19 RCs - it's a bit of an optimistic assumption since RCs can still break things, but we test our code against the RCs, and we don't make any guarantees for the final React 19 release, so it should be fine and it sends a good signal that we intend to support React 19 as soon as possible.

While I'm at it, I also bump the version of the RC we run our tests with.

Important

This version range seems to break https://semver.npmjs.com/, where "^16.8.0 || ^17.0.0 || >=19.0.0-rc <19.0.0" works, but "^16.8.0 || ^17.0.0 || ^18.0.0 || >=19.0.0-rc <19.0.0" doesn't.

I did validate it with the semver package, which is supposedly used by npm though, and it seems to work out correctly:

const semver = require("semver");

async function getMatchingPackages(package, versions) {
  let n = await fetch(
    "https://registry.npmjs.org/" + package.replace(/\//g, "%2f")
  );
  if (404 === n.status) throw new Error("Package not found");
  let json = await n.json();
  console.log(
    Object.keys(json.versions).filter((version) =>
      semver.satisfies(version, versions)
    )
  );
}

getMatchingPackages(
  "react",
  "^16.8.0 || ^17.0.0 || ^18.0.0 || >=19.0.0-rc <19.0.0"
);

prints

[
  '16.8.0',
  '16.8.1',
  '16.8.2',
  '16.8.3',
  '16.8.4',
  '16.8.5',
  '16.8.6',
  '16.9.0',
  '16.10.0',
  '16.10.1',
  '16.10.2',
  '16.11.0',
  '16.12.0',
  '16.13.0',
  '16.13.1',
  '16.14.0',
  '17.0.0',
  '17.0.1',
  '17.0.2',
  '18.0.0',
  '18.1.0',
  '18.2.0',
  '18.3.0',
  '18.3.1',
  '19.0.0-rc-915b914b3a-20240515',
  '19.0.0-rc-3f1436cca1-20240516',
  '19.0.0-rc-57fbe3ba37-20240520',
  '19.0.0-rc-d3ce0d3ea9-20240520',
  '19.0.0-rc-8f3c0525f9-20240521',
  '19.0.0-rc-81c5ff2e04-20240521',
  '19.0.0-rc-3ac551e855-20240522',
  '19.0.0-rc-f994737d14-20240522',
  '19.0.0-rc-4c2e457c7c-20240522',
  '19.0.0-rc-935180c7e0-20240524',
  '19.0.0-rc-6f23540c7d-20240528',
  '19.0.0-rc-38e3b23483-20240529',
  '19.0.0-rc-9d4fba0788-20240530',
  '19.0.0-rc-6d3110b4d9-20240531',
  '19.0.0-rc-9598c41a20-20240603',
  '19.0.0-rc.0',
  '19.0.0-rc-bf3a29d097-20240603',
  '19.0.0-rc-1df34bdf62-20240605',
  '19.0.0-rc-eb259b5d3b-20240605',
  '19.0.0-rc-99da76f23a-20240606',
  '19.0.0-rc-827cbea417-20240606',
  '19.0.0-rc-cc1ec60d0d-20240607',
  '19.0.0-rc-20b6f4c0e8-20240607',
  '19.0.0-rc-a532d91d01-20240610',
  '19.0.0-rc-34d0c5e357-20240607',
  '19.0.0-rc-6230622a1a-20240610',
  '19.0.0-rc-a26e3f403e-20240611',
  '19.0.0-rc-f3e09d6328-20240612',
  '19.0.0-rc-dfd30974ab-20240613',
  '19.0.0-rc-fb9a90fa48-20240614',
  '19.0.0-rc-107a2f8c3e-20240617',
  '19.0.0-rc-1434af3d22-20240618',
  '19.0.0-rc-e684ca66ab-20240619',
  '19.0.0-rc-6fb39ec9e9-20240621',
  '19.0.0-rc-3563387fe3-20240621',
  '19.0.0-rc-c21bcd627b-20240624',
  '19.0.0-rc-8971381549-20240625',
  '19.0.0-rc-e02baf6c92-20240627',
  '19.0.0-rc-58af67a8f8-20240628',
  '19.0.0-rc-100dfd7dab-20240701',
  '19.0.0-rc-9c6806964f-20240703',
  '19.0.0-rc-3da26163a3-20240704',
  '19.0.0-rc-f38c22b244-20240704',
  '19.0.0-rc-df783f9ea1-20240708',
  '19.0.0-rc-c3cdbec0a7-20240708',
  '19.0.0-rc-378b305958-20240710'
]

Copy link

changeset-bot bot commented Jul 11, 2024

🦋 Changeset detected

Latest commit: cf2ea63

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

Copy link
Contributor

github-actions bot commented Jul 11, 2024

size-limit report 📦

Path Size
dist/apollo-client.min.cjs 39.26 KB (0%)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/main.cjs" 48 KB (0%)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/main.cjs" (production) 45.53 KB (0%)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/index.js" 34.38 KB (0%)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/index.js" (production) 32.23 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.24 KB (0%)
import { useQuery } from "dist/react/index.js" (production) 4.31 KB (0%)
import { useLazyQuery } from "dist/react/index.js" 5.71 KB (0%)
import { useLazyQuery } from "dist/react/index.js" (production) 4.79 KB (0%)
import { useMutation } from "dist/react/index.js" 3.62 KB (0%)
import { useMutation } from "dist/react/index.js" (production) 2.85 KB (0%)
import { useSubscription } from "dist/react/index.js" 4.42 KB (0%)
import { useSubscription } from "dist/react/index.js" (production) 3.46 KB (0%)
import { useSuspenseQuery } from "dist/react/index.js" 5.5 KB (0%)
import { useSuspenseQuery } from "dist/react/index.js" (production) 4.16 KB (0%)
import { useBackgroundQuery } from "dist/react/index.js" 5 KB (0%)
import { useBackgroundQuery } from "dist/react/index.js" (production) 3.65 KB (0%)
import { useLoadableQuery } from "dist/react/index.js" 5.07 KB (0%)
import { useLoadableQuery } from "dist/react/index.js" (production) 3.72 KB (0%)
import { useReadQuery } from "dist/react/index.js" 3.39 KB (0%)
import { useReadQuery } from "dist/react/index.js" (production) 3.34 KB (0%)
import { useFragment } from "dist/react/index.js" 2.32 KB (0%)
import { useFragment } from "dist/react/index.js" (production) 2.27 KB (0%)

Copy link

netlify bot commented Jul 11, 2024

Deploy Preview for apollo-client-docs ready!

Name Link
🔨 Latest commit 15691ec
🔍 Latest deploy log https://app.netlify.com/sites/apollo-client-docs/deploys/668fa6a92f6081000865d7be
😎 Deploy Preview https://deploy-preview-11951--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

netlify bot commented Jul 11, 2024

Deploy Preview for apollo-client-docs ready!

Name Link
🔨 Latest commit cf2ea63
🔍 Latest deploy log https://app.netlify.com/sites/apollo-client-docs/deploys/6694d84662a96b00080be6cd
😎 Deploy Preview https://deploy-preview-11951--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.

@phryneas phryneas added this to the 3.11.0 milestone Jul 11, 2024
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.

🎉

@github-actions github-actions bot added the auto-cleanup 🤖 label Jul 12, 2024
@phryneas
Copy link
Member Author

Explanation for that here: npm/node-semver#729 (comment)

@phryneas phryneas merged commit 0de03af into release-3.11 Jul 15, 2024
11 of 24 checks passed
@phryneas phryneas deleted the pr/react-19-rc-peerDep branch July 15, 2024 08:06
@github-actions github-actions bot mentioned this pull request Jul 15, 2024
@github-actions github-actions bot mentioned this pull request Jul 22, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants