Skip to content

Commit

Permalink
Bump commander from 6.2.0 to 7.0.0 (#1791)
Browse files Browse the repository at this point in the history
* Bump commander from 6.2.0 to 7.0.0

Bumps [commander](https://github.com/tj/commander.js) from 6.2.0 to 7.0.0.
- [Release notes](https://github.com/tj/commander.js/releases)
- [Changelog](https://github.com/tj/commander.js/blob/master/CHANGELOG.md)
- [Commits](tj/commander.js@v6.2.0...v7.0.0)

Signed-off-by: dependabot-preview[bot] <[email protected]>

* migrate code for commander 7.0.0

* generate new program on each function call

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: daemon1024 <[email protected]>
Co-authored-by: Barun Acharya <[email protected]>
Co-authored-by: Jeffrey Warren <[email protected]>
  • Loading branch information
4 people authored Feb 8, 2021
1 parent 240fd53 commit a73cba8
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 8 deletions.
12 changes: 9 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"bootstrap": "^3.4.1",
"bootstrap-colorpicker": "^2.5.3",
"buffer": "~6.0.2",
"commander": "^6.2.0",
"commander": "^7.0.0",
"compressorjs": "^1.0.5",
"data-uri-to-buffer": "^3.0.0",
"downloadjs": "^1.4.7",
Expand Down
12 changes: 8 additions & 4 deletions src/cli/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require('../ImageSequencer');
sequencer = ImageSequencer({ ui: true });
var fs = require('fs');
var program = require('commander');
var { Command } = require('commander');
var utils = require('../CliUtils');

var saveSequence = require('./saveSequence.js');
Expand Down Expand Up @@ -73,6 +73,9 @@ function parseSteps(program) {
}

function cli(args) {

let program = new Command();

program
.version('0.1.0')
.option('-i, --image [PATH/URL]', 'Input image URL')
Expand All @@ -90,9 +93,10 @@ function cli(args) {
)
.parse(args);

if (program.saveSequence) saveSequence(program, sequencer);
else if (program.installModule) installModule(program, sequencer);
else parseSteps(program);
const options = program.opts();
if (options.saveSequence) saveSequence(options, sequencer);
else if (options.installModule) installModule(options, sequencer);
else parseSteps(options);
}

module.exports = cli;
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2430,6 +2430,11 @@ commander@^6.2.0:
resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.0.tgz#b990bfb8ac030aedc6d11bc04d1488ffef56db75"
integrity sha512-zP4jEKbe8SHzKJYQmq8Y9gYjtO/POJLgIdKgV7B9qNmABVFVc+ctqSX6iXh4mCpJfRBOabiZ2YKPg8ciDw6C+Q==

commander@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-7.0.0.tgz#3e2bbfd8bb6724760980988fb5b22b7ee6b71ab2"
integrity sha512-ovx/7NkTrnPuIV8sqk/GjUIIM1+iUQeqA3ye2VNpq9sVoiZsooObWlQy+OPWGI17GDaEoybuAGJm6U8yC077BA==

commander@~2.13.0:
version "2.13.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c"
Expand Down

0 comments on commit a73cba8

Please sign in to comment.