Skip to content

Commit

Permalink
chore: upgrade dependencies (#872)
Browse files Browse the repository at this point in the history
  • Loading branch information
bcoe committed May 2, 2017
1 parent 4c824c9 commit 88b61b8
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 20 deletions.
2 changes: 0 additions & 2 deletions CHANGELOG.md
Expand Up @@ -26,8 +26,6 @@ All notable changes to this project will be documented in this file. See [standa

### BREAKING CHANGES

* environment variables now override config files in order of precedence.
* '--' is now populated rather than '_' when parsing is stopped.
* extends functionality now always loads the JSON provided, rather than reading from a specific key
* Node 4+ is now required; this will allow us to start updating our dependencies.
* the first argument to strict() is now used to enable/disable its functionality, rather than controlling whether or not it is global.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -1938,7 +1938,7 @@ parsing tricks
stop parsing
------------

Use `--` to stop parsing flags and stuff the remainder into `argv['--']`.
Use `--` to stop parsing flags and stuff the remainder into `argv._`.

$ node examples/reflect.js -a 1 -b 2 -- -c 3 -d 4
{ _: [ '-c', '3', '-d', '4' ],
Expand Down
21 changes: 7 additions & 14 deletions package.json
Expand Up @@ -12,19 +12,19 @@
"LICENSE"
],
"dependencies": {
"camelcase": "^3.0.0",

This comment has been minimized.

Copy link
@dotcarls

dotcarls May 8, 2017

@bcoe Hey -- updating to camelcase 4.x breaks pre-4.x versions of node with the following error:

/usr/share/node/migration/node_modules/yargs/node_modules/camelcase/index.js:4
let isLastCharLower = false;
^^^
SyntaxError: Unexpected strict mode reserved word

So, either the engine attribute should be updated to reflect this or the camelcase dependency should be downgraded to a compatible version.

This comment has been minimized.

Copy link
@bcoe

bcoe May 8, 2017

Author Member

@dotcarls good catch; we should update the engine field -- as newer versions of yargs now require Node 4+.

"camelcase": "^4.1.0",
"cliui": "^3.2.0",
"decamelize": "^1.1.1",
"get-caller-file": "^1.0.1",
"os-locale": "^1.4.0",
"read-pkg-up": "^1.0.1",
"os-locale": "^2.0.0",
"read-pkg-up": "^2.0.0",
"require-directory": "^2.1.1",
"require-main-filename": "^1.0.1",
"set-blocking": "^2.0.0",
"string-width": "^1.0.2",
"which-module": "^1.0.0",
"string-width": "^2.0.0",
"which-module": "^2.0.0",
"y18n": "^3.2.1",
"yargs-parser": "^6.0.1"
"yargs-parser": "^7.0.0"
},
"devDependencies": {
"chai": "^3.4.1",
Expand All @@ -38,7 +38,7 @@
"nyc": "^10.3.0",
"rimraf": "^2.5.0",
"standard": "^8.6.0",
"standard-version": "^3.0.0",
"standard-version": "^4.0.0",
"which": "^1.2.9",
"yargs-test-extends": "^1.0.1"
},
Expand Down Expand Up @@ -70,12 +70,5 @@
"license": "MIT",
"engine": {
"node": ">=0.10"
},
"greenkeeper": {
"ignore": [
"string-width",
"read-pkg-up",
"camelcase"
]
}
}
6 changes: 3 additions & 3 deletions test/yargs.js
Expand Up @@ -1987,12 +1987,12 @@ describe('yargs dsl tests', function () {
})

describe('stop parsing', () => {
it('populates "--" with unparsed arguments after "--"', () => {
it('populates argv._ with unparsed arguments after "--"', () => {
const argv = yargs.parse('--foo 33 --bar=99 -- --grep=foobar')
argv.foo.should.equal(33)
argv.bar.should.equal(99)
argv['--'].length.should.equal(1)
argv['--'][0].should.equal('--grep=foobar')
argv._.length.should.equal(1)
argv._[0].should.equal('--grep=foobar')
})
})
})
Expand Down

0 comments on commit 88b61b8

Please sign in to comment.