build: Updating npm dependencies

* eslint-config-wikimedia: 0.27.0 → 0.28.0
  The following rules are failing and were disabled:
  * ReCaptchaNoCaptcha/resources/ve-confirmedit-reCaptchaNoCaptcha:
    * no-jquery/no-extend
  * Turnstile/resources/ve-confirmedit-turnstile:
    * no-jquery/no-extend
  * hCaptcha/resources/ve-confirmedit-hCaptcha:
    * no-jquery/no-extend

* grunt-stylelint: 0.19.0 → 0.20.0
* stylelint-config-wikimedia: 0.16.1 → 0.17.1

Change-Id: I8045a843b3e9b6a67e07d580ce07dc6afeaeab2d
This commit is contained in:
libraryupgrader 2024-06-07 03:55:13 +00:00
parent 8e9edd424e
commit a8c5016096
11 changed files with 1791 additions and 2131 deletions

View file

@ -7,7 +7,7 @@ $( document ).on( 'click', '.fancycaptcha-reload', function () {
$this.addClass( 'fancycaptcha-reload-loading' );
// AJAX request to get captcha index key
new mw.Api().post( { action: 'fancycaptchareload' } ).done( function ( data ) {
new mw.Api().post( { action: 'fancycaptchareload' } ).done( ( data ) => {
const captchaIndex = data.fancycaptchareload.index;
let imgSrc;
if ( typeof captchaIndex === 'string' ) {
@ -27,7 +27,7 @@ $( document ).on( 'click', '.fancycaptcha-reload', function () {
$captchaImage.data( 'captchaId', captchaIndex );
}
} )
.always( function () {
.always( () => {
$this.removeClass( 'fancycaptcha-reload-loading' );
} );

View file

@ -10,9 +10,7 @@ module.exports = function ( grunt ) {
// eslint-disable-next-line security/detect-non-literal-require
messagesDirs[ subExtension ] = require( './' + subExtension + '/extension.json' )
.MessagesDirs[ subExtension ]
.map( function ( path ) {
return subExtension + '/' + path;
} );
.map( ( path ) => subExtension + '/' + path );
}
grunt.loadNpmTasks( 'grunt-banana-checker' );

View file

@ -2,5 +2,8 @@
"globals": {
"ve": false,
"OO": false
},
"rules": {
"no-jquery/no-extend": "warn"
}
}

View file

@ -1,5 +1,5 @@
mw.loader.using( 'ext.visualEditor.targetLoader' ).then( function () {
mw.libs.ve.targetLoader.addPlugin( function () {
mw.loader.using( 'ext.visualEditor.targetLoader' ).then( () => {
mw.libs.ve.targetLoader.addPlugin( () => {
ve.init.mw.NoCaptchaReCaptchaSaveErrorHandler = function () {};
@ -45,7 +45,7 @@ mw.loader.using( 'ext.visualEditor.targetLoader' ).then( function () {
};
this.getReadyPromise()
.then( function () {
.then( () => {
if ( self.widgetId ) {
window.grecaptcha.reset( self.widgetId );
} else {

View file

@ -2,5 +2,8 @@
"globals": {
"ve": false,
"OO": false
},
"rules": {
"no-jquery/no-extend": "warn"
}
}

View file

@ -1,5 +1,5 @@
mw.loader.using( 'ext.visualEditor.targetLoader' ).then( function () {
mw.libs.ve.targetLoader.addPlugin( function () {
mw.loader.using( 'ext.visualEditor.targetLoader' ).then( () => {
mw.libs.ve.targetLoader.addPlugin( () => {
ve.init.mw.TurnstileSaveErrorHandler = function () {};
@ -45,7 +45,7 @@ mw.loader.using( 'ext.visualEditor.targetLoader' ).then( function () {
};
this.getReadyPromise()
.then( function () {
.then( () => {
if ( self.widgetId ) {
window.turnstile.reset( self.widgetId );
} else {

View file

@ -2,5 +2,8 @@
"globals": {
"ve": false,
"OO": false
},
"rules": {
"no-jquery/no-extend": "warn"
}
}

View file

@ -1,5 +1,5 @@
mw.loader.using( 'ext.visualEditor.targetLoader' ).then( function () {
mw.libs.ve.targetLoader.addPlugin( function () {
mw.loader.using( 'ext.visualEditor.targetLoader' ).then( () => {
mw.libs.ve.targetLoader.addPlugin( () => {
ve.init.mw.HCaptchaSaveErrorHandler = function () {};
OO.inheritClass( ve.init.mw.HCaptchaSaveErrorHandler, ve.init.mw.SaveErrorHandler );
@ -42,7 +42,7 @@ mw.loader.using( 'ext.visualEditor.targetLoader' ).then( function () {
};
this.getReadyPromise()
.then( function () {
.then( () => {
// ProcessDialog's error system isn't great for this yet.
target.saveDialog.clearMessage( 'api-save-error' );
target.saveDialog.showMessage( 'api-save-error', $container, { wrap: false } );

3873
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -5,11 +5,11 @@
"test": "grunt test"
},
"devDependencies": {
"eslint-config-wikimedia": "0.27.0",
"eslint-config-wikimedia": "0.28.0",
"grunt": "1.6.1",
"grunt-banana-checker": "0.13.0",
"grunt-eslint": "24.3.0",
"grunt-stylelint": "0.19.0",
"stylelint-config-wikimedia": "0.16.1"
"grunt-stylelint": "0.20.0",
"stylelint-config-wikimedia": "0.17.1"
}
}

View file

@ -5,8 +5,8 @@
// or "fancy" type of captcha. They all expose differently named properties in the
// API for different things in the UI. At this point we only support the SimpleCaptcha and
// FancyCaptcha which we very intuitively detect by the presence of a "url" property.
mw.loader.using( 'ext.visualEditor.targetLoader' ).then( function () {
mw.libs.ve.targetLoader.addPlugin( function () {
mw.loader.using( 'ext.visualEditor.targetLoader' ).then( () => {
mw.libs.ve.targetLoader.addPlugin( () => {
ve.init.mw.CaptchaSaveErrorHandler = function () {};
@ -38,7 +38,7 @@ mw.loader.using( 'ext.visualEditor.targetLoader' ).then( function () {
captchaInput.on( 'load', onCaptchaLoad );
// Save when pressing 'Enter' in captcha field as it is single line.
captchaInput.on( 'enter', function () {
captchaInput.on( 'enter', () => {
target.saveDialog.executeAction( 'save' );
} );
@ -50,7 +50,7 @@ mw.loader.using( 'ext.visualEditor.targetLoader' ).then( function () {
return captchaInput.getCaptchaWord();
};
// Unregister extra fields on save attempt
target.saveDialog.once( 'save', function () {
target.saveDialog.once( 'save', () => {
delete target.saveFields.wpCaptchaId;
delete target.saveFields.wpCaptchaWord;
} );