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

YUI Compressor is not ES5 complaint. #98

Closed
grssam opened this issue Jul 31, 2013 · 8 comments
Closed

YUI Compressor is not ES5 complaint. #98

grssam opened this issue Jul 31, 2013 · 8 comments
Labels

Comments

@grssam
Copy link

grssam commented Jul 31, 2013

If your code is like

var foo = {
  delete : "asd"
};

then the compressor will give syntax errors, while the code is perfectly correct as per ES5, but is incorrect as per ES3.

Are there any plans to support ES5, or if you already are supporting ES5, then consider this as a new bug.

@tml
Copy link
Contributor

tml commented Jul 31, 2013

This is because Rhino is not ES5 compliant (yet). As soon as a Rhino release comes out with ES5 support, I'll start migrating it in. Thanks for your input!

@grssam
Copy link
Author

grssam commented Aug 1, 2013

How hard it would be to migrate to node which is up to date in ES5 standards ?

@tml
Copy link
Contributor

tml commented Aug 1, 2013

Well, node isn't a Javascript interpreter; we'd have to build it on v8. As for "how hard", it would be a complete rewrite - which probably doesn't make sense in the face of projects like mishoo/UglifyJS.

@grssam
Copy link
Author

grssam commented Aug 1, 2013

Rhino is kind of stalled right now. Not sure what are the plans on that front ..

@tml
Copy link
Contributor

tml commented Aug 1, 2013

I don't know what their plans are, either, but if you look at the mozilla/rhino project, it's really not all THAT dead (compared to how close YUICompressor came!) A lot of ES5 is implemented in Rhino, the only really big issues I know of are strict mode, allowing reserved words as IdentifierNames (which is what this issue is raising), and a niggle about parseInt behaviour. If I find the bandwidth, I plan to address these myself eventually.

@grssam
Copy link
Author

grssam commented Aug 1, 2013

I just looked at the last commit time, it was 5 months ago.. so I assumed that it is stalled now :)

@tml
Copy link
Contributor

tml commented Aug 1, 2013

I think that may be a bit premature; both Rhino and YUICompressor have had quiet periods lasting a lot more than 5 months...there was a lull of more than 18 months between YUICompressor 2.4.7 and 2.4.8 :)

@tml
Copy link
Contributor

tml commented Jan 9, 2015

Tracking all versions of this issue on #47, closing the rest so that I only have one bug to keep track of for all the variants of the problem.

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

No branches or pull requests

2 participants