Skip to content

Update dependency pdfjs-dist to v6#10034

Open
renovate[bot] wants to merge 2 commits into
mainfrom
renovate/pdfjs-dist-6.x
Open

Update dependency pdfjs-dist to v6#10034
renovate[bot] wants to merge 2 commits into
mainfrom
renovate/pdfjs-dist-6.x

Conversation

@renovate

@renovate renovate Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
pdfjs-dist (source) 5.7.2846.0.227 age confidence

Release Notes

mozilla/pdf.js (pdfjs-dist)

v6.0.227

Compare Source

PDF.js 6.0 is a major release that contains a number of API changes, features and bugfixes.

The complete list of changes in this release is shown below. If you're upgrading to PDF.js 6.0 we recommend checking the changes prefixed with [api-minor] and [api-major] since those might require updates to your code.

Changes since v5.7.284


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • "before 3am"
  • Automerge
    • At any time (no schedule defined)

🚦 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.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot added dependencies PRs or issues relating to dependencies renovate labels Jun 3, 2026
@greptile-apps

greptile-apps Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR bumps pdfjs-dist from v5.7.284 to v6.0.227 (a major release) and fully regenerates all viewer bundle assets by running the documented update-viewer.ts script, so the package version and pre-built files are kept in sync.

  • Package and lock file: pdfjs-dist version is updated in packages/pdfjs-viewer/package.json and pnpm-lock.yaml.
  • Viewer bundle files: viewer.mjs (now v6.0.227/241dbabbf), viewer.html, viewer.css, locale .ftl files, and the source map are all regenerated — picking up upstream [api-major] changes (removal of PDFDocumentProxy.prototype.destroy, removal of old-browser light-dark() polyfills, new CSP meta tag, Webpack runtime replaced with native ESM output) and new features (image file support in the merge picker, knockout transparency group rendering).

Confidence Score: 5/5

Safe to merge — the package bump and all pre-built viewer assets are in sync, the documented update-viewer script was run, and Trilium's own code communicates with the viewer exclusively via postMessage so no direct pdfjs API calls are affected.

The PR is a well-formed, complete dependency update: the npm version, pnpm lock file, viewer bundle JS/CSS/HTML, source map, and locale files are all regenerated together. Trilium's client code doesn't call the removed pdfjs APIs directly — all interaction goes through iframe postMessage.

No files require special attention.

Important Files Changed

Filename Overview
packages/pdfjs-viewer/package.json Version bumped from 5.7.284 to 6.0.227; all dependent viewer assets have been regenerated in this same PR.
packages/pdfjs-viewer/viewer/viewer.mjs Regenerated viewer bundle (v6.0.227). Webpack runtime bootstrap removed in favour of native ESM; getXfaPageViewport moved into XfaLayer class; EventBus internal listener API updated to use 'on' + internalOpt.
packages/pdfjs-viewer/viewer/viewer.html Adds upstream CSP meta tag (default-src 'none', connect-src ); file picker now accepts image/ and multiple files; inline style removed from printServiceDialog.
packages/pdfjs-viewer/viewer/viewer.css Removes csstools light-dark() polyfills; now uses native CSS nesting and light-dark() directly following the browser minimum-support bump.
pnpm-lock.yaml Lock file updated to reflect pdfjs-dist@6.0.227.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[pdfjs-dist 5.7.284] -->|Renovate bump| B[pdfjs-dist 6.0.227]
    B --> C[package.json updated]
    B --> D[pnpm-lock.yaml updated]
    B --> E[update-viewer.ts script run]
    E --> F[viewer.mjs regenerated v6.0.227]
    E --> G[viewer.html updated + CSP + image picker]
    E --> H[viewer.css - native CSS nesting]
    E --> I[locale .ftl files updated]
    subgraph Trilium Integration
        K[PDF type_widget iframe postMessage] -->|no direct pdfjs API calls| F
    end
Loading

Reviews (3): Last reviewed commit: "chore(pdfjs-viewer): regenerate vendored..." | Re-trigger Greptile

},
"devDependencies": {
"pdfjs-dist": "5.7.284"
"pdfjs-dist": "6.0.227"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Viewer bundle files not updated after version bump

This PR updates the pdfjs-dist npm package version, but the viewer/viewer.mjs, viewer/viewer.html, viewer/viewer.css, locale files, images, and wasm assets in packages/pdfjs-viewer/viewer/ are still from v5.7.284. The repository's documented PDF.js update process (CLAUDE.mdUpdating PDF.js) requires running npx tsx scripts/update-viewer.ts from the packages/pdfjs-viewer directory, then pnpm build, and committing the updated viewer files. Without this, the bundled viewer served to browsers is v5 while the TypeScript sources (and their typings) are compiled against the v6 API — including breaking [api-major] changes such as the removal of PDFDocumentProxy.prototype.destroy and the altered getDocument signature.

Fix in Claude Code

@codecov

codecov Bot commented Jun 3, 2026

Copy link
Copy Markdown

Bundle Report

Changes will increase total bundle size by 6.32MB (7.55%) ⬆️⚠️, exceeding the configured threshold of 5%.

Bundle name Size Change
client-esm 46.31MB 6.32MB (15.79%) ⬆️⚠️

Affected Assets, Files, and Routes:

view changes for bundle: client-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
src/typescript-*.js 3.46MB 3.47MB 45230.46% ⚠️
src/typescript-*.js (New) 64 bytes 64 bytes 100.0% 🚀
src/typescript-*.js (New) 7.66kB 7.66kB 100.0% 🚀
src/ts_lib_files-*.js (New) 2.8MB 2.8MB 100.0% 🚀
src/jquery_types-*.js (New) 1.12MB 1.12MB 100.0% 🚀
src/src-*.js 22 bytes 90.37kB 0.02%
src/src-*.js -38 bytes 531.77kB -0.01%
src/src-*.js (Deleted) -8.64kB 0 bytes -100.0% 🗑️
src/dist-*.js 32 bytes 7.81kB 0.41%
src/dist-*.js 32 bytes 7.44kB 0.43%
src/dist-*.js 32 bytes 7.68kB 0.42%
src/dist-*.js -4.02kB 66.77kB -5.68%
src/dist-*.js 31 bytes 14.37kB 0.22%
src/dist-*.js 32 bytes 7.49kB 0.43%
src/dist-*.js 6 bytes 63 bytes 10.53% ⚠️
src/dist-*.js 32 bytes 7.67kB 0.42%
src/dist-*.js 31 bytes 28.29kB 0.11%
src/dist-*.js 32 bytes 7.41kB 0.43%
src/dist-*.js 32 bytes 7.37kB 0.44%
src/dist-*.js 32 bytes 7.49kB 0.43%
src/dist-*.js 32 bytes 7.4kB 0.43%
src/dist-*.js -25 bytes 57 bytes -30.49%
src/dist-*.js 31 bytes 146.82kB 0.02%
src/dist-*.js 12 bytes 30.81kB 0.04%
src/dist-*.js 32 bytes 7.74kB 0.42%
src/dist-*.js 32 bytes 7.68kB 0.42%
src/dist-*.js 32 bytes 39.62kB 0.08%
src/dist-*.js 32 bytes 7.8kB 0.41%
src/dist-*.js 31 bytes 20.73kB 0.15%
src/dist-*.js 32 bytes 7.17kB 0.45%
src/dist-*.js 29 bytes 43.72kB 0.07%
src/dist-*.js 32 bytes 7.66kB 0.42%
src/dist-*.js 32 bytes 7.41kB 0.43%
src/dist-*.js 31 bytes 20.99kB 0.15%
src/dist-*.js 32 bytes 8.79kB 0.37%
src/dist-*.js 32 bytes 7.36kB 0.44%
src/dist-*.js 32 bytes 7.71kB 0.42%
src/dist-*.js 32 bytes 7.47kB 0.43%
src/dist-*.js 32 bytes 7.5kB 0.43%
src/dist-*.js -1.83kB 14.41kB -11.25%
src/dist-*.js -2.62kB 63 bytes -97.65%
src/dist-*.js 32 bytes 7.82kB 0.41%
src/dist-*.js 32 bytes 7.67kB 0.42%
src/dist-*.js 32 bytes 7.79kB 0.41%
src/dist-*.js 32 bytes 7.67kB 0.42%
src/dist-*.js 32 bytes 7.74kB 0.41%
src/dist-*.js 32 bytes 7.5kB 0.43%
src/dist-*.js -66.97kB 229.88kB -22.56%
src/dist-*.js -14.52kB 70.79kB -17.02%
src/dist-*.js 8.45kB 16.23kB 108.48% ⚠️
src/dist-*.js 184 bytes 7.82kB 2.41%
src/dist-*.js -90.07kB 7.67kB -92.16%
src/dist-*.js (New) 97.74kB 97.74kB 100.0% 🚀
src/dist-*.js (New) 2.68kB 2.68kB 100.0% 🚀
src/dist-*.js (New) 84.43kB 84.43kB 100.0% 🚀
src/content_renderer-*.js -24 bytes 319.52kB -0.01%
src/preact_types-*.js (New) 252.7kB 252.7kB 100.0% 🚀
src/constants-*.js -9.39kB 199.44kB -4.5%
src/esm-*.js -40.15kB 4.21kB -90.51%
src/esm-*.js (New) 44.36kB 44.36kB 100.0% 🚀
src/script_api-*.js (New) 37.79kB 37.79kB 100.0% 🚀
src/setup-*.js 22 bytes 16.49kB 0.13%
src/Code-*.js 168 bytes 6.08kB 2.84%
src/vfs.esm-*.js (New) 4.1kB 4.1kB 100.0% 🚀
src/mermaid-*.core-C5g7tRvI.js (New) 3.93kB 3.93kB 100.0% 🚀
src/ReadOnlyText-*.css 241 bytes 2.83kB 9.29% ⚠️
src/turtle-*.js -2 bytes 1.96kB -0.1%
src/linter-*.js (Deleted) -1.29MB 0 bytes -100.0% 🗑️
src/globals-*.js (Deleted) -74.52kB 0 bytes -100.0% 🗑️
src/mermaid-*.core-CaKSIEj2.js (Deleted) -3.93kB 0 bytes -100.0% 🗑️
src/eslint-*.js (Deleted) -879 bytes 0 bytes -100.0% 🗑️

@renovate renovate Bot changed the title Update dependency pdfjs-dist to v6 chore(deps): update dependency pdfjs-dist to v6 Jun 3, 2026
@renovate renovate Bot changed the title chore(deps): update dependency pdfjs-dist to v6 Update dependency pdfjs-dist to v6 Jun 3, 2026
@renovate renovate Bot changed the title Update dependency pdfjs-dist to v6 chore(deps): update dependency pdfjs-dist to v6 Jun 3, 2026
@renovate renovate Bot changed the title chore(deps): update dependency pdfjs-dist to v6 Update dependency pdfjs-dist to v6 Jun 6, 2026
@renovate renovate Bot force-pushed the renovate/pdfjs-dist-6.x branch from 63b55a8 to 25be16e Compare June 7, 2026 17:23
Renovate bumped the pdfjs-dist devDependency to 6.0.227 but cannot
regenerate the vendored viewer. Ran scripts/update-viewer.ts to refresh
web/viewer.{html,css,mjs} and locale files for v6.

The v6 viewer.html now ships a Content-Security-Policy. Verified it is
compatible with Trilium's customizations: injected <style> elements are
allowed via style-src-elem 'unsafe-inline', custom.{css,mjs} load under
script-src/style-src-elem 'self', and our code uses CSSOM (not blocked
inline style attributes). No client code uses the removed raw APIs
(getDocument param-less, PDFDocumentProxy.destroy).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@dosubot dosubot Bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Jun 9, 2026
@renovate

renovate Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

Edited/Blocked Notification

Renovate 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.

⚠️ Warning: custom changes will be lost.

@codecov

codecov Bot commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies PRs or issues relating to dependencies merge-conflicts renovate size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant