Skip to content

Commit

Permalink
chore: update dependencies
Browse files Browse the repository at this point in the history
BREAKING CHANGE: drops Node 4 support
  • Loading branch information
Benjamin committed Oct 6, 2018
1 parent 77ae1d4 commit 6dc42a1
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ language: node_js
os:
- linux
node_js:
- "4"
- "6"
- "8"
- "node"
after_script: npm run coverage
21 changes: 12 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,22 @@
"author": "Ben Coe <ben@npmjs.com>",
"license": "ISC",
"devDependencies": {
"chai": "^3.5.0",
"coveralls": "^2.11.12",
"mocha": "^3.0.1",
"nyc": "^11.4.1",
"standard": "^10.0.2",
"standard-version": "^4.3.0"
"chai": "^4.2.0",
"coveralls": "^3.0.2",
"mocha": "^5.2.0",
"nyc": "^13.0.1",
"standard": "^12.0.1",
"standard-version": "^4.4.0"
},
"dependencies": {
"camelcase": "^4.1.0",
"decamelize": "^2.0.0"
"camelcase": "^5.0.0",
"decamelize": "^1.2.0"
},
"files": [
"lib",
"index.js"
]
],
"engine": {
"node": ">=6"
}
}
22 changes: 11 additions & 11 deletions test/yargs-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ describe('yargs-parser', function () {
'--other', '-99', '-220'
], {
array: 'bounds',
narg: {'other': 2}
narg: { 'other': 2 }
})

argv._.should.deep.equal([-33, -177, 33])
Expand Down Expand Up @@ -1419,12 +1419,12 @@ describe('yargs-parser', function () {

describe('array', function () {
it('should group values into an array if the same option is specified multiple times (duplicate-arguments-array=true)', function () {
var parse = parser(['-v', 'a', '-v', 'b', '-v', 'c'], {configuration: {'duplicate-arguments-array': true}})
var parse = parser(['-v', 'a', '-v', 'b', '-v', 'c'], { configuration: { 'duplicate-arguments-array': true } })
parse.should.have.property('v').and.deep.equal(['a', 'b', 'c'])
parse.should.have.property('_').with.length(0)
})
it('should keep only the last value if the same option is specified multiple times (duplicate-arguments-false)', function () {
var parse = parser(['-v', 'a', '-v', 'b', '-v', 'c'], {configuration: {'duplicate-arguments-array': false}})
var parse = parser(['-v', 'a', '-v', 'b', '-v', 'c'], { configuration: { 'duplicate-arguments-array': false } })
parse.should.have.property('v').and.equal('c')
parse.should.have.property('_').with.length(0)
})
Expand Down Expand Up @@ -1503,8 +1503,8 @@ describe('yargs-parser', function () {
var result = parser(['-a=hello', 'world', '-b',
'33', '22', '--foo', 'red', 'green',
'--bar=cat', 'dog'], {
array: ['a', 'b', 'foo', 'bar']
})
array: ['a', 'b', 'foo', 'bar']
})

Array.isArray(result.a).should.equal(true)
result.a.should.include('hello')
Expand Down Expand Up @@ -2166,7 +2166,7 @@ describe('yargs-parser', function () {
}
})

parsed['x'].should.deep.equal({foo: ['a', 'b']})
parsed['x'].should.deep.equal({ foo: ['a', 'b'] })
})
})

Expand Down Expand Up @@ -2400,13 +2400,13 @@ describe('yargs-parser', function () {
number: ['d'],
count: ['e'],
normalize: ['f'],
narg: {g: 2},
narg: { g: 2 },
coerce: {
h: function (arg) {
return arg
}
},
configuration: {'set-placeholder-key': true}
configuration: { 'set-placeholder-key': true }
})
parsed.should.have.property('a')
expect(parsed.a).to.be.equal(undefined)
Expand All @@ -2427,8 +2427,8 @@ describe('yargs-parser', function () {
it('should not set placeholder for key with a default value', function () {
var parsed = parser([], {
string: ['a'],
default: {a: 'hello'},
configuration: {'set-placeholder-key': true}
default: { a: 'hello' },
configuration: { 'set-placeholder-key': true }
})
parsed.a.should.equal('hello')
})
Expand Down Expand Up @@ -2639,7 +2639,7 @@ describe('yargs-parser', function () {
var argv = parser([ '--foo', 'bar' ], {
array: ['a'],
normalize: ['a'],
configObjects: [{'a': ['bin/../a.txt', 'bin/../b.txt']}]
configObjects: [{ 'a': ['bin/../a.txt', 'bin/../b.txt'] }]
})
argv.a.should.deep.equal(['a.txt', 'b.txt'])
})
Expand Down

0 comments on commit 6dc42a1

Please sign in to comment.