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

manually update various tooling-related dependencies #12286

Merged
merged 16 commits into from
Jan 21, 2025
Merged

Conversation

phryneas
Copy link
Member

@phryneas phryneas commented Jan 21, 2025

This should address a lot of the updates in #11959

Also see the build output diff: https://github.com/apollographql/apollo-client/actions/runs/12888464243?pr=12286

Copy link

changeset-bot bot commented Jan 21, 2025

⚠️ No Changeset found

Latest commit: fe45d68

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 Jan 21, 2025

✅ Docs preview has no changes

The preview was not built because there were no changes.

Build ID: 3e14ee0b26b5817fab5d2812

Copy link

pkg-pr-new bot commented Jan 21, 2025

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

commit: fe45d68

Copy link

pkg-pr-new bot commented Jan 21, 2025

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

commit: cefb838

Copy link
Contributor

github-actions bot commented Jan 21, 2025

size-limit report 📦

Path Size
dist/apollo-client.min.cjs 40.66 KB (0%)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/main.cjs" 50.07 KB (0%)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/main.cjs" (production) 47.18 KB (0%)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/index.js" 36.18 KB (0%)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/index.js" (production) 33.58 KB (+0.01% 🔺)
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.03% 🔽)
import { useLazyQuery } from "dist/react/index.js" 5.7 KB (0%)
import { useLazyQuery } from "dist/react/index.js" (production) 4.78 KB (+0.03% 🔺)
import { useMutation } from "dist/react/index.js" 3.62 KB (+0.03% 🔺)
import { useMutation } from "dist/react/index.js" (production) 2.84 KB (+0.04% 🔺)
import { useSubscription } from "dist/react/index.js" 4.42 KB (-0.03% 🔽)
import { useSubscription } from "dist/react/index.js" (production) 3.48 KB (0%)
import { useSuspenseQuery } from "dist/react/index.js" 5.51 KB (0%)
import { useSuspenseQuery } from "dist/react/index.js" (production) 4.17 KB (-0.05% 🔽)
import { useBackgroundQuery } from "dist/react/index.js" 5.01 KB (0%)
import { useBackgroundQuery } from "dist/react/index.js" (production) 3.66 KB (0%)
import { useLoadableQuery } from "dist/react/index.js" 5.09 KB (0%)
import { useLoadableQuery } from "dist/react/index.js" (production) 3.74 KB (0%)
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%)
import { useFragment } from "dist/react/index.js" (production) 2.31 KB (0%)

Copy link

netlify bot commented Jan 21, 2025

Deploy Preview for apollo-client-docs ready!

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

@@ -0,0 +1,175 @@
import typescriptEslint from "@typescript-eslint/eslint-plugin";
Copy link
Member Author

Choose a reason for hiding this comment

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

This file was auto-migrated via npx @eslint/migrate-config .eslintrc.

As a result I had to add the new dependencies @eslint/compat globals @eslint/js @eslint/eslintrc

@@ -77,7 +77,7 @@ const generateErrorMessage = (err: ApolloError) => {
*
* Use `ReadonlyArray<GraphQLFormattedError>` instead.
*/
// eslint-disable-next-line @typescript-eslint/ban-types
Copy link
Member Author

Choose a reason for hiding this comment

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

ban-types has been removed and been split up into various new rules

see https://typescript-eslint.io/rules/ban-types/

@@ -1526,7 +1526,6 @@ describe("General Mutation testing", () => {
// expect(waitFor(() => didError)).resolves.toBe(true);
//
// ...however it also causes the test to fail against React 17.
// eslint-disable-next-line testing-library/await-async-utils
Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure why that rule ever warned here, but it doesn't do that anymore.

@@ -9,6 +9,7 @@ export function useDeepMemo<TValue>(
const ref = React.useRef<{ deps: DependencyList; value: TValue }>(void 0);

if (!ref.current || !equal(ref.current.deps, deps)) {
// eslint-disable-next-line react-compiler/react-compiler
Copy link
Member Author

Choose a reason for hiding this comment

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

New warnings on variables the compiler assumes immutable. I've added ignore comments for all of them.

@@ -190,12 +190,13 @@ export function useBackgroundQuery<
] {
return wrapHook(
"useBackgroundQuery",
_useBackgroundQuery,
// eslint-disable-next-line react-compiler/react-compiler
useBackgroundQuery_,
Copy link
Member Author

Choose a reason for hiding this comment

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

_useBackgroundQuery wasn't recognized as a "hook name" anymore, so I had to change it.

New rule on top: hooks cannot be saved into variables or passed as arguments. Generally I agree, but in this pattern it's okay.

@@ -5,7 +5,7 @@ import {
invariant,
} from "../invariantWrappers";

function withDev() {
function withDev(): typeof import("../../../dev") & AsyncDisposable {
Copy link
Member Author

Choose a reason for hiding this comment

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

The AsyncDisposable needs to be explicit.

@@ -49,4 +49,4 @@ export { Policies } from "./inmemory/policies.js";
export type { FragmentRegistryAPI } from "./inmemory/fragmentRegistry.js";
export { createFragmentRegistry } from "./inmemory/fragmentRegistry.js";

export * from "./inmemory/types.js";
export type * from "./inmemory/types.js";
Copy link
Member Author

Choose a reason for hiding this comment

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

wildcard type-only exports should also contain type, which seems like a good thing.

@@ -63,7 +63,7 @@ interface BaseOptions {
// Warning: (ae-forgotten-export) The symbol "ApolloLink" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
export const createPersistedQueryLink: (options: PersistedQueryLink.Options) => ApolloLink & {
export const createPersistedQueryLink: (options: PersistedQueryLink.Options) => ApolloLink & ({
Copy link
Member Author

Choose a reason for hiding this comment

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

Additional () caused by api-explorer update

@phryneas phryneas requested a review from jerelmiller January 21, 2025 18:04
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.

Thanks for doing this! This was long overdue.

@github-actions github-actions bot added the auto-cleanup 🤖 label Jan 21, 2025
@jerelmiller jerelmiller merged commit 12ecde9 into main Jan 21, 2025
46 checks passed
@jerelmiller jerelmiller deleted the pr/manual-updates branch January 21, 2025 19:30
Cellule pushed a commit to Cellule/apollo-client that referenced this pull request Jan 22, 2025
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