Repository navigation
Update to PDF.js 6.5.438 and add renderer-src - #77
Merged
Merged
Conversation
…s for PDF.js and QuickJS - Updated the PDF.js worker source to version 6.5.438 in basic tests. - Added a new SVG file for the close icon in the editor toolbar. - Included the MIT license for PDF.js QuickJS. - Added the license for the QuickJS JavaScript engine.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
All alerts resolved. Learn more about Socket for GitHub. This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. Ignoring alerts on:
|
Collaborator
Author
|
@SocketSecurity ignore npm/pdfjs-dist@6.5.438 This is a false positive.
|
This was referenced Nov 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Updates the bundled PDF.js from 6.4.299 to 6.5.438 and adds a
renderer-srcattribute for the renderer worker that 6.5 introduces.This supersedes #73. Dependabot only bumps
package.jsonand the lockfile, but the viewer files insrc/buildandsrc/webare vendored, so the update also needspnpm sync:pdfjs.PDF.js 6.5.438 (96f4f3c)
pdfjs-distto 6.5.438 and regeneratessrc/buildandsrc/webwithpnpm sync:pdfjs. Running the sync at 6.4.299 first left the tree unchanged, so the vendored files carry no local patches.demo/custom-worker-src.html, and in the CDNworker-srctest.PDFViewerApplicationmember it uses still exists, no CSS variable the theme overrides was removed, andviewer.htmlis unchanged.renderer-src(dd8a6e9)pdf.renderer.mjs. The viewer keeps this off (disableWorkerRendering: true), and its default URL../build/pdf.renderer.mjsnever resolves in the element's srcdoc frame. Turning it on therefore loggedRenderer worker disabled: … is not a valid URLand drew on the main thread.renderer-srcworks likeworker-src. It defaults topdf.renderer.min.mjsnext to the element, followsassets-base, applies to the next document, and its origin is allowed in the frame'sscript-srcandworker-src.dist/pdf.renderer.min.mjs(175 KB). Bundlers emit that file the same way they emit the worker, so bundled apps get one more file even though the feature is off by default.demo/worker-rendering.htmlshows how to turn it on:setViewerOptions({ disableWorkerRendering: false }).The docs site needs a
renderer-srcrow and a line under Hosting after the release.Pre-existing test problems found during review are tracked in #76.
Validation
pnpm test -- --run: 40 passed (36 before). The suite also passes with thepublic/fixtures moved away, as CI sees the repository. Each of the four new tests fails when the feature it covers is broken.pnpm buildpasses, andtypes/is unchanged.dist/with worker rendering turned on: the renderer worker starts and draws pages, with no warning and no CSP violation, in three setups. These are the same-origin default, a cross-originassets-base, and a cross-originrenderer-src. With the renderer origin removed from the CSP, the cross-origin case fails, so the CSP entry is needed.pdf.renderer.min-<hash>.mjsnext to the worker.pnpm install --frozen-lockfilepasses.Checklist
renderer-srcafter the release.viewer.htmlis unchanged in 6.5.438, and the element adds no UI.🤖 Generated with Claude Code