Repository navigation
fix: polyfill Map.prototype.getOrInsertComputed to stop PDF.js render crash - #795
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe change adds conditional ChangesMap upsert polyfill
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant Application
participant map_upsert_polyfill
participant pdfjs_dist
Application->>map_upsert_polyfill: import at startup
map_upsert_polyfill->>map_upsert_polyfill: install missing Map methods
Application->>pdfjs_dist: import after polyfill
pdfjs_dist-->>Application: initialize rendering dependency
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Thank you! But you would need to accept the CLA by typing "I have read the CLA Document and I hereby sign the CLA" in the comments so I can merge it. |
|
I have read the CLA Document and I hereby sign the CLA |
* @mvanhorn has signed the CLA in alam00000#795 * feat: update BentoPDF viewer to version 2.9.1 and add font embedding support * @OctoBored has signed the CLA in alam00000#835 * feat: add Edit PDF Text tool and related functionality * fix: trim whitespace from resource body * fix(ui): restyle leftover dark-theme chrome onto Sumi tokens Category headers, compact cards, legal copy, scrollbars, and nav hovers were still BentoPDF dark colors, so they went white or indigo on the paper atelier. Hide the privacy pill until the desktop nav row, let Originals columns shrink, and theme Edit PDF Text to Sumi. * fix(ui): drop indigo tool filters and stray legal-page chrome tools.html still overrode Sumi chips with BentoPDF navy/indigo, and main.ts injected “classic tool” continuation on Terms and other non-tools. Keep that adapter for registered tools only and set Inspect/Flow/Proof/Recipes document titles correctly. --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: alam00000 <adullah.alam.tapadar2000@gmail.com> Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: ajdohaxhia <ajdohaxhia@users.noreply.github.com>
This PR contains the following updates: | Package | Update | Change | |---|---|---| | [ghcr.io/alam00000/bentopdf-simple](https://github.com/alam00000/bentopdf) | patch | `2.8.7` → `2.8.8` | | [ghcr.io/gchq/cyberchef](https://github.com/gchq/CyberChef) | minor | `11.3.0` → `11.4.0` | | [jgraph/drawio](https://www.drawio.com) ([source](https://github.com/jgraph/docker-drawio)) | minor | `31.1.8` → `31.4.2` | | [plantuml/plantuml-server](https://github.com/plantuml/plantuml-server) | patch | `v1.2026.6` → `v1.2026.8` | --- ### Release Notes <details> <summary>alam00000/bentopdf (ghcr.io/alam00000/bentopdf-simple)</summary> ### [`v2.8.8`](https://github.com/alam00000/bentopdf/releases/tag/v2.8.8): Text Editing In BentoPDF! and many more - v2.8.8 [Compare Source](alam00000/bentopdf@v2.8.8...v2.8.8) ##### Dad Joke Of the Release What do you call a bee that can't make up its mind? A maybe 🤣 ##### The Biggest Release of BentoPDF yet! **This is the biggest release of BentoPDF**. BentoPDF can now edit text, image, shapes in BentoPDF and there are two new engines **Kura** and **Hyper Compress**. Detailed Explanation is below. ##### PDF Text Editing BentoPDF can now edit the actual text inside a PDF. You can click any paragraph and type. Text reflows live, fonts and styling are preserved, and everything runs entirely in your browser, as always. - **Edit in place** with live reflow, real font matching, and word wrap that follows the original layout - **Full styling**: bold, italic, underline, strikethrough, superscript, subscript, font family and size, text colour, outline colour and width, character and line spacing - **Paragraph control**: left / centre / right / justify alignment, bulleted and numbered lists with indent levels, and left-to-right and right-to-left text - **Find & replace** across the document, plus **spell-check** with a personal dictionary and per-language switching - **Images**: add, replace in place, or export a PNG, edit it in any app, and have your saved changes re import automatically - **Objects**: align, distribute, rotate, flip, duplicate, and reorder front to back. Even commercial software like Apryse and Nutrient do not support this - **Accessibility**: alt text for tagged PDFs, and reading-order text export - Undo / redo, document properties, page navigation, zoom presets This was arguably the hardest feature I had built so far. Given the complex nature of PDFs and the different ways it can be produced, you might encounter certain bugs. ##### Note Local fonts access is only available on chromium based browsers such as Chrome and Edge. Other browsers have a limitation of not having the font access API. ##### Hyper Compress is the best open source PDF compression engine [hyper.bentopdf.com](https://hyper.bentopdf.com) · [github.com/alam00000/bentopdf-hyper-compress](https://github.com/alam00000/bentopdf-hyper-compress) Hyper is a High fidelity, content preserving PDF compressor that preserves PDF conformance. - **Monotonic**: Hyper never returns a larger file. If compression does not save space, you get the original back untouched. This makes it useful for workflows so you can have a predicctable output. - **True lossless mode**, with no quality loss - **Verified output**: transformations that can affect visual fidelity are checked and rolled back when a page cannot be reproduced faithfully. **0.39% corruption rate, the lowest of any engine measured** - **Benchmarked** against Ghostscript, MuPDF and qpdf across 2,104 real-world PDFs and 27,352 engine runs, with fidelity measured by an independent renderer: | Tier | Hyper | Ghostscript | MuPDF | qpdf | | -------- | ---------------------- | ------------- | ------------- | ------------ | | Lossless | **22.4% @​ SSIM 1.000** | 21.1% @​ 0.997 | 4.7% @​ 1.000 | 6.3% @​ 1.000 | | 300 dpi | **52.3% @​ 1.000** | 19.1% @​ 0.996 | 14.0% @​ 1.000 | n/a | | 150 dpi | **58.2% @​ 0.999** | 42.4% @​ 0.994 | 19.4% @​ 1.000 | n/a | | 72 dpi | **64.8% @​ 0.996** | 53.9% @​ 0.990 | 28.0% @​ 0.999 | n/a | - Ships as a CLI, Node SDK, C API, self-hosted service, and a WebAssembly build for the browser ##### Kura is a PDF standards and preflight engine [kura.bentopdf.com](https://kura.bentopdf.com) · [github.com/alam00000/bentopdf-kura](https://github.com/alam00000/bentopdf-kura) Kura turns everyday PDFs into archival, print and accessible ones, from a single engine. - **Supports every standard**: all 11 PDF/A levels, PDF/UA-1 and UA-2, PDF/X-1a through X-6, PDF/E-1 and PDF/VT, plus Factur-X, ZUGFeRD, XRechnung and Order-X e-invoices - **Print preflight built in**: 396 bundled profiles covering hairlines, rich black, image resolution, overprint, transparency, page boxes, fonts and colour, with repairs where a repair exists, and your own profiles in JSON or the XML dialect you already use - **Validates clean**: 0 red on the veraPDF corpus, Isartor 204/204, BFO 34/34, Ghent Output Suite 5.0 69/69, PDF/UA Reference Suite 10/10, Cal Poly PDF/VT 24/24 - **Proven on real files**: 30,677 real-world PDFs converted, **zero crashes**, zero timeouts, 0.05 s median - Also Ships as a CLI, C library, npm package, Docker image, and a WebAssembly build that runs entirely in the browser ##### Note Both Kura and Hyper are not yet integrated into BentoPDF. I need to do some further tests and optimizations after which they will be ready to be integrated. However they are stable and you can try them out ##### 🐛 Bug Fixes 1. Webpage strings fail to render on self-hosted simple version on some browsers [#​833](alam00000/bentopdf#833) 2. Service Worker not precaching assets [#​830](alam00000/bentopdf#830) 3. PDF To Tiff OOM bug [#​829](alam00000/bentopdf#829) 4. Bug In PDF commenting where the cursor moved to EOL [#​809](alam00000/bentopdf#809) 5. URL redirection issue [#​796](alam00000/bentopdf#796) 6. WASM Initialization timeout error [#​324](alam00000/bentopdf#324) ##### New Features & Improvements 1. Author names can now be changed in PDF Editor - [#​707](alam00000/bentopdf#707) 2. Github API Call is optional - [#​269](alam00000/bentopdf#269) 3. Korean, CJK, Indic and other Non Latin Texts were not supported in PDF Editor when added as text. this has now been fixed. Also the text is now written into the content stream, its searchable and selectable . - [#​404](alam00000/bentopdf#404) 4. BentoPDF live website now has removed Simple Analytics. It used to track anonymous visit count only. But as a pledge to complete privacy both BentoPDF live website and self hosted tools have 0 analytics. 5. New Duplex sort tool by [@​r0ckarong](https://github.com/r0ckarong) - [#​752](alam00000/bentopdf#752) ❤️ 6. A polyfill fix for pdf.js which caused rendering crashes in older browsers by [@​mvanhorn](https://github.com/mvanhorn) - [#​795](alam00000/bentopdf#795) ❤️ 7. Translations and other fixes by [@​PeterDaveHello](https://github.com/PeterDaveHello) and [@​Stephan-P](https://github.com/Stephan-P) ❤️ ##### What's More - build(deps): bump dompurify from 3.4.11 to 3.4.12 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​805](alam00000/bentopdf#805) - build(deps): bump PDF engine and viewer to [`7ffa16f`](alam00000/bentopdf@7ffa16f9c5cd) by [@​github-actions](https://github.com/github-actions)\[bot] in [#​838](alam00000/bentopdf#838) - Fix broken star history chart in README by [@​OctoBored](https://github.com/OctoBored) in [#​835](alam00000/bentopdf#835) ❤️ - Update nl/tools.json by [@​Stephan-P](https://github.com/Stephan-P) in [#​824](alam00000/bentopdf#824) ❤️ - build(deps): bump postcss from 8.5.16 to 8.5.26 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​823](alam00000/bentopdf#823) - build(deps): bump nanoid from 3.3.15 to 3.3.18 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​832](alam00000/bentopdf#832) - build(deps): bump mermaid from 11.16.0 to 11.16.1 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​821](alam00000/bentopdf#821) - build(deps-dev): bump brace-expansion from 2.1.2 to 2.1.4 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​822](alam00000/bentopdf#822) - Correct grammar, wording, branding, and metadata inconsistencies by [@​PeterDaveHello](https://github.com/PeterDaveHello) in [#​790](alam00000/bentopdf#790) ❤️ - fix: polyfill Map.prototype.getOrInsertComputed to stop PDF.js render crash by [@​mvanhorn](https://github.com/mvanhorn) in [#​795](alam00000/bentopdf#795) - build(deps): bump PDF engine and viewer to [`b9854c1`](alam00000/bentopdf@b9854c1098fc) by [@​github-actions](https://github.com/github-actions)\[bot] in [#​841](alam00000/bentopdf#841) - (Feature) Add Duplex sort / collate documents (Fixes [#​220](alam00000/bentopdf#220)) by [@​r0ckarong](https://github.com/r0ckarong) in [#​752](alam00000/bentopdf#752) - build(deps): bump PDF engine and viewer to [`f486379`](alam00000/bentopdf@f48637921bf4) by [@​github-actions](https://github.com/github-actions)\[bot] in [#​843](alam00000/bentopdf#843) - build(deps): bump PDF engine and viewer to [`8ff5002`](alam00000/bentopdf@8ff5002c6cd5) by [@​github-actions](https://github.com/github-actions)\[bot] in [#​844](alam00000/bentopdf#844) ##### New Contributors - [@​github-actions](https://github.com/github-actions)\[bot] made their first contribution in [#​838](alam00000/bentopdf#838) - [@​OctoBored](https://github.com/OctoBored) made their first contribution in [#​835](alam00000/bentopdf#835) ❤️ - [@​mvanhorn](https://github.com/mvanhorn) made their first contribution in [#​795](alam00000/bentopdf#795) ❤️ - [@​r0ckarong](https://github.com/r0ckarong) made their first contribution in [#​752](alam00000/bentopdf#752) ❤️ ##### A Note From Dev Thank you so much for your continued support of BentoPDF. ❤️ Unfortunately, I broke my hand a couple of weeks ago, so this release was originally planned to include several more features, including Measurement, an Acrobat Parity Comparison Tool, Print Production, and Accessibility. I wasn't able to get them ready in time, but once I'm fully recovered, I'll be working on bringing them to BentoPDF as soon as possible. I really look forward to hearing what you think of this release! If you run into any bugs or issues, please don't hesitate to report them. Have a wonderful weekend, and thank you again for all your support! ❤️ **Full Changelog**: <alam00000/bentopdf@v2.8.7...v2.8.8> ### [`v2.8.8`](https://github.com/alam00000/bentopdf/releases/tag/v2.8.8): Text Editing In BentoPDF! and many more - v2.8.8 [Compare Source](alam00000/bentopdf@v2.8.7...v2.8.8) ##### Dad Joke Of the Release What do you call a bee that can't make up its mind? A maybe 🤣 ##### The Biggest Release of BentoPDF yet! **This is the biggest release of BentoPDF**. BentoPDF can now edit text, image, shapes in BentoPDF and there are two new engines **Kura** and **Hyper Compress**. Detailed Explanation is below. ##### PDF Text Editing BentoPDF can now edit the actual text inside a PDF. You can click any paragraph and type. Text reflows live, fonts and styling are preserved, and everything runs entirely in your browser, as always. - **Edit in place** with live reflow, real font matching, and word wrap that follows the original layout - **Full styling**: bold, italic, underline, strikethrough, superscript, subscript, font family and size, text colour, outline colour and width, character and line spacing - **Paragraph control**: left / centre / right / justify alignment, bulleted and numbered lists with indent levels, and left-to-right and right-to-left text - **Find & replace** across the document, plus **spell-check** with a personal dictionary and per-language switching - **Images**: add, replace in place, or export a PNG, edit it in any app, and have your saved changes re import automatically - **Objects**: align, distribute, rotate, flip, duplicate, and reorder front to back. Even commercial software like Apryse and Nutrient do not support this - **Accessibility**: alt text for tagged PDFs, and reading-order text export - Undo / redo, document properties, page navigation, zoom presets This was arguably the hardest feature I had built so far. Given the complex nature of PDFs and the different ways it can be produced, you might encounter certain bugs. ##### Note Local fonts access is only available on chromium based browsers such as Chrome and Edge. Other browsers have a limitation of not having the font access API. ##### Hyper Compress is the best open source PDF compression engine [hyper.bentopdf.com](https://hyper.bentopdf.com) · [github.com/alam00000/bentopdf-hyper-compress](https://github.com/alam00000/bentopdf-hyper-compress) Hyper is a High fidelity, content preserving PDF compressor that preserves PDF conformance. - **Monotonic**: Hyper never returns a larger file. If compression does not save space, you get the original back untouched. This makes it useful for workflows so you can have a predicctable output. - **True lossless mode**, with no quality loss - **Verified output**: transformations that can affect visual fidelity are checked and rolled back when a page cannot be reproduced faithfully. **0.39% corruption rate, the lowest of any engine measured** - **Benchmarked** against Ghostscript, MuPDF and qpdf across 2,104 real-world PDFs and 27,352 engine runs, with fidelity measured by an independent renderer: | Tier | Hyper | Ghostscript | MuPDF | qpdf | | -------- | ---------------------- | ------------- | ------------- | ------------ | | Lossless | **22.4% @​ SSIM 1.000** | 21.1% @​ 0.997 | 4.7% @​ 1.000 | 6.3% @​ 1.000 | | 300 dpi | **52.3% @​ 1.000** | 19.1% @​ 0.996 | 14.0% @​ 1.000 | n/a | | 150 dpi | **58.2% @​ 0.999** | 42.4% @​ 0.994 | 19.4% @​ 1.000 | n/a | | 72 dpi | **64.8% @​ 0.996** | 53.9% @​ 0.990 | 28.0% @​ 0.999 | n/a | - Ships as a CLI, Node SDK, C API, self-hosted service, and a WebAssembly build for the browser ##### Kura is a PDF standards and preflight engine [kura.bentopdf.com](https://kura.bentopdf.com) · [github.com/alam00000/bentopdf-kura](https://github.com/alam00000/bentopdf-kura) Kura turns everyday PDFs into archival, print and accessible ones, from a single engine. - **Supports every standard**: all 11 PDF/A levels, PDF/UA-1 and UA-2, PDF/X-1a through X-6, PDF/E-1 and PDF/VT, plus Factur-X, ZUGFeRD, XRechnung and Order-X e-invoices - **Print preflight built in**: 396 bundled profiles covering hairlines, rich black, image resolution, overprint, transparency, page boxes, fonts and colour, with repairs where a repair exists, and your own profiles in JSON or the XML dialect you already use - **Validates clean**: 0 red on the veraPDF corpus, Isartor 204/204, BFO 34/34, Ghent Output Suite 5.0 69/69, PDF/UA Reference Suite 10/10, Cal Poly PDF/VT 24/24 - **Proven on real files**: 30,677 real-world PDFs converted, **zero crashes**, zero timeouts, 0.05 s median - Also Ships as a CLI, C library, npm package, Docker image, and a WebAssembly build that runs entirely in the browser ##### Note Both Kura and Hyper are not yet integrated into BentoPDF. I need to do some further tests and optimizations after which they will be ready to be integrated. However they are stable and you can try them out ##### 🐛 Bug Fixes 1. Webpage strings fail to render on self-hosted simple version on some browsers [#​833](alam00000/bentopdf#833) 2. Service Worker not precaching assets [#​830](alam00000/bentopdf#830) 3. PDF To Tiff OOM bug [#​829](alam00000/bentopdf#829) 4. Bug In PDF commenting where the cursor moved to EOL [#​809](alam00000/bentopdf#809) 5. URL redirection issue [#​796](alam00000/bentopdf#796) 6. WASM Initialization timeout error [#​324](alam00000/bentopdf#324) ##### New Features & Improvements 1. Author names can now be changed in PDF Editor - [#​707](alam00000/bentopdf#707) 2. Github API Call is optional - [#​269](alam00000/bentopdf#269) 3. Korean, CJK, Indic and other Non Latin Texts were not supported in PDF Editor when added as text. this has now been fixed. Also the text is now written into the content stream, its searchable and selectable . - [#​404](alam00000/bentopdf#404) 4. BentoPDF live website now has removed Simple Analytics. It used to track anonymous visit count only. But as a pledge to complete privacy both BentoPDF live website and self hosted tools have 0 analytics. 5. New Duplex sort tool by [@​r0ckarong](https://github.com/r0ckarong) - [#​752](alam00000/bentopdf#752) ❤️ 6. A polyfill fix for pdf.js which caused rendering crashes in older browsers by [@​mvanhorn](https://github.com/mvanhorn) - [#​795](alam00000/bentopdf#795) ❤️ 7. Translations and other fixes by [@​PeterDaveHello](https://github.com/PeterDaveHello) and [@​Stephan-P](https://github.com/Stephan-P) ❤️ ##### What's More - build(deps): bump dompurify from 3.4.11 to 3.4.12 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​805](alam00000/bentopdf#805) - build(deps): bump PDF engine and viewer to [`7ffa16f`](alam00000/bentopdf@7ffa16f9c5cd) by [@​github-actions](https://github.com/github-actions)\[bot] in [#​838](alam00000/bentopdf#838) - Fix broken star history chart in README by [@​OctoBored](https://github.com/OctoBored) in [#​835](alam00000/bentopdf#835) ❤️ - Update nl/tools.json by [@​Stephan-P](https://github.com/Stephan-P) in [#​824](alam00000/bentopdf#824) ❤️ - build(deps): bump postcss from 8.5.16 to 8.5.26 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​823](alam00000/bentopdf#823) - build(deps): bump nanoid from 3.3.15 to 3.3.18 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​832](alam00000/bentopdf#832) - build(deps): bump mermaid from 11.16.0 to 11.16.1 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​821](alam00000/bentopdf#821) - build(deps-dev): bump brace-expansion from 2.1.2 to 2.1.4 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​822](alam00000/bentopdf#822) - Correct grammar, wording, branding, and metadata inconsistencies by [@​PeterDaveHello](https://github.com/PeterDaveHello) in [#​790](alam00000/bentopdf#790) ❤️ - fix: polyfill Map.prototype.getOrInsertComputed to stop PDF.js render crash by [@​mvanhorn](https://github.com/mvanhorn) in [#​795](alam00000/bentopdf#795) - build(deps): bump PDF engine and viewer to [`b9854c1`](alam00000/bentopdf@b9854c1098fc) by [@​github-actions](https://github.com/github-actions)\[bot] in [#​841](alam00000/bentopdf#841) - (Feature) Add Duplex sort / collate documents (Fixes [#​220](alam00000/bentopdf#220)) by [@​r0ckarong](https://github.com/r0ckarong) in [#​752](alam00000/bentopdf#752) - build(deps): bump PDF engine and viewer to [`f486379`](alam00000/bentopdf@f48637921bf4) by [@​github-actions](https://github.com/github-actions)\[bot] in [#​843](alam00000/bentopdf#843) - build(deps): bump PDF engine and viewer to [`8ff5002`](alam00000/bentopdf@8ff5002c6cd5) by [@​github-actions](https://github.com/github-actions)\[bot] in [#​844](alam00000/bentopdf#844) ##### New Contributors - [@​github-actions](https://github.com/github-actions)\[bot] made their first contribution in [#​838](alam00000/bentopdf#838) - [@​OctoBored](https://github.com/OctoBored) made their first contribution in [#​835](alam00000/bentopdf#835) ❤️ - [@​mvanhorn](https://github.com/mvanhorn) made their first contribution in [#​795](alam00000/bentopdf#795) ❤️ - [@​r0ckarong](https://github.com/r0ckarong) made their first contribution in [#​752](alam00000/bentopdf#752) ❤️ ##### A Note From Dev Thank you so much for your continued support of BentoPDF. ❤️ Unfortunately, I broke my hand a couple of weeks ago, so this release was originally planned to include several more features, including Measurement, an Acrobat Parity Comparison Tool, Print Production, and Accessibility. I wasn't able to get them ready in time, but once I'm fully recovered, I'll be working on bringing them to BentoPDF as soon as possible. I really look forward to hearing what you think of this release! If you run into any bugs or issues, please don't hesitate to report them. Have a wonderful weekend, and thank you again for all your support! ❤️ **Full Changelog**: <alam00000/bentopdf@v2.8.7...v2.8.8> </details> <details> <summary>gchq/CyberChef (ghcr.io/gchq/cyberchef)</summary> ### [`v11.4.0`](https://github.com/gchq/CyberChef/blob/HEAD/CHANGELOG.md#1140---2026-08-18) [Compare Source](gchq/CyberChef@v11.3.0...v11.4.0) This release includes a security fix - Security: patch XSS in Regular expression module \[[@​Ne0re0](https://github.com/Ne0re0)] - chore (deps): bump [@​codemirror/view](https://github.com/codemirror/view) from 6.43.8 to 6.43.9 in the patch-updates group | \[[#​2731](gchq/CyberChef#2731)] - chore (deps): bump [@​codemirror/commands](https://github.com/codemirror/commands) from 6.10.4 to 6.11.0 in the minor-updates group | \[[#​2732](gchq/CyberChef#2732)] - Add XPRESS (MS-XCA) decompression operations \[[@​MP-GOWTHAM](https://github.com/MP-GOWTHAM)] | \[[#​2722](gchq/CyberChef#2722)] - Feat/node 26 support \[[@​alleria173](https://github.com/alleria173)] | \[[#​2699](gchq/CyberChef#2699)] - chore(root): update allowlist \[[@​evenstensberg](https://github.com/evenstensberg)] | \[[#​2713](gchq/CyberChef#2713)] - chore (deps): bump the patch-updates group across 1 directory with 7 updates | \[[#​2730](gchq/CyberChef#2730)] - chore (deps): bump the minor-updates group across 1 directory with 9 updates | \[[#​2729](gchq/CyberChef#2729)] - chore (deps): bump docker/login-action from 4.5.2 to 4.6.0 in the actions-dependencies group | \[[#​2716](gchq/CyberChef#2716)] - chore (deps): bump node from `a0b9bf0` to `d32cdf6` in the docker-dependencies group | \[[#​2723](gchq/CyberChef#2723)] - docs(root): improve docs a bit \[[@​evenstensberg](https://github.com/evenstensberg)] | \[[#​2718](gchq/CyberChef#2718)] - fix: use js-yaml for both JSON to YAML and YAML to JSON \[[@​bartvanandel](https://github.com/bartvanandel)] | \[[#​2710](gchq/CyberChef#2710)] - chore (deps): bump the patch-updates group across 1 directory with 6 updates | \[[#​2712](gchq/CyberChef#2712)] - chore (deps): bump the minor-updates group across 1 directory with 3 updates | \[[#​2705](gchq/CyberChef#2705)] - chore (deps): bump the actions-dependencies group with 2 updates | \[[#​2703](gchq/CyberChef#2703)] - fix: replace `shasum` / `sha256sum` / `sed` calls with node built-ins \[[@​bartvanandel](https://github.com/bartvanandel)] | \[[#​2019](gchq/CyberChef#2019)] - chore (deps): bump fast-uri from 3.1.4 to 3.1.5 | \[[#​2709](gchq/CyberChef#2709)] - chore (deps): bump ip-address from 10.2.0 to 10.4.0 | \[[#​2708](gchq/CyberChef#2708)] - fix: stop Parse QR Code from participating in Magic ([#​2610](gchq/CyberChef#2610)) \[[@​Sanjays2402](https://github.com/Sanjays2402)] | \[[#​2613](gchq/CyberChef#2613)] - Restrict A1Z26 Magic checks to valid ranges \[[@​vetrovk](https://github.com/vetrovk)] | \[[#​2644](gchq/CyberChef#2644)] - feat: Extend automated ingredient validation to include argSelector ingredients ([#​2641](gchq/CyberChef#2641)) \[[@​mansiverma897993](https://github.com/mansiverma897993)] | \[[#​2643](gchq/CyberChef#2643)] - Add Modular Exponentiation operation \[[@​p-leriche](https://github.com/p-leriche)] | \[[#​2149](gchq/CyberChef#2149)] - Add npm allowScripts policy for npm v12 \[[@​zainnadeem786](https://github.com/zainnadeem786)] | \[[#​2682](gchq/CyberChef#2682)] - chore (deps): bump assorted vulnerable dependencies \[[@​GCHQDeveloper581](https://github.com/GCHQDeveloper581)] | \[[#​2689](gchq/CyberChef#2689)] - chore (deps): bump shell-quote from 1.8.4 to 1.10.0 | \[[#​2690](gchq/CyberChef#2690)] - chore (deps): bump the patch-updates group across 1 directory with 9 updates | \[[#​2686](gchq/CyberChef#2686)] - chore (deps): bump the actions-dependencies group across 1 directory with 2 updates | \[[#​2685](gchq/CyberChef#2685)] - chore (deps): bump nginxinc/nginx-unprivileged from `fd3314e` to `44e3633` in the docker-dependencies group | \[[#​2684](gchq/CyberChef#2684)] </details> <details> <summary>jgraph/docker-drawio (jgraph/drawio)</summary> ### [`v31.4.2`](jgraph/docker-drawio@v31.4.1...v31.4.2) [Compare Source](jgraph/docker-drawio@v31.4.1...v31.4.2) ### [`v31.4.1`](jgraph/docker-drawio@v31.3.2...v31.4.1) [Compare Source](jgraph/docker-drawio@v31.3.2...v31.4.1) ### [`v31.3.2`](jgraph/docker-drawio@v31.3.1...v31.3.2) [Compare Source](jgraph/docker-drawio@v31.3.1...v31.3.2) ### [`v31.3.1`](jgraph/docker-drawio@v31.1.8...v31.3.1) [Compare Source](jgraph/docker-drawio@v31.1.8...v31.3.1) </details> <details> <summary>plantuml/plantuml-server (plantuml/plantuml-server)</summary> ### [`v1.2026.8`](plantuml/plantuml-server@v1.2026.6...v1.2026.8) [Compare Source](plantuml/plantuml-server@v1.2026.6...v1.2026.8) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My43My4yIiwidXBkYXRlZEluVmVyIjoiNDMuNzMuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsicmVub3ZhdGUiXX0=--> Reviewed-on: https://forgejo.internal/forgejo_admin/infra-personal/pulls/137
Description
Fetched
pdfjs-dist@5.5.207(the version currently resolved bypackage-lock.jsonunder the^5.4.624caret range) from unpkg and confirmed the crash site directly:PDFPageProxy.render()unconditionally callsthis._transport.getOptionalContentConfig(renderingIntent), which calls#cacheSimpleMethod("GetOptionalContentConfig"), which callsthis.#methodPromises.getOrInsertComputed(name, () => ...)(build/pdf.mjsline ~15510) - an exact match for the minified stack trace in the issue (this.#e.getOrInsertComputed(t,()=>this.messageHandler.sendWithPromise(t,e))).render()also callsthis._intentStates.getOrInsertComputed(cacheKey, makeObj)on the same code path.Map.prototype.getOrInsertComputedis a very recent TC39 "Upsert" built-in thatpdfjs-distnow relies on unconditionally, without feature-detection or a bundled polyfill - so it crashes in any browser/engine that lacks native support, which explains why it fails identically across Safari 18.6 and the reporter's Chrome build, and also explains the second, independently-reported crash inpdf-multi-tool(any tool callingpdfJsPage.render()is affected, not just OCR)./ocr-pdf.htmlcrashes on every PDF withTypeError: this.#e.getOrInsertComputed is not a function, thrown from PDF.js'srender()->getOptionalContentConfig()path (main-*.jschunk). Reproduced on both Safari 18.6 and Chrome latest, on a self-hosted Docker deployment (ghcr.io/alam00000/bentopdf-simple:latest). The reporter speculated a worker/main-thread PDF.js version mismatch, butsrc/js/main.tssetsGlobalWorkerOptions.workerSrcvia Vite'snew URL('pdfjs-dist/build/pdf.worker.min.mjs', import.meta.url), which always resolves to the same installedpdfjs-distpackage as the main thread - so worker/main are in lockstep, ruling that theory out. A second reporter (BlackWolfWoof, 2026-07-12) hit an apparently related crash in the unrelatedpdf-multi-tool, which also calls `pdfJsPage.render({ canvasContext, ...Fixes #662
Type of change
Please delete options that are not relevant.
🧪 How Has This Been Tested?
Native support present: if
Map.prototype.getOrInsertComputedalready exists (feature-detected viaMap.prototype.hasOwnPropertyortypeofcheck), the polyfill module does not overwrite it - assert the original function reference is unchanged after import.Polyfill installs when missing: delete/stub
Map.prototype.getOrInsertComputedbefore import (or test the standalone install function against a plain object shaped like a Map), then call it on aMapinstance and assert it exists as a function afterward.Existing key:
map.getOrInsertComputed(key, cb)on a Map that already haskeyreturns the existing value and never invokescb.Missing key:
map.getOrInsertComputed(key, cb)on a Map withoutkeyinvokescb(key)exactly once, stores the result underkey, and returns it.Regression guard: a lightweight smoke test (or comment referencing the OCR/PDF.js path) documenting that this polyfill is what unblocks
pdfjsPage.render()ingetOptionalContentConfig, so a future removal of the import doesn't silently reintroduce the crash.Checklist:
Summary by CodeRabbit
Compatibility
Mapconvenience methods in environments where they are unavailable.Bug Fixes