Webpack's `-d` option is an alias for
`--debug --devtool cheap-module-eval-source-map --output-pathinfo`[0]
which overrode the `devtool` specified in the config. Specify
`--mode=development` which appears to be better supported than `-d`,
although the distinction is poorly documented[1]. The build products are
identical for `--mode=development --debug --output-pathinfo` and simply
`--mode=development` so the latter is used.
For consistency, replace `-p`, an alias for
`--optimize-minimize --define process.env.NODE_ENV=production`[0],
where `--optimize-minimize` is documented[2] as:
Minimize JavaScript and switches loaders to minimizing UglifyJsPlugin
and LoaderOptionsPlugin.
With `--mode=production` which is documented[3] as:
Sets process.env.NODE_ENV on DefinePlugin to value production. Enables
FlagDependencyUsagePlugin, FlagIncludedChunksPlugin,
ModuleConcatenationPlugin, NoEmitOnErrorsPlugin,
OccurrenceOrderPlugin, SideEffectsFlagPlugin and UglifyJsPlugin.
This change has already been made to MobileFrontend in c10f87d89.
[0] https://webpack.js.org/api/cli/#shortcuts
[1] https://medium.com/webpack/webpack-4-released-today-6cdb994702d4#dfa8
[2] https://webpack.js.org/api/cli/#optimize-options
[3] https://webpack.js.org/concepts/mode/#usage
Change-Id: I7a7ffc913592f0b18e091bb219a7fc75873d4d7a
FETCH_COMPLETE_TARGET_DELAY is used to introduce an artificial delay to
HTTP requests as needed. However, FETCH_START_DELAY is always accounted
for so it makes sense to define FETCH_COMPLETE_TARGET_DELAY with it. The
docs are updated to draw the distinction between total delay and API
response delay.
Change-Id: I4cddc89b8090d54db0dd85f270441cab17c54993
The project ESLint configuration unintentionally inherited unwanted
configuration from MediaWiki, which allows global jQuery usage. Cap the
project's ESLint hierarchy at the project root.
Change-Id: I5177d306feface7fcce0867c624bbcf9e74f19fc
The other messages when announcing a widget below use a ':' at the
end of line and add extra information in brackets, not on a new line.
Bug: T203992
Change-Id: Ide151e39159df01fa1c97c808bcf7ad29c671580
This is the first step, in a second after the OOUI rollout we should also
remove the paragraphs within the `label`, for appearance and HTML validation
reasons.
Bug: T203992
Change-Id: I4a12e4572ae2518079616e3765a5d3954aab794b
tests/selenium/wdio.conf.js defines a Junit reporter but it is not
installed when running the suite directly from the extension.
Bug: T203591
Change-Id: Idf192506d0af01abbfea479223a3bbcfc5eef4ea
Add documentation for the Schema:Popups' linkInteractionToken property
in the EventLogging reducer.
https://meta.wikimedia.org/wiki/Schema:Popups
Bug: T203013
Change-Id: I7fc872beda284ef8639ad036ddeb9efc8581a452
Currently the Popups schema is disabled but if we were to re-enable
it, the page tokens would now be consistent with the ReadingDepth
schema
The getToken function is kept to allow generation of the
pageInteractionToken's relating to a link interaction, for which
there is no centralised API.
Additional changes:
* I've updated various tests to use the central mw.user stub to make
clearer where tokens come from.
Bug: T203013
Change-Id: If746bea5aeed2b4c192a9b8a02feb1fe06480633
diffs now correctly output errors. This will pick up changes to
index.js and index.js.json that have not been committed
--exit-code is passed to ensure that if there are changes then an
error is thrown and the action is not allowed.
The dist folder became out of date as depending on what version
of node you run, the output is different.
To aid debugging, the script that checks the diff now outputs the
node version and the npm version. From now on, we will all have
to use the same node version to build assets.
This is annoying, but we will re-evaluate the approach we are taking
to build assets in T202743. We can easily work around this by all using
nvm and making consistent use of the same node version.
The assets have been rebuilt with the node version that CI uses.
Bug: T202748
Change-Id: I82aee879d4b04ca06447f95eb81230bfc24d20e9