benmmurphy/jsdeminifier_xpi

Update jsbeautifier code

Closed this issue · 3 comments

The jsbeautifier code being used here is very old and a lot of bugs have been fixed. Could you update the jsbeautifier code being used, or better yet figure out a way to have the extension automatically use the most recent code? Thanks!

i'll try and keep up with latest versions

new version of jsdeminifier 1.0.8 with jsbeautify 0.4.2 should appear in mozilla addons after it has passed the review process

Awesome, thanks for the quick response!

In the longer term, I think I would support replacing jsbeautifier with something that does a full Javascript parse, because (per some discussion I've been having with the jsbeautifier devs) it currently doesn't and this results in a lot of corner cases being handled incorrectly. The semicolon insertion algorithm is actually very simple, but only if you have already have a full parser. UglifyJS (as you mention in #9) might be an option, or it might even be possible to use this: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API which would make the extension extremely fast and robust.

Thanks!