Skip to content

fix: print c8's own version with yargs 18 - #608

Open
official-burak wants to merge 1 commit into
bcoe:mainfrom
official-burak:fix/cli-version-from-package-json
Open

fix: print c8's own version with yargs 18#608
official-burak wants to merge 1 commit into
bcoe:mainfrom
official-burak:fix/cli-version-from-package-json

Conversation

@official-burak

@official-burak official-burak commented Sep 2, 2026

Copy link
Copy Markdown

After the yargs 18 bump in v12, c8 --version no longer reads this package's version. It prints unknown, or in some installs the consuming app's version, which is what #607 ran into.

This sets .version() from c8's own package.json so the CLI always reports the published version. The test runs the bin from a cwd whose package.json is 1.0.0 so we don't pick that up again.

Fixes #607

Checklist
  • npm test, tests passing
  • npm run test:snap (to update the snapshot)
  • tests and/or benchmarks are included
  • documentation is changed or added

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.

v12.0.0 seems to have the wrong binary version

1 participant