dthree / vorpal

Node's framework for interactive CLIs
http://vorpal.js.org
MIT License
5.64k stars 280 forks source link

Normalization regex fix #321

Closed b4dnewz closed 5 years ago

b4dnewz commented 6 years ago

Handle the commandArgKeyPair normalization checking if the key=pair is not inside a string, also leaves untouched the key=pair strings that are not enclosed in quotes (both single/double)

As seen in the issue #307, this is the behavior now: image

This is the proposed regex with the solution and some parse examples:

image

milesj commented 6 years ago

Looks like the regex is invalid in Node 6. Maybe we can just drop that target.

b4dnewz commented 6 years ago

For me it's ok, usually I only target these for node projects:

milesj commented 6 years ago

Yeah, let's remove the node 6 target.

b4dnewz commented 6 years ago

@milesj I see you are very active on this repository, which unfortunately seems not maintained by the owner, if you are interested I forked this project months ago and made many changes (bugfix, mainly from vorpal issues) and I completed last week the typescript migration (it was a nightmare).

If you want we can keep going there, I decided to open this PR because the fix (that I made in my forked version) was very small and easily integrable on the original project, but I prefer to work on the fork since has many more changes on it.

is a problem for you? my goal is to build a new open source (MIT) project from the fork once has been completely refactored (typescript, usage, docs, new features, ....) are you interested in contrib? it will be faster than here on the original project because Im using the forked version in various projects and I frequently find possible updates

milesj commented 6 years ago

I can imagine how tough the TS conversion was! I ran into the same problem trying to add flow types. It was a pain in the ass.

I don't really have time to contribute, but forking it is probably the best route since I'm unable to publish new versions here.