Skip to content

feat(runtime): require Node.js 22 and refresh PDF parsing - #253

Merged
ihor-sokoliuk merged 1 commit into
mainfrom
codex/feature/node22-pdf-migration
Aug 20, 2026
Merged

feat(runtime): require Node.js 22 and refresh PDF parsing#253
ihor-sokoliuk merged 1 commit into
mainfrom
codex/feature/node22-pdf-migration

Conversation

@ihor-sokoliuk

Copy link
Copy Markdown
Owner

Summary

  • require Node.js 22 or later and test Node 22, 24, and 26.7.0 in CI
  • update unpdf to 1.8.1 and migrate PDF teardown to the loading-task API
  • add deterministic local PDF E2E coverage and make E2E mandatory on every CI runtime
  • update installation guidance for the new runtime floor

Breaking change

Node.js 20 is no longer supported. Consumers must use Node.js 22 or later.

Verification

  • 740/740 unit and integration tests; 95.93% line coverage
  • 17/17 local E2E tests, including real two-page loopback PDF extraction
  • clean runtime gates on Node 22.23.2, 24.19.0, and 26.7.0
  • packed-consumer verification and npm audit pass
  • clean Docker build; runtime reports Node 24.19.0

This pull request does not change the package version, create a tag, or publish artifacts.

Coverage: 95.93% (was 94.97%)

BREAKING CHANGE: Node.js 22 or later is now required.
Copilot AI lite review requested due to automatic review settings August 20, 2026 15:39
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Copilot AI 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.

Pull request overview

This PR raises the runtime floor to Node.js 22+ and updates the PDF parsing/teardown flow to align with the newer unpdf loading-task lifecycle, while strengthening CI by running deterministic E2E coverage across all supported Node versions.

Changes:

  • Require Node.js >=22 (package engines, docs, CI matrix) and remove Node 20 from CI coverage.
  • Update unpdf to 1.8.1 and switch PDF teardown to loadingTask.destroy() via a dedicated teardown helper.
  • Add/expand unit + E2E coverage for PDF worker teardown and deterministic local PDF extraction, and run E2E in CI.

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/pdf-worker.ts Refactors PDF worker extraction to inject the document loader and reliably teardown via loadingTask.destroy().
src/pdf-worker-bootstrap.mjs Updates worker bootstrap comment to be runtime-agnostic (tsx loader timing).
README.md Updates installation guidance to require Node.js 22+.
package.json Bumps Node engine requirement to >=22 and updates unpdf to 1.8.1.
package-lock.json Locks updated Node engine requirement and unpdf@1.8.1 metadata.
docs/client-configurations.md Updates NPX/STDIO client requirement to Node.js 22+.
.github/workflows/ci.yml Removes Node 20 from the matrix and makes E2E tests mandatory on each runtime.
tests/unit/pdf-reader.test.ts Adds deterministic unit coverage for loading-task teardown and worker timeout/cleanup behaviors.
tests/unit/documentation.test.ts Extends metadata/documentation assertions for Node floor, unpdf version, and CI/E2E requirements.
tests/e2e/url-reader.e2e.ts Adds a deterministic local-PDF E2E test validating SSRF boundaries and PDF extraction behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@ihor-sokoliuk
ihor-sokoliuk merged commit 694a02b into main Aug 20, 2026
7 checks passed
@ihor-sokoliuk
ihor-sokoliuk deleted the codex/feature/node22-pdf-migration branch August 20, 2026 15:51
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