resourceloader: Add to debug mode the same 'jquery' clause as for prod
authorTimo Tijhof <krinklemail@gmail.com>
Wed, 8 Aug 2018 21:58:33 +0000 (22:58 +0100)
committerRoan Kattouw <roan.kattouw@gmail.com>
Wed, 8 Aug 2018 23:49:44 +0000 (16:49 -0700)
commit2873d65d9f2ba6a5f5db141d6c7326c8a8566da9
treeac304a0522e6c2194bfd19e059d25d7267b8924d
parent487cf02e178e4af6d254b06550e4505e0d5c45cf
resourceloader: Add to debug mode the same 'jquery' clause as for prod

=== module.exports

Follows-up dec800968e, which added a clause for `window.$` inside runScript()
that ensures require/module.exports is not given to 'jquery'.

This commit adds the same clause to debug mode handling, which follows a
different code path. Without this, jquery.migrate.js execution throws from
`require('jquery')`, when viewing a page in debug mode.

=== mediawiki.legacy.wikibits

Before dec800968e, 'jquery' was a raw module and not allowed as dependency,
and before that commit base modules did not follow debug mode. Instead,
they were always combined in the same request (even in debug mode), with
only the order in the query string dictating their execution order.

After that commit, it is mandatory for base modules to express their
execution order through dependency links. This was done for 'mediawiki.base',
but forgotten for 'mediawiki.legacy.wikibits'. That module isn't used by
default, but becomes used when enabling $wgIncludeLegacyJavaScript, which
is off by default, but on for Wikimedia wikis.

Bug: T192623
Change-Id: Id4fbfee71deeb9528e8a622604d4cd972dd25d3b
resources/Resources.php
resources/src/startup/mediawiki.js