Commit graph

91 commits

Author SHA1 Message Date
Ed Sanders 842e027586 build: Update jsdoc-wmf-theme to 1.1.0
Bug: T368081
Change-Id: I71fef6340d84b2c061b3c967ebed3bf3ebc88c3b
2024-06-26 12:25:15 +01:00
James D. Forrester f3f397e252 Upgrade browserslist-config-wikimedia from 0.6.1 to 0.7.0
Change-Id: Ic078cdb7d86f9e7b6ebc3624a76ae92da13c6010
2024-05-23 17:49:47 -04:00
Ed Sanders 9b8b402cb1 Update jsdoc to 4 and use jsdoc-wmf-theme
Change-Id: Idb33efa5b714826550917397d4de1f2e5087f1bd
2024-04-29 19:17:17 +01:00
James D. Forrester 03449d1af0 .nvmrc: Update version from 18.17.0 to 18.20.2
Change-Id: Ic751ea1bfe708f1728301c2fce7e16deee5fbfa4
2024-04-17 14:01:32 +00:00
James D. Forrester 608fa2b69d build: Upgrade browserslist-config-wikimedia from 0.5.1 to 0.6.0
Change-Id: I8d0a00efb0464149951af33b7d24e407035c8d08
2024-02-07 14:32:44 -05:00
Volker E 31ef381e90 build: Update 'svgo' to latest v3.2.0 and re-minify SVGs
The latest update of 'svgo' dependency includes three optimizations on
converting path commands, which
- improves closing paths and how we determine if to use absolute or
  relative commands.
- round arc or convert to lines based on the geometric sagitta
- convert cubic Bézier curves to quadratic Bézier curves where possible

Bug: T354875
Change-Id: Ibd611396c48ff6f971ee251b59f13e350e0f812f
2024-01-16 00:13:08 +01:00
WMDE-Fisch a3f3cf9e3f build: Update eslint 0.26.0 and apply fixes
Mainly auto fixes but also getting rid of some straight forward lint
warnings to reduce the wall of issues a bit when running the tests.

Also removing some rule exceptions that seem to got more relaxed
upstream.

Change-Id: Icb4d73374583675be74517e6df6508314d61e8c2
2024-01-12 13:50:19 -05:00
James D. Forrester 863c442c32 .nvmrc: Update now we're using Node 18, and make CI pass
* Babel upgraded to a version that works with new Node's OpenSSL.
* Various loaders upgraded to match
* Babel config changed as plugin-proposal-private-property-in-object is now official
* Webpack config updated as noEmitOnErrors was renamed to not be a negation
* Webpack config updated as namedModules was renamed to the wider moduleIds
* Ignore the built Webpack output from eslint

Bug: T354943
Change-Id: I449f601b8218925d96bfb423fc0f349214d08385
2024-01-12 13:50:19 -05:00
Ed Sanders 461f949823 build: Update linters
Also restructure eslint config so that
* root files are linted with server rules
* src and tests share config

Change-Id: Ie4d0731ba9670af7f3e60cdfe3c4e331386b17c6
2023-11-09 11:36:08 +00:00
WMDE-Fisch 62510a4fba [build] Bump wdio-mediawiki to v2.3.0
Change-Id: Id5ab1b832e48cc9c211278f32354ca97ca3b693f
2023-09-26 14:22:42 +00:00
James D. Forrester a8557a7042 tests: Raise jQuery requirement from v3.6.1 to v3.7.1
Matches MediaWiki change d3d0a363d1f8c70cfa2e880d24182c050ad9bf78.

Change-Id: I948042fb0c4e19d9162680a4fa3e5ae024393859
2023-09-07 16:14:29 +00:00
WMDE-Fisch c2413c858b selenium: Refactor WebdriverIO tests from sync to async mode
I also removed the bool on the shouldUseReferencePopupsBetaFeature
method. It was always just used with `true`

Bug: T293072
Change-Id: I1a2d6f912fcac2ac77539581897e0feab489edf0
2023-07-18 09:34:47 +02:00
bwang 6b659443b5 Update popups to use codex buttons over mediawiki.ui.buttons
- Provides missing accessible label for the settings button

Bug: T340256
Change-Id: I86972322ae34f1d1df8d79c66daa9e34091f9dd3
2023-07-10 16:03:36 -05:00
Volker E 4132ee96ab build: Update SVGO to v3.0.2
svgo         2.8.0  →   3.0.2

Amending to new `cleanupIds` plugin name.

Bug: T339162
Change-Id: I8ad37e46501c36883967827b4d622788ae9065f1
2023-06-14 12:32:01 -07:00
Jon Robson 580067b94e Discourage jQuery usage in Popups extension
Change-Id: Iff0c81e4c1d78cc52d1bd9d81e24d8fae228c9bc
2023-06-13 15:39:57 -07:00
libraryupgrader faa3c63af8 build: Updating npm dependencies
* grunt-banana-checker: 0.10.0 → 0.11.0
* stylelint-config-wikimedia: 0.14.0 → 0.15.0

Change-Id: Ie2be62f89f01533a83982880a0ea7a2a71405b37
2023-06-02 01:01:00 +00:00
libraryupgrader 32778684af build: Updating npm dependencies
* @wikimedia/codex: 0.10.0 → 0.11.0
* @wikimedia/codex-icons: 0.10.0 → 0.11.0

Change-Id: Ic5218ad62e27900eb6a96461d9aa9126829f70e0
2023-05-24 00:54:43 +00:00
libraryupgrader 3840382ba1 build: Updating npm dependencies
* @wikimedia/codex: 0.9.1 → 0.10.0
* @wikimedia/codex-icons: 0.9.1 → 0.10.0

Change-Id: I5e8d4af946ae8d679f9cedbe34eac9f221035bef
2023-05-17 00:51:30 +00:00
Umherirrender 7a6cac8a64 build: Updating eslint-config-wikimedia to 0.25.0
Change-Id: Ic511f54b58947a2694514e2d417e022bdeae219d
2023-05-16 00:22:03 +02:00
libraryupgrader 97855ef2f4 build: Updating npm dependencies
* @wikimedia/codex: 0.8.0 → 0.9.1
* @wikimedia/codex-icons: 0.8.0 → 0.9.1
* less: 3.8.1 → 3.13.1

Change-Id: Idb363fba64495430bbc97e044d2047dec450e7cf
2023-04-27 00:25:44 +00:00
Umherirrender 3573232c21 build: Updating npm dependencies
* eslint-config-wikimedia: 0.22.1 → 0.24.0
* @wikimedia/mw-node-qunit: 6.3.3 → 7.0.0

Change-Id: I348eb70bfc6c1d6c922c8290152926183712dee1
2023-04-03 23:14:47 +02:00
Jon Robson ec50f3f6ff Fix storybook integration
Broken by If2b4073115d9082829e4917c87c167d18f5431d9
Change import to directly hit the Codex library
This should also allow web team to respond to Codex upgrades
at their own pace (via package.json)

Render functions must now be registered in storybook for
them to display. Follow up to
Iefe98c1f0422dbf034e385b1a41a859d030a2cf4

Change-Id: Iac9dede15f4de3a4d584f1e505e379764af6dcbf
2023-03-30 15:36:05 -07:00
Umherirrender 5f18164beb build: Updating npm dependencies
* stylelint-config-wikimedia: 0.13.0 → 0.14.0

Run stylelint fix to fix the new stylelint rule

Change-Id: I98f17b481d4ba56a8cd87fcafb1fc2efdaa8abe7
2023-03-28 20:18:47 +00:00
libraryupgrader 7ccf2f0f3a build: Updating dependencies
composer:
* mediawiki/mediawiki-codesniffer: 39.0.0 → 41.0.0
* mediawiki/mediawiki-phan-config: 0.11.1 → 0.12.0

npm:
* eslint: 8.9.0 → 8.31.0
* grunt-banana-checker: 0.9.0 → 0.10.0
* @wdio/mocha-framework: 7.4.6 → 7.30.2
* svg-inline-loader: 0.8.0 → 0.8.2
* decode-uri-component: 0.2.0 → 0.2.2
  * https://github.com/advisories/GHSA-w573-4hg7-7wgq
* deep-object-diff: 1.1.7 → 1.1.9
  * https://github.com/advisories/GHSA-653v-rqx9-j85p
* http-cache-semantics: 4.1.0 → 4.1.1
  * https://github.com/advisories/GHSA-rc47-6667-2j5j
* terser: 4.8.0 → 4.8.1
  * https://github.com/advisories/GHSA-4wf5-vphf-c2xc
  * https://github.com/advisories/GHSA-4wf5-vphf-c2xc
* ua-parser-js: 0.7.31 → 0.7.34
  * https://github.com/advisories/GHSA-fhg7-m89q-25r3

Change-Id: I11c9ba8212c9103e92baa5ebc09f9214b04851ff
2023-03-12 08:46:52 +00:00
Vaughn Walters a7dba1c602 selenium: Remove webdriverio npm package from the Popups extension
The `webdriverio` package does not need to be an explicit dependency.
It is a dependency of `@wdio/cli`.

Bug: T325059
Change-Id: I9d72d936e763dde9bc6d21708bf03fd39ee32ba0
2023-01-13 11:38:43 -06:00
James D. Forrester e1ea210f6f build: Upgrade jQuery test install to 3.6.1 to align with MediaWiki
Bug: T316516
Change-Id: I76a4aad525975e7fde7c70a2d0edb9801c1c939b
2022-08-31 09:22:27 -04:00
libraryupgrader 77c22caac7 build: Updating got to 11.8.5
* https://github.com/advisories/GHSA-pfrx-2q88-qq97

Change-Id: Idb772ad7380f34f8017faabffd95b675b0c99871
2022-06-22 08:25:00 +00:00
libraryupgrader 922ba0ac20 build: Updating npm dependencies
* mocha: 8.4.0 → 8.4.0
  * https://github.com/advisories/GHSA-qrpm-p2h7-hrv2
* nanoid: 3.1.20 → 3.1.20
  * https://github.com/advisories/GHSA-qrpm-p2h7-hrv2

Change-Id: I1a7e59872c1fc53697376e27538d2a02139895f8
2022-05-29 15:53:17 +00:00
libraryupgrader f32d77c603 build: Updating dependencies
composer:
* php-parallel-lint/php-parallel-lint: 1.3.1 → 1.3.2
* mediawiki/mediawiki-codesniffer: 38.0.0 → 39.0.0
* php-parallel-lint/php-console-highlighter: 0.5.0 → 1.0.0

npm:
* stylelint-config-wikimedia: 0.12.2 → 0.13.0
* mocha: 8.4.0 → 8.4.0
  * https://github.com/advisories/GHSA-qrpm-p2h7-hrv2
* nanoid: 3.1.20 → 3.1.20
  * https://github.com/advisories/GHSA-qrpm-p2h7-hrv2

Change-Id: I972f0212957bb495238f072a5de64fdd72e8c856
2022-05-21 10:03:09 +00:00
libraryupgrader af500bbccc build: Updating npm dependencies
* ejs: 3.1.6 → 3.1.8
  * https://github.com/advisories/GHSA-phwq-j96m-2c2q
* mocha: 8.4.0 → 8.4.0
  * https://github.com/advisories/GHSA-qrpm-p2h7-hrv2
* nanoid: 3.1.20 → 3.1.20
  * https://github.com/advisories/GHSA-qrpm-p2h7-hrv2

Change-Id: If0fac00718925fb57019e98fa8dbbd6fdec52187
2022-05-20 08:25:25 +00:00
libraryupgrader bf24312e60 build: Updating npm dependencies
* async: 0.9.2 → 3.2.3
  * https://github.com/advisories/GHSA-fwr7-v2mv-hh25
* jake: 10.8.4 → 10.8.5
  * https://github.com/advisories/GHSA-fwr7-v2mv-hh25
* mocha: 8.4.0 → 8.4.0
  * https://github.com/advisories/GHSA-qrpm-p2h7-hrv2
* nanoid: 3.1.20 → 3.1.20
  * https://github.com/advisories/GHSA-qrpm-p2h7-hrv2

Change-Id: I2026a6efa93a7837a1cdba142443df2c7af87ca8
2022-04-27 16:55:56 +00:00
libraryupgrader a5e2d17b45 build: Updating dependencies
composer:
* mediawiki/mediawiki-phan-config: 0.11.0 → 0.11.1

npm:
* eslint: 8.8.0 → 8.9.0
* wdio-mediawiki: 1.1.1 → 1.2.0
* @storybook/html: 6.2.9 → 6.4.22
* bundlesize: 0.18.0 → 0.18.1
* jquery: 3.4.1 → 3.6.0
* jsdoc: 3.6.3 → 3.6.10
* webpack-cli: 3.1.2 → 3.3.12
* ansi-regex: 5.0.1 → 5.0.1
  * https://github.com/advisories/GHSA-93q8-gq69-wqmw
* async: 0.9.2 → 0.9.2
  * https://github.com/advisories/GHSA-fwr7-v2mv-hh25
* ejs: 3.1.6 → 3.1.6
  * https://github.com/advisories/GHSA-fwr7-v2mv-hh25
* jake: 10.8.2 → 10.8.4
  * https://github.com/advisories/GHSA-fwr7-v2mv-hh25
* minimist: 1.2.5 → 1.2.6
  * https://github.com/advisories/GHSA-xvch-5gv4-984h
* mocha: 8.4.0 → 8.4.0
  * https://github.com/advisories/GHSA-qrpm-p2h7-hrv2
* nanoid: 3.1.20 → 3.1.20
  * https://github.com/advisories/GHSA-qrpm-p2h7-hrv2
* prismjs: 1.27.0 → 1.27.0
  * https://github.com/advisories/GHSA-3949-f494-cm99
* refractor: 3.5.0 → 3.6.0
  * https://github.com/advisories/GHSA-3949-f494-cm99

Additional changes:
* Set `name` in package.json.
* Also sorted "composer fix" command to run phpcbf last.
* Added the "composer phan" command to conveniently run phan.
* composer.json: Updated phpcs command in composer test (T280592).
* composer.json: Added phpcs command to scripts (T280592).

Change-Id: Ic9c742a3be5b22ccc1e8dff5b65ee779e2a02175
2022-04-15 19:01:33 +00:00
Ed Sanders 7cb024592b build: Update stylelint-config-wikimedia to 0.12.2
Change-Id: I5deff2e90e0bfa4e318094fe1962c2c66b5bd8f5
2022-02-28 13:18:39 +00:00
Ed Sanders 883c8c1aca build: Update eslint-config-wikimedia to 0.22.1
Change-Id: I055517998ed06fccdf50ec31251ea6aa9040abb5
2022-02-28 13:18:24 +00:00
Volker E 830ec1b56b build: Update 'svgo' to latest v2.8.0 & re-crush images
Updating 'svgo' to v2.8.0 and newest Wikimedia SVG guidelines –
mainly around new whitespace features of SVGO.

Change-Id: I37da089916d2efad696989427b0a06b392d1d89c
2022-02-27 23:58:05 +00:00
Umherirrender d6eddc9ca0 build: Updating stylelint-config-wikimedia to 0.11.1
Change-Id: Id770e10a4c37503eae2b6fb383f12b389d793f77
2021-09-12 16:11:01 +02:00
sahil 7142676629 selenium: Upgrade WebdriverIO to v7
Update npm packages: @wdio/* and webdriverio.

Bug: T274579
Change-Id: Ie9bd50e36f0c888a19e73ab9b424a8b6a5bd67fd
2021-08-24 17:29:16 +00:00
sahil 1e1b8506ac selenium: Update wdio-mediawiki
wdio-mediawiki v1.1.1:
- Includes wdio-defaults.conf.js file that vastly simplifies wdio.conf.js.
- Replaces @wdio/spec-reporter with @wdio/dot-reporter.
- Introduces video recording.

Bug: T283597
Change-Id: I76edb3f16272fc6c1d70b0a796115cf5cc22d255
2021-07-28 16:35:31 +05:30
Jan Drewniak dbb58da86b [Storybook] Upgrade Storybook to v6.2.9
This removes the webpack.config.js file, moving the webpack config
into main.js, which replaces config.js.

- Moves the global jQuery into the webpack config in main.js.
- Removes the outdates .nvmrc file in the webpack folder.
- Moves the mockMediaWiki initialization from config.js into
  index.stories.js
- Upgrades webpack to 4.22.2

Bug: T271763
Change-Id: Ie008d69e992625113ae98d52ad6d37186eb933de
2021-07-16 15:38:29 +00:00
Jan Drewniak 1e04551b1c [Storybook] Removing custom CSS grid and addons from Storybook
Removes the following add-ons and their configuration from Storybook:

- addon-cssresources
- addon-knobs
- addon-options

This will hopefully ease the upgrade to Storybook 6.

Removes the custom CSS grid used to position previews within the Storybook
instance in favour of a flexbox layout. This simplifies the creation
of previews for Storybook.

This change requires us to to add relative positioning to
`.mwe-popups-container` so that the footer is correctly positioned in the
popup without absolute positioning. This positioning has been moved to
be Storybook specific to avoid an regressions in production.

Bug: T271763
Change-Id: I9a97291cb4bca7d4cc60dad232a60f6f92c0adea
2021-07-14 12:54:55 +02:00
Volker E 21d49d3de1 build: Add and use 'browserslist-config-wikimedia'
Use central, shareable `browserslist-config-wikimedia/modern` config.

Bug: T282937
Change-Id: I72b38cba2028eab0b67543d066c341b76b91b5bb
2021-05-19 11:19:34 -07:00
James D. Forrester 14c2102476 build: Upgrade eslint-config-wikimedia from 0.17.0 to 0.20.0
Some inline compatibility queries for the maintainers, where it
wasn't obviously intentional.

Change-Id: Idd659a0a0f7fb86c3f6870b8fe4608bbf8a45f05
2021-05-03 12:31:52 -07:00
James D. Forrester 2d5f39f4c7 build: Upgrade stylelint-config-wikimedia from 0.10.1 to 0.10.3
Also update coverage thresholds so the repo builds with newer
build tools.

Change-Id: I5561f2008b5e5462bb9afdb00c3ed86ff59c57f7
2021-05-03 12:29:30 -07:00
Jan Drewniak b6fceb2fda build: Upgrade 'svgo' & re-crush SVGs
'svgo' upgraded to v2.3.0

This includes:
- Replacing .svgo.json with .svgo.config.js
- Updating the SVGs files. This amounts to changes in the order of
  some attributes.
- Adding the minify-svg command as part of the npm run test command

Bug: T278656
Change-Id: Ia38332be68b8ac47a31caf30272920c0f0c12053
2021-04-28 07:28:16 +00:00
bwang 2081ab4bf3 build: Replace Grunt tasks with npm scripts for eslint, stylelint, banana-checker & svgo.
Changes of note:
- The doc and node-debug jobs are moved to ensure that all test prefixed
jobs are together in the package.json manifest.
- 2 additional scripts are added (linter:js & linter:styles) to match WVUI's NPM script naming convention.

Bug: T206462
Change-Id: Ib84f93c20f13aefb2d8f8755261b1f14e5902f16
2021-04-21 22:25:17 +00:00
Umherirrender 3d179775b9 build: Update eslint-config-wikimedia
Fixed the jsdoc issues

Change-Id: Ib6acf224ea5527e5c6a14212cb95b49018241764
2020-09-30 00:46:58 +02:00
vidhi-mody bd7b4c87cc Selenium: Update to WebdriverIO v6
Update NPM packages: @wdio/* and webdriverio.

Bug: T258620
Change-Id: I63e6812e5cfd0e29444765b4b956a9a63711dfdb
2020-08-25 15:10:40 +05:30
vidhi-mody 17a3e59a1e Selenium: Update to WebdriverIO v5
Update NPM packages: webdriverio, wdio-mediawiki.

Replace NPM packages:
- wdio-mocha-framework with @wdio/mocha-framework.
- wdio-spec-reporter with @wdio/spec-reporter.
- wdio-junit-reporter with @wdio/junit-reporter.

New NPM packages: @wdio/cli, @wdio/local-runner, @wdio/sync.

Commands that return data no longer wrapped in `{ value: … }`.
Values are now returned directly.

Replace:
- `browser.element` with `$`.
- `chromeOptions` with `'goog:chromeOptions'`.
- `password` with `mwPwd`.
- `username` with `mwUser`.
- `moveToObject()` with `moveTo()`.
- `isVisible()` with `isDisplayed()`.

Bug: T258620
Change-Id: If339ff08b5e87c91905a65927ccd7e1b72b9f8e4
2020-07-24 17:17:01 +05:30
James D. Forrester e37ce8ef80 build: Upgrade grunt to 1.1.0
Change-Id: I2196e88f40a9cbd57c33e157e699a74870778efa
2020-06-26 17:35:18 +01:00
James D. Forrester eb0347135a build: Upgrade grunt-banana-checker to 0.9.0
Change-Id: I6532248f8384d1a818598ac30c75d01d3350ae88
2020-06-26 17:33:41 +01:00