Open benkeen opened 2 years ago
Not so quick. Logic to generate valid ones is fiddly. Removing from 4.0.12.
I gave this another stab tonight. No luck yet, but a few notes.
I was able to get it going just fine with IIFE with only a small change to the source generator file: altering export const onmessage
to self.onmessage
. That then references the top-level WorkerGlobalScope from within the IIFE. That then breaks the tests, but should be easily solveable. Plus TBH the worker-related boilerplate will need to be separated from the actual generation code so down the road when this thing is a node package as well as a web app, the execution code can be called from both contexts.
ecc library invalid
errors on the ECPairFactory creation step when running a test.No-one else complains about this. I couldn't reproduce it on their own repo when checking out (node 14 too). I suspect it's something to do with the jest / TS/JS build target... not sure. I did try changing the tsconfig target to ES2020 like in their repo but got the same thing. Need to isolate it in a separate repo & if there's still problems open up a ticket.
Suggested by someone at work. Quick & easy addition!