Patch zeroperl-ts so worker WASM load honors custom fetch.
Postinstall updates @6over3/zeroperl-ts and wires the worker to load zeroperl.wasm via Vite ?url.
This commit is contained in:
@@ -14,3 +14,16 @@ Instead, `patches/patch-exiftool-stderr.mjs` runs on `postinstall` and removes t
|
||||
See the script for exact literals and upstream context.
|
||||
|
||||
When upgrading `@uswriting/exiftool`, run `npm install` and confirm the script still finds both guards (or update the script for the new bundle).
|
||||
|
||||
## `@6over3/zeroperl-ts@1.0.10` — WASM load in module workers
|
||||
|
||||
`patches/patch-zeroperl-worker-fetch.mjs` changes the WASM loader so a custom `fetch` (from `@uswriting/exiftool` options) is honored even when `document` is missing (Web Workers).
|
||||
|
||||
| Snippet | Role |
|
||||
| ----- | ---- |
|
||||
| `if(Ee())a=await...` → `if(Ee()\|\|e)a=await...` (ESM) | Use fetch path when `options.fetch` is set |
|
||||
| `if(pe())a=await...` → `if(pe()\|\|e)a=await...` (CJS) | Same for CJS bundle |
|
||||
|
||||
Workers still pass Vite’s WASM URL via `zeroperl.wasm?url` and `exiftoolParseOptions.fetch` in app code.
|
||||
|
||||
When upgrading `@6over3/zeroperl-ts`, re-run `npm install` and confirm the script still matches (or update literals).
|
||||
|
||||
Reference in New Issue
Block a user