Skip to content

refactor: replace @react-pdf/pdfkit fork with upstream pdfkit - #3509

Merged
diegomura merged 1 commit into
masterfrom
diegomura/pdfkit-upstream-swap-audit
Aug 23, 2026
Merged

refactor: replace @react-pdf/pdfkit fork with upstream pdfkit#3509
diegomura merged 1 commit into
masterfrom
diegomura/pdfkit-upstream-swap-audit

Conversation

@diegomura

@diegomura diegomura commented Aug 23, 2026

Copy link
Copy Markdown
Owner

Deletes the @react-pdf/pdfkit fork (97 files, ~12k lines) and points renderer and font at upstream pdfkit, pinned to exactly 0.20.1 since render relies on pdfkit internals. Upstream v0.20.0/v0.20.1 landed the last two prerequisites: doc.font() accepts pre-parsed fontkit Font instances, and Node ESM imports resolve to a real Node build (native fs/zlib, self-registering standard fonts), so the BROWSER-gated registerStdFonts in @react-pdf/font stays as-is — rollup treeshakes the standard-font imports out of the server bundle (verified in built output). Also removes the fork from vitest/eslint config and updates CLAUDE.md. Full suite green (224 files / 2454 tests incl. visual snapshots), lint clean; the 9 pre-existing render typecheck errors in addBookmarks.ts are unrelated (reproduce without pdfkit installed).

Closes #2613

Fallout for open PRs:

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Aug 23, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c0b5727

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 11 packages
Name Type
@react-pdf/renderer Minor
@react-pdf/font Minor
@react-pdf/math Major
@react-pdf/mermaid Major
next-14 Patch
next-15 Patch
@react-pdf/vite-example Patch
@react-pdf/types Patch
@react-pdf/layout Patch
@react-pdf/render Patch
@react-pdf/stylesheet Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@diegomura
diegomura merged commit 37a7a9f into master Aug 23, 2026
14 checks passed
@diegomura
diegomura deleted the diegomura/pdfkit-upstream-swap-audit branch August 23, 2026 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use main pdfkit repo

1 participant