Commit graph

1893 commits

Author SHA1 Message Date
Stephen Niedzielski a24bbe76e6 Hygiene: use source-maps for dev builds not eval maps
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
2018-11-16 13:17:46 -07:00
libraryupgrader 750a357434 build: Updating mediawiki/mediawiki-codesniffer to 23.0.0
Change-Id: I046509fb8fa8c7e3e3ad8ab00062212498da54d0
2018-11-16 07:41:01 +00:00
Translation updater bot b7f0a9e0c7 Localisation updates from https://translatewiki.net.
Change-Id: Ie7eb4531cffee9534136779d5b64b8cd1eefb18d
2018-11-12 22:12:54 +01:00
Translation updater bot fa8af07513 Localisation updates from https://translatewiki.net.
Change-Id: I76384f034e05632b3f74602ada589e23a61c222d
2018-11-04 22:42:33 +01:00
Translation updater bot 605b13ff97 Localisation updates from https://translatewiki.net.
Change-Id: Icc70b5dd3afbdf0bc36e7c3f778392f4350ea9d0
2018-10-18 22:34:27 +02:00
Stephen Niedzielski 4d44390a4b Hygiene: enable ESLint caching
Copy ESLint caching configuration from MinervaNeue.

eead7c9382%5E%21/

Change-Id: Ifee0f67392f73c1285da7767a949998520bf4a0d
2018-10-17 16:45:35 -06:00
Stephen Niedzielski c7e742743b Doc: fix fetch delay comments
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
2018-10-17 16:44:16 -06:00
jenkins-bot 471ea931de Merge "Hygiene: limit ESLint inheritance" 2018-10-17 22:37:08 +00:00
jenkins-bot 1db76db5ae Merge "Doc: fix type in getPageviewTracker()" 2018-10-17 22:31:05 +00:00
Translation updater bot b76034988d Localisation updates from https://translatewiki.net.
Change-Id: Ibf11cf0b65e97af4c42f624953ac3423cd0819de
2018-10-17 23:44:29 +02:00
Stephen Niedzielski d1ef4cbe88 Hygiene: limit ESLint inheritance
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
2018-10-16 16:22:25 +00:00
Translation updater bot 87112444c4 Localisation updates from https://translatewiki.net.
Change-Id: I2b92645b27b057a266daf70b97ece8dd37aa3c52
2018-10-11 22:37:27 +02:00
Translation updater bot 1bc072f9bd Localisation updates from https://translatewiki.net.
Change-Id: If85e6f6b48f468c2d7da69ef5576a9b538152417
2018-10-09 22:13:03 +02:00
Translation updater bot 1e352ce7de Localisation updates from https://translatewiki.net.
Change-Id: If6885d4317d692305729b81bad2c633c3b59cf0d
2018-10-06 22:35:36 +02:00
James D. Forrester 505ddc61fa PHP tests: Use the . not + operator to join strings
This unbreaks the test suite in PHP 7.1+.

Bug: T206297
Change-Id: I29677e84f41da447180beb58ffbc60655640890c
2018-10-05 15:47:05 -07:00
Stephen Niedzielski 6e3f90016a Doc: fix type in getPageviewTracker()
Change-Id: I45b9456e0869657069c4a961171fd89415bf5656
2018-10-05 10:41:23 -06:00
Translation updater bot 1c3b5307e7 Localisation updates from https://translatewiki.net.
Change-Id: Ic9810142f096b906047bd3a0e6ecb15c942cec79
2018-10-04 22:24:22 +02:00
Translation updater bot 23425e3acd Localisation updates from https://translatewiki.net.
Change-Id: I0d2043940d7e1cf68aaaa5be689f855b0ab022f1
2018-10-03 18:53:40 +02:00
Translation updater bot 49878e43d5 Localisation updates from https://translatewiki.net.
Change-Id: I16c662e1552abc74af1648cda35c9f951c5b345d
2018-09-26 13:46:13 +02:00
Volker E 3cfb1d346a Amend preferences message to unify with messages elsewhere
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
2018-09-24 16:50:03 -07:00
Translation updater bot a449690dc9 Localisation updates from https://translatewiki.net.
Change-Id: I0b29750b8ff5e3d782a624f044e2a0614ba4a84c
2018-09-23 10:27:15 +02:00
Translation updater bot 4e944dd48a Localisation updates from https://translatewiki.net.
Change-Id: I38cd3f2a08316535e0bef7d668454e13f7131d5d
2018-09-22 10:03:50 +02:00
Fomafix 5b6fe60407 Do not use jQuery's hasClass with space separated classes
A parameter with space separated class names is not specified in
https://api.jquery.com/hasClass/

Change-Id: I1b44215115a3e51319c042f0f20547cff640ab52
2018-09-21 08:20:12 -06:00
Translation updater bot f0d59dfcc1 Localisation updates from https://translatewiki.net.
Change-Id: I4d566c9607214a7f87528eca7da613b83c49f0f8
2018-09-21 10:35:20 +02:00
jenkins-bot e4af99f94f Merge "Simplify JavaScript by using native ES5 instead of jQuery" 2018-09-18 17:24:15 +00:00
Fomafix ae472fe689 Simplify JavaScript by using native ES5 instead of jQuery
jQuery.isFunction is deprecated since jQuery 3.3.
https://blog.jquery.com/2018/01/19/jquery-3-3-0-a-fragrant-bouquet-of-deprecations-and-is-that-a-new-feature/
A simple thruthy check suffices here.

Also make the parameters of isValid mandatory.

Change-Id: Ief595dd3304016011cf6df1ffbe88cd51d4ec9ea
2018-09-18 10:08:34 -07:00
Translation updater bot 64f4980a27 Localisation updates from https://translatewiki.net.
Change-Id: I22812458182af0210fb47621e7fe80af54b155b2
2018-09-18 09:52:25 +02:00
Translation updater bot 18d8561a8d Localisation updates from https://translatewiki.net.
Change-Id: I596e6e20f1dc2053d9e8f8b8522222bc4491328a
2018-09-17 10:18:25 +02:00
Translation updater bot 812148fda9 Localisation updates from https://translatewiki.net.
Change-Id: I86eecb9c95110f2589cd8eb6d7b025f6ad1255c9
2018-09-15 09:54:32 +02:00
Translation updater bot e19e209f08 Localisation updates from https://translatewiki.net.
Change-Id: Ie3e5545f14ecbef39052935eb857adca9b979286
2018-09-13 10:15:57 +02:00
Volker E 567bd4176f Remove unique and misplaced italicized text from preferences setting
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
2018-09-12 15:44:10 -07:00
Translation updater bot 7c616db10b Localisation updates from https://translatewiki.net.
Change-Id: I7cc40e695817d96c3a31043fce7dc8d20aa6b82e
2018-09-12 09:19:08 +02:00
Ed Sanders c74d2e5313 build: Update linters
Bug: T202739
Change-Id: Ie3f68977598f46f7e12b216f8381b2e9dc6d83ad
2018-09-11 10:26:35 -07:00
libraryupgrader 5635d8863b build: Updating mediawiki/phan-taint-check-plugin to 1.5.0
Change-Id: Ia9c9cc3426d811d2b7341323f58d73479d5e9943
2018-09-08 04:56:41 +00:00
Translation updater bot 75139cf1df Localisation updates from https://translatewiki.net.
Change-Id: I6abcc9f17409dfc9ec29e5c91646b5e2fe1580f6
2018-09-07 09:03:00 +02:00
Antoine Musso 99d0092096 QA: add missing wdio-junit-reporter
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
2018-09-06 16:08:44 +02:00
jenkins-bot ddc705c664 Merge "Selenium: add selenium-daily NPM script" 2018-09-06 08:20:04 +00:00
Stephen Niedzielski 16004549cf Doc: add linkInteractionToken description
Add documentation for the Schema:Popups' linkInteractionToken property
in the EventLogging reducer.

https://meta.wikimedia.org/wiki/Schema:Popups

Bug: T203013
Change-Id: I7fc872beda284ef8639ad036ddeb9efc8581a452
2018-09-05 20:02:32 +00:00
jdlrobson 53d1a2c329 Use getPageviewToken api
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
2018-09-05 20:02:17 +00:00
jenkins-bot 14df0a587c Merge "Update package.json to ensure assets get built on every commit" 2018-09-05 19:50:42 +00:00
jdlrobson 04afdd4741 Update package.json to ensure assets get built on every commit
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
2018-09-05 13:36:39 -06:00
Stephen Niedzielski 510577fcd3 Hygiene: add NVM config
Add Node Version Manager configuration file to simplify Node.js usage.

Change-Id: I6f4c0b5d0c52237af9f85a0b6508f7a30e51f296
2018-09-05 19:16:36 +00:00
Željko Filipin c578de27d8 Selenium: add selenium-daily NPM script
The script is needed to run the new Docker-based Jenkins job that runs daily and targets beta cluster.
selenium-test script and NPM packages are dependencies. selenium-daily now just calls selenium-test.

selenium-daily might seem redundant, but it provides flexibility. In case a
repository does not want to run all tests daily, that's easily fixed by updating the
selenium-daily script.

Bug: T188742
Change-Id: I35c93ff1897afc4b9e66703a1acf765e3fe7b643
2018-09-05 19:16:12 +00:00
Piotr Miazga df9e724d89 Fix failing isTranslatedTitleBlacklistedTest
Somhow the testIsTranslatedTitleBlacklisted start to fail, the test
looks like it's broken but because of some reason it used to work.
For now let me fix the test because it blocks merged, and later
I'll try to investigate whats wrong.

Changes:
 - testIsTranslatedTitleBlacklisted() has to define blacklisted
 pages in canonical way (eg: Special:Preferences, not in a language
 variant)
 - use MediaWikiServices::getSpecialPageFactory() as
 SpecialPageFactory static calls are deprectated

Bug: T203522
Change-Id: I0db1481c96c9c0e27364d028a57c1178865741ba
2018-09-05 21:04:52 +02:00
Translation updater bot 33a5cbce00 Localisation updates from https://translatewiki.net.
Change-Id: Idca2bb5ac6ac80be6e7531ba084503080bb2d193
2018-09-03 22:15:29 +02:00
libraryupgrader f9ea076bbc build: Updating mediawiki/mediawiki-codesniffer to 22.0.0
Change-Id: Ib7bfe61e9ce064e712d061f8360c88a7552c688d
2018-09-03 09:24:02 +00:00
libraryupgrader c03ebb6521 build: Updating mediawiki/phan-taint-check-plugin to 1.4.0
Change-Id: Id118b3d76cd1cdd11e4328309faf1705bb56e659
2018-09-01 13:16:51 +00:00
Translation updater bot bce353cd17 Localisation updates from https://translatewiki.net.
Change-Id: I02d381421068f24ba7bbaa36605bb17557748fca
2018-08-29 22:28:22 +02:00
Translation updater bot 7732202881 Localisation updates from https://translatewiki.net.
Change-Id: I34d8a1cc134898f2acfb18770f66884a694484be
2018-08-27 22:17:29 +02:00
Fomafix 27cfa1ce02 Start showing warning for deprecated PHP entry point
Change-Id: I01f3fd805b76c666eedc358d3c860248011622e4
2018-08-24 18:32:21 +02:00