-
Notifications
You must be signed in to change notification settings - Fork 9
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: remove unused helia, use verified fetch, and simplify code #89
Conversation
A few comments before I review:
👍 great, yea this needed done!
I believe in the last helia WG call we discussed not removing localStorage.
There is a TODO to use the commsChannel to use passMessageAndWaitForResponse (or whatever its called) which would require waiting until the message is passed and sw responds back |
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.
I'm a fan of these changes in general. I think there are a few changes we should get in before merging though.
Thanks Daniel!
@@ -97,6 +103,7 @@ const fetchHandler = async ({ path, request }: FetchHandlerArg): Promise<Respons | |||
return new Response('heliaFetch error: ' + errorMessage, { status: 500 }) |
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.
return new Response('heliaFetch error: ' + errorMessage, { status: 500 }) | |
return new Response('verifiedFetch error: ' + errorMessage, { status: 500 }) |
* fix: config loading on subdomains waits for updated config * fix: remove event.waitUtil inside channel.onmessagefrom the activate event is fired when the service worker is first activated, and then the channel.onmessagefrom event listener is set up. by the time the channel receives any messages, the event passed to activate will be done, and waitUntil has no effect (and throws an error) * fix: service worker handles being disposed of * fix: preload request from redirect page is handled by sw * chore: better trace logging for config updates
PR Summary
This PR is mostly refactoring with some small changes to make it easier to implement caching.
Notes & open questions
Change checklist