Skip to content

fix(pdf): keep PDF.js external in production - #7409

Merged
waleedlatif1 merged 2 commits into
stagingfrom
fix/pdf-bytes-issue
Sep 2, 2026
Merged

fix(pdf): keep PDF.js external in production#7409
waleedlatif1 merged 2 commits into
stagingfrom
fix/pdf-bytes-issue

Conversation

@j15z

@j15z j15z commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • keep PDF.js external to Next.js server bundles so its worker and canvas dependencies resolve at runtime
  • add a regression test that protects the production packaging requirement

Type of Change

  • Bug fix

Testing

  • bun run test next-config.test.ts lib/file-parsers/pdfjs-server.test.ts lib/file-parsers/pdf-parser.test.ts (9 tests passed)
  • bun run lint
  • bun run apps/sim/scripts/check-block-registry.ts origin/staging
  • bun run check:audits (45 audits passed)
  • bun run docs-manifest:check

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Sep 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Sep 2, 2026 8:01pm UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment

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.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR keeps pdfjs-dist external to Next.js production server bundles so PDF.js runtime dependencies remain resolvable.

  • Adds pdfjs-dist to serverExternalPackages.
  • Adds a correctly named and discoverable regression test for the packaging configuration.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
apps/sim/next.config.ts Adds pdfjs-dist to the server external-package list, preserving its runtime package layout.
apps/sim/next.config.test.ts Adds a discoverable Node-environment regression test and resolves the previously reported filename mismatch.

Reviews (2): Last reviewed commit: "chore(pdf): align config test filename" | Re-trigger Greptile

Comment thread apps/sim/next.config.test.ts
@j15z

j15z commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator Author

@greptile

@j15z

j15z commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@j15z I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

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.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit a663c4e into staging Sep 2, 2026
29 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/pdf-bytes-issue branch September 2, 2026 20: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.

2 participants