This repository has been archived by the owner on May 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
fix: window is not defined in worker contexts #59
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.WebTransport doesn't exist in service worker.
ping @achingbrain |
SgtPooki
added a commit
to SgtPooki/helia-service-worker-gateway
that referenced
this pull request
Mar 23, 2023
achingbrain
changed the title
feat: resolve serviceWorker error
fix: resolve serviceWorker error
Mar 23, 2023
achingbrain
reviewed
Mar 23, 2023
achingbrain
reviewed
Mar 23, 2023
SgtPooki
referenced
this pull request
in ipfs/aegir
Mar 23, 2023
we should get changes from aegir when ipfs/aegir#1219 lands
I pushed a change to run our test suite on Chrome webworkers which would have caught this error. |
achingbrain
approved these changes
Mar 24, 2023
achingbrain
changed the title
fix: resolve serviceWorker error
fix: window is not defined in worker contexts
Mar 24, 2023
github-actions bot
pushed a commit
that referenced
this pull request
Mar 24, 2023
## [1.0.10](v1.0.9...v1.0.10) (2023-03-24) ### Bug Fixes * window is not defined in worker contexts ([#59](#59)) ([94c646b](94c646b))
🎉 This PR is included in version 1.0.10 🎉 The release is available on: Your semantic-release bot 📦🚀 |
SgtPooki
commented
Mar 24, 2023
SgtPooki
commented
Mar 24, 2023
interface Window { | ||
WebTransport: any | ||
} | ||
var WebTransport: any |
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.
why get rid of the typings...?
SgtPooki
added a commit
to SgtPooki/helia-service-worker-gateway
that referenced
this pull request
Mar 25, 2023
* feat: move helia stuff to service worker * debugging: add dag, bootstrap, etc.... why doesnt libp2p like me * fix: libp2p/webtransports in serviceworker see libp2p/js-libp2p-webtransport#59 * feat: add some input caching and service worker stuff * feat: sw and main thread work properly, with status updating in UI terminal * feat: lint and fix all type errors * no more any * reframev1-routing and ipni-routing extend from CustomRouting.ts and are much smaller now * added eslint, plus 'npm run lint' and 'npm run lint:fix' commands * added lint run prior to prod build (inside 'npm run build') if we want to customize timeouts/other in the custom routing methods, we may need to just modify CustomRouting and then the 'super' calls inside the subclasses * chore: remove libp2p patch * chore: cleanup eslintrc.cjs * fix: empty localMultiAddr shouldn't try to dial * Revert "chore: remove libp2p patch" This reverts commit 74660c9. * fix: CustomRouting class and subclasses mapEvent * docs: update example image * fix: some typings * feat: consistent working with SW and window (when local multiAddr is provided) * fix: some UI styling * feat: split out libp2p configs * chore: remove src/components/Form.tsx * chore: move src/form.tsx to src/components/Form.tsx * chore: move header html to src/components/Header.tsx * feat: enable libp2p config toggle
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
window.WebTransport doesn't exist in service worker.