From 8e0d91f8e7ffd50ffb244d1eef25494301a609b2 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 4 Feb 2021 06:25:56 +0000 Subject: [PATCH 1/3] 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](https://github.com/tj/commander.js/compare/v6.2.0...v7.0.0) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 12 +++++++++--- package.json | 2 +- yarn.lock | 5 +++++ 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index f718d93369..4f453f4fcc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4531,9 +4531,9 @@ } }, "commander": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.0.tgz", - "integrity": "sha512-zP4jEKbe8SHzKJYQmq8Y9gYjtO/POJLgIdKgV7B9qNmABVFVc+ctqSX6iXh4mCpJfRBOabiZ2YKPg8ciDw6C+Q==" + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.0.0.tgz", + "integrity": "sha512-ovx/7NkTrnPuIV8sqk/GjUIIM1+iUQeqA3ye2VNpq9sVoiZsooObWlQy+OPWGI17GDaEoybuAGJm6U8yC077BA==" }, "component-bind": { "version": "1.0.0", @@ -12780,6 +12780,12 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "commander": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", + "dev": true + }, "cosmiconfig": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.0.tgz", diff --git a/package.json b/package.json index c94ea9d1f1..83ee009058 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/yarn.lock b/yarn.lock index d9a5bb75a2..17f14d8082 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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" From 39911d15d8ac4f1f99d822414c3fd696febb99a1 Mon Sep 17 00:00:00 2001 From: daemon1024 Date: Thu, 4 Feb 2021 21:07:56 +0000 Subject: [PATCH 2/3] migrate code for commander 7.0.0 --- src/cli/index.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/cli/index.js b/src/cli/index.js index 918eb11953..f2b14844ca 100644 --- a/src/cli/index.js +++ b/src/cli/index.js @@ -90,9 +90,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; From 66b69214cb0659ad16bc09f14c350fc8d63f2f68 Mon Sep 17 00:00:00 2001 From: daemon1024 Date: Sun, 7 Feb 2021 20:13:11 +0000 Subject: [PATCH 3/3] generate new program on each function call --- src/cli/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cli/index.js b/src/cli/index.js index f2b14844ca..35261b5914 100644 --- a/src/cli/index.js +++ b/src/cli/index.js @@ -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'); @@ -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')