fix(ci): handle Node 25 incompatibility with c8 11.0.0 / yargs 17.x#2783
Conversation
Co-authored-by: brendandburns <5751682+brendandburns@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Copilot The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@copilot as an alternative can you disable coverage via c8 for node25 and fall back to just plain unit tests? |
Co-authored-by: brendandburns <5751682+brendandburns@users.noreply.github.com>
Done in commit 528c983. Added a |
.github/workflows/test.yml
Outdated
| build: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false |
There was a problem hiding this comment.
Remove this line as it is now unrelated.
|
@copilot please address comments |
Co-authored-by: brendandburns <5751682+brendandburns@users.noreply.github.com>
91c2bae
into
dependabot/npm_and_yarn/main/c8-11.0.0
c8 11.0.0 (bumped to fix CVE-2026-26996 in minimatch) fails on Node 25 with
ReferenceError: require is not defined in ES module scope. Node 25 changed how extension-less files in"type": "module"packages are loaded—they're now treated as ESM. c8 11.0.0's updatedtest-exclude(v7→v8) switched glob v10→v13, which eliminated thenode_modules/yargs/node_modules/nested directory. Without it,yargs/yargs(extension-less, in a"type": "module"package) is now loaded as ESM by Node 25, whererequire()is not defined.Changes
package.jsontest-no-coveragescript — identical totestbut withoutc8, for use on Node 25 where c8 cannot start.github/workflows/test.ymlnpm run test-no-coverageinstead ofnpm testto skip c8 coverage and fall back to plain unit tests🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.