Browse files

add "Node v4 or greater is required" message

  • Loading branch information...
1 parent 9a5f404 commit 85e19d6de535d863613d67ad0f6d3bb6eae9bab3 @feross committed Aug 18, 2016
Showing with 7 additions and 2 deletions.
  1. +7 โˆ’2 bin/cmd.js
@@ -1,4 +1,9 @@
#!/usr/bin/env node
-var opts = require('../options')
+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


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.

LinusU commented on 85e19d6 Sep 28, 2016

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

feross commented on 85e19d6 Sep 29, 2016

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.