devOps: consolidate devDependencies, replace jest with node:test and … - #434
Merged
Merged
Conversation
…bump engine version to the current lowest LTS version 22.23.2
- Test Runner Migration: Replaced Jest with Node built-in node:test and node:assert/strict across
all 7 test suites (74 tests), eliminating ~250 transitive dependencies and reducing test execution
time
from ~13s to ~1.6s.
- Test Timeouts & Discovery: Restored bounded 15-second timeouts (--test-timeout=15000) for event-
based tests and used explicit test file paths to ensure reliable cross-platform
(macOS/Linux/Windows)
discovery.
- Code Coverage & Exclusions: Configured native Node coverage generating dual console spec tables and
coverage/lcov.info, excluding test/base/generated files via --test-coverage-exclude.
- Node Engine Bump: Bumped engines.node to >=22.23.2 and updated @types/node to ^22.20.2 to
resolve Node 20 V8 coverage sourcemap mapping crashes and align with the active LTS baseline.
- Dependency Consolidation: Replaced separate @typescript-eslint/eslint-plugin and @typescript-
eslint/parser with unified typescript-eslint, and removed dead packages (jest, @rollup/plugin-
commonjs, @rollup/plugin-node-resolve, @rollup/plugin-eslint, resolutions, overrides).
- Build & Sourcemaps: Restored sourcemap: true in Rollup to eliminate @rollup/plugin-typescript
build warnings, and removed unused json() plugin from CLI bundle.
- TypeScript Declaration Fix: Implemented declaration merging in .d.cts (export = PDFParser) so
CommonJS TypeScript consumers construct without TS2351.
- CI & Scripts: Modernized GitHub Actions workflow with a multi-OS matrix (ubuntu-latest, windows-
latest) using npm ci for reproducible clean builds, and updated test/p2j.one.sh to enforce exit
1 on unexpected exit code mismatches.
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.
…bump engine version to the current lowest LTS version 22.23.2
node:testandnode:assert/strictacrossall 7 test suites (74 tests), eliminating ~250 transitive dependencies and reducing test execution time
from ~13s to ~1.6s.
--test-timeout=15000) for event-based tests and used explicit test file paths to ensure reliable cross-platform (macOS/Linux/Windows)
discovery.
coverage/lcov.info, excluding test/base/generated files via--test-coverage-exclude.engines.nodeto>=22.23.2and updated@types/nodeto^22.20.2toresolve Node 20 V8 coverage sourcemap mapping crashes and align with the active LTS baseline.
@typescript-eslint/eslint-pluginand@typescript- eslint/parserwith unifiedtypescript-eslint, and removed dead packages (jest,@rollup/plugin- commonjs,@rollup/plugin-node-resolve,@rollup/plugin-eslint,resolutions,overrides).sourcemap: truein Rollup to eliminate@rollup/plugin-typescriptbuild warnings, and removed unused
json()plugin from CLI bundle..d.cts(export = PDFParser) soCommonJS TypeScript consumers construct without TS2351.
ubuntu-latest,windows- latest) usingnpm cifor reproducible clean builds, and updatedtest/p2j.one.shto enforceexit 1on unexpected exit code mismatches.