Skip to content

HTTPS clone URL

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 History.md
  2. +1 −1  package.json
View
5 History.md
@@ -1,4 +1,9 @@
+2.0.0 / 2013-07-18
+==================
+
+ * remove input methods (.prompt, .confirm, etc)
+
1.3.2 / 2013-07-18
==================
View
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 <tj@vision-media.ca>"

9 comments on commit efc585c

@mreinstein

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

@tj
Owner
tj commented on efc585c

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

@mreinstein

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
Owner
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: https://github.com/visionmedia/co-prompt

@mreinstein

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
Owner
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))
@mreinstein

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
Owner
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

@mreinstein

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.