Skip to content

chore: Update to support 0.19 #54

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

arv
Copy link
Collaborator

@arv arv commented Apr 11, 2025

0.19 removes updateTTL from Query. Instead it gets passed into the view factory function.

This PR supports both 0.18 and 0.19 by checking the arguments passed to the view factory function. If updateTTL is passed, it is passed to the view. If not, it is taken from the query.

Once 0.18 is old enough the workaround can be removed.

0.19 removes updateTTL from Query. Instead it gets passed into the
view factory function.

This PR supports both 0.18 and 0.19 by checking the arguments
passed to the view factory function. If updateTTL is passed, it
is passed to the view. If not, it is taken from the query.

Once 0.18 is old enough the workaround can be removed.
@arv arv requested review from danielroe and markusgeert April 11, 2025 07:49
@arv
Copy link
Collaborator Author

arv commented Apr 11, 2025

There is no rush to land this. It can wait until 0.19 is released... Who knows. There might be further changes.

Copy link
Collaborator

@markusgeert markusgeert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@danielroe do you want to merge and release?

@@ -47,7 +47,7 @@ export function useQuery<
)

watch(ttl, (ttl) => {
toValue(query).updateTTL(ttl)
toValue(view)?.updateTTL(ttl)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can just do this:

Suggested change
toValue(view)?.updateTTL(ttl)
view.value?.updateTTL(ttl)

@arv
Copy link
Collaborator Author

arv commented Apr 14, 2025

I would wait until 0.19 is done. I'm thinking about his to remove more things from query

@danielroe
Copy link
Owner

marking as draft in the interim - ping me whenever you'd like! 🙏

@danielroe danielroe marked this pull request as draft April 21, 2025 09:42
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants