Side navigation
#14998 closed bug (notabug)
Opened April 12, 2014 02:37PM UTC
Closed April 12, 2014 03:03PM UTC
Last modified April 12, 2014 03:57PM UTC
Yuglify fails to parse jquery.js
| Reported by: | jon.dufresne@gmail.com | Owned by: | |
|---|---|---|---|
| Priority: | undecided | Milestone: | None |
| Component: | unfiled | Version: | 1.11.0 |
| Keywords: | Cc: | ||
| Blocked by: | Blocking: |
Description
Steps to reproduce:
$ rm -rf bower_components && bower cache clean && bower install jquery#~1.11
bower deleted Cached package jquery: /home/jon/.cache/bower/packages/fe2fe255e91d251051d543998aa8327a/1.11.0
bower jquery#~1.11 not-cached git://github.com/jquery/jquery.git#~1.11
bower jquery#~1.11 resolve git://github.com/jquery/jquery.git#~1.11
bower jquery#~1.11 download https://github.com/jquery/jquery/archive/1.11.0.tar.gz
bower jquery#~1.11 extract archive.tar.gz
bower jquery#~1.11 resolved git://github.com/jquery/jquery.git#1.11.0
bower jquery#~1.11 install jquery#1.11.0
jquery#1.11.0 bower_components/jquery
$ yuglify bower_components/jquery/dist/jquery.js
Compressing bower_components/jquery/dist/jquery.js...
/home/jon/node_modules/yuglify/bin/yuglify:111
throw(err);
^
Error
at new JS_Parse_Error (/home/jon/node_modules/yuglify/node_modules/uglify-js/lib/parse-js.js:263:18)
at js_error (/home/jon/node_modules/yuglify/node_modules/uglify-js/lib/parse-js.js:271:11)
at croak (/home/jon/node_modules/yuglify/node_modules/uglify-js/lib/parse-js.js:733:9)
at token_error (/home/jon/node_modules/yuglify/node_modules/uglify-js/lib/parse-js.js:740:9)
at unexpected (/home/jon/node_modules/yuglify/node_modules/uglify-js/lib/parse-js.js:746:9)
at /home/jon/node_modules/yuglify/node_modules/uglify-js/lib/parse-js.js:1112:13
at maybe_unary (/home/jon/node_modules/yuglify/node_modules/uglify-js/lib/parse-js.js:1209:19)
at expr_ops (/home/jon/node_modules/yuglify/node_modules/uglify-js/lib/parse-js.js:1236:24)
at maybe_conditional (/home/jon/node_modules/yuglify/node_modules/uglify-js/lib/parse-js.js:1240:20)
at maybe_assign (/home/jon/node_modules/yuglify/node_modules/uglify-js/lib/parse-js.js:1264:20)
at /home/jon/node_modules/yuglify/node_modules/uglify-js/lib/parse-js.js:1278:20
at vardefs (/home/jon/node_modules/yuglify/node_modules/uglify-js/lib/parse-js.js:1065:32)
at var_ (/home/jon/node_modules/yuglify/node_modules/uglify-js/lib/parse-js.js:1077:26)
As many asset pipelines concatenate JavaScript files and then use minifiers on the final result, this breaks asset pipelines that use Yuglify. Django-pipeline is one such case that uses Yuglify by default. http://django-pipeline.readthedocs.org/en/latest/
Yuglify is installable through npm.
Attachments (0)
Change History (3)
Changed April 12, 2014 02:40PM UTC by comment:1
Changed April 12, 2014 03:03PM UTC by comment:2
| resolution: | → notabug |
|---|---|
| status: | new → closed |
Given that every jQuery build is validated with JSHint and tested successfully in many browsers, this is almost certainly a yuglify issue. But please come back here if you identify a specific line or expression we should look at.
Changed April 12, 2014 03:57PM UTC by comment:3
In case anyone is interested, I filed a bug with Yuglify: <https://github.com/yui/yuglify/issues/19>
I just verified that yuflify parses 1.10 no problem.