From ad041225116e4e75a307e1c893e2f7c10b740028 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Sun, 14 Mar 2021 00:38:22 +0000 Subject: [PATCH] CLI: Upgrade `commander` to 7.1.0 Closes https://github.com/qunitjs/qunit/issues/1564. --- bin/qunit.js | 19 ++++++++++--------- package-lock.json | 6 +++--- package.json | 2 +- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/bin/qunit.js b/bin/qunit.js index dc7f069eb..d9d93ed26 100755 --- a/bin/qunit.js +++ b/bin/qunit.js @@ -38,20 +38,21 @@ program .option( "-w, --watch", "watch files for changes and re-run the test suite" ) .parse( process.argv ); -if ( program.reporter === true ) { +const opts = program.opts(); + +if ( opts.reporter === true ) { displayAvailableReporters(); } -const args = program.args; const options = { - filter: program.filter, - reporter: findReporter( program.reporter ), - requires: program.require, - seed: program.seed + filter: opts.filter, + reporter: findReporter( opts.reporter ), + requires: opts.require, + seed: opts.seed }; -if ( program.watch ) { - run.watch( args, options ); +if ( opts.watch ) { + run.watch( program.args, options ); } else { - run( args, options ); + run( program.args, options ); } diff --git a/package-lock.json b/package-lock.json index 3c71b5b0c..6ed65f9e7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1886,9 +1886,9 @@ } }, "commander": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", - "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==" + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.1.0.tgz", + "integrity": "sha512-pRxBna3MJe6HKnBGsDyMv8ETbptw3axEdYHoqNh7gu5oDcew8fs0xnivZGm06Ogk8zGAJ9VX+OPEr2GXEQK4dg==" }, "commondir": { "version": "1.0.1", diff --git a/package.json b/package.json index 1b01d9613..e5e2ea4e7 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "node": ">=10" }, "dependencies": { - "commander": "6.2.1", + "commander": "7.1.0", "js-reporters": "1.2.3", "node-watch": "0.7.1", "tiny-glob": "0.2.8"