Re: Bug in new libjs-jquery package from last week
Hi Brian,
It looks like the recent jquery update introduced a regression on the minified
file. I see that you change how the minified file is built, which is likely to
be related. Can you take a look? Also see the recently filed bug #928827.
Thanks,
Emilio
On 10/05/2019 16:00, Keith Erekson wrote:
> I believe the update to libjs-jquery, released last week, contains a
> malformed jquery.min.js file.
>
> On a (legacy) system with multiple web apps that make use of
> /usr/share/javascript/jquery/jquery.min.js via symlink (specifically,
> icinga and pnp4nagios), web browsers throw a syntax error:
>
> jquery-1.8.0.min.js:3 Uncaught SyntaxError: Invalid or unexpected token
>
> (A dozen other errors cascade from that one, as the other jquery
> components also fail.)
>
> Unfortunately, knowing there's a syntax error on line 3 isn't very
> useful with minified js...
>
> I've pasted the entirety of jquery.min.js into several online js
> validators that fail to validate (https://codebeautify.org/jsvalidate
> and http://esprima.org/demo/validate.html) but I'm not sure this is
> conclusive.
>
> Running jquery.min.js through a "code beautifier"
> (https://beautifier.io/), and then running *that* output through the
> Esprima validator yields:
>
> Error: Line 4101: Invalid regular expression
>
> ... where line 4101 is, itself, about 4k in length. This is where I've
> given up debugging.
>
> Switching the symlink to point to /usr/share/javascript/jquery/jquery.js
> resolves the issue, meaning no errors are thrown and, more importantly,
> jquery works in the web applications.
>
> I can provide additional data and/or test any changes if necessary.
>
> Thanks,
>
> ~Keith
>
>
Reply to: