mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RelatedArticles
synced 2024-11-27 09:41:01 +00:00
build: Updating npm dependencies
* eslint-config-wikimedia: 0.25.1 → 0.27.0 * @wikimedia/codex: 1.3.5 → 1.4.0 Change-Id: I2c36146322f92812c009ef26c6138068356aa053
This commit is contained in:
parent
b41bf12e62
commit
833a84db4a
|
@ -3,15 +3,6 @@
|
|||
"extends": [
|
||||
"wikimedia/server"
|
||||
],
|
||||
"rules": {
|
||||
"node/no-unsupported-features/node-builtins": [
|
||||
"error",
|
||||
{
|
||||
"version": ">=14",
|
||||
"ignores": []
|
||||
}
|
||||
]
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"files": "**/**/*.vue",
|
||||
|
|
811
package-lock.json
generated
811
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -20,10 +20,10 @@
|
|||
"@wdio/local-runner": "7.16.13",
|
||||
"@wdio/mocha-framework": "7.16.13",
|
||||
"@wdio/spec-reporter": "7.16.13",
|
||||
"@wikimedia/codex": "1.3.5",
|
||||
"@wikimedia/codex": "1.4.0",
|
||||
"@wikimedia/mw-node-qunit": "7.2.0",
|
||||
"@wikimedia/types-wikimedia": "0.3.4",
|
||||
"eslint-config-wikimedia": "0.25.1",
|
||||
"eslint-config-wikimedia": "0.27.0",
|
||||
"grunt-banana-checker": "0.11.1",
|
||||
"jest": "27.4.7",
|
||||
"stylelint-config-wikimedia": "0.16.1",
|
||||
|
|
|
@ -11,23 +11,23 @@
|
|||
*/
|
||||
const RelatedArticles = ( options ) => {
|
||||
return [
|
||||
`<div class="read-more-container ${( options.isContainerSmall ) ? 'read-more-container-small' : 'read-more-container-large'}">`,
|
||||
`<div class="read-more-container ${ ( options.isContainerSmall ) ? 'read-more-container-small' : 'read-more-container-large' }">`,
|
||||
`<aside class="noprint">`,
|
||||
( options.heading ) ?
|
||||
`<h2 class="read-more-container-heading">${options.heading}</h2>` : ``,
|
||||
`<h2 class="read-more-container-heading">${ options.heading }</h2>` : ``,
|
||||
`<ul class="read-more-container-card-list">`,
|
||||
options.cards.map( ( card ) => `<li title="${card.label}">
|
||||
<a href="${card.url}"><span class="cdx-card">
|
||||
options.cards.map( ( card ) => `<li title="${ card.label }">
|
||||
<a href="${ card.url }"><span class="cdx-card">
|
||||
<span class="cdx-card__thumbnail cdx-thumbnail">
|
||||
${( card.thumbnail && card.thumbnail.url ) ?
|
||||
`<span class="cdx-thumbnail__image" style="background-image: url('${card.thumbnail.url}')"></span>` :
|
||||
${ ( card.thumbnail && card.thumbnail.url ) ?
|
||||
`<span class="cdx-thumbnail__image" style="background-image: url('${ card.thumbnail.url }')"></span>` :
|
||||
`<span class="cdx-thumbnail__placeholder">
|
||||
<span class="cdx-thumbnail__placeholder__icon"></span>
|
||||
</span>`}
|
||||
</span>` }
|
||||
</span>
|
||||
<span class="cdx-card__text">
|
||||
<span class="cdx-card__text__title">${card.label}</span>
|
||||
<span class="cdx-card__text__description">${card.description}</span>
|
||||
<span class="cdx-card__text__title">${ card.label }</span>
|
||||
<span class="cdx-card__text__description">${ card.description }</span>
|
||||
</span>
|
||||
</a>
|
||||
</li>` ).join( '\n' ),
|
||||
|
|
|
@ -132,7 +132,7 @@ RelatedPagesGateway.prototype.getForCurrentPage = function ( limit ) {
|
|||
parameters.pilimit = limit;
|
||||
|
||||
parameters.generator = 'search';
|
||||
parameters.gsrsearch = `morelike:${this.currentPage}`;
|
||||
parameters.gsrsearch = `morelike:${ this.currentPage }`;
|
||||
parameters.gsrnamespace = '0';
|
||||
parameters.gsrlimit = limit;
|
||||
parameters.gsrqiprofile = 'classic_noboostlinks';
|
||||
|
|
|
@ -15,7 +15,7 @@ const PAGE_WITH_DESCRIPTION = {
|
|||
|
||||
describe( 'ext.relatedArticles.readMore.bootstrap', () => {
|
||||
beforeEach( () => {
|
||||
mw.util.getUrl = jest.fn( ( title ) => `/wiki/${title}` );
|
||||
mw.util.getUrl = jest.fn( ( title ) => `/wiki/${ title }` );
|
||||
} );
|
||||
|
||||
it( 'init with zero pages and parent container', () => {
|
||||
|
@ -57,7 +57,7 @@ describe( 'ext.relatedArticles.readMore.bootstrap', () => {
|
|||
const plugin = {
|
||||
install: function ( app ) {
|
||||
app.config.globalProperties.$i18n = () => ( {
|
||||
text: ( key ) => `<${key}>`
|
||||
text: ( key ) => `<${ key }>`
|
||||
} );
|
||||
}
|
||||
};
|
||||
|
|
|
@ -5,7 +5,9 @@ const CARD_SELECTOR = '.ext-related-articles-card',
|
|||
|
||||
class ReadMorePage extends Page {
|
||||
|
||||
get mobileView() { return $( '#footer-places-mobileview' ); }
|
||||
get mobileView() {
|
||||
return $( '#footer-places-mobileview' );
|
||||
}
|
||||
|
||||
openDesktop( name ) {
|
||||
super.openTitle( name );
|
||||
|
|
Loading…
Reference in a new issue