fix(deps): update dependency react-pdf to v11 - #18271
renovate[bot] wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the frontend PDF viewer from React-PDF 10.5.0 to 11.0.0.
Changes:
- Upgrades React-PDF and PDF.js.
- Refreshes related dependency resolutions and checksums.
Review note: React-PDF 11 enables Suspense by default; both existing Document usages need local fallbacks or suspense={false} to preserve current behavior. (Moderate, 3 votes.)
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
opencti-platform/opencti-front/package.json |
Updates the React-PDF dependency. |
opencti-platform/opencti-front/yarn.lock |
Refreshes React-PDF, PDF.js, and related dependency locks. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #18271 +/- ##
=======================================
Coverage 36.75% 36.75%
=======================================
Files 3470 3470
Lines 141349 141349
Branches 38175 38175
=======================================
+ Hits 51946 51954 +8
+ Misses 89403 89395 -8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
6ff3de4 to
fae8298
Compare
fae8298 to
9083637
Compare
Edited/Blocked NotificationRenovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR. You can manually request rebase by checking the rebase/retry box above. |
9083637 to
e7c72d5
Compare
React-PDF 11 suspends while loading and rethrows load failures by default,
so `Document` no longer honours the `loading` and `onLoadError` props the two
viewers are built on. `PdfViewer` would hand its wait to the nearest route
fallback, and `StixCoreObjectContent` would send a password-protected file to
the page Error Boundary instead of rendering its own placeholder.
Both viewers now pass `suspense={false}`, which is the documented way to keep
the previous behaviour. `Page` inherits the flag through the document context,
so the pages inside need no change.
The new tests cover both regressions: they pass on 10.5.0, fail on 11.0.0
without this change, and pass again with it. They need a DOMMatrix stub, which
PDF.js reads at import time and jsdom does not provide.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
e7c72d5 to
9118bbd
Compare
This PR contains the following updates:
10.5.0→11.0.0Release Notes
wojtekmaj/react-pdf (react-pdf)
v11.0.0Compare Source
See Upgrade guide from version 10.x to 11.x.
React-PDF 11 brings PDF loading into React's Suspense flow. Use the same loading fallbacks and Error Boundaries as the rest of your application, or keep your existing viewer behavior with
suspense={false}.This release also upgrades PDF.js to version 6, with improvements to rendering, accessibility, and performance, along with some important compatibility changes.
👀 Want to see exciting features more often? Consider sponsoring React-PDF.
❗️ = breaking change
What's new?
Document,Page,Thumbnail, andOutlinenow use your boundary fallbacks for loading and failures.suspense={false}onDocumentto keep the previous loading and error behavior.startTransitionto keep previously revealed content visible while loading another file or page.What's changed?
pdfjsdirectly, document/page proxies, or custom data factories, check the upgrade guide.onRenderAnnotationLayerSuccessnow runs after asynchronous annotation rendering finishes, and rendering failures are reported throughonRenderAnnotationLayerError.fileandoptionsobjects are compared by value.Configuration
📅 Schedule: (in timezone Europe/Paris)
* 0-4,22-23 * * 1-5)* * * * 0,6)🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.