bcoe / bcoe/c8

Crash on node v25

Open
#582 7 comments 7 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2.1k
Forks
99
PR merge metrics
No merged PRs in 30d

Description

```
c8 tape 'test/**/*.js'
file:///Users/coderaiser/@cloudcmd/fileop/node_modules/yargs/yargs:3
const {applyExtends, cjsPlatformShim, Parser, Yargs, processArgv} = require('./build/index.cjs')
^

ReferenceError: require is not defined in ES module scope, you can use import instead
at file:///Users/coderaiser/@cloudcmd/fileop/node_modules/yargs/yargs:3:69
at ModuleJobSync.runSync (node:internal/modules/esm/module_job:534:37)
```
Fix: https://github.com/bcoe/c8/pull/581
Related to https://github.com/yargs/yargs/issues/2509
Possible solution:

Possible solution: [`superc8`](https://github.com/coderaiser/superc8) with:

- ✅ Fixed TODO ([`parase-args#L176`](https://github.com/bcoe/c8/blob/main/lib/parse-args.js#L176), [`check-coverage#L14`](https://github.com/bcoe/c8/blob/ee2f1cfc5584d41bb2d51b788d0953dab0c798f8/lib/commands/check-coverage.js#L14));
- ✅ ESM-only code;
- ✅ Updated dependencies, including `yargs` that works in `node v25` and `node v26`;
- ✅ Applied 🐊[**Putout**](https://github.com/coderaiser/putout) default suggestions;
- ✅ When tests failed do not report coverage;
- ✅ Used `execa` instead of `foreground-child`;

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.