Skip to content

Commit ac5b009

Browse files
authored
FABCN-401 Correct use of Yargs api (#145)
* FABCN-401 Correct use of Yargs api Change from package.json to api parser configuration Signed-off-by: Matthew B White <[email protected]> * Force build Signed-off-by: Matthew B White <[email protected]>
1 parent a81935a commit ac5b009

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

libraries/fabric-shim/cli.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ const Logger = require('./lib/logger');
55
const logger = Logger.getLogger('fabric-shim/cli');
66

77
const results = require('yargs')
8+
.parserConfiguration({"dot-notation":false})
89
.commandDir('./lib/cmds')
910
.demandCommand()
1011
.help()

libraries/fabric-shim/package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@
3232
"node": "^12.16.1",
3333
"npm": "^6.4.1"
3434
},
35-
"yargs": {
36-
"dot-notation": false
37-
},
3835
"types": "./types/index.d.ts",
3936
"license": "Apache-2.0",
4037
"nyc": {

libraries/fabric-shim/test/unit/cli.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ describe('fabric-chaincode-node cli', () => {
2525

2626
beforeEach(() => {
2727
sandbox = sinon.createSandbox();
28+
sandbox.stub(yargs, 'parserConfiguration').returns(yargs);
2829
sandbox.stub(yargs, 'commandDir').returns(yargs);
2930
sandbox.stub(yargs, 'demandCommand').returns(yargs);
3031

0 commit comments

Comments
 (0)