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

uglify fails to parse executable files #23

Closed
clux opened this issue Jul 9, 2014 · 4 comments
Closed

uglify fails to parse executable files #23

clux opened this issue Jul 9, 2014 · 4 comments

Comments

@clux
Copy link

clux commented Jul 9, 2014

Uglify failes to parse executable files - mishoo/UglifyJS#509 - that use the shebang directive and thus jscoverage fails.

$ jscoverage lib
/home/clux/repos/badgify/node_modules/jscoverage/node_modules/uglify-js/lib/parse.js:204
    throw new JS_Parse_Error(message, line, col, pos);
          ^
Error
    at new JS_Parse_Error (/home/clux/repos/badgify/node_modules/jscoverage/node_modules/uglify-js/lib/parse.js:196:18)
    at js_error (/home/clux/repos/badgify/node_modules/jscoverage/node_modules/uglify-js/lib/parse.js:204:11)
    at parse_error (/home/clux/repos/badgify/node_modules/jscoverage/node_modules/uglify-js/lib/parse.js:306:9)
    at Object.next_token [as input] (/home/clux/repos/badgify/node_modules/jscoverage/node_modules/uglify-js/lib/parse.js:551:9)
    at next (/home/clux/repos/badgify/node_modules/jscoverage/node_modules/uglify-js/lib/parse.js:649:25)
    at Object.parse (/home/clux/repos/badgify/node_modules/jscoverage/node_modules/uglify-js/lib/parse.js:635:15)
    at Object.Instrument.process (/home/clux/repos/badgify/node_modules/jscoverage/lib/instrument.js:60:22)
    at Object.exports.process (/home/clux/repos/badgify/node_modules/jscoverage/lib/jscoverage.js:132:18)
    at Object.exports.processFile (/home/clux/repos/badgify/node_modules/jscoverage/index.js:170:18)
    at /home/clux/repos/badgify/node_modules/jscoverage/bin/jscoverage:63:20

jscoverage version 0.5.4

@fishbar
Copy link
Owner

fishbar commented Jul 10, 2014

Shebang is not part of js snytax, seems i can ignore it before pass code to uglify.parse()

i will fix it in this week

@clux
Copy link
Author

clux commented Jul 10, 2014

Okay, thank you :]

@fishbar
Copy link
Owner

fishbar commented Jul 13, 2014

it's done, update to v0.5.5

@fishbar fishbar closed this as completed Jul 13, 2014
@clux
Copy link
Author

clux commented Jul 13, 2014

Thanks again. That works perfectly now.

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

No branches or pull requests

2 participants