From eead94e3134c2d192cf6a3bf286a5f17d3966f01 Mon Sep 17 00:00:00 2001 From: Mark Lee Date: Mon, 23 Mar 2020 14:17:52 -0700 Subject: [PATCH] build(deps): upgrade commander to ^5.0.0 Fixes #186. --- bin/asar.js | 2 -- package-lock.json | 6 +++--- package.json | 2 +- test/cli-spec.js | 6 +++--- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/bin/asar.js b/bin/asar.js index d913b4e..8efcc1a 100755 --- a/bin/asar.js +++ b/bin/asar.js @@ -55,8 +55,6 @@ program.command('list ') for (var i in files) { console.log(files[i]) } - // This is in order to disappear help - process.exit(0) }) program.command('extract-file ') diff --git a/package-lock.json b/package-lock.json index dbb3027..690b306 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1979,9 +1979,9 @@ } }, "commander": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", - "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==" + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-5.0.0.tgz", + "integrity": "sha512-JrDGPAKjMGSP1G0DUoaceEJ3DZgAfr/q6X7FVk4+U5KxUSKviYGM2k6zWkfyyBHy5rAtzgYJFa1ro2O9PtoxwQ==" }, "compare-func": { "version": "1.3.2", diff --git a/package.json b/package.json index 7e6c528..7779071 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ }, "dependencies": { "chromium-pickle-js": "^0.2.0", - "commander": "^4.1.1", + "commander": "^5.0.0", "glob": "^7.1.6", "minimatch": "^3.0.4" }, diff --git a/test/cli-spec.js b/test/cli-spec.js index 2110a6d..2017d32 100644 --- a/test/cli-spec.js +++ b/test/cli-spec.js @@ -12,10 +12,10 @@ const compDirs = require('./util/compareDirectories') const compFileLists = require('./util/compareFileLists') const compFiles = require('./util/compareFiles') -childProcess.exec = promisify(childProcess.exec) +const exec = promisify(childProcess.exec) async function execAsar (args) { - return childProcess.exec(`node bin/asar ${args}`) + return exec(`node bin/asar ${args}`) } async function assertAsarOutputMatches (args, expectedFilename) { @@ -118,7 +118,7 @@ describe('command line interface', function () { return assertAsarOutputMatches('l test/expected/packthis-unpack-dir.asar', 'test/expected/extractthis-filelist.txt') }) it('should list files/dirs in archive with unpacked dirs & is-pack option', async () => { - return assertAsarOutputMatches('l test/expected/packthis-unpack-dir.asar --is-pack', 'test/expected/extractthis-filelist-with-option.txt') + return assertAsarOutputMatches('l --is-pack test/expected/packthis-unpack-dir.asar', 'test/expected/extractthis-filelist-with-option.txt') }) it('should extract an archive with unpacked dirs', async () => { await execAsar('e test/input/extractthis-unpack-dir.asar tmp/extractthis-unpack-dir/')