Files
private_image/frontend/patches/README.md
T
nobswebdev e10341d44b 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.
2026-10-15 18:57:43 +02:00

30 lines
1.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Dependency patches
## `@uswriting/exiftool@1.0.9` — stderr vs warnings
We do **not** use a `patch-package` diff here: the published `dist/*.js` files are one minified line each, so unified diffs are huge and hard to review.
Instead, `patches/patch-exiftool-stderr.mjs` runs on `postinstall` and removes two **documented** guard strings:
| Guard | Role |
| ----- | ---- |
| `READ_STDERR_GUARD` | After exit 0 on **read**, fail if stderr is non-empty |
| `WRITE_STDERR_GUARD` | After exit 0 on **write**, fail if stderr is non-empty |
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).