aboutsummaryrefslogtreecommitdiffstats
path: root/package.json
Commit message (Collapse)AuthorAgeFilesLines
* build: Add 'npm run qunit' commandTimo Tijhof2017-11-221-0/+1
| | | | | | | | | | | | | | | | | | The running of 'grunt qunit' is unconvenient due to it only working if the user has grunt-cli installed globally, which should not be needed because it is already installed in the local directory. It could be worked around by instructing users to use `./node_modules/.bin/grunt qunit`, but it would be much simpler to instruct them to use `npm run qunit` instead. Unlike 'composer', 'npm' does not come by default with a command like 'composer exec' that one could pass a command directly without needing to register it. This is fixed in more recent versions through 'npx -c', but that's a bit too new to require in the manual, so adding it as a run-script instead. Change-Id: I2812b13dbed50612b1626a617ba65f92e212f01a
* build: Upgrade grunt-stylelintEd Sanders2017-10-301-1/+1
| | | | Change-Id: I4c47f1d290802705d061167fe369c130405512e0
* build: Bump karma devDependencies to latestJames D. Forrester2017-10-301-5/+5
| | | | | | | | | | karma 1.5.0 → 1.7.1 karma-chrome-launcher 2.0.0 → 2.2.0 karma-mocha-reporter 2.2.3 → 2.2.5 nodemw 0.10.1 → 0.11.0 qunitjs 2.4.0 → 2.4.1 Change-Id: I1e06189a12fbbc1d62781a4636f192c5b7078c1a
* Merge "build: Bump eslint devDependencies to latest"jenkins-bot2017-10-301-2/+2
|\
| * build: Bump eslint devDependencies to latestJames D. Forrester2017-10-261-2/+2
| | | | | | | | | | | | | | eslint 3.12.2 → 4.9.0 grunt-eslint 20.0.0 → 20.1.0 Change-Id: I7eb9964fb5d163c5bbcef850f62383cbceb59287
* | build: Update stylelintEd Sanders2017-10-271-2/+2
|/ | | | Change-Id: I5a0ccb26a54109e641fd121c6427a71e82e05c74
* Follow-up 2454f51b274: Upgrade qunit from 1.x to 2.x tooJames D. Forrester2017-10-111-2/+2
| | | | | | | | karma-qunit 1.0.0 → 1.2.1 qunitjs 1.23.1 → 2.4.0 Bug: T170515 Change-Id: Ibc0909ed5fbde715814b0ddb1a1d1c9668d10a85
* build: Bump eslint-config-wikimedia from 0.4.0 to 0.5.0James D. Forrester2017-08-211-1/+1
| | | | Change-Id: I06010cd6367c1884b5536e7929d3345feba7f305
* Merge "build: Upgrade grunt-eslint from 19.0.0 to 20.0.0"jenkins-bot2017-07-181-1/+1
|\
| * build: Upgrade grunt-eslint from 19.0.0 to 20.0.0Ed Sanders2017-07-181-1/+1
| | | | | | | | | | | | Most indent and escaping fixes. Change-Id: I210e2fc3c0ce3148327ef81f824e1ce9f1e269b6
* | build: Update grunt-stylelintEd Sanders2017-07-181-1/+2
|/ | | | Change-Id: I05e48d3eb749d192ccd4b837e4b8dc6307d761af
* Create users and pages for Selenium tests using action APIŽeljko Filipin2017-07-071-0/+1
| | | | | | | | This will make tests slightly more robust. Bug: T164721 Bug: T167502 Change-Id: I9b2fea77b28af4f7f521490a0105e7d04730bc87
* Make running Selenium tests using Sauce Labs easyŽeljko Filipin2017-05-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | If SAUCE_USERNAME and SAUCE_ACCESS_KEY environment variables are not defined, tests are run with `npm run selenium`, as usual. https://www.mediawiki.org/wiki/Selenium/Node.js/Inside_MediaWiki-Vagrant https://www.mediawiki.org/wiki/Selenium/Node.js/Target_MediaWiki-Vagrant If the environment variables are defined, to run tests using Sauce Labs and targeting Beta Cluster, run this: ``` export SAUCE_USERNAME=*** export SAUCE_ACCESS_KEY=*** export MW_SERVER=https://en.wikipedia.beta.wmflabs.org ./node_modules/.bin/wdio tests/selenium/wdio.conf.js ``` https://www.mediawiki.org/wiki/Selenium/Node.js/Target_beta_cluster_using_Sauce_Labs Bug: T139740 Change-Id: I622d9c55ae595ab772e733388d209623e3a9f81e
* build: Update eslint to 0.4.0 and make passEd Sanders2017-05-041-1/+1
| | | | Change-Id: Ib230392f332268ac801cf668f399fcefb1cb1cc5
* build: Sync qunitjs version for karma with version of Special pageTimo Tijhof2017-04-181-1/+1
| | | | | | | | | | | Special:JavaScriptTest loads qunitjs from /resources/lib/qunitjs which was upgraded in 99aad9397e to 1.23.1. However, when running QUnit tests from the command-line, QUnit is loaded by karma-qunit using the npm qunitjs dependency, which was still at v1.22.0. Change-Id: Ie24b2b061735fa03a8ed1527d09f65c103506c67
* build: Update karma to 1.5.0, karma-firefox-launcher to 1.0.1Paladox2017-04-151-2/+2
| | | | | | | | | | | | | | | | | | | | karma: Changelog at https://github.com/karma-runner/karma/releases https://github.com/karma-runner/karma/compare/v1.1.0...v1.5.0 karma-firefox-launcher: Changelog at https://github.com/karma-runner/karma-firefox-launcher/blob/master/CHANGELOG.md#101-2017-03-04 https://github.com/karma-runner/karma-firefox-launcher/compare/v1.0.0...v1.0.1 Karma v1.1.1 added use of `<script crossorigin="anonymous">` for the urls it initially loads. While most requests will be done by MW itself directly (and served locally via the proxy at /w/) the initial request cannot come from the proxy and is loaded from wgServer directly. Therefore we need to set crossOriginAttribute=false to override the new default that v1.1.1 introduced. Change-Id: I9f5067b949c0a77e46f47c2a110a7b5df5953fda
* build: Bump grunt-banana-checker from 0.5.0 to 0.6.0James D. Forrester2017-03-281-1/+1
| | | | Change-Id: I64d4267d20716b893237f7f13729343593c8d382
* build: karma now reports with mocha formatterAntoine Musso2017-03-201-0/+1
| | | | | | | | | | | | | | | | | | | | | The progress reporter is quite nice to avoid spammy output to the terminal, but it is not very human friendly when trying to find out what is breaking. Mocha has a very nice reporting organized as modules and list items for each of the tests: ext.cx.tools.template ✖ Equivalent template exists ✔ Adapting a template not existing in target language ✖ Adapting template having invalid title ✖ Template name and params adaptation using templatedata ✖ Template params adaptation using templateData - English to French ✖ Template params adaptation using templateData - English to Spanish Add karma-mocha-reporter node module and make it the reporter. Change-Id: Ic7d848b45e8e5ad3839d8a2bd822b63838319ad7
* Selenium tests in Node.js using WebdriverIOŽeljko Filipin2017-03-141-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce the WebdriverIO browser testing framework driven by Node.js. The overall intents are: * have MediaWiki core to provide a platform to run tests that is shared between core and the extensions. * phase out ruby driven browser tests eventually. Code is namespaced in sub directory /tests/selenium The 'pages' sub directory provides helper representing a MediaWiki page such as Special:Login and human friendly helpers to interact with the elements. Add Grunt task webdriver:test. Provide a npm script to easily spawn/dispose chromedriver and run above grunt task. wdio.conf.js provides all the configuration. It defaults to point to a MediaWiki-Vagrant installation on http://127.0.0.1:8080. Can be overriden with environment settings as needed. glob patterns (specs) are made absolute paths from MediaWiki root path that let us run the tests either from the root path (eg the npm wrapper or from the tests/selenium directory when invoking wdio directly. wdio assumes they are relative to the current working directory, hence the normalization. wdio.conf.jenkins.js extends the configuration and is used solely for Jenkins. The switch is done from the Gruntfile.js whenever JENKINS_HOME is set. Specially we want junit reports to be generated. Provide a more specific eslint configuration. References: * MALU https://phabricator.wikimedia.org/source/malu/ * T151442 Research WebdriverIO * T151443 Research Nightwatch.js Bug: T139740 Signed-off-by: Antoine Musso <hashar@free.fr> Change-Id: Ibe7a004a120e82af637ab3e31b725de743134c99
* build: Bump stylelint and make passJames D. Forrester2017-02-171-2/+2
| | | | | | | grunt-stylelint 0.6.0 → 0.7.0 stylelint-config-wikimedia 0.3.0 → 0.4.1 Change-Id: Id87b8df04d415e1f1058a4042a31408236402037
* build: Upgrade karma-chrome-launcher to support Chromium on Mac/WindowsAntoine Musso2017-01-121-1/+1
| | | | | | | | | | | | | | | | | | | | | Before karma-chrome-launcher 2.0.0, Chromium was only detected on Linux and as part of the "Chrome" setting. "Chromium" is now recognised as a separate browser and is detected on Mac and Windows as well. https://github.com/karma-runner/karma-chrome-launcher/issues/45 Add a grunt target for Chromium so users may run the following to use Chromium instead of Chrome: grunt karma:chromium Since we keep the default of "Chrome", we'll need an override for CI since we install Chromium there instead of Chrome. Depends on Ie9f906f8 being merged and Nodepool images updated. Bug: T153756 Change-Id: I6ba0d971e7e8c3022d2ab6268ae637688189d768
* Pin eslint versionPaladox2016-12-211-0/+1
| | | | | | | | | | | We don't want tests failing every time upstream publishing a new version. Instead we should bump this manually everytime they update to make sure no failures happen. Bug: T118941 Change-Id: I1c76dacd0950100825b85a3791f74c1f6d5477d9
* build: Bump jsonlint devDependency to latestJames D. Forrester2016-11-221-1/+1
| | | | | | | | grunt-jsonlint 1.0.7 → 1.1.0 We can't bump the karma/qunit modules due to issues with our CI. Change-Id: I15595df8b30a8ef4ddb6471acdd8d4da4f4afabc
* build: Bump eslint-config-wikimedia to v0.3.0 (already passes)James D. Forrester2016-11-151-1/+1
| | | | Change-Id: Iee727a4521acd8c221733c7bd763cbf2adb9bd49
* build: Replace jscs+jshint with eslintEd Sanders2016-11-151-2/+2
| | | | Change-Id: Id0a23c03aabadfaf2ec705528ae4b3bd0908fa3e
* build: Fix stylelint devDependenciesJames D. Forrester2016-08-051-2/+2
| | | | Change-Id: I26cee89c27e3cd8f3c1fc48088b2a8e8b3927e4a
* build: Bump grunt-karma and related tools to 1.0.xPaladox2016-07-111-5/+5
| | | | | | | Also bump karma to 1.1.0 see changelog at https://github.com/karma-runner/karma/releases please Change-Id: Ic982dfc7ccebeecd6082b5476372cbb87fec5f1b
* build: Bump grunt-stylelint to v0.4.0 and make passJames D. Forrester2016-06-241-2/+2
| | | | Change-Id: I00e469cf9b484c9d4d4ad145480fa6e66dd7e8cc
* Revert "build: Bump grunt-karma and related tools to 1.0.x"Hashar2016-05-261-4/+4
| | | | | | | | | | Karma is suspected to have an issue disconnecting Chromium. That causes the qunit job to idle even after all tests have been completed. This reverts commit 72b0d9da08d6ea8c1842d76aaefe8e57046a2026. Bug: T136188 Change-Id: Id818f5a0d1983d0bffa545f7731a780bf2b9bf25
* build: Bump grunt-stylelint to v0.3.0James D. Forrester2016-05-191-1/+1
| | | | Change-Id: I012d8b8cb2851270180f1a981c49a8a5043ae218
* build: Bump grunt-karma and related tools to 1.0.xJames D. Forrester2016-05-191-4/+4
| | | | Change-Id: I3d8ad9fbd3b6950c13bf400790eb97fe4e94f849
* build: Introduce stylelintJames D. Forrester2016-05-191-1/+3
| | | | | | | | | | | Initially, with just a single rule to make this a smaller change that we can incrementally extend up to the full Wikimedia coding conventions preset; namely, forcing hex references to colours to be in lower-case. Note the odd src definition to avoid referring to mediawiki.less the directory in the glob. Change-Id: I34f0c8e3c8280e3fce0aa22d7537100b850cbb8d
* Bump grunt to 1.0.1, remove grunt-cliRicordisamoa2016-04-061-2/+1
| | | | Change-Id: Ic04c3a0b0237c8785f54b83f1bcfb64a3978d768
* Update grunt-banana-checker to 0.5.0Paladox2016-03-301-1/+1
| | | | | | | This fixes a json crash according to release notes at https://github.com/wikimedia/grunt-banana-checker/releases/tag/v0.5.0 Change-Id: I7cb37b3f1289b8b91bd98d770ebe58e4c3c6aae5
* build: Bump npm development dependencies to latestJames D. Forrester2016-03-191-3/+3
| | | | | | | | grunt-contrib-copy 0.8.2 → 1.0.0 grunt-contrib-watch 0.6.1 → 1.0.0 karma 0.13.19 → 0.13.22 Change-Id: Idc5c1ac97580e91d9c958c55cdfdda681330c254
* Update grunt-karma to 0.12.2Paladox2016-03-181-1/+1
| | | | | | | Reason because this update will include a fix for incompatibility with grunt 1.0.0 when it is released. Change-Id: I39f01e3a68b764a4638c3465a1d116aefd517ef5
* Merge "build: Update grunt-jscs to 2.8.0"jenkins-bot2016-03-131-1/+1
|\
| * build: Update grunt-jscs to 2.8.0Paladox2016-03-131-1/+1
| | | | | | | | Change-Id: Ica4fac1bee551467614a76c76aa699406927c9a4
* | Update Karma's QUnit to v1.22.0Timo Tijhof2016-03-121-1/+1
|/ | | | | | | Follows-up 54bbef467d, which updated the version used by MediaWiki's Special:JavaScriptTest. Change-Id: I7876808c3b5ac88976706cdff1cf7abe8075cfdb
* build: Update grunt-contrib-jshint from 0.12.0 to 1.0.0Paladox2016-02-221-1/+1
| | | | | | | | | | Changelog at https://github.com/gruntjs/grunt-contrib-jshint/blob/v1.0.0/CHANGELOG This release includes a fix to the checker because sometimes it would not show where the error was coming from. Change-Id: Ia2e7d6520b760bdc80f7e24051ec578954aa0706
* build: Bump grunt-contrib-jshint from 0.11.3 to 0.12.0James D. Forrester2016-02-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Taking the opportunity to modernise our .jshintrc file, I have made the following changes there and adjusted the repo to pass: * Replaced the deprecated `"es3": true` with `"esversion": 3`; nil change. * Adjusted `"latedef": true` to `"latedef": "nofunc"`, a new setting for this option that lets us retain previous behaviour. One call needed to be adjusted for the update with this change; without it, several dozen were needed. * Added `"futurehostile": true`, to make bumping `esversion` easier in future. I have reviewed the rest of the options and chosen not to apply them: * No need to over-ride the runtime option `maxerr`. * No need to add the additional 'enforcing' options: `forin`, `nocomma`, `nonbsp`, `notypeof`, `predef`, `shadow`, `singleGroups`, `varstmt`. * No need to add the additional 'relaxing' options, as ideally we should use none: `asi`, `boss`, `debug`, `elision`, `eqnull`, `evil`, `expr`, `lastsemic`, `loopfunc`, `moz`, `noyield`, `plusplus`, `proto`, `scripturl`, `supernew`, `validthis`, `withstmt` * Definitely no need to add any of the deprecated coding style-related items: `camelcase`, `curly`, `immed`, `indent`, `laxcomma`, `maxlen`, `maxcomplexity`, `maxdepth`, `maxparams`, `maxstatements`, `newcap`, `noempty`, `quotmark`, `sub` Note that we retain two deprecated options, `laxbreak` and `multistr` which are set to be removed in the next major version of jshint but are as-yet required for the repo so that it passes. Change-Id: I2a780f655010f2231ab2ab93c40b34943828b4df
* build: Bump devDependencies to latestJames D. Forrester2016-02-061-3/+3
| | | | | | | | | | | | * grunt-contrib-copy: 0.8.1 -> 0.8.2 * grunt-jscs: 2.6.0 -> 2.7.0 * karma-qunit: 0.1.5 -> 0.1.9 Leaving grunt-contrib-jshint for a follow-up patch. Avoiding upgrading qunitjs again due to incompatibility of recent versions. Change-Id: Ie4d2f63c3ec247f1bad26ca5d954362210394618
* build: Update jscs to latestPaladox2016-01-081-1/+1
| | | | | | * grunt-jscs: 2.5.0 → 2.6.0 Change-Id: I4b1585c557b94927e593975e2e4696b88becd095
* Update packages to do with karmaPaladox2016-01-061-2/+2
| | | | | | | | | | Packages updated are: karma-chrome-launcher updated to 0.2.0 karma-firefox-launcher updated to 0.1.7 Change-Id: I542436bf8f0d782fc2af57a170faf936271b2bf9
* Update karma to 0.13.19Paladox2016-01-061-1/+1
| | | | Bug: T122941 Change-Id: Iee84646b0f914bceb254ffc18d678d916c38eb20
* Update grunt-jsonlint to 1.0.7Paladox2015-12-241-1/+1
| | | | | | | | | | | | This update now tells you on which line in which file the error happends. Changelog is 1.0.7 Include file name and JSON source line number in error messages 1.0.6 CJSON support thanks to @fredghosn, unit tests Change-Id: I38dc4a51416cfde0bb0434921d15f1c119abc01b
* Update grunt-jscs to 2.5.0Paladox2015-12-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 2.5.0 Bump JSCS version to 2.7.0 2.4.0 Bump JSCS version to 2.6.0 2.3.0 Bump JSCS version to 2.5.0 2.2.0 * Update jscs dependency to 2.4.0 * Use new Checker#execute method, which allows to respect maxErrors * option when fix option is enabled * fix option is now directly passed to Checker class of jscs * Use new "idiomatic" preset instead of "jquery" * Test in latest version of node in travis CI * Update dev dependencies https://github.com/jscs-dev/grunt-jscs/releases Change-Id: I472a3c63fff814357799a3889b09bbb6a977474b
* Update grunt-jsonlint to 1.0.5Paladox2015-10-241-1/+1
| | | | | | This is a minor update there were packages updates in this version. Change-Id: I43cced8c20153d06f764ebba90f64de0431e2d3f
* build: Upgrade grunt-banana-checker from v0.3.0 to v0.4.0James D. Forrester2015-10-121-1/+1
| | | | | | Take opportunity to drop no-longer-needed options. Change-Id: I11250c12d2123d4729e12cd0dce07b24fc5008e5
* Merge "build: Bump various devDependencies to latest"jenkins-bot2015-09-281-5/+5
|\