Skip to content

Commit

Permalink
add "Node v4 or greater is required" message
Browse files Browse the repository at this point in the history
  • Loading branch information
feross committed Aug 18, 2016
1 parent 9a5f404 commit 85e19d6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions bin/cmd.js
@@ -1,4 +1,9 @@
#!/usr/bin/env node

var opts = require('../options')
require('standard-engine').cli(opts)
if (process.version.match(/v(\d+)\./)[1] < 4) {
console.error('standard: Node v4 or greater is required. `standard` did not run.')
} else {
var opts = require('../options')
require('standard-engine').cli(opts)
}

4 comments on commit 85e19d6

@mafintosh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is v4 needed? i use standard but on plenty on modules that support 0.12, 0.10, kinda annoying that i have to pin an old version now.

@mafintosh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LinusU
Copy link
Member

@LinusU LinusU commented on 85e19d6 Sep 28, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, eslint 3.0 decided to drop support for Node <4.x which introduced that restriction here as well...

@feross
Copy link
Member Author

@feross feross commented on 85e19d6 Sep 29, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I'm not a fan of folks aggressively dropping Node 0.10 and 0.12 support either, but this came from ESLint. We enabled a bunch of bug-catching new rules in standard v8, so I think it's a net win.

Also, you can keep 0.10 and 0.12 in your Travis tests, because standard will pass on those versions, without running. 馃憤

Please sign in to comment.