Back to Explore

yargs/yargs-parser

GitHub
1 watchersOpen source

Last release: 5/26/2025

yargs-parser is the option parser used by yargs. It parses command line arguments (as a string or string array) into an object of key/value pairs, supporting common parsing options like aliases, booleans, arrays, type coercion, defaults, env var parsing, and configuration file loading.

Project status

  • Active maintenance: The repository shows a recent upstream push on 2026-05-15, but the provided versioned update history shows the last tagged update was v22.0.0 on 2025-05-26.
  • Update cadence: Based on the listed updates, there is a long gap between v22.0.0 (2025-05-26) and earlier updates (v21.1.1 and v21.1.0 in 2022), suggesting a slower, infrequent cadence lately.

AI summary generated Today

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • yargs-parser-v22.0.0

    5/26/2025

    yargs-parser v22.0.0 primarily shifts the package to be ESM-first. The release notes only call out the ESM-first breaking change, but the code diff shows additional compatibility changes around CommonJS entrypoints, supported Node versions, and the build/test toolchain.

    Breaking
  • yargs-parser-v21.1.1

    8/4/2022

    yargs-parser v21.1.1 is a small packaging and build-related update. The documented change is a TypeScript-related fix to ignore .cts artifacts during publishing.

  • yargs-parser-v21.1.0

    8/3/2022

    yargs-parser v21.1.0 adds support for importing the browser build and includes a few parsing-related bug fixes. The code changes mainly adjust Node version detection, refine how unknown options are treated when halt-at-non-option and unknown-options-as-args are enabled, and tighten handling of option tokens with 3 or more trailing hyphens.

    Features
  • yargs-parser-v21.0.1

    2/27/2022

    yargs-parser v21.0.1 is a small patch release focused on a Deno-specific bug fix. The release notes document returning the Deno environment object so envPrefix-based parsing works correctly.

  • yargs-parser-v21.0.0

    11/16/2021

    yargs-parser v21.0.0 primarily updates Node compatibility and fixes parsing behavior around JSON config imports in ESM and how quoted strings are handled. Release notes call out dropping support for Node 10, plus bug fixes for ESM JSON handling and preserving inner quotes during parsing.

    Breaking
  • yargs-parser-v20.2.9

    6/20/2021

    Release yargs-parser v20.2.9 is documented as a single bug fix related to the automated release pipeline. The provided code diff shows only version and changelog/version manifest updates, with no actual parser/runtime code changes present in the diff.

  • yargs-parser-v20.2.8

    6/20/2021

    yargs-parser v20.2.8 release notes only list a handful of bug fixes (Deno release, Turkish locale casing, a performance fix for unknown-options-as-args, and improved number detection in string-utils). The actual diff shows a much larger refactor to a TypeScript, ESM/CJS-compatible build with new packaging and internal implementations. Several potentially breaking behavior and compatibility changes are not mentioned in the release notes.

  • yargs-parser-v15.0.3

    6/20/2021

    yargs-parser v15.0.3 includes a single build/workflow related bug fix. The published package version and changelog were updated accordingly, but no runtime parsing logic or public API code changes are present in the diff.

  • yargs-parser-v15.0.2

    6/20/2021

    This release primarily addresses performance issues in yargs-parser when parsing unknown-options-as-args. In the actual code changes, it also introduces additional input sanitization intended to prevent prototype pollution during dot-notation parsing, which is not mentioned in the release notes.

    BreakingSecurity
  • v20.2.7

    3/10/2021

    Release v20.2.7 release notes contain only a single Deno-related bug fix. The actual code diff for this release shows a much larger, largely undocumented refactor and packaging change, including a migration from the legacy CommonJS implementation to a TypeScript-based ESM/CJS build with new entrypoints for Node, Deno, and browsers.