mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-11-23 15:56:50 +00:00
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:
parent
8e9edd424e
commit
a8c5016096
|
@ -7,7 +7,7 @@ $( document ).on( 'click', '.fancycaptcha-reload', function () {
|
||||||
$this.addClass( 'fancycaptcha-reload-loading' );
|
$this.addClass( 'fancycaptcha-reload-loading' );
|
||||||
|
|
||||||
// AJAX request to get captcha index key
|
// 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;
|
const captchaIndex = data.fancycaptchareload.index;
|
||||||
let imgSrc;
|
let imgSrc;
|
||||||
if ( typeof captchaIndex === 'string' ) {
|
if ( typeof captchaIndex === 'string' ) {
|
||||||
|
@ -27,7 +27,7 @@ $( document ).on( 'click', '.fancycaptcha-reload', function () {
|
||||||
$captchaImage.data( 'captchaId', captchaIndex );
|
$captchaImage.data( 'captchaId', captchaIndex );
|
||||||
}
|
}
|
||||||
} )
|
} )
|
||||||
.always( function () {
|
.always( () => {
|
||||||
$this.removeClass( 'fancycaptcha-reload-loading' );
|
$this.removeClass( 'fancycaptcha-reload-loading' );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
|
|
@ -10,9 +10,7 @@ module.exports = function ( grunt ) {
|
||||||
// eslint-disable-next-line security/detect-non-literal-require
|
// eslint-disable-next-line security/detect-non-literal-require
|
||||||
messagesDirs[ subExtension ] = require( './' + subExtension + '/extension.json' )
|
messagesDirs[ subExtension ] = require( './' + subExtension + '/extension.json' )
|
||||||
.MessagesDirs[ subExtension ]
|
.MessagesDirs[ subExtension ]
|
||||||
.map( function ( path ) {
|
.map( ( path ) => subExtension + '/' + path );
|
||||||
return subExtension + '/' + path;
|
|
||||||
} );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
||||||
|
|
|
@ -2,5 +2,8 @@
|
||||||
"globals": {
|
"globals": {
|
||||||
"ve": false,
|
"ve": false,
|
||||||
"OO": false
|
"OO": false
|
||||||
|
},
|
||||||
|
"rules": {
|
||||||
|
"no-jquery/no-extend": "warn"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
mw.loader.using( 'ext.visualEditor.targetLoader' ).then( function () {
|
mw.loader.using( 'ext.visualEditor.targetLoader' ).then( () => {
|
||||||
mw.libs.ve.targetLoader.addPlugin( function () {
|
mw.libs.ve.targetLoader.addPlugin( () => {
|
||||||
|
|
||||||
ve.init.mw.NoCaptchaReCaptchaSaveErrorHandler = function () {};
|
ve.init.mw.NoCaptchaReCaptchaSaveErrorHandler = function () {};
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ mw.loader.using( 'ext.visualEditor.targetLoader' ).then( function () {
|
||||||
};
|
};
|
||||||
|
|
||||||
this.getReadyPromise()
|
this.getReadyPromise()
|
||||||
.then( function () {
|
.then( () => {
|
||||||
if ( self.widgetId ) {
|
if ( self.widgetId ) {
|
||||||
window.grecaptcha.reset( self.widgetId );
|
window.grecaptcha.reset( self.widgetId );
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -2,5 +2,8 @@
|
||||||
"globals": {
|
"globals": {
|
||||||
"ve": false,
|
"ve": false,
|
||||||
"OO": false
|
"OO": false
|
||||||
|
},
|
||||||
|
"rules": {
|
||||||
|
"no-jquery/no-extend": "warn"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
mw.loader.using( 'ext.visualEditor.targetLoader' ).then( function () {
|
mw.loader.using( 'ext.visualEditor.targetLoader' ).then( () => {
|
||||||
mw.libs.ve.targetLoader.addPlugin( function () {
|
mw.libs.ve.targetLoader.addPlugin( () => {
|
||||||
|
|
||||||
ve.init.mw.TurnstileSaveErrorHandler = function () {};
|
ve.init.mw.TurnstileSaveErrorHandler = function () {};
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ mw.loader.using( 'ext.visualEditor.targetLoader' ).then( function () {
|
||||||
};
|
};
|
||||||
|
|
||||||
this.getReadyPromise()
|
this.getReadyPromise()
|
||||||
.then( function () {
|
.then( () => {
|
||||||
if ( self.widgetId ) {
|
if ( self.widgetId ) {
|
||||||
window.turnstile.reset( self.widgetId );
|
window.turnstile.reset( self.widgetId );
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -2,5 +2,8 @@
|
||||||
"globals": {
|
"globals": {
|
||||||
"ve": false,
|
"ve": false,
|
||||||
"OO": false
|
"OO": false
|
||||||
|
},
|
||||||
|
"rules": {
|
||||||
|
"no-jquery/no-extend": "warn"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
mw.loader.using( 'ext.visualEditor.targetLoader' ).then( function () {
|
mw.loader.using( 'ext.visualEditor.targetLoader' ).then( () => {
|
||||||
mw.libs.ve.targetLoader.addPlugin( function () {
|
mw.libs.ve.targetLoader.addPlugin( () => {
|
||||||
ve.init.mw.HCaptchaSaveErrorHandler = function () {};
|
ve.init.mw.HCaptchaSaveErrorHandler = function () {};
|
||||||
|
|
||||||
OO.inheritClass( ve.init.mw.HCaptchaSaveErrorHandler, ve.init.mw.SaveErrorHandler );
|
OO.inheritClass( ve.init.mw.HCaptchaSaveErrorHandler, ve.init.mw.SaveErrorHandler );
|
||||||
|
@ -42,7 +42,7 @@ mw.loader.using( 'ext.visualEditor.targetLoader' ).then( function () {
|
||||||
};
|
};
|
||||||
|
|
||||||
this.getReadyPromise()
|
this.getReadyPromise()
|
||||||
.then( function () {
|
.then( () => {
|
||||||
// ProcessDialog's error system isn't great for this yet.
|
// ProcessDialog's error system isn't great for this yet.
|
||||||
target.saveDialog.clearMessage( 'api-save-error' );
|
target.saveDialog.clearMessage( 'api-save-error' );
|
||||||
target.saveDialog.showMessage( 'api-save-error', $container, { wrap: false } );
|
target.saveDialog.showMessage( 'api-save-error', $container, { wrap: false } );
|
||||||
|
|
3873
package-lock.json
generated
3873
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -5,11 +5,11 @@
|
||||||
"test": "grunt test"
|
"test": "grunt test"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint-config-wikimedia": "0.27.0",
|
"eslint-config-wikimedia": "0.28.0",
|
||||||
"grunt": "1.6.1",
|
"grunt": "1.6.1",
|
||||||
"grunt-banana-checker": "0.13.0",
|
"grunt-banana-checker": "0.13.0",
|
||||||
"grunt-eslint": "24.3.0",
|
"grunt-eslint": "24.3.0",
|
||||||
"grunt-stylelint": "0.19.0",
|
"grunt-stylelint": "0.20.0",
|
||||||
"stylelint-config-wikimedia": "0.16.1"
|
"stylelint-config-wikimedia": "0.17.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
// or "fancy" type of captcha. They all expose differently named properties in the
|
// 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
|
// 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.
|
// FancyCaptcha which we very intuitively detect by the presence of a "url" property.
|
||||||
mw.loader.using( 'ext.visualEditor.targetLoader' ).then( function () {
|
mw.loader.using( 'ext.visualEditor.targetLoader' ).then( () => {
|
||||||
mw.libs.ve.targetLoader.addPlugin( function () {
|
mw.libs.ve.targetLoader.addPlugin( () => {
|
||||||
|
|
||||||
ve.init.mw.CaptchaSaveErrorHandler = function () {};
|
ve.init.mw.CaptchaSaveErrorHandler = function () {};
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ mw.loader.using( 'ext.visualEditor.targetLoader' ).then( function () {
|
||||||
|
|
||||||
captchaInput.on( 'load', onCaptchaLoad );
|
captchaInput.on( 'load', onCaptchaLoad );
|
||||||
// Save when pressing 'Enter' in captcha field as it is single line.
|
// Save when pressing 'Enter' in captcha field as it is single line.
|
||||||
captchaInput.on( 'enter', function () {
|
captchaInput.on( 'enter', () => {
|
||||||
target.saveDialog.executeAction( 'save' );
|
target.saveDialog.executeAction( 'save' );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ mw.loader.using( 'ext.visualEditor.targetLoader' ).then( function () {
|
||||||
return captchaInput.getCaptchaWord();
|
return captchaInput.getCaptchaWord();
|
||||||
};
|
};
|
||||||
// Unregister extra fields on save attempt
|
// Unregister extra fields on save attempt
|
||||||
target.saveDialog.once( 'save', function () {
|
target.saveDialog.once( 'save', () => {
|
||||||
delete target.saveFields.wpCaptchaId;
|
delete target.saveFields.wpCaptchaId;
|
||||||
delete target.saveFields.wpCaptchaWord;
|
delete target.saveFields.wpCaptchaWord;
|
||||||
} );
|
} );
|
||||||
|
|
Loading…
Reference in a new issue