Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): bump sywac from 1.2.2 to 1.3.0 #657

Merged
merged 1 commit into from
Apr 1, 2020

Conversation

dependabot-preview[bot]
Copy link
Contributor

Bumps sywac from 1.2.2 to 1.3.0.

Release notes

Sourced from sywac's releases.

New .strict() mode added

Thanks to @elliot-nelson, you can now configure sywac to error when unknown flags or arguments are encountered during parsing, giving your CLI an extra layer of security against typos for sensitive operations.

To enable strict mode, call the .strict() synchronous configuration method, just like you would do for any other configuration.

A good example

Consider this use-case from #17:

// example of sensitive operation WITHOUT strict mode
require('sywac')
  .boolean('-D, --dry-run', { desc: 'Dry run' })
  .command('delete-all', {
    desc: 'Deletes everything',
    run: argv => {
      console.log(argv.D ? 'no harm done' : 'wreak havoc')
    }
  })
  .help('-h, --help', { implicitCommand: false })
  .parseAndExit()
$ program delete-all --dyr-run
wreak havoc

Oh no! Without .strict() mode, the parser basically ignored the mistyped --dyr-run option.

But if we add .strict() mode:

// example of sensitive operation WITH strict mode
require('sywac')
  .boolean('-D, --dry-run', { desc: 'Dry run' })
  .command('delete-all', {
    desc: 'Deletes everything',
    run: argv => {
      console.log(argv.D ? 'no harm done' : 'wreak havoc')
    }
  })
  .help('-h, --help', { implicitCommand: false })
  .strict() // <-- just add this one line here
  .parseAndExit()
$ program delete-all --dyr-run
Usage: program delete-all [options]
</tr></table> ... (truncated)
Commits
  • 14f5ef6 release v1.3.0
  • de1eefb feat: add .strict() mode to error on unknown flags/args (#51)
  • 82e0a8e chore: bump dev dependencies, March 2020 edition (#48)
  • a7b7c8b chore(package): update standard to version 14.0.0 (#40)
  • See full diff in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
  • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot dashboard:

  • Update frequency (including time of day and day of week)
  • Pull request limits (per update run and/or open at any time)
  • Out-of-range updates (receive only lockfile updates, if desired)
  • Security updates (receive only security updates, if desired)

Bumps [sywac](https://github.com/sywac/sywac) from 1.2.2 to 1.3.0.
- [Release notes](https://github.com/sywac/sywac/releases)
- [Commits](sywac/sywac@v1.2.2...v1.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
@jdalrymple jdalrymple merged commit c11900c into master Apr 1, 2020
@jdalrymple jdalrymple deleted the dependabot/npm_and_yarn/sywac-1.3.0 branch April 1, 2020 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant