Skip to content

Commit c0d5be7

Browse files
authored
Use named export equal instead of default from "@wry/equality" (#12900)
* Use named export `equal` instead of default from `"@wry/equality"` * chore * Clean up Prettier, Size-limit, and Api-Extractor --------- Co-authored-by: phryneas <[email protected]>
1 parent 70e706a commit c0d5be7

File tree

7 files changed

+26
-8
lines changed

7 files changed

+26
-8
lines changed

.changeset/thick-olives-smile.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@apollo/client": patch
3+
---
4+
5+
Use named export `equal` instead of default from `"@wry/equality"`

.size-limits.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\" (CJS)": 43807,
3-
"import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\" (production) (CJS)": 38705,
4-
"import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\"": 33582,
5-
"import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\" (production)": 27649
2+
"import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\" (CJS)": 43878,
3+
"import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\" (production) (CJS)": 38665,
4+
"import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\"": 33423,
5+
"import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\" (production)": 27476
66
}

eslint.config.mjs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,19 @@ export default [
7979

8080
// rules for the whole repo
8181
rules: {
82+
"no-restricted-imports": [
83+
"error",
84+
{
85+
paths: [
86+
{
87+
name: "@wry/equality",
88+
importNames: ["default"],
89+
message:
90+
"Please use named export `{ equal }` from @wry/equality instead.",
91+
},
92+
],
93+
},
94+
],
8295
"import/no-unresolved": "error",
8396
"import/order": [
8497
"warn",

src/masking/maskFragment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import equal from "@wry/equality";
1+
import { equal } from "@wry/equality";
22
import type { FragmentDefinitionNode } from "graphql";
33
import { Kind } from "graphql";
44

src/react/hooks/__tests__/useBackgroundQuery.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
useTrackRenders,
77
} from "@testing-library/react-render-stream";
88
import { userEvent } from "@testing-library/user-event";
9-
import equal from "@wry/equality";
9+
import { equal } from "@wry/equality";
1010
import { expectTypeOf } from "expect-type";
1111
import { GraphQLError } from "graphql";
1212
import React, { Suspense } from "react";

src/react/hooks/useFragment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import equal from "@wry/equality";
1+
import { equal } from "@wry/equality";
22
import * as React from "react";
33

44
import type {

src/utilities/internal/equalByQuery.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import equal from "@wry/equality";
1+
import { equal } from "@wry/equality";
22
import type {
33
DirectiveNode,
44
DocumentNode,

0 commit comments

Comments
 (0)