Skip to content

remove overloads codemod #5046

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

Merged
merged 12 commits into from
Mar 7, 2023

Conversation

balazsmatepetro
Copy link
Contributor

No description provided.

@vercel
Copy link

vercel bot commented Feb 27, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated
query ⬜️ Ignored (Inspect) Mar 7, 2023 at 5:02PM (UTC)

@codesandbox-ci
Copy link

codesandbox-ci bot commented Feb 27, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit a7b7c7d:

Sandbox Source
@tanstack/query-example-react-basic-typescript Configuration
@tanstack/query-example-solid-basic-typescript Configuration
@tanstack/query-example-svelte-basic Configuration
@tanstack/query-example-vue-basic Configuration

@balazsmatepetro balazsmatepetro marked this pull request as ready for review March 2, 2023 18:10
@balazsmatepetro balazsmatepetro changed the title feat(codemod): initial implementation of remove overloads codemod remove overloads codemod Mar 3, 2023
@codecov-commenter
Copy link

codecov-commenter commented Mar 4, 2023

Codecov Report

Patch coverage: 96.95% and project coverage change: +0.32 🎉

Comparison is base (02f0e4e) 90.39% compared to head (975ddc9) 90.72%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@            Coverage Diff             @@
##            alpha    #5046      +/-   ##
==========================================
+ Coverage   90.39%   90.72%   +0.32%     
==========================================
  Files         105      110       +5     
  Lines        3791     3988     +197     
  Branches      952     1000      +48     
==========================================
+ Hits         3427     3618     +191     
- Misses        331      337       +6     
  Partials       33       33              
Impacted Files Coverage Δ
...es/codemods/src/v5/remove-overloads/utils/index.js 91.42% <91.42%> (ø)
packages/codemods/src/utils/index.js 97.56% <93.33%> (-0.95%) ⬇️
...ads/transformers/filter-aware-usage-transformer.js 97.95% <97.95%> (ø)
...s/transformers/query-fn-aware-usage-transformer.js 98.68% <98.68%> (ø)
...demods/src/v5/remove-overloads/remove-overloads.js 100.00% <100.00%> (ø)
...c/v5/remove-overloads/utils/unknown-usage-error.js 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@TkDodo
Copy link
Collaborator

TkDodo commented Mar 5, 2023

can you add documentation to the upgrade guide please:

https://tanstack.com/query/v5/docs/react/guides/migrating-to-v5

@TkDodo
Copy link
Collaborator

TkDodo commented Mar 5, 2023

not sure if this is possible but it would be much easier to look at the test cases if we had input and output co-located for each situation. Something like:

useIsMutating(['foo', 'bar'])

will become

useIsMutating({
  mutationKey: ['foo', 'bar']
})

right now, I have to know that line 18 in the input file corresponds to lines 36-38 in the output file ...

@balazsmatepetro
Copy link
Contributor Author

can you add documentation to the upgrade guide please:

https://tanstack.com/query/v5/docs/react/guides/migrating-to-v5

Of course, that will be added in a separate commit.

@balazsmatepetro
Copy link
Contributor Author

not sure if this is possible but it would be much easier to look at the test cases if we had input and output co-located for each situation. Something like:

Unfortunately not, at least I haven't found a way yet. 😞 I will try to come up with something nicer but probably not in this PR.

@TkDodo TkDodo mentioned this pull request Mar 6, 2023
@TkDodo TkDodo linked an issue Mar 6, 2023 that may be closed by this pull request
@balazsmatepetro
Copy link
Contributor Author

can you add documentation to the upgrade guide please:

5af2a2e

@TkDodo TkDodo merged commit 0028a14 into TanStack:alpha Mar 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

codemods for v5
3 participants