Skip to content
This repository has been archived by the owner on Dec 8, 2024. It is now read-only.

ECMAScript 6 support #141

Open
cctuan opened this issue Jan 24, 2014 · 6 comments
Open

ECMAScript 6 support #141

cctuan opened this issue Jan 24, 2014 · 6 comments

Comments

@cctuan
Copy link

cctuan commented Jan 24, 2014

Hi,
is it possible to have a version that support harmony version?

We have problem when the scripts contains "let" and "const" ..etc. which are from ECMA 6.

I saw there's a harmony branch in istanbul, but unfortunately, it cannot work in our FirefoxOS test env which does not support to download repo from "git://xxx".

It will be nice if this plugin could provide a version without git dependency

@gotwarlost
Copy link
Owner

Why don't you just download the instrumenter from: https://raw2.github.com/gotwarlost/istanbul/harmony/lib/instrumenter.js

And similarly for esprima and escodegen that are required for the browser.

https://raw2.github.com/ariya/esprima/harmony/esprima.js

I cannot publish a new module just for this.

@cctuan
Copy link
Author

cctuan commented Jan 27, 2014

@gotwarlost Thanks, I create another repo with the new instrumenter.js and use git://github.com/ariya/esprima.git#harmony for esprima. However, the mocha test always tell me
|SyntaxError: Use of const in strict mode.| error.

Is there any other options I haven't enable yet?

@gotwarlost
Copy link
Owner

Could you give me a reproducible test case so I can dig into what is happening?

@jonathanong
Copy link

@gotwarlost is there a possibility you could unpin the esprima dep so i could just do npm i ariya/esprima#harmony and have it work? right now i'm using https://www.npmjs.org/package/istanbul-harmony which is kind of silly

@andrewdeandrade
Copy link

@gotwarlost So like 12 hours ago esprima 2.0.0 was released, which is the first version with official ES6 support. Would it be possible to upgrade istanbul to esprima 2 and start supporting the es6 features it currently supports (there are only 3 features so far).

gotwarlost added a commit that referenced this issue Feb 19, 2015
Update to Esprima 2.0 (refs #141).
@silkentrance
Copy link

@gotwarlost it seems that this had been resolved. Can we please close this?

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

No branches or pull requests

5 participants