build: Updating npm dependencies

* eslint-config-wikimedia: 0.27.0 → 0.28.2
  The following rules are failing and were disabled:
  * tests/selenium:
    * implicit-arrow-linebreak
    * no-mixed-spaces-and-tabs
* grunt-banana-checker: 0.11.1 → 0.13.0
* stylelint-config-wikimedia: 0.16.1 → 0.17.2
  The following rules no longer exist and were removed:
  * stylistic/selector-list-comma-newline-after
* braces: 3.0.2 → 3.0.3
  * https://github.com/advisories/GHSA-grv7-fg5c-xmjg

Change-Id: Ia94454c1da778f241085714e1601a0233d547570
This commit is contained in:
libraryupgrader 2024-07-27 05:52:33 +00:00 committed by James D. Forrester
parent 73ce70c005
commit 842a91590a
26 changed files with 1358 additions and 1659 deletions

View file

@ -7,7 +7,6 @@
"declaration-no-important": null,
"declaration-property-unit-disallowed-list": null,
"selector-class-pattern": null,
"stylistic/selector-list-comma-newline-after": null,
"value-keyword-case": null
}
}

2856
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -22,13 +22,13 @@
"@wdio/local-runner": "7.30.1",
"@wdio/mocha-framework": "7.26.0",
"@wdio/spec-reporter": "7.29.1",
"eslint-config-wikimedia": "0.27.0",
"grunt-banana-checker": "0.11.1",
"eslint-config-wikimedia": "0.28.2",
"grunt-banana-checker": "0.13.0",
"jsdoc": "4.0.3",
"jsdoc-wmf-theme": "1.1.0",
"mwbot": "2.0.0",
"pre-commit": "1.2.2",
"stylelint-config-wikimedia": "0.16.1",
"stylelint-config-wikimedia": "0.17.2",
"svgo": "3.2.0",
"wdio-mediawiki": "2.5.0"
},

View file

@ -38,7 +38,12 @@
@import '../../../minerva.less/minerva.variables.less';
@import '../../../minerva.less/minerva.mixins.less';
h1, h2, h3, h4, h5, h6 {
h1,
h2,
h3,
h4,
h5,
h6 {
margin: 0;
padding: 0;
font: inherit;
@ -82,7 +87,10 @@ h4 {
.mw-heading4,
.mw-heading5,
.mw-heading6,
h3, h4, h5, h6 {
h3,
h4,
h5,
h6 {
line-height: @line-height-xx-small;
word-wrap: break-word;
@ -100,7 +108,11 @@ h3, h4, h5, h6 {
.mw-heading4,
.mw-heading5,
.mw-heading6,
h2, h3, h4, h5, h6 {
h2,
h3,
h4,
h5,
h6 {
padding: @margin-heading 0;
}
@ -112,7 +124,12 @@ h3, h4, h5, h6 {
// Override the styles above for `hN` nested inside `.mw-heading`, as used on wikitext pages.
.mw-heading {
h1, h2, h3, h4, h5, h6 {
h1,
h2,
h3,
h4,
h5,
h6 {
font-size: inherit;
line-height: inherit;
padding: 0;

View file

@ -2,15 +2,13 @@
ol {
margin: 0;
padding: 0 0 0 2.25em;
padding-inline-start: 2.25em;
padding-inline-end: 0;
padding-inline: 2.25em 0;
}
ul {
list-style-type: disc;
padding-left: 1em;
padding-inline-start: 1em;
padding-inline-end: 0;
padding-inline: 1em 0;
& > li > ul {
list-style-type: circle;
@ -27,8 +25,7 @@
ol,
ul {
margin: 0 0 0 1em;
margin-inline-start: 1em;
margin-inline-end: 0;
margin-inline: 1em 0;
}
}
@ -53,7 +50,6 @@ dl {
dd {
margin: 0 0 0 1em;
margin-inline-start: 1em;
margin-inline-end: 0;
margin-inline: 1em 0;
}
}

View file

@ -36,8 +36,7 @@
/* following 4 rules are needed for scrolling */
overflow: auto; /* for browsers that don't support overflow-y */
overflow-y: hidden;
overflow-x: auto;
overflow: auto hidden;
}
caption {

View file

@ -93,7 +93,12 @@
}
.mw-heading,
h1, h2, h3, h4, h5, h6 {
h1,
h2,
h3,
h4,
h5,
h6 {
border-bottom: 0;
padding-bottom: 0;
margin-bottom: 16px;
@ -113,7 +118,9 @@
.mw-heading4,
.mw-heading5,
.mw-heading6,
h4, h5, h6 {
h4,
h5,
h6 {
font-size: 36px;
margin-bottom: 12px;
}

View file

@ -13,7 +13,6 @@ body {
html {
font-size: @font-size-root;
// Support Safari: Prevent font scaling in landscape
// stylelint-disable-next-line plugin/no-unsupported-browser-features
-webkit-text-size-adjust: none;
}
@ -185,7 +184,12 @@ main {
}
// FIXME: Remove `.mw-headline` when $wgParserEnableLegacyHeadingDOM is removed.
h1, h2, h3, h4, h5, h6,
h1,
h2,
h3,
h4,
h5,
h6,
.mw-headline {
flex-grow: 1;
flex-basis: 0;

View file

@ -33,6 +33,7 @@ function testScrollLeftStyle() {
/**
* When tabs are present and one is selected, scroll the selected tab into view.
*
* @ignore
*/
function initTabsScrollPosition() {

View file

@ -67,7 +67,7 @@ function newFromUri( uri, options ) {
if ( mwUri.query.title ) {
// True if input starts with wgScriptPath.
// eslint-disable-next-line security/detect-non-literal-regexp
const regExp = new RegExp( '^' + mw.util.escapeRegExp( mw.config.get( 'wgScriptPath' ) ) + '/' );
// URL has a nonempty `title` query parameter like `/w/index.php?title=Foo`. The script
@ -82,7 +82,7 @@ function newFromUri( uri, options ) {
} else {
// True if input starts with wgArticlePath and ends with a nonempty page title. The
// first matching group (index 1) is the page title.
// eslint-disable-next-line security/detect-non-literal-regexp
const regExp = new RegExp( '^' + mw.util.escapeRegExp( mw.config.get( 'wgArticlePath' ) ).replace( '\\$1', '(.+)' ) );
// No title query parameter is present so the URL may be "pretty" like `/wiki/Foo`.

View file

@ -97,6 +97,7 @@ function hookHandler( listItem, data ) {
/**
* Init portlet link items added by gadgets prior to Minerva
* loading.
*
* @ignore
*/
function init() {

View file

@ -23,6 +23,7 @@ function discardDrawer( drawer ) {
/**
* Lock scroll of viewport.
*
* @ignore
*/
function lockScroll() {

View file

@ -2,6 +2,7 @@ const BODY_NOTIFICATIONS_REVEAL_CLASS = 'navigation-enabled secondary-navigation
/**
* Wire up the main menu
*
* @ignore
*/
function init() {

View file

@ -71,7 +71,7 @@ const SEVERITY_REGEX = {
const TYPE_REGEX = {
// recommended (opt-in) / en, es / ru, it (long term only recommended should be used)
MOVE: /mobile-issue-move|ambox-converted|ambox-move|ambox-merge|avviso-struttura/,
// eslint-disable-next-line security/detect-non-literal-regexp
POINT_OF_VIEW: new RegExp( [
// recommended (opt-in)
'mobile-issue-pov',

View file

@ -1,6 +1,7 @@
/**
* This setups the Minerva skin.
* It should run without errors even if MobileFrontend is not installed.
*
* @ignore
*/
const ms = require( 'mobile.startup' );

View file

@ -6,7 +6,8 @@
.editor-textarea();
}
.editHelp, .cancelLink {
.editHelp,
.cancelLink {
display: none;
}

View file

@ -87,7 +87,9 @@
.content table.diff {
display: block;
tbody, tr, td {
tbody,
tr,
td {
display: block;
padding: 0;
}

View file

@ -41,7 +41,8 @@
// don't use visibility: hidden in old browsers that don't support animations
display: none;
&.visible, &.mw-notification-visible {
&.visible,
&.mw-notification-visible {
display: block;
}
}

View file

@ -60,7 +60,8 @@
opacity: 0;
transition: transform @transition-duration-medium, opacity @transition-duration-medium, visibility @transition-duration-medium;
&.visible, &.mw-notification-visible {
&.visible,
&.mw-notification-visible {
visibility: visible;
opacity: 1;
transform: translate( 0, 0 );

View file

@ -7,6 +7,8 @@
"mw": "readonly"
},
"rules": {
"camelcase": "off"
"camelcase": "off",
"implicit-arrow-linebreak": "warn",
"no-mixed-spaces-and-tabs": "warn"
}
}

View file

@ -22,16 +22,14 @@ const createPages = ( pages ) => {
password: browser.options.password,
apiUrl: `${ browser.options.baseUrl }/api.php`
} )
.then( () => {
return bot.batch(
pages.map( ( page ) => [ 'create' ].concat( page ).concat( [ summary ] ) )
).catch( ( err ) => {
if ( err.code === 'articleexists' ) {
return;
}
throw err;
} );
} )
.then( () => bot.batch(
pages.map( ( page ) => [ 'create' ].concat( page ).concat( [ summary ] ) )
).catch( ( err ) => {
if ( err.code === 'articleexists' ) {
return;
}
throw err;
} ) )
.catch( ( err ) => {
throw err;
} );
@ -71,24 +69,20 @@ const iAmLoggedIntoTheMobileWebsite = async () => {
};
const pageExists = async ( title ) => {
await browser.call( async () =>
await createPage( title, 'Page created by Selenium browser test.' )
await browser.call( async () => await createPage( title, 'Page created by Selenium browser test.' )
);
// wait 2 seconds so the change can propogate.
await waitForPropagation( 2000 );
};
const pageExistsWithText = ( title, text ) => {
browser.call( () =>
createPage( title, text )
browser.call( () => createPage( title, text )
);
// wait 2 seconds so the change can propogate.
waitForPropagation( 2000 );
};
const iAmOnAPageThatDoesNotExist = () => {
return iAmOnPage( `NewPage ${ new Date() }` );
};
const iAmOnAPageThatDoesNotExist = () => iAmOnPage( `NewPage ${ new Date() }` );
const iShouldSeeAToastNotification = async () => {
await ArticlePage.notification_element.waitForDisplayed();

View file

@ -36,19 +36,18 @@ const iAmInAWikiThatHasCategories = ( title ) => {
await bot.edit( title, wikitext );
} );
browser.call( () => {
browser.call( () =>
// The category overlay uses the category API
// which will only return results if the job queue has completed.
// Run before continuing!
return RunJobs.run();
} );
RunJobs.run()
);
};
const iAmOnAPageThatHasTheFollowingEdits = function ( table ) {
const randomString = Math.random().toString( 36 ).slice( 7 ),
pageTitle = `Selenium_diff_test_${ randomString }`,
edits = table.rawTable.map( ( row, i ) =>
[ i === 0 ? 'create' : 'edit', pageTitle, row[ 0 ] ] );
edits = table.rawTable.map( ( row, i ) => [ i === 0 ? 'create' : 'edit', pageTitle, row[ 0 ] ] );
browser.call( () => {
const bot = new MWBot();
@ -94,9 +93,7 @@ const watch = ( title ) => {
const iAmViewingAWatchedPage = () => {
const title = `I am on the "Selenium mobile watched page test ${ Date.now() }`;
browser.call( () => {
return createPage( title, 'watch test' );
} );
browser.call( () => createPage( title, 'watch test' ) );
watch( title );
// navigate away from page
iAmOnPage( 'Main Page' );

View file

@ -15,23 +15,17 @@ const iClearTheEditor = () => {
ArticlePageWithEditorOverlay.editor_textarea_element.setValue( '' );
};
const iDoNotSeeTheWikitextEditorOverlay = () => {
browser.waitUntil( () => {
return ArticlePageWithEditorOverlay.editor_overlay_element.isDisplayed() === false;
}, 10000 );
browser.waitUntil( () => ArticlePageWithEditorOverlay.editor_overlay_element.isDisplayed() === false, 10000 );
};
const iTypeIntoTheEditor = ( text ) => {
ArticlePageWithEditorOverlay.editor_overlay_element.waitForExist();
ArticlePageWithEditorOverlay.editor_textarea_element.waitForExist();
ArticlePageWithEditorOverlay.editor_textarea_element.waitForDisplayed();
// Make sure the slow connection load basic button is gone (T348539)
browser.waitUntil( () => {
return ArticlePageWithEditorOverlay.editor_load_basic_element.isDisplayed() === false;
} );
browser.waitUntil( () => ArticlePageWithEditorOverlay.editor_load_basic_element.isDisplayed() === false );
ArticlePageWithEditorOverlay.editor_textarea_element.addValue( text );
browser.waitUntil( () => {
return !ArticlePageWithEditorOverlay
.continue_element.getAttribute( 'disabled' );
} );
browser.waitUntil( () => !ArticlePageWithEditorOverlay
.continue_element.getAttribute( 'disabled' ) );
};
const iClickContinue = () => {
ArticlePageWithEditorOverlay.continue_element.waitForExist();

View file

@ -41,7 +41,7 @@ const { defineSupportCode } = require( '@cucumber/cucumber' ),
iShouldNotSeeTheNotificationsOverlay
} = require( './notification_steps' );
defineSupportCode( function ( { Then, When, Given } ) {
defineSupportCode( ( { Then, When, Given } ) => {
// Editor steps
Given( /^I click the edit button$/, iClickTheEditButton );

View file

@ -11,14 +11,14 @@
const { After, Before } = require( '@cucumber/cucumber' );
Before( function () {
Before( () => {
// This hook will be executed before ALL scenarios
} );
After( function () {
After( () => {
// This hook will be executed after ALL scenarios
} );
Before( { tags: '@foo' }, function () {
Before( { tags: '@foo' }, () => {
// This hook will be executed before scenarios tagged with @foo
} );

View file

@ -69,9 +69,7 @@ class MinervaPage extends Page {
waitUntilResourceLoaderModuleReady( moduleName ) {
browser.waitUntil( () => {
const state = browser.execute( ( m ) => {
return mw.loader.getState( m );
}, moduleName );
const state = browser.execute( ( m ) => mw.loader.getState( m ), moduleName );
return state === 'ready';
} );
}