Commit 3689d59
authored
fix: improve
Worker-based environments (e.g. `jest` tests) do not have access to
`globalThis.require()` (while calling `require()` instead works). Deeper
investigation shows that `tsup` doesn't transpile this in a dangerous
way, so we can use this here.
Unblocks apify/apify-client-js#782 (tested)
Unblocks failing tests in #570createHmacSignatureAsync compatibility with worker-based environments (#573)1 parent c0b8030 commit 3689d59
1 file changed
+11
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
46 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
47 | 53 | | |
| 54 | + | |
| 55 | + | |
48 | 56 | | |
49 | 57 | | |
50 | 58 | | |
| |||
0 commit comments