From 51c0d96472310f80a34cc3b6cb5639dfbd54ecad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=A8=E3=83=AA=E3=82=B9?= Date: Tue, 19 Mar 2019 11:50:07 +0900 Subject: [PATCH 01/11] Bumped cordova-lib@^9.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 38456fa5..fb3d8569 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ }, "engineStrict": true, "dependencies": { - "cordova-lib": "8.0.0", + "cordova-lib": "^9.0.0", "nopt": "1.0.9" }, "devDependencies": { From db1fd1ef0ee68f3d831cfac04e3c11b50d624987 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=A8=E3=83=AA=E3=82=B9?= Date: Tue, 19 Mar 2019 11:50:09 +0900 Subject: [PATCH 02/11] Bumped nopt@^4.0.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fb3d8569..2da5d731 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "engineStrict": true, "dependencies": { "cordova-lib": "^9.0.0", - "nopt": "1.0.9" + "nopt": "^4.0.1" }, "devDependencies": { "eslint": "^4.2.0", From c3e7fb023754150a672c1effbf3f1ca85d21c72f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=A8=E3=83=AA=E3=82=B9?= Date: Tue, 19 Mar 2019 11:50:16 +0900 Subject: [PATCH 03/11] Bumped eslint@^5.15.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2da5d731..fd2893ac 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "nopt": "^4.0.1" }, "devDependencies": { - "eslint": "^4.2.0", + "eslint": "^5.15.3", "eslint-config-semistandard": "^11.0.0", "eslint-config-standard": "^10.2.1", "eslint-plugin-import": "^2.3.0", From a4d64d565e67f0093fc157da77799801fcd8c24a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=A8=E3=83=AA=E3=82=B9?= Date: Tue, 19 Mar 2019 11:50:19 +0900 Subject: [PATCH 04/11] Bumped eslint-config-semistandard@^13.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fd2893ac..0a7e13c1 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ }, "devDependencies": { "eslint": "^5.15.3", - "eslint-config-semistandard": "^11.0.0", + "eslint-config-semistandard": "^13.0.0", "eslint-config-standard": "^10.2.1", "eslint-plugin-import": "^2.3.0", "eslint-plugin-node": "^5.0.0", From 61b161e1523196b271c9160bfc7f79569547028e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=A8=E3=83=AA=E3=82=B9?= Date: Tue, 19 Mar 2019 11:50:24 +0900 Subject: [PATCH 05/11] Bumped eslint-config-standard@^12.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0a7e13c1..0298c012 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "devDependencies": { "eslint": "^5.15.3", "eslint-config-semistandard": "^13.0.0", - "eslint-config-standard": "^10.2.1", + "eslint-config-standard": "^12.0.0", "eslint-plugin-import": "^2.3.0", "eslint-plugin-node": "^5.0.0", "eslint-plugin-promise": "^3.5.0", From 79971c339f178b5abef070ecfc4c1aed20150cc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=A8=E3=83=AA=E3=82=B9?= Date: Tue, 19 Mar 2019 11:50:28 +0900 Subject: [PATCH 06/11] Bumped eslint-plugin-import@^2.16.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0298c012..039601de 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "eslint": "^5.15.3", "eslint-config-semistandard": "^13.0.0", "eslint-config-standard": "^12.0.0", - "eslint-plugin-import": "^2.3.0", + "eslint-plugin-import": "^2.16.0", "eslint-plugin-node": "^5.0.0", "eslint-plugin-promise": "^3.5.0", "eslint-plugin-standard": "^3.0.1", From 7f43596237e9348a4529366c5562ff7cf17e0433 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=A8=E3=83=AA=E3=82=B9?= Date: Tue, 19 Mar 2019 11:50:31 +0900 Subject: [PATCH 07/11] Bumped eslint-plugin-node@^8.0.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 039601de..c9b4d200 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "eslint-config-semistandard": "^13.0.0", "eslint-config-standard": "^12.0.0", "eslint-plugin-import": "^2.16.0", - "eslint-plugin-node": "^5.0.0", + "eslint-plugin-node": "^8.0.1", "eslint-plugin-promise": "^3.5.0", "eslint-plugin-standard": "^3.0.1", "jasmine": "^3.1.0" From ee1a4ef5f4dc4cd7d1a1d47e67cf28ef0732190b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=A8=E3=83=AA=E3=82=B9?= Date: Tue, 19 Mar 2019 11:50:34 +0900 Subject: [PATCH 08/11] Bumped eslint-plugin-promise@^4.0.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c9b4d200..1664eccd 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "eslint-config-standard": "^12.0.0", "eslint-plugin-import": "^2.16.0", "eslint-plugin-node": "^8.0.1", - "eslint-plugin-promise": "^3.5.0", + "eslint-plugin-promise": "^4.0.1", "eslint-plugin-standard": "^3.0.1", "jasmine": "^3.1.0" }, From 67bde8942c1e6e9c973c7fd85eadda0f0826ab25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=A8=E3=83=AA=E3=82=B9?= Date: Tue, 19 Mar 2019 11:50:37 +0900 Subject: [PATCH 09/11] Bumped eslint-plugin-standard@^4.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1664eccd..26c43b35 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "eslint-plugin-import": "^2.16.0", "eslint-plugin-node": "^8.0.1", "eslint-plugin-promise": "^4.0.1", - "eslint-plugin-standard": "^3.0.1", + "eslint-plugin-standard": "^4.0.0", "jasmine": "^3.1.0" }, "bin": { From a9c630559448cfd6fa3d8da92cb3ccd801cee8c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=A8=E3=83=AA=E3=82=B9?= Date: Tue, 19 Mar 2019 11:50:40 +0900 Subject: [PATCH 10/11] Bumped jasmine@^3.3.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 26c43b35..3a527569 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "eslint-plugin-node": "^8.0.1", "eslint-plugin-promise": "^4.0.1", "eslint-plugin-standard": "^4.0.0", - "jasmine": "^3.1.0" + "jasmine": "^3.3.1" }, "bin": { "plugman": "./main.js" From 6b774173093e7b288c95eafd23971f5c0df36ec9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=A8=E3=83=AA=E3=82=B9?= Date: Tue, 19 Mar 2019 23:47:50 +0900 Subject: [PATCH 11/11] Updated to support nopt@^4.0.1 --- main.js | 8 ++++++-- package.json | 3 ++- spec/nopt.interface.spec.js | 14 +++++++++----- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/main.js b/main.js index 3de71a69..fadb1a19 100755 --- a/main.js +++ b/main.js @@ -36,7 +36,7 @@ const known_opts = { ], project: path, plugin: [String, path, url, Array], - version: Boolean, + version: String, help: Boolean, debug: Boolean, silent: Boolean, @@ -45,7 +45,11 @@ const known_opts = { variable: Array, www: path, searchpath: [path, Array], - save: Boolean + save: Boolean, + name: String, + platform_id: String, + platform_version: String, + plugins_dir: String }; const shortHands = { var: ['--variable'], v: ['--version'], h: ['--help'] }; diff --git a/package.json b/package.json index 3a527569..ca0a1f98 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,8 @@ "eslint-plugin-node": "^8.0.1", "eslint-plugin-promise": "^4.0.1", "eslint-plugin-standard": "^4.0.0", - "jasmine": "^3.3.1" + "jasmine": "^3.3.1", + "rewire": "^4.0.1" }, "bin": { "plugman": "./main.js" diff --git a/spec/nopt.interface.spec.js b/spec/nopt.interface.spec.js index 88eb1b56..bedfcbf9 100644 --- a/spec/nopt.interface.spec.js +++ b/spec/nopt.interface.spec.js @@ -16,12 +16,16 @@ specific language governing permissions and limitations under the License. */ -var nopt = require('nopt'); +const nopt = require('nopt'); +const rewire = require('rewire'); +const main = rewire('../main'); + +describe('nopt interface check', () => { + it('parameters without assignment operator should be assigned', () => { + const knownOptions = main.__get__('known_opts'); + const shortHands = main.__get__('shortHands'); + const cli_opts = nopt(knownOptions, shortHands, ['plugman', 'create', '--name', 'MyName', '--platform_id', 'MyId', '--platform_version', '1.0.0']); -describe('nopt interface check', function () { - // https://issues.apache.org/jira/browse/CB-7915 - it('parameters without assignment operator should be assigned', function () { - var cli_opts = nopt(null, null, ['plugman', 'create', '--name', 'MyName', '--platform_id', 'MyId', '--platform_version', '1.0.0']); expect(cli_opts.name).toEqual('MyName'); expect(cli_opts.platform_id).toEqual('MyId'); expect(cli_opts.platform_version).toEqual('1.0.0');