Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dashdash

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dashdash - npm Package Versions

23

2.0.0

Diff

Changelog

Source

2.0.0

  • [Backward incompatible change] This version drops official support for versions of node.js before 10.x. Dashdash 1.x supports back to node 0.10.x. I've no direct intention of breaking compat, but new changes won't be tested on older node versions. Moving to a newer node allows me to switch to a modernish node-tap for better testing.

    Dev changes:

    • Switch from nodeunit to node-tap for testing.
    • Switch from jsstyle to eslint for linting, and prettier for formatting.
    • Prefix release tags with a "v", e.g. "v2.0.0", as is I think more typical with other projects.
trentm
published 1.14.1 •

Changelog

Source

1.14.1

  • [issue #30] Change the output used by dashdash's Bash completion support to indicate "there are no completions for this argument" to cope with different sorting rules on different Bash/platforms. For example:

      $ triton -v -p test2 package get <TAB>          # before
      ##-no -tritonpackage- completions-##
    
      $ triton -v -p test2 package get <TAB>          # after
      ##-no-completion- -results-##
    
trentm
published 1.14.0 •

Changelog

Source

1.14.0

  • New synopsisFromOpt(<option spec>) function. This will be used by node-cmdln to put together a synopsis of options for a command. Some examples:

      > synopsisFromOpt({names: ['help', 'h'], type: 'bool'});
      '[ --help | -h ]'
      > synopsisFromOpt({name: 'file', type: 'string', helpArg: 'FILE'});
      '[ --file=FILE ]'
    
trentm
published 1.13.1 •

Changelog

Source

1.13.1

  • [issue #20] bashCompletionSpecFromOptions breaks on an options array with an empty-string group.
trentm
published 1.13.0 •

Changelog

Source

1.13.0

  • Update assert-plus dep to 1.x to get recent fixes (particularly for assert.optional*).

  • Drop testing (and official support in packages.json#engines) for node 0.8.x. Add testing against node 5.x and 4.x with make testall.

  • [pull #16] Change the positiveInteger type to NOT accept zero (0). For those who might need the old behaviour, see "examples/custom-option-intGteZero.js". (By Dave Pacheco.)

trentm
published 1.12.2 •

Changelog

Source

1.12.2

  • Bash completion: Add argtypes to specify the types of positional args. E.g. this would allow you to have an ssh command with argtypes = ['host', 'cmd'] for bash completion. You then have to provide Bash functions to handle completing those types via the specExtra arg. See "examples/ddcompletion.js" for an example.

  • Bash completion: Tweak so that options or only offered as completions when there is a leading '-'. E.g. mytool <TAB> does NOT offer options, mytool -<TAB> does. Without this, a tool with options would never be able to fallback to Bash's "default" completion. For example ls <TAB> wouldn't result in filename completion. Now it will.

  • Bash completion: A workaround for not being able to explicitly have no completion results. Because dashdash's completion uses complete -o default, we fallback to Bash's "default" completion (typically for filename completion). Before this change, an attempt to explicitly say "there are no completions that match" would unintentionally trigger filename completion. Instead as a workaround we return:

      $ ddcompletion --none <TAB>         # the 'none' argtype
      ##-no           completions-##
    
      $ ddcompletion                      # a custom 'fruit' argtype
      apple   banana  orange
      $ ddcompletion z
      ##-no           -fruit-         completions-##
    

    This is a bit of a hack, but IMO a better experience than the surprise of matching a local filename beginning with 'z', which isn't, in this case, a "fruit".

trentm
published 1.12.1 •

Changelog

Source

1.12.1

  • Bash completion: Document <option spec>.completionType. Add includeHidden option to bashCompletionSpecFromOptions(). Add support for dealing with hidden subcmds.
trentm
published 1.12.0 •

Changelog

Source

1.12.0

  • Support for generating Bash completion files. See the "Bash completion" section of the README.md and "examples/ddcompletion.js" for an example.
trentm
published 1.11.0 •

Changelog

Source

1.11.0

  • Add the arrayFlatten boolean option to dashdash.addOptionType used for custom option types. This allows one to create an arrayOf... option type where each usage of the option can return multiple results. For example:

      node mytool.js --foo a,b --foo c
    

    We could define an option type for --foo such that opts.foo = ['a', 'b', 'c']. See "examples/custom-option-arrayOfCommaSepString.js" for an example.

trentm
published 1.10.1 •

Changelog

Source

1.10.1

  • Trim the published package to the minimal bits. Before: 24K tarball, 144K unpacked. After: 12K tarball, 48K unpacked. npm won't let me drop the README.md. :)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc