Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Release 2.0.0

  • Loading branch information...
commit efc585c7831f589a9ab0c9e34ed8a9ac5b97acbf 1 parent bf5e1f5
@tj authored
Showing with 6 additions and 1 deletion.
  1. +5 −0
  2. +1 −1  package.json
@@ -1,4 +1,9 @@
+2.0.0 / 2013-07-18
+ * remove input methods (.prompt, .confirm, etc)
1.3.2 / 2013-07-18
2  package.json
@@ -1,6 +1,6 @@
"name": "commander"
- , "version": "1.3.2"
+ , "version": "2.0.0"
, "description": "the complete solution for node.js command-line programs"
, "keywords": ["command", "option", "parser", "prompt", "stdin"]
, "author": "TJ Holowaychuk <>"

9 comments on commit efc585c


@visionmedia why were the validation routines removed? Is there an alternative way in 2.x or are you removing this feature?

tj commented on efc585c

validation? maybe I removed something I shouldn't have, not sure what you mean


So currently in my usage of commanderjs I'm able to do things like this:

program.prompt('email: ', /^.+@.+\..+$/, function (email){
   // user will be infinitely re-prompted until passes validation, then we get here.

Is this still possible? I thought it might be gone as a result of bf5e1f5

tj commented on efc585c

oh no I removed all the input related stuff, they don't really belong in commander. Someone else put them in npm as a different package and I created a generator-friendly one:


I'm guessing I need to migrate my port over to that lib. Looks like it doesn't support regex.

ok, so you took this out to make commanderjs more modular?

tj commented on efc585c

you could just stay on 1.x, nothing wrong with that. co-prompt doesn't have any validation stuff but it could, though with generators you could easily just do a while loop:

do {
  val = yield prompt('email: ')
} while (isInvalid(val))

I'm not complaining, I'm just trying to understand the motivation and fight software rot within my own repos. :) Would you accept a pull on visionmedia/co-prompt for regex support?

tj commented on efc585c

hmmm maybe, I like the idea of keeping validation separate personally, because otherwise we need ways to customize the message you output if it's invalid, if any, blah blah, just complicates things


ugh co-prompt is using yield? There are so few js engines that support it at this point.

Please sign in to comment.
Something went wrong with that request. Please try again.