Skip to content

Commit

Permalink
improved import migration (#12244)
Browse files Browse the repository at this point in the history
  • Loading branch information
Urik authored Jan 6, 2025
1 parent 6dcb6ba commit 0a0298f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/codemods/ac2-to-ac3/imports.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ export default function transformer(file, api) {
renameOrCreateApolloClientImport();

moveSpecifiersToApolloClient("react-apollo");
moveSpecifiersToApolloClient("@apollo/react-common");
moveSpecifiersToApolloClient("@apollo/react-hooks");
moveSpecifiersToApolloClient("apollo-cache");
moveSpecifiersToApolloClient("apollo-cache-inmemory");
moveSpecifiersToApolloClient("apollo-link");
moveSpecifiersToApolloClient("apollo-link-http");
Expand All @@ -28,6 +30,7 @@ export default function transformer(file, api) {
renameImport("@apollo/react-hoc", "@apollo/client/react/hoc");
renameImport("@apollo/react-ssr", "@apollo/client/react/ssr");
renameImport("@apollo/react-testing", "@apollo/client/testing");
renameImport("apollo-utilities", "@apollo/client/utilities");

renameDefaultSpecifier(getImport("apollo-link-schema"), "SchemaLink");
[
Expand Down

0 comments on commit 0a0298f

Please sign in to comment.