-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
refactor(client): simplify fetchUpdate code #11004
Conversation
Thanks for the step-by-step process @ArnaudBarre! There is a message here that says I think we should extract 9db55db (remove |
I don't know what was the initial goal for decline, but invalidate becoming a lot more powerful that what it was during this commit, I think it was never implemented or removed. I grep Plus if people want to trigger a location reload, they can just directly use I will split prune into another PR and decline into another one if you agree to drop it |
I think we should have both PRs, and we'll check quickly with Evan just in case pointing to them. I also agree that having this noop isn't needed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The refactors looks great to me. Re decline()
, I think we should still keep it to prevent a breaking change. Astro is currently using it.
It's also part of the spec so it might be a good idea to keep it for now to be compliant. And in case we ever find a use for it.
@bluwy maybe you could check why Astro is using it? It isn't doing anything on Vite's side. Maybe they believe it is working and it is hiding bugs (probably it was implemented in Snowpack). @ArnaudBarre we should split |
I will do that. In case we need to keep for backward compatibility, I would just keep it in the JS runtime but removes it from the type so that meta framework can be warn without breaking code from end users |
I spend few hours understanding the logic of the client and wanted to cleanup some inconsistency before sending a PR to update the hot.accept API.
Each commit is independant.
The main fix to me is the drop of the
moduleMap
that introduced me in error at the beginning. Thanks @patak-dev for this comment!Re: #7475 (comment)
This is technically breaking is people when doing calling noop decline method, but that's a good thing we're in alpha!