Skip to content
CAI
Software that uses CAICheck a score

yargs/yargs

66.8

Adequate · 15 November 2026

5.9k

lines of production code

TypeScript

primary language

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Library codebase converted to TypeScript

The core library modules (including argument parsing, command handling, validation, completion, and middleware) have been rewritten in TypeScript. This change introduces static type checking for the library's internal logic and ensures that the public API is properly typed for consumers using TypeScript, improving developer experience and reducing runtime errors.

lib · high confidence

Security

Security fix for prototype pollution in config extends

The \apply-extends\ utility now prevents prototype pollution by explicitly skipping the \\_\proto\\_\ key during deep merging of extended configuration objects. This change ensures that user-supplied config files cannot overwrite the base object's prototype, addressing a security vulnerability in how nested configuration properties are merged.

lib/utils · high confidence

Behavioural changes

Introduction of internal TypeScript type definitions for yargs-parser and common utilities

This change adds new TypeScript declaration files (\lib/typings/common-types.ts\ and \lib/typings/yargs-parser-types.ts\) to the library. These files define internal types for the \yargs-parser\ interface (mirroring version 19.0.1) and provide shared utility types and platform shim interfaces. This supports the broader effort to modernize the codebase for ESM and Deno compatibility by isolating platform-specific dependencies and improving type safety for internal parsing logic.

lib/typings · medium confidence

Updated examples to support ESM and Deno

The example files have been migrated from CommonJS to ES Modules (ESM), with most files now using \import\ statements and \.mjs\ extensions. This change enables the examples to run in ESM-compatible environments like Deno and modern Node.js versions. The HTML example has also been updated to import the browser-specific ESM build of yargs directly from a CDN.

example · high confidence

Yargs v18.0.0: ESM-first architecture and Node.js version bump

Yargs has been upgraded to version 18.0.0, shifting the library to be ESM-first and raising the minimum supported Node.js version to ^20.19.0, ^22.12.0, or \>=23. This release removes legacy singleton usage patterns (such as \yargs.foo\ and \yargs().argv\) and changes how command names are derived from modules passed to \command\. The codebase has been refactored to use TypeScript, introducing new entry points for ESM (\index.mjs\), Deno (\deno.ts\), and browser environments (\browser.mjs\), alongside a new \YargsFactory\ class structure.

(repo-wide) · high confidence

Fixes

21 commits (12 fixes) fixing lib/platform-shims

A fix in lib/platform-shims — 21 commits (12 fixs), 4 files.

lib/platform-shims · medium confidence · unverified

Expose helper utilities for legacy Node.js compatibility

A new helpers module has been added to expose specific utility functions (applyExtends, hideBin, and Parser) that wrap internal implementation details. This change ensures these helpers are accessible for use in legacy versions of Node.js, addressing compatibility concerns by providing a stable interface for these underlying utilities.

helpers · high confidence

Test coverage

Added Deno-specific test coverage for platform shim and core yargs functionality; Added ESM test coverage for helpers, platform shim, and yargs core; Added test fixture for command name derivation from filename; Added test fixtures for CLI and command module scenarios; Added test fixtures for array-based command registration; Added test fixtures for configuration extension scenarios; Added test fixtures for nested command directories and cyclic references; Added test suite for ESM-first architecture.

Dependencies

531 commits updating dependencies (7 manifests)

A dependency / build maintenance change in (dependencies) — 531 commits (90 fixs), 7 files.

(dependencies) · high confidence · unverified

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 66 → 67 (+0.7)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.

Lenses

  • Code Health 62 → 62 (-0.6)
  • Architecture 89 → 87 (-2.4)
  • Maturity 61 → 64 (+2.9)
  • Readiness 65 → 65 (-0.1)
  • Security 87 → 91 (+4.0)
  • Performance 100 → 100 (+0.0)

Resolved (1)

  • Off-boarding risk: anonymized user #1

New (8)

  • Medium CVE: [GHSA redacted] (package-lock.json)
  • Medium CVE: [GHSA redacted] (package-lock.json)
  • Medium CVE: [GHSA redacted] (package-lock.json)
  • Medium CVE: [GHSA redacted] (package-lock.json)
  • Off-boarding risk: anonymized user #1
  • redundant comment (lib/validation.ts)
  • redundant comment (lib/yargs-factory.ts)
  • redundant comment (lib/yargs-factory.ts)

Changes since last survey

  • 4 commits — 4 feature/other, 0 fixes

By area

  • (root) — 2 commits
  • .github/workflows — 2 commits

Notable commits

  • change: chore: add acknowledgement of HeroDevs sponsorship (#2629)
  • change: chore: skip build if release-please not doing actual release (#2620)
  • change: chore: update actions and switch to supported release-please-action (#2614)
  • change: docs: add Release Policy (#2621)

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

yargs/yargs was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 15 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit f444858808bc11e9910fc5ed0d0322dc40d5638e — the exact code this score is about.
  • Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.65+preprod-3c33c1882dc1.