Packages

yargs

18.2.0 · 20 Sep 2026MIT241.1M / weekRepositoryHomepagenpmAtom feed

Your version

18.0.0

major27 May 2025Where it was published

18.2.0 is the newest release of 18.x.

In short

4 breaking4 new10 fixed4 internal

  • breaking

    Command names are not derived from modules passed to command.

  • breaking

    Singleton usage of yargs yargs.foo, yargs().argv, has been removed.

  • breaking

    Minimum node.js versions now ^20.19.0 || ^22.12.0 || >=23.

  • breaking

    Yargs is now ESM first

Release note

Breaking changes

  • breaking

    Command names are not derived from modules passed to command.

  • breaking

    Singleton usage of yargs yargs.foo, yargs().argv, has been removed.

  • breaking

    Minimum node.js versions now ^20.19.0 || ^22.12.0 || >=23.

  • breaking

    Yargs is now ESM first

Features

  • commandDir now works with ESM files

  • locale: adds hebrew translation

  • Yargs is now ESM first

  • zsh: Add default completion as fallback

Bug Fixes

  • addDirectory do not support absolute command dir

  • Allows ESM modules commands to be extensible using visit option

  • browser: fix shims so that yargs continues working in browser context

  • build: address problems with typescript compilation

  • Coerce should play well with parser configuration

  • Exit after async handler done

  • Handle spaces in bash completion

  • parser-configuration should work well with generated completion script

  • Propagate Dictionary including undefined in value type

  • zsh: completion no longer requires double tab when using autoloaded