Commit graph

135 commits

Author SHA1 Message Date
libraryupgrader
8892eed498 build: Updating npm dependencies
* body-parser: 1.19.2 → 1.20.3
  * https://github.com/advisories/GHSA-qwcr-r2fm-qrc7
* cookie: 0.4.2 → 0.7.2
  * https://github.com/advisories/GHSA-pxg6-pf52-xh8x
* engine.io: 6.4.2 → 6.6.2
  * https://github.com/advisories/GHSA-pxg6-pf52-xh8x
* micromatch: 4.0.7 → 4.0.8
  * https://github.com/advisories/GHSA-952p-6rrq-rcjv
* socket.io: 4.6.1 → 4.8.1
  * https://github.com/advisories/GHSA-25hc-qcg6-38wj
  * https://github.com/advisories/GHSA-pxg6-pf52-xh8x

Additional changes:
* Also sorted "composer fix" command to run phpcbf last.

Change-Id: I32746ac5ce244ff72de315bf28298ac287d30a14
2025-01-06 08:38:45 -05:00
jenkins-bot
4acdea458f Merge "Update Codex from v1.13.1 to v1.14.0" 2024-10-16 17:26:41 +00:00
lwatson
15eea4cea6 Update Codex from v1.13.1 to v1.14.0
Bug: T362650
Bug: T370057
Bug: T371118
Bug: T374659
Bug: T374882
Bug: T375699
Bug: T375700
Bug: T376024
Bug: T376622
Change-Id: I18684997862a1a6427627d8061a2583fff00e621
2024-10-16 09:11:15 -07:00
MusikAnimal
f717259a14 package.json: add pinia and @pinia/testing
The upcoming Multiblocks project will make use of a Pinia store, which
is already shipped in MediaWiki via ResourceLoader. In order to continue
to test Vue components that make use of a store, we need the Pinia
testing utilities.

The 'pinia' package is locked to the same version that's in RL, 2.0.16,
while '@pinia/testing' is locked at 0.0.12, the same version used by
some extensions such as GrowthExperiments.

Bug: T251790
Change-Id: Ia88d987bf7e5afa1a17d63b4ebc96448ccec2f6c
2024-10-15 17:54:33 -04:00
Anne Tomasevich
0823ce884e Update Codex from v1.13.0 to v1.13.1
Bug: T322014
Bug: T362346
Bug: T373225
Bug: T375698
Bug: T376045
Change-Id: I48c5a0e781fb10893adf63921124df23587b83ad
2024-10-01 18:34:35 +00:00
lwatson
c13fff37e2 Update Codex from v1.12.0 to v1.13.0
Bug: T251790
Bug: T360494
Bug: T363515
Bug: T365779
Bug: T370493
Bug: T371998
Bug: T372433
Bug: T372928
Bug: T373437
Bug: T374246
Bug: T374378

Change-Id: I1106330843660978bd917fe5ab7ce2e23226d3ee
2024-09-17 23:05:31 +00:00
Eric Gardner
48798f130f Add Jest to MW Core for testing Vue components
This brings Jest to MW Core so that Vue components can more easily be
tested. Packages ending with 'icons.json' are auto-mapped to the
@wikimedia/codex-icons package, establishing a new convention.
Jest is needed for testing Vue, but can be used for general JS testing
as well. Documentation to come at https://www.mediawiki.org/wiki/Jest

Usage: to run the tests, run "npx jest" or "npm run jest" in the root
folder. This could be aliased to a "test:unit" script in package.json
if desired.

In order to make a Vue component testable, it is required to follow the
`module.exports = exports` pattern. See:
https://nodejs.org/api/modules.html#exports-shortcut

A default jest.setup.js is added that mocks Core's mw global object, as
well as providing the $i18n Vue plugin. This is based on
Extension:GrowthExperiments (GPL-3.0-or-later). See https://w.wiki/B9vM

An initial test for mediawiki.special.block is added, exemplifying how
to mock calls to mw.config.get().

NOTE: The "overrides" added to package.json is a temporary measure to
get around a current issue with caniuse-lite and the stylelint plugin
that relies on it. See:
https://github.com/RJWadley/stylelint-no-unsupported-browser-features/issues/299

Bug: T251790
Change-Id: I1af15e038d17b0f1c645fc5debf9db5846f6215c
2024-09-11 16:40:17 -04:00
Željko Filipin
e2341256c7 selenium: Remove engines from wdio-mediawiki
Bug: T373684
Change-Id: I2d482b61d6a3bf037f43c9050b46f989c06bc559
2024-09-09 13:48:09 +02:00
apaskulin
139160aabc Update jsdoc-wmf-theme from 1.0.1 to 1.1.0
* Use the new default set of plugins
* Remove prefixMap since that is now handled by the theme
* Remove linkMap items provided by the theme
* Replace the JSDoc-specific package.json with a maintitle
  and README h1
* Add node_modules/jsdoc-class-hierarchy as a dependency.
  This plugin isn't currently used in core, but it is part
  of the default plugin set.

Bug: T368081
Change-Id: Ib2b16b2f4c5f11ff29cc6dc5d67df43bc59c9752
2024-06-27 19:29:24 +00:00
jenkins-bot
668d940135 Merge "build: Update stylelint-config-wikimedia to 0.17.2" 2024-06-13 17:20:37 +00:00
Ed Sanders
5728537128 build: Update stylelint-config-wikimedia to 0.17.2
Change-Id: I8d68bcae416463ceec6d7b617e38d34c57360698
2024-06-13 16:11:25 +00:00
Ed Sanders
8f9d3d4bcc build: Update eslint-config-wikimedia to 0.28.2
Fixes false positive with no-jquery/no-extend

Change-Id: I4f7e8da89da3a7433e0fcd82b7bb341ad4d0068c
2024-06-13 14:47:43 +01:00
Ed Sanders
2af1c3c901 build: Update eslint-config-wikimedia to 0.28.1 and autofix
Also remove temporary explicit dependency on eslint-plugin-vue
introduced in Ibd616750f046a.

Change-Id: Ic6330fcb116e99d5827b4877e094e3073e2b7b72
2024-06-11 19:03:53 +01:00
libraryupgrader
43883f32fd build: Updating grunt-banana-checker to 0.13.0
Change-Id: Ie15fafb908815c34784effbdcbc0613a21262094
2024-06-10 12:54:08 -04:00
daniel
99cffa524e api-testing: make xmls2js a devDependency
xml2js was accidentally aded as a regular dependency in Idb5b0d21a.

Change-Id: I22bdcf61b0e6dd0623cf973df89b991d2504e3c4
2024-05-21 22:13:37 +02:00
daniel
879846b29c REST: introduce OpenSearchDescriptionHandler
Move open search description endpoint from /w/opensource_desc.php
to /w/rest.php/v1/search.

Bug: T363984
Change-Id: Idb5b0d21adc6152ef77e6d17846b6acc6a904e01
2024-05-18 17:29:07 +00:00
tacsipacsi
73e7a1e1ef Update jsdoc-wmf-theme to 1.0.1
Change-Id: I1ac4b1ee2938f35fa9964dddfacbe9a09bcd5dff
2024-05-07 18:46:23 +02:00
libraryupgrader
c37b7d608d build: Updating ejs to 3.1.10
* https://github.com/advisories/GHSA-ghr5-ch3p-vcr6

Change-Id: I4a7c8e2c5d9eb4eb9bb69820bab091673c55d9a3
2024-05-05 09:13:55 +03:00
apaskulin
46df45a0f8 Update jsdoc-wmf-theme from 0.0.13 to 1.0.0
- Upgrade to 1.0.0, adding dependency on marked
- Replace local allow-dots-in-modules plugin with theme plugin
- Replace JSDoc summarize plugin with theme plugin
- Enable betterlinks plugin

Change-Id: I4c9d7f05c1fa1e6b8869dc3519d0bfd4a92b353f
2024-04-16 09:33:09 -07:00
James D. Forrester
da70c43115 build: Upgrade eslint-config-wikimedia to 0.27.0
Two odd compat/compat warnings not detecting the implicit sniffs.
Otherwise a no-op.

Change-Id: Ibfbf8f2653a0954f773ebdd98268d02f7b978eb6
2024-04-09 19:57:03 -04:00
Roan Kattouw
cd68f65cbb Update eslint-plugin-vue to 9.23.0
In theory we shouldn't need to do this, because eslint-config-wikimedia
already provides eslint-plugin-vue. However, eslint-plugin-mediawiki
also pulls in eslint-plugin-vue but at an older version, and this causes
nonsensical vue/dot-location errors to be raised at the end of the
`<script>` block in each .vue file.

This is a temporary fix to make it possible to introduce .vue files in
MW core without having to disable the vue/dot-location at the end of
each file. Once this is fixed permanently upstream (see
https://github.com/wikimedia/eslint-plugin-mediawiki/pull/95), this
change can be undone.

Change-Id: Ibd616750f046a3a66b5d7f2665696ed9175a4090
2024-03-21 15:36:11 -07:00
apaskulin
10815a9be4 Update jsdoc-wmf-theme from 0.0.12 to 0.0.13
Update jsdoc 3.6.10 to 4.0.2

Change-Id: I88f4ae48ca7b60d370daa729daf2c6f68ce0648f
2024-03-05 08:11:23 -08:00
Timo Tijhof
d999dc7ac5 build: Update karma-qunit to 4.2.0 and remove old __karma__ hack
Made redundant by https://github.com/karma-runner/karma-qunit/pull/184.

Change-Id: If636ec52826c2bdcf1b6809e8ff18e34179cd71d
2024-03-02 20:11:36 +00:00
jenkins-bot
94a6a629d1 Merge "build: Update karma-firefox-launcher to fix bug on macOS" 2024-02-13 20:08:45 +00:00
James D. Forrester
4330eb372b build: Upgrade grunt-banana-checker from 0.11.0 to 0.11.1
Change-Id: Ia14474b62f226fe5ce735903c5d23a513e976840
2024-02-09 10:43:29 -05:00
Timo Tijhof
eb637c51a5 build: Update karma-firefox-launcher to fix bug on macOS
Mozilla has stopped shipping the `Firefox.app/Contents/MacOS/firefox-bin`
entrypoint for macOS, instead favouring `Firefox.app/Contents/MacOS/firefox`.
This broke the launcher and requires a minor patch.

Pending an upstream release, use our fork for now. We can transition
this to a simpler setup without Karma (i.e. launch browser directly),
but for now we can patch it in this way.

Change-Id: If99f030b1b23be6b906a15bfdb72590fc249cb0c
2024-02-09 13:46:06 +00:00
apaskulin
9046fe8368 Update jsdoc-wmf-theme from 0.0.11 to 0.0.12
Change-Id: I772deeed7c5e7f95ebbab88d1e67bcd00da4cbcc
2024-01-25 13:37:54 -08:00
Volker E
6e65645f5a build: Update 'svgo' to latest v3.2.0
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
Also unifiying npm command to qua standard notation `minify:svg`.

Bug: T354875
Change-Id: Iaa9857ad95a1247fa0751f3953d324ea5c83b92c
2024-01-12 17:45:18 +00:00
jenkins-bot
3776f48ca2 Merge "Gruntfile: Remove now-unused copy:jsdoc command" 2023-12-21 16:02:49 +00:00
Roan Kattouw
78175b0695 Gruntfile: Remove now-unused copy:jsdoc command
This was needed for jsduck, but isn't needed now that we use jsdoc
instead.

Bug: T352308
Change-Id: Iade0bf72d74328d8e88f15ee54dd064b526a7c05
2023-12-21 10:37:30 -05:00
apaskulin
978e3e5848 Update jsdoc-wmf-theme from 0.0.9 to 0.0.11
Change-Id: I79c826babd864a8d519134839d55f27747a99455
2023-12-19 13:20:32 -08:00
Roan Kattouw
7cd6b4e05a Update jsdoc-wmf-theme from 0.0.8 to 0.0.9
Change-Id: Ida572854ccbbfe2c5ff9c3c958eee37d83ce7c1d
2023-12-07 16:27:08 -08:00
Daniel Kinzler
b73cc87dd1 Re-apply "REST: Emit swagger spec"
This reverts commit 890558f1fa.
This restores Id584208d9b67d877606a0add1d71c9b1784cdb1b with some fixes.

Bug: T323786
Bug: T352742
Change-Id: Ib31c451ddd75b06c95a544c8a3d2a64b32264126
2023-12-06 11:20:11 +01:00
Urbanecm
890558f1fa Revert "REST: Emit swagger spec"
This reverts commit bb4b5c5f87.

Reason for revert: patch breaks CI

Bug: T352742
Change-Id: Iaf57bad945f5cbd01508a513f0d219ec4b510ce8
2023-12-05 10:37:48 +00:00
daniel
bb4b5c5f87 REST: Emit swagger spec
This is only enabled in development mode for now.
It's intended as a baseline for further development,
the feature is not ready for production.

Bug: T323786
Change-Id: Id584208d9b67d877606a0add1d71c9b1784cdb1b
Co-authored-by: Atieno <pnjira@wikimedia.org>
2023-12-04 16:28:32 +03:00
Jon Robson
dfea3e8e5a Add jsdoc with jsdoc-wmf-theme
jsduck is preventing us from using ES6 syntax and has not
been supported for some time. It is also difficult to setup
locally due its use of Ruby.

Introduce jsdoc and remove jsduck per T138401#9335987
Link to static copy of jsduck explaining the state

This does the bare minimum - the docs are built to the folder
docs/js/index.html and only one module is ported over to allow
us to provide feedback on the end result.

Bug: T138401
Change-Id: I1a351ac5aec731bb79a877023ac10988ec3ec786
2023-11-28 00:37:48 +00:00
James D. Forrester
c2aa05102d build: Upgrade eslint-config-wikimedia from 0.25.0 to 0.26.0 and make pass
Mostly this has a bunch of whitespace changes from the
template-curly-spacing and brace-style rules being set
to align with other spacing rules.

Change-Id: I4609c52a4ef426ad1f35fb4bfe447bb08323a8e8
2023-11-22 13:25:32 -05:00
Željko Filipin
7a5c032ca0 selenium: Update @wdio to the latest v7 versions
Required for running tests using Firefox.

Bug: T351747
Change-Id: I19d247d559eff06fc0aebac79f0d31b6ef65170a
2023-11-22 16:18:58 +01:00
James D. Forrester
b391a10a0a tests: Upgrade QUnit from v2.19.4 to v2.20.0
Change-Id: I9a870d937efee1588fb87584f65a985cb0d03693
2023-10-20 15:06:30 -04:00
Ed Sanders
49ad39015d build: Update linters
Change-Id: I35fa6b68e1ffdc563bd49de06d8ba11561f9cfdc
2023-08-21 16:33:43 +01:00
James D. Forrester
85edc611b4 wdio-mediawiki: Upgrade mwbot from 2.0.0 to 2.1.3
Mostly this fixes security warnings from dependencies, but also adds
the createProtect() and editProtect() methods.

Change-Id: Ic033d6d69decc0122fcd9c309ebe98cbc90514c7
2023-07-14 13:16:33 -04:00
Volker E
ff1731dab1 build: Update SVGO to v3.0.2
svgo         2.8.0  →   3.0.2

Amending to new `cleanupIds` plugin name.

Bug: T339290
Change-Id: I16c77a2e6472f8b24e09795899233814fbb570e4
2023-06-15 12:24:22 -07:00
libraryupgrader
99c7447d27 build: Updating npm dependencies
* grunt-banana-checker: 0.10.0 → 0.11.0
* stylelint-config-wikimedia: 0.14.0 → 0.15.0

Change-Id: I21b3f7ed59c6f1485d968a6912f4ac33cdb1f53c
2023-06-02 22:39:05 +00:00
libraryupgrader
f5ad04e018 build: Updating socket.io-parser to 4.2.3
* https://github.com/advisories/GHSA-cqmj-92xf-r6r9

Change-Id: I4055c2d8bb03e103c1181854e201a38b3696d9e8
2023-05-23 22:37:05 +00:00
libraryupgrader
50e0f6895a build: Updating npm dependencies
* engine.io: 6.2.1 → 6.4.2
  * https://github.com/advisories/GHSA-q9mw-68c2-j6m5
* socket.io: 4.5.3 → 4.6.1
  * https://github.com/advisories/GHSA-q9mw-68c2-j6m5

Change-Id: I2ade5b7049a07c81af4457e53d8998e2e8e5457c
2023-05-07 00:17:02 +00:00
Ed Sanders
13e0a7cc58 Update eslint-config-wikimedia to 0.25.0
Change-Id: I70d4e311d369bd160e0cb9411d1b074e22104006
2023-05-05 15:03:43 +01:00
libraryupgrader
b061b84862 build: Updating mediawiki/mediawiki-phan-config to 0.12.1
Change-Id: I4a2c81b9c02b39beda3cf77c785e2e6940be4ab2
2023-04-28 22:43:35 +00:00
jenkins-bot
550d7fbb78 Merge "build: Upgrade api-testing from 1.5.1 to 1.6.0" 2023-04-28 15:37:56 +00:00
jenkins-bot
5b7b57f975 Merge "build: Update eslint-plugin-qunit to ^7.3.0" 2023-04-12 23:30:22 +00:00
James D. Forrester
6ebdfdcdf9 build: Upgrade api-testing from 1.5.1 to 1.6.0
Bug: T333134
Change-Id: I8a9a3c3b2ba641806a6c75ffb852238b1a1d7606
2023-04-12 14:39:12 -04:00