• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

yargs / yargs-parser / 406
100%

Build:
DEFAULT BRANCH: master
Ran 04 Apr 2018 02:07AM UTC
Jobs 3
Files 2
Run time 58s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
406

push

travis-ci

bcoe
fix: do not set boolean flags if not defined in `argv` (#119)

BREAKING CHANGE: `boolean` flags defined without a `default` value will now behave like other option type and won't be set in the parsed results when the user doesn't set the corresponding CLI arg.

Previous behavior:
```js
var parse = require('yargs-parser');

parse('--flag', {boolean: ['flag']});
// => { _: [], flag: true }

parse('--no-flag', {boolean: ['flag']});
// => { _: [], flag: false }

parse('', {boolean: ['flag']});
// => { _: [], flag: false }
```

New behavior:
```js
var parse = require('yargs-parser');

parse('--flag', {boolean: ['flag']});
// => { _: [], flag: true }

parse('--no-flag', {boolean: ['flag']});
// => { _: [], flag: false }

parse('', {boolean: ['flag']});
// => { _: [] } => flag not set similarly to other option type
```

340 of 348 branches covered (97.7%)

397 of 397 relevant lines covered (100.0%)

1154.97 hits per line

Jobs
ID Job ID Ran Files Coverage
1 406.1 04 Apr 2018 02:07AM UTC 0
100.0
Travis Job 406.1
2 406.2 04 Apr 2018 02:08AM UTC 0
100.0
Travis Job 406.2
3 406.3 04 Apr 2018 02:07AM UTC 0
100.0
Travis Job 406.3
Source Files on build 406
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #406
  • f6e65994 on github
  • Prev Build on master (#401)
  • Next Build on master (#408)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc