Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support all harmony flags #1885

Merged
merged 1 commit into from
Sep 11, 2015
Merged

Support all harmony flags #1885

merged 1 commit into from
Sep 11, 2015

Conversation

danielstjules
Copy link
Contributor

Rel: #1846

This solution doesn't break the existing API - it only improves on our current situation. Rather than have to add flags to both bin/_mocha and bin/mocha each time they're introduced and publish a patch release, we'll automatically support all flags of the form --harmony* This also has the advantage of being less error prone, as some flags were supported in mocha, but not listed in_mocha and thus weren't visible via --help.

Finally, --help output will be quite a bit cleaner. Node 4.0.0 includes a few other flags we'd have to add otherwise:

  --harmony_array_includes (enable "harmony Array.prototype.includes" (in progress))
  --harmony_sloppy (enable "harmony features in sloppy mode" (in progress))
  --harmony_unicode_regexps (enable "harmony unicode regexps" (in progress))
  --harmony_reflect (enable "harmony Reflect API" (in progress))
  --harmony_destructuring (enable "harmony destructuring" (in progress))
  --harmony_sharedarraybuffer (enable "harmony sharedarraybuffer" (in progress))
  --harmony_atomics (enable "harmony atomics" (in progress))
  --harmony_new_target (enable "harmony new.target" (in progress))
  --harmony_tostring (enable "harmony toString")
  --harmony_concat_spreadable (enable "harmony isConcatSpreadable")
  --harmony_rest_parameters (enable "harmony rest parameters")
  --harmony_spreadcalls (enable "harmony spread-calls")
  --harmony_spread_arrays (enable "harmony spread in array literals")

@danielstjules
Copy link
Contributor Author

cc @mochajs/mocha Worth pushing for a patch release? :)

@danielstjules danielstjules mentioned this pull request Sep 11, 2015
@travisjeffery
Copy link
Contributor

SGTM

travisjeffery pushed a commit that referenced this pull request Sep 11, 2015
@travisjeffery travisjeffery merged commit a3ae593 into mochajs:master Sep 11, 2015
@danielstjules danielstjules deleted the flags branch September 11, 2015 03:50
@alekseykulikov
Copy link

Thank you @danielstjules for great patch!
Would love to see it published to npm.

@danielstjules
Copy link
Contributor Author

Hoping we might get a patch release out this week! :)

@thom4parisot
Copy link

Amazing, I was just looking for it to be able to use --harmony_destructuring :-)

@jkresner
Copy link

I know we've moved on - but thought it interesting when I came across this thread just now and how the coffee folks dealt with the node.js flags

@danielstjules
Copy link
Contributor Author

Interesting. I know tap offers a --harmony flag as well. If mocha specs could be ran just using node with require('mocha'), that would also solve this issue.

@danielstjules
Copy link
Contributor Author

Happy to keep discussing this in #1846 :) I don't think we've moved on at all. I just hid the duct tape haha

@brandonros
Copy link

brandonros commented Jan 28, 2017

--harmony-async-await ?

(for anybody trying to find)

Edit: mocha --harmony_async_await

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants