Skip to content

Array of camel-cased option with ConfigObjects #196

@juergba

Description

@juergba
var args = parse('--watchFiles path1 --watchFiles path2', {
    array: ['watch-files'],
    configObjects: [{'watchFiles': 'path3'}],
    configuration: {
        'combine-arrays': true,
        'camel-case-expansion': true
    }
})
console.log(args); 
// { _: [], watchFiles: [ 'path1', 'path2' ], 'watch-files': [ 'path1', 'path2' ] }

The result is incorrect, it should be:

{ _: [],
  watchFiles: [ 'path1', 'path2', 'path3' ],
  'watch-files': [ 'path1', 'path2', 'path3' ] }

The input of --watchFiles is not recognised as the camel-cased version of --watch-files.

yargs-parser: v13.0.0 and also current master.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions