Remove predicate typing for query filters#8958
Conversation
|
View your CI Pipeline Execution ↗ for commit 209af08.
☁️ Nx Cloud last updated this comment at |
|
So @TkDodo I'm in two minds if we should go as far as stripping out the generics entirely. It's more of a breaking change to remove them than to leave them unused, especially since the 4th type param (query key) does get used currently. What do you think? |
|
TypeScript errors on unused type parameters: so what option do we have other than deleting them? |
|
Should be possible to ignore the warnings I think? So it's more a question of where your mind is at as a maintainer I didn't do anything today beyond start this draft, there will be tests failing as well that I can sort out either way |
this isn’t just an eslint warning - it’s a TS error that you would need to silence with |
84eb7d3 to
8064c84
Compare
|
Hey @TkDodo I've stripped this out everywhere, might need synchronising with tRPC as I think we made some changes to support these generics but that should be quick |
|
failing test seems to be flake rather than anything I've done, could use a retry |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8958 +/- ##
===========================================
+ Coverage 44.47% 59.01% +14.54%
===========================================
Files 203 138 -65
Lines 8104 5358 -2746
Branches 1804 1424 -380
===========================================
- Hits 3604 3162 -442
+ Misses 4066 1907 -2159
+ Partials 434 289 -145 🚀 New features to boost your workflow:
|
Affected by TanStack/query#8958 Closes #6730 ## 🎯 Changes What changes are made in this PR? Is it a feature or a bug fix? <!-- Note: once you create a Pull request, we will automatically fix auto-fixable lint issues in your branch --> ## ✅ Checklist - [ ] I have followed the steps listed in the [Contributing guide](https://github.com/trpc/trpc/blob/main/CONTRIBUTING.md). - [ ] If necessary, I have added documentation related to the changes made. - [ ] I have added or updated the tests related to the changes made. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Streamlined internal query filtering methods by simplifying filter type parameters, improving usability and clarity. - **Chores** - Upgraded the core query library dependency across the project and examples to version `^5.74.7`, enhancing performance, stability, and access to the latest features. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: juliusmarminge <jmarminge@gmail.com>
Affected by TanStack/query#8958 Closes trpc/trpc#6730 ## 🎯 Changes What changes are made in this PR? Is it a feature or a bug fix? <!-- Note: once you create a Pull request, we will automatically fix auto-fixable lint issues in your branch --> ## ✅ Checklist - [ ] I have followed the steps listed in the [Contributing guide](https://github.com/trpc/trpc/blob/main/CONTRIBUTING.md). - [ ] If necessary, I have added documentation related to the changes made. - [ ] I have added or updated the tests related to the changes made. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Streamlined internal query filtering methods by simplifying filter type parameters, improving usability and clarity. - **Chores** - Upgraded the core query library dependency across the project and examples to version `^5.74.7`, enhancing performance, stability, and access to the latest features. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: juliusmarminge <jmarminge@gmail.com>
Affected by TanStack/query#8958 Closes trpc/trpc#6730 ## 🎯 Changes What changes are made in this PR? Is it a feature or a bug fix? <!-- Note: once you create a Pull request, we will automatically fix auto-fixable lint issues in your branch --> ## ✅ Checklist - [ ] I have followed the steps listed in the [Contributing guide](https://github.com/trpc/trpc/blob/main/CONTRIBUTING.md). - [ ] If necessary, I have added documentation related to the changes made. - [ ] I have added or updated the tests related to the changes made. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Streamlined internal query filtering methods by simplifying filter type parameters, improving usability and clarity. - **Chores** - Upgraded the core query library dependency across the project and examples to version `^5.74.7`, enhancing performance, stability, and access to the latest features. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: juliusmarminge <jmarminge@gmail.com>
Affected by TanStack/query#8958 Closes trpc/trpc#6730 ## 🎯 Changes What changes are made in this PR? Is it a feature or a bug fix? <!-- Note: once you create a Pull request, we will automatically fix auto-fixable lint issues in your branch --> ## ✅ Checklist - [ ] I have followed the steps listed in the [Contributing guide](https://github.com/trpc/trpc/blob/main/CONTRIBUTING.md). - [ ] If necessary, I have added documentation related to the changes made. - [ ] I have added or updated the tests related to the changes made. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Streamlined internal query filtering methods by simplifying filter type parameters, improving usability and clarity. - **Chores** - Upgraded the core query library dependency across the project and examples to version `^5.74.7`, enhancing performance, stability, and access to the latest features. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: juliusmarminge <jmarminge@gmail.com>
Affected by TanStack/query#8958 Closes trpc/trpc#6730 ## 🎯 Changes What changes are made in this PR? Is it a feature or a bug fix? <!-- Note: once you create a Pull request, we will automatically fix auto-fixable lint issues in your branch --> ## ✅ Checklist - [ ] I have followed the steps listed in the [Contributing guide](https://github.com/trpc/trpc/blob/main/CONTRIBUTING.md). - [ ] If necessary, I have added documentation related to the changes made. - [ ] I have added or updated the tests related to the changes made. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Streamlined internal query filtering methods by simplifying filter type parameters, improving usability and clarity. - **Chores** - Upgraded the core query library dependency across the project and examples to version `^5.74.7`, enhancing performance, stability, and access to the latest features. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: juliusmarminge <jmarminge@gmail.com>
Affected by TanStack/query#8958 Closes trpc/trpc#6730 ## 🎯 Changes What changes are made in this PR? Is it a feature or a bug fix? <!-- Note: once you create a Pull request, we will automatically fix auto-fixable lint issues in your branch --> ## ✅ Checklist - [ ] I have followed the steps listed in the [Contributing guide](https://github.com/trpc/trpc/blob/main/CONTRIBUTING.md). - [ ] If necessary, I have added documentation related to the changes made. - [ ] I have added or updated the tests related to the changes made. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Streamlined internal query filtering methods by simplifying filter type parameters, improving usability and clarity. - **Chores** - Upgraded the core query library dependency across the project and examples to version `^5.74.7`, enhancing performance, stability, and access to the latest features. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: juliusmarminge <jmarminge@gmail.com>
Affected by TanStack/query#8958 Closes trpc/trpc#6730 ## 🎯 Changes What changes are made in this PR? Is it a feature or a bug fix? <!-- Note: once you create a Pull request, we will automatically fix auto-fixable lint issues in your branch --> ## ✅ Checklist - [ ] I have followed the steps listed in the [Contributing guide](https://github.com/trpc/trpc/blob/main/CONTRIBUTING.md). - [ ] If necessary, I have added documentation related to the changes made. - [ ] I have added or updated the tests related to the changes made. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Streamlined internal query filtering methods by simplifying filter type parameters, improving usability and clarity. - **Chores** - Upgraded the core query library dependency across the project and examples to version `^5.74.7`, enhancing performance, stability, and access to the latest features. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: juliusmarminge <jmarminge@gmail.com>
Affected by TanStack/query#8958 Closes trpc/trpc#6730 ## 🎯 Changes What changes are made in this PR? Is it a feature or a bug fix? <!-- Note: once you create a Pull request, we will automatically fix auto-fixable lint issues in your branch --> ## ✅ Checklist - [ ] I have followed the steps listed in the [Contributing guide](https://github.com/trpc/trpc/blob/main/CONTRIBUTING.md). - [ ] If necessary, I have added documentation related to the changes made. - [ ] I have added or updated the tests related to the changes made. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Streamlined internal query filtering methods by simplifying filter type parameters, improving usability and clarity. - **Chores** - Upgraded the core query library dependency across the project and examples to version `^5.74.7`, enhancing performance, stability, and access to the latest features. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: juliusmarminge <jmarminge@gmail.com>
Affected by TanStack/query#8958 Closes trpc/trpc#6730 ## 🎯 Changes What changes are made in this PR? Is it a feature or a bug fix? <!-- Note: once you create a Pull request, we will automatically fix auto-fixable lint issues in your branch --> ## ✅ Checklist - [ ] I have followed the steps listed in the [Contributing guide](https://github.com/trpc/trpc/blob/main/CONTRIBUTING.md). - [ ] If necessary, I have added documentation related to the changes made. - [ ] I have added or updated the tests related to the changes made. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Streamlined internal query filtering methods by simplifying filter type parameters, improving usability and clarity. - **Chores** - Upgraded the core query library dependency across the project and examples to version `^5.74.7`, enhancing performance, stability, and access to the latest features. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: juliusmarminge <jmarminge@gmail.com>
Fixes #8768