Skip to content

Commit 1f9c2bf

Browse files
committed
zz-removals -> v4-migration
1 parent 5944a3e commit 1f9c2bf

8 files changed

Lines changed: 765 additions & 765 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
"development": "./src/utilities/environment/index.development.ts",
7878
"default": "./src/utilities/environment/index.ts"
7979
},
80-
"./zz_removals": "./src/zz_removals.ts"
80+
"./v4-migration": "./src/v4-migration.ts"
8181
},
8282
"scripts": {
8383
"prebuild": "npm run clean",

scripts/codemods/ac3-to-ac4/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ npx @apollo/client-codemod-migrate-3-to-4 --parser ts file1.ts file2.ts --codem
1717
- `imports`: Moves imports that have been moved or renamed in Apollo Client 4. Also moves types into namespace imports where applicable.
1818
- `links`: Moves `split`, `from`, `concat` and `empty` onto the `ApolloLink` namespace, changes funtion link invocations like `createHttpLink(...)` to their class equivalents like (`new HttpLink(...)`).
1919
Does not change `setContext((operation, prevContext) => {})` to `new ContextLink((prevContext, operation) => {})` - this requires manual intervention, as the order of callback arguments is flipped and this is not reliable codemoddable.
20-
- `removals`: Points all imports of values or types that have been removed in Apollo Client 4 to the `@apollo/client/zz_removals` entry point. That entry point contains context for each removal, oftentimes with migration instructions.
20+
- `removals`: Points all imports of values or types that have been removed in Apollo Client 4 to the `@apollo/client/v4-migration` entry point. That entry point contains context for each removal, oftentimes with migration instructions.
2121

2222
### Usage against TypeScript/TSX
2323

scripts/codemods/ac3-to-ac4/src/__tests__/__snapshots__/removals.test.ts.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ exports[`all exports 1`] = `
231231
+ removeConnectionDirectiveFromDocument as utilities_removeConnectionDirectiveFromDocument,
232232
+ removeFragmentSpreadFromDocument as utilities_removeFragmentSpreadFromDocument,
233233
+ valueToObjectRepresentation as utilities_valueToObjectRepresentation,
234-
+} from "@apollo/client/zz_removals";
234+
+} from "@apollo/client/v4-migration";
235235
+
236236
+import type {
237237
+ ClientParseError as _ClientParseError,
@@ -311,7 +311,7 @@ exports[`all exports 1`] = `
311311
+ TupleToIntersection as utilities_TupleToIntersection,
312312
+ UnionToIntersection as utilities_UnionToIntersection,
313313
+ VariableValue as utilities_VariableValue,
314-
+} from "@apollo/client/zz_removals";
314+
+} from "@apollo/client/v4-migration";
315315
+
316316
+import {
317317
ApolloClientOptions as core_ApolloClientOptions,

scripts/codemods/ac3-to-ac4/src/removals.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ const removalsTransform: Transform = function transform(file, api) {
179179
identifier: removal.identifier,
180180
alternativeModules: ["@apollo/client", "@apollo/client/core"],
181181
},
182-
to: { module: "@apollo/client/zz_removals", alternativeModules: [] },
182+
to: { module: "@apollo/client/v4-migration", alternativeModules: [] },
183183
importType: removal.importType,
184184
};
185185
handleIdentiferRename({

src/__tests__/__snapshots__/exports.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,4 +488,4 @@ Array [
488488
]
489489
`;
490490

491-
exports[`exports of public entry points @apollo/client/zz_removals 1`] = `Array []`;
491+
exports[`exports of public entry points @apollo/client/v4-migration 1`] = `Array []`;

src/__tests__/exports.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ import * as utilitiesEnvironment from "@apollo/client/utilities/environment";
4343
import * as utilitiesInternal from "@apollo/client/utilities/internal";
4444
import * as utilitiesInternalGlobals from "@apollo/client/utilities/internal/globals";
4545
import * as utilitiesInvariant from "@apollo/client/utilities/invariant";
46-
import * as zz_removals from "@apollo/client/zz_removals";
46+
import * as v4_migration from "@apollo/client/v4-migration";
4747

4848
// eslint-disable-next-line local-rules/no-relative-imports
4949
import { entryPoints } from "../../config/entryPoints.js";
@@ -106,7 +106,7 @@ describe("exports of public entry points", () => {
106106
check("@apollo/client/utilities/internal/globals", utilitiesInternalGlobals);
107107
check("@apollo/client/utilities/invariant", utilitiesInvariant);
108108
check("@apollo/client/utilities/environment", utilitiesEnvironment);
109-
check("@apollo/client/zz_removals", zz_removals);
109+
check("@apollo/client/v4-migration", v4_migration);
110110

111111
checkWithConditions("@apollo/client/react", ["react-server"]);
112112

0 commit comments

Comments
 (0)