CI: switch Puppeteer loading to ESM import, pin Size tests to Node 22, and make Codecov upload non-blocking#582
Merged
Merged
Conversation
Copilot
AI
changed the title
[WIP] Fix CI failures in nevware21/ts-utils
CI: switch Puppeteer loading to ESM import, pin Size tests to Node 22, and make Codecov upload non-blocking
Jul 1, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #582 +/- ##
=======================================
Coverage 99.17% 99.17%
=======================================
Files 179 179
Lines 5475 5475
Branches 1211 1241 +30
=======================================
Hits 5430 5430
Misses 45 45 🚀 New features to boost your workflow:
|
nev21
approved these changes
Jul 2, 2026
nevware21-bot
approved these changes
Jul 2, 2026
nevware21-bot
left a comment
Contributor
There was a problem hiding this comment.
Approved by nevware21-bot
Contributor
There was a problem hiding this comment.
Pull request overview
This PR stabilizes CI execution for @nevware21/ts-utils by making Puppeteer resolution compatible with ESM-only Puppeteer releases, reducing Node-matrix variability for size-limit runs, and ensuring coverage upload failures don’t fail the whole workflow.
Changes:
- Updated Karma configs to resolve Puppeteer’s executable path via dynamic
import("puppeteer")from a subprocess (ESM-compatible). - Adjusted CI workflow so
npm run sizeruns only on Node 22 in the matrix. - Made the Codecov upload step non-blocking via
continue-on-error: true.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Adds @types/node to align Node typings with the TypeScript/TypeDoc toolchain used in CI. |
| karma.browser.conf.js | Switches Puppeteer executable resolution from CJS require() to ESM-friendly dynamic import(). |
| karma.browser.esnext.conf.js | Same Puppeteer ESM import adjustment for the ESNext browser Karma config. |
| karma.worker.conf.js | Same Puppeteer ESM import adjustment for the worker Karma config. |
| karma.worker.esnext.conf.js | Same Puppeteer ESM import adjustment for the ESNext worker Karma config. |
| .github/workflows/ci.yml | Runs size-limit only on Node 22 and makes Codecov upload non-blocking. |
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.
The failing CI path came from Puppeteer being loaded via CommonJS in Karma config while Puppeteer is ESM-only, plus flaky/non-portable size checks across the full Node matrix. This PR updates Puppeteer loading for Node 18+ compatibility and narrows workflow behavior where required.
Puppeteer ESM compatibility (Karma configs)
require("puppeteer")usage with dynamicimport("puppeteer")in:karma.browser.conf.jskarma.browser.esnext.conf.jskarma.worker.conf.jskarma.worker.esnext.conf.jsCI matrix stabilization for size checks
.github/workflows/ci.ymlso Size tests run only onmatrix.node == 22.Codecov hardening
.github/workflows/ci.ymlwithcontinue-on-error: true.CODECOV_TOKENwiring exactly as-is.