Closed Jack-Works closed 2 years ago
Specifically, it's not building. You can see the failing runs above.
What is this PR attempting to fix? Not clear what the issue is
What is this PR attempting to fix? Not clear what the issue is
This library failed to run inside a Web Worker because there is no window
variable in it.
now i think it's ok
What is this PR attempting to fix? Not clear what the issue is
This library failed to run inside a Web Worker because there is no
window
variable in it.
IIRC there are other issues preventing this library from running inside web workers. Have you tested this PR locally?
we have a patch to arweave-js https://github.com/DimensionDev/Maskbook/blob/develop/patches/arweave%401.11.4.patch to let it run in a Web Worker, but I didn't test all features. This PR just make it can be imported in a Web Worker without crash.
I prefer a squash-merge 👀
I presume someone tested this with ArConnect or arweave.app @hlolli ?
backstory please to this type of testing @rosmcmahon ?
typescript compiles global window vars to window. That's what typescript does, I see your concern in that regard.
ts: location.path js: window.location.path
yeah, i was thinking in more broad strokes actually:
we should probably do a quick test before publishing a new release, or is a scream test ok? 😅
Does that break something? "self" is equal to "window" in a normal Web page and also available as the global object in a Web Worker, I thought it should be ok?
as long as we aren't releasing major version I think a scream test is ok. There's no regression, api change or behvioral change in this as far as I can see. If there's one, it's going to have to be a big surprise.
hi, this PR is failing tests