mediawiki/skins/Vector (master)

sourcepatches
$ date
Thu Mar  4 11:15:23 UTC 2021

$ git clone file:///srv/git/mediawiki-skins-Vector.git repo --depth=1 -b master
Cloning into 'repo'...

$ git config user.name libraryupgrader

$ git config user.email tools.libraryupgrader@tools.wmflabs.org

$ git submodule update --init

$ grr init
Installed commit-msg hook.

$ git show-ref refs/heads/master
e827eb0518a0a06b4aa139ec2beb4bb53bad7f0b refs/heads/master

$ composer install
Loading composer repositories with package information
Warning from https://repo.packagist.org: You are using an outdated version of Composer. Composer 2 is now available and you should upgrade. See https://getcomposer.org/2
Updating dependencies (including require-dev)
Package operations: 32 installs, 0 updates, 0 removals
  - Installing composer/installers (v1.10.0): Loading from cache
  - Installing squizlabs/php_codesniffer (3.5.8): Loading from cache
  - Installing composer/spdx-licenses (1.5.5): Loading from cache
  - Installing composer/semver (3.2.4): Loading from cache
  - Installing mediawiki/mediawiki-codesniffer (v35.0.0): Loading from cache
  - Installing symfony/polyfill-php80 (v1.22.1): Loading from cache
  - Installing symfony/polyfill-mbstring (v1.22.1): Loading from cache
  - Installing symfony/polyfill-intl-normalizer (v1.22.1): Loading from cache
  - Installing symfony/polyfill-intl-grapheme (v1.22.1): Loading from cache
  - Installing symfony/polyfill-ctype (v1.22.1): Loading from cache
  - Installing symfony/string (v5.2.3): Loading from cache
  - Installing psr/container (1.0.0): Loading from cache
  - Installing symfony/service-contracts (v2.2.0): Loading from cache
  - Installing symfony/polyfill-php73 (v1.22.1): Loading from cache
  - Installing symfony/console (v5.2.3): Loading from cache
  - Installing psr/log (1.1.3): Loading from cache
  - Installing sabre/event (5.1.2): Loading from cache
  - Installing netresearch/jsonmapper (v2.1.0): Loading from cache
  - Installing microsoft/tolerant-php-parser (v0.0.23): Loading from cache
  - Installing phpdocumentor/reflection-common (2.2.0): Loading from cache
  - Installing webmozart/assert (1.9.1): Loading from cache
  - Installing phpdocumentor/type-resolver (1.4.0): Loading from cache
  - Installing phpdocumentor/reflection-docblock (5.2.2): Loading from cache
  - Installing felixfbecker/advanced-json-rpc (v3.2.0): Loading from cache
  - Installing composer/xdebug-handler (1.4.5): Loading from cache
  - Installing phan/phan (3.2.6): Loading from cache
  - Installing mediawiki/phan-taint-check-plugin (3.2.1): Loading from cache
  - Installing mediawiki/mediawiki-phan-config (0.10.6): Loading from cache
  - Installing mediawiki/minus-x (1.1.0): Loading from cache
  - Installing php-parallel-lint/php-console-color (v0.3): Loading from cache
  - Installing php-parallel-lint/php-console-highlighter (v0.5): Loading from cache
  - Installing php-parallel-lint/php-parallel-lint (v1.2.0): Loading from cache
symfony/service-contracts suggests installing symfony/service-implementation
symfony/console suggests installing symfony/event-dispatcher
symfony/console suggests installing symfony/lock
symfony/console suggests installing symfony/process
phan/phan suggests installing ext-ast (Needed for parsing ASTs (unless --use-fallback-parser is used). 1.0.1+ is needed, 1.0.8+ is recommended.)
Writing lock file
Generating autoload files
13 packages you are using are looking for funding.
Use the `composer fund` command to find out more!

Upgrading n:eslint-config-wikimedia from 0.17.0 -> 0.18.1
$ npm install

> iltorb@2.4.5 install /src/repo/node_modules/iltorb
> node ./scripts/install.js || node-gyp rebuild

info looking for cached prebuild @ /cache/_prebuilds/2a34dd-iltorb-v2.4.5-node-v64-linux-x64.tar.gz
info found cached prebuild 
info unpacking @ /cache/_prebuilds/2a34dd-iltorb-v2.4.5-node-v64-linux-x64.tar.gz
info unpack resolved to /src/repo/node_modules/iltorb/build/bindings/iltorb.node
info unpack required /src/repo/node_modules/iltorb/build/bindings/iltorb.node successfully
info install Successfully installed iltorb binary!

> pre-commit@1.2.2 install /src/repo/node_modules/pre-commit
> node install.js


> core-js@2.6.11 postinstall /src/repo/node_modules/babel-runtime/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 
> https://opencollective.com/core-js 
> https://www.patreon.com/zloirock 

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)


> core-js@3.6.4 postinstall /src/repo/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"


> core-js-pure@3.6.4 postinstall /src/repo/node_modules/core-js-pure
> node -e "try{require('./postinstall')}catch(e){}"


> ejs@2.7.4 postinstall /src/repo/node_modules/ejs
> node ./postinstall.js

Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)


> core-js@3.9.1 postinstall /src/repo/node_modules/eslint-plugin-compat/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"


> spawn-sync@1.0.15 postinstall /src/repo/node_modules/spawn-sync
> node postinstall

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/watchpack/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 1586 packages from 1101 contributors and audited 1658 packages in 199.592s

126 packages are looking for funding
  run `npm fund` for details

found 15 vulnerabilities (12 low, 2 moderate, 1 high)
  run `npm audit fix` to fix them, or `npm audit` for details

$ npm update eslint -depth 10

$ ./node_modules/.bin/eslint . --fix

/src/repo/resources/skins.vector.js/searchLoader.js
  17:3  error  performance is not supported in Safari 5.1, iOS Safari 6.0-6.1  compat/compat
  18:3  error  performance is not supported in Safari 5.1, iOS Safari 6.0-6.1  compat/compat
  19:3  error  performance is not supported in Safari 5.1, iOS Safari 6.0-6.1  compat/compat
  20:3  error  performance is not supported in Safari 5.1, iOS Safari 6.0-6.1  compat/compat

/src/repo/resources/skins.vector.search/instrumentation.js
  15:36  error  performance is not supported in Safari 5.1, iOS Safari 6.0-6.1  compat/compat
  17:3   error  performance is not supported in Safari 5.1, iOS Safari 6.0-6.1  compat/compat
  18:3   error  performance is not supported in Safari 5.1, iOS Safari 6.0-6.1  compat/compat
  19:3   error  performance is not supported in Safari 5.1, iOS Safari 6.0-6.1  compat/compat
  20:3   error  performance is not supported in Safari 5.1, iOS Safari 6.0-6.1  compat/compat
  40:2   error  performance is not supported in Safari 5.1, iOS Safari 6.0-6.1  compat/compat

✖ 10 problems (10 errors, 0 warnings)


$ ./node_modules/.bin/eslint . -f json
[{"filePath":"/src/repo/.eslintrc.json","messages":[],"errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[]},{"filePath":"/src/repo/bundlesize.config.json","messages":[],"errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[]},{"filePath":"/src/repo/composer.json","messages":[],"errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[]},{"filePath":"/src/repo/jsdoc.json","messages":[],"errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[]},{"filePath":"/src/repo/package-lock.json","messages":[],"errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[]},{"filePath":"/src/repo/package.json","messages":[],"errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[]},{"filePath":"/src/repo/resources/skins.vector.js/languageButton.js","messages":[],"errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[]},{"filePath":"/src/repo/resources/skins.vector.js/searchLoader.js","messages":[{"ruleId":"compat/compat","severity":2,"message":"performance is not supported in Safari 5.1, iOS Safari 6.0-6.1","line":17,"column":3,"nodeType":"MemberExpression","endLine":17,"endColumn":21},{"ruleId":"compat/compat","severity":2,"message":"performance is not supported in Safari 5.1, iOS Safari 6.0-6.1","line":18,"column":3,"nodeType":"MemberExpression","endLine":18,"endColumn":19},{"ruleId":"compat/compat","severity":2,"message":"performance is not supported in Safari 5.1, iOS Safari 6.0-6.1","line":19,"column":3,"nodeType":"MemberExpression","endLine":19,"endColumn":22},{"ruleId":"compat/compat","severity":2,"message":"performance is not supported in Safari 5.1, iOS Safari 6.0-6.1","line":20,"column":3,"nodeType":"MemberExpression","endLine":20,"endColumn":31}],"errorCount":4,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"/**\n * Disabling this rule as it's only necessary for\n * combining multiple class names and documenting the output.\n * That doesn't happen in this file but the linter still throws an error.\n * https://github.com/wikimedia/eslint-plugin-mediawiki/blob/master/docs/rules/class-doc.md\n */\n/* eslint-disable mediawiki/class-doc */\n\n/** @interface VectorResourceLoaderVirtualConfig */\n/** @interface MediaWikiPageReadyModule */\n\nvar /** @type {VectorResourceLoaderVirtualConfig} */\n\tconfig = require( /** @type {string} */ ( './config.json' ) ),\n\t// T251544: Collect search performance metrics to compare Vue search with\n\t// mediawiki.searchSuggest performance.\n\tCAN_TEST_SEARCH = !!(\n\t\twindow.performance &&\n\t\tperformance.mark &&\n\t\tperformance.measure &&\n\t\tperformance.getEntriesByName ),\n\tLOAD_START_MARK = 'mwVectorVueSearchLoadStart',\n\tLOAD_END_MARK = 'mwVectorVueSearchLoadEnd',\n\tLOAD_MEASURE = 'mwVectorVueSearchLoadStartToLoadEnd',\n\tSEARCH_FORM_ID = 'simpleSearch',\n\tSEARCH_INPUT_ID = 'searchInput',\n\tSEARCH_LOADING_CLASS = 'search-form__loader';\n\n/**\n * Loads the search module via `mw.loader.using` on the element's\n * focus event. Or, if the element is already focused, loads the\n * search module immediately.\n * After the search module is loaded, executes a function to remove\n * the loading indicator.\n *\n * @param {HTMLElement} element search input.\n * @param {string} moduleName resourceLoader module to load.\n * @param {function(): void} afterLoadFn function to execute after search module loads.\n */\nfunction loadSearchModule( element, moduleName, afterLoadFn ) {\n\tvar SHOULD_TEST_SEARCH = CAN_TEST_SEARCH && moduleName === 'skins.vector.search';\n\n\tfunction requestSearchModule() {\n\t\tif ( SHOULD_TEST_SEARCH ) {\n\t\t\tperformance.mark( LOAD_START_MARK );\n\t\t}\n\t\tmw.loader.using( moduleName, afterLoadFn );\n\t\telement.removeEventListener( 'focus', requestSearchModule );\n\t}\n\n\tif ( document.activeElement === element ) {\n\t\trequestSearchModule();\n\t} else {\n\t\telement.addEventListener( 'focus', requestSearchModule );\n\t}\n}\n\n/**\n * Event callback that shows or hides the loading indicator based on the event type.\n * The loading indicator states are:\n * 1. Show on input event (while user is typing)\n * 2. Hide on focusout event (when user removes focus from the input )\n * 3. Show when input is focused, if it contains a query. (in case user re-focuses on input)\n *\n * @param {Event} event\n */\nfunction renderSearchLoadingIndicator( event ) {\n\n\tvar form = /** @type {HTMLElement} */ ( event.currentTarget ),\n\t\tinput = /** @type {HTMLInputElement} */ ( event.target );\n\n\tif (\n\t\t!( event.currentTarget instanceof HTMLElement ) ||\n\t\t!( event.target instanceof HTMLInputElement ) ||\n\t\t!( input.id === SEARCH_INPUT_ID ) ) {\n\t\treturn;\n\t}\n\n\tif ( !form.dataset.loadingMsg ) {\n\t\tform.dataset.loadingMsg = mw.msg( 'vector-search-loader' );\n\t}\n\n\tif ( event.type === 'input' ) {\n\t\tform.classList.add( SEARCH_LOADING_CLASS );\n\n\t} else if ( event.type === 'focusout' ) {\n\t\tform.classList.remove( SEARCH_LOADING_CLASS );\n\n\t} else if ( event.type === 'focusin' && input.value.trim() ) {\n\t\tform.classList.add( SEARCH_LOADING_CLASS );\n\t}\n}\n\n/**\n * Attaches or detaches the event listeners responsible for activating\n * the loading indicator.\n *\n * @param {HTMLElement} element\n * @param {boolean} attach\n * @param {function(Event): void} eventCallback\n */\nfunction setLoadingIndicatorListeners( element, attach, eventCallback ) {\n\n\t/** @type { \"addEventListener\" | \"removeEventListener\" } */\n\tvar addOrRemoveListener = ( attach ? 'addEventListener' : 'removeEventListener' );\n\n\t[ 'input', 'focusin', 'focusout' ].forEach( function ( eventType ) {\n\t\telement[ addOrRemoveListener ]( eventType, eventCallback );\n\t} );\n\n\tif ( !attach ) {\n\t\telement.classList.remove( SEARCH_LOADING_CLASS );\n\t}\n}\n\n/**\n * Marks when the lazy load has completed.\n */\nfunction markLoadEnd() {\n\tif ( performance.getEntriesByName( LOAD_START_MARK ).length ) {\n\t\tperformance.mark( LOAD_END_MARK );\n\t\tperformance.measure( LOAD_MEASURE, LOAD_START_MARK, LOAD_END_MARK );\n\t}\n}\n\n/**\n * Initialize the loading of the search module as well as the loading indicator.\n * Only initialize the loading indicator when not using the core search module.\n *\n * @param {Document} document\n */\nfunction initSearchLoader( document ) {\n\tvar searchForm = document.getElementById( SEARCH_FORM_ID ),\n\t\tsearchInput = document.getElementById( SEARCH_INPUT_ID ),\n\t\tshouldUseCoreSearch;\n\n\t// Allow developers to defined $wgVectorSearchHost in LocalSettings to target different APIs\n\tif ( config.wgVectorSearchHost ) {\n\t\tmw.config.set( 'wgVectorSearchHost', config.wgVectorSearchHost );\n\t}\n\n\tif ( !searchForm || !searchInput ) {\n\t\treturn;\n\t}\n\n\tshouldUseCoreSearch = !document.body.classList.contains( 'skin-vector-search-vue' );\n\n\t/**\n\t * 1. If $wgVectorUseWvuiSearch is false,\n\t *    or we are in a browser that doesn't support fetch\n\t *    load the legacy searchSuggest module. The check for window.fetch\n\t *    can be removed when IE11 support is finally officially dropped.\n\t * 2. If we're using a different search module, enable the loading indicator\n\t *    before the search module loads.\n\t **/\n\tif ( shouldUseCoreSearch || !window.fetch ) {\n\t\tloadSearchModule( searchInput, 'mediawiki.searchSuggest', function () {} );\n\t} else {\n\t\t// Remove tooltips while Vue search is still loading\n\t\tsearchInput.setAttribute( 'autocomplete', 'off' );\n\t\tsearchInput.removeAttribute( 'title' );\n\t\tsetLoadingIndicatorListeners( searchForm, true, renderSearchLoadingIndicator );\n\t\tloadSearchModule(\n\t\t\tsearchInput,\n\t\t\t'skins.vector.search',\n\t\t\tfunction () {\n\t\t\t\tmarkLoadEnd();\n\n\t\t\t\tsetLoadingIndicatorListeners(\n\t\t\t\t\t/** @type {HTMLElement} */ ( searchForm ),\n\t\t\t\t\tfalse,\n\t\t\t\t\trenderSearchLoadingIndicator\n\t\t\t\t);\n\t\t\t}\n\t\t);\n\n\t}\n}\n\nmodule.exports = {\n\tinitSearchLoader: initSearchLoader\n};\n","usedDeprecatedRules":[]},{"filePath":"/src/repo/resources/skins.vector.js/sidebar.js","messages":[],"errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[]},{"filePath":"/src/repo/resources/skins.vector.js/skin.js","messages":[],"errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[]},{"filePath":"/src/repo/resources/skins.vector.legacy.js/collapsibleTabs.js","messages":[],"errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[]},{"filePath":"/src/repo/resources/skins.vector.legacy.js/skin-legacy.js","messages":[],"errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[]},{"filePath":"/src/repo/resources/skins.vector.legacy.js/vector.js","messages":[],"errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[]},{"filePath":"/src/repo/resources/skins.vector.search/App.vue","messages":[],"errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[]},{"filePath":"/src/repo/resources/skins.vector.search/instrumentation.js","messages":[{"ruleId":"compat/compat","severity":2,"message":"performance is not supported in Safari 5.1, iOS Safari 6.0-6.1","line":15,"column":36,"nodeType":"MemberExpression","endLine":15,"endColumn":54},{"ruleId":"compat/compat","severity":2,"message":"performance is not supported in Safari 5.1, iOS Safari 6.0-6.1","line":17,"column":3,"nodeType":"MemberExpression","endLine":17,"endColumn":19},{"ruleId":"compat/compat","severity":2,"message":"performance is not supported in Safari 5.1, iOS Safari 6.0-6.1","line":18,"column":3,"nodeType":"MemberExpression","endLine":18,"endColumn":22},{"ruleId":"compat/compat","severity":2,"message":"performance is not supported in Safari 5.1, iOS Safari 6.0-6.1","line":19,"column":3,"nodeType":"MemberExpression","endLine":19,"endColumn":31},{"ruleId":"compat/compat","severity":2,"message":"performance is not supported in Safari 5.1, iOS Safari 6.0-6.1","line":20,"column":3,"nodeType":"MemberExpression","endLine":20,"endColumn":25},{"ruleId":"compat/compat","severity":2,"message":"performance is not supported in Safari 5.1, iOS Safari 6.0-6.1","line":40,"column":2,"nodeType":"MemberExpression","endLine":40,"endColumn":18}],"errorCount":6,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"/* global FetchEndEvent, SuggestionClickEvent, SubmitEvent */\n/** @module Instrumentation */\n\n/**\n * The value of the `inputLocation` property of any and all SearchSatisfaction events sent by the\n * corresponding instrumentation.\n *\n * @see https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/skins/Vector/+/refs/heads/master/includes/Constants.php\n */\nvar INPUT_LOCATION_MOVED = 'header-moved',\n\twgScript = mw.config.get( 'wgScript' ),\n\t// T251544: Collect search performance metrics to compare Vue search with\n\t// mediawiki.searchSuggest performance. Marks and Measures will only be\n\t// recorded on the Vector skin and only if browser supported.\n\tshouldTestSearchPerformance = !!( window.performance &&\n\t\twindow.requestAnimationFrame &&\n\t\tperformance.mark &&\n\t\tperformance.measure &&\n\t\tperformance.getEntriesByName &&\n\t\tperformance.clearMarks ),\n\tloadStartMark = 'mwVectorVueSearchLoadStart',\n\tqueryMark = 'mwVectorVueSearchQuery',\n\trenderMark = 'mwVectorVueSearchRender',\n\tqueryToRenderMeasure = 'mwVectorVueSearchQueryToRender',\n\tloadStartToFirstRenderMeasure = 'mwVectorVueSearchLoadStartToFirstRender';\n\nfunction onFetchStart() {\n\tif ( !shouldTestSearchPerformance ) {\n\t\treturn;\n\t}\n\n\t// Clear past marks that are no longer relevant. This likely means that the\n\t// search request failed or was cancelled. Whatever the reason, the mark\n\t// is no longer needed since we are only interested in collecting the time\n\t// from query to render.\n\tif ( performance.getEntriesByName( queryMark ).length ) {\n\t\tperformance.clearMarks( queryMark );\n\t}\n\n\tperformance.mark( queryMark );\n}\n\n/**\n * @param {FetchEndEvent} event\n */\nfunction onFetchEnd( event ) {\n\tmw.track( 'mediawiki.searchSuggest', {\n\t\taction: 'impression-results',\n\t\tnumberOfResults: event.numberOfResults,\n\t\t// resultSetType: '',\n\t\t// searchId: '',\n\t\tquery: event.query,\n\t\tinputLocation: INPUT_LOCATION_MOVED\n\t} );\n\n\tif ( shouldTestSearchPerformance ) {\n\t\t// Schedule the mark after the search results have rendered and are\n\t\t// visible to the user. Two rAF's are needed for this since rAF will\n\t\t// execute before the rendering steps happen (e.g. layout and paint). A\n\t\t// nested rAF will execute after these rendering steps have completed\n\t\t// and ensure the search results are visible to the user.\n\t\trequestAnimationFrame( function () {\n\t\t\trequestAnimationFrame( function () {\n\t\t\t\tif ( !performance.getEntriesByName( queryMark ).length ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tperformance.mark( renderMark );\n\t\t\t\tperformance.measure( queryToRenderMeasure, queryMark, renderMark );\n\n\t\t\t\t// Measure from the start of the lazy load to the first render if we\n\t\t\t\t// haven't already captured that info.\n\t\t\t\tif ( performance.getEntriesByName( loadStartMark ).length &&\n\t\t\t\t\t!performance.getEntriesByName( loadStartToFirstRenderMeasure ).length ) {\n\t\t\t\t\tperformance.measure( loadStartToFirstRenderMeasure, loadStartMark, renderMark );\n\t\t\t\t}\n\n\t\t\t\t// The measures are the most meaningful info so we remove the marks\n\t\t\t\t// after we have the measure.\n\t\t\t\tperformance.clearMarks( queryMark );\n\t\t\t\tperformance.clearMarks( renderMark );\n\t\t\t} );\n\t\t} );\n\t}\n}\n\n/**\n * @param {SuggestionClickEvent|SubmitEvent} event\n */\nfunction onSuggestionClick( event ) {\n\tmw.track( 'mediawiki.searchSuggest', {\n\t\taction: 'click-result',\n\t\tnumberOfResults: event.numberOfResults,\n\t\tindex: event.index\n\t} );\n}\n\n/**\n * Generates the value of the `wprov` parameter to be used in the URL of a search result and the\n * `wprov` hidden input.\n *\n * See https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/WikimediaEvents/+/refs/heads/master/modules/ext.wikimediaEvents/searchSatisfaction.js\n * and also the top of that file for additional detail about the shape of the parameter.\n *\n * @param {number} index\n * @return {string}\n */\nfunction getWprovFromResultIndex( index ) {\n\n\t// If the user hasn't highlighted an autocomplete result.\n\tif ( index === -1 ) {\n\t\treturn 'acrw1';\n\t}\n\n\treturn 'acrw1' + index;\n}\n\n/**\n * @typedef {Object} SearchResultPartial\n * @property {string} title\n */\n\n/**\n * @typedef {Object} GenerateUrlMeta\n * @property {number} index\n */\n\n/**\n * Used by the `wvui-typeahead-search` component to generate URLs for the search results. Adds a\n * `wprov` paramater to the URL to satisfy the SearchSatisfaction instrumentation.\n *\n * @see getWprovFromResultIndex\n *\n * @param {SearchResultPartial|string} suggestion\n * @param {GenerateUrlMeta} meta\n * @return {string}\n */\nfunction generateUrl( suggestion, meta ) {\n\tvar result = new mw.Uri( wgScript );\n\n\tif ( typeof suggestion !== 'string' ) {\n\t\tsuggestion = suggestion.title;\n\t}\n\n\tresult.query.title = 'Special:Search';\n\tresult.query.suggestion = suggestion;\n\tresult.query.wprov = getWprovFromResultIndex( meta.index );\n\n\treturn result.toString();\n}\n\nmodule.exports = {\n\tlisteners: {\n\t\tonFetchStart: onFetchStart,\n\t\tonFetchEnd: onFetchEnd,\n\t\tonSuggestionClick: onSuggestionClick,\n\n\t\t// As of writing (2020/12/08), both the \"click-result\" and \"submit-form\" kind of\n\t\t// mediawiki.searchSuggestion events result in a \"click\" SearchSatisfaction event being\n\t\t// logged [0]. However, when processing the \"submit-form\" kind of mediawiki.searchSuggestion\n\t\t// event, the SearchSatisfaction instrument will modify the DOM, adding a hidden input\n\t\t// element, in order to set the appropriate provenance parameter (see [1] for additional\n\t\t// detail).\n\t\t//\n\t\t// In this implementation of the mediawiki.searchSuggestion protocol, we don't want to\n\t\t// trigger the above behavior as we're using Vue.js, which doesn't expect the DOM to be\n\t\t// modified underneath it.\n\t\t//\n\t\t// [0] https://gerrit.wikimedia.org/g/mediawiki/extensions/WikimediaEvents/+/df97aa9c9407507e8c48827666beeab492fd56a8/modules/ext.wikimediaEvents/searchSatisfaction.js#735\n\t\t// [1] https://phabricator.wikimedia.org/T257698#6416826\n\t\tonSubmit: onSuggestionClick\n\t},\n\tgetWprovFromResultIndex: getWprovFromResultIndex,\n\tgenerateUrl: generateUrl\n};\n","usedDeprecatedRules":[]},{"filePath":"/src/repo/resources/skins.vector.search/skins.vector.search.js","messages":[],"errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[]},{"filePath":"/src/repo/resources/skins.vector.search/types.js","messages":[],"errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[]},{"filePath":"/src/repo/skin.json","messages":[],"errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[]},{"filePath":"/src/repo/stories/.eslintrc.json","messages":[],"errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/stories/Footer.stories.data.js","messages":[],"errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/stories/Footer.stories.js","messages":[],"errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/stories/LanguageButton.stories.data.js","messages":[],"errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/stories/LanguageButton.stories.js","messages":[],"errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/stories/Logo.stories.data.js","messages":[],"errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/stories/Logo.stories.js","messages":[],"errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/stories/Menu.stories.data.js","messages":[],"errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/stories/Menu.stories.js","messages":[],"errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/stories/MenuDropdown.stories.data.js","messages":[],"errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/stories/MenuDropdown.stories.js","messages":[],"errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/stories/MenuPortal.stories.data.js","messages":[],"errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/stories/MenuPortal.stories.js","messages":[],"errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/stories/MenuTabs.stories.data.js","messages":[],"errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/stories/MenuTabs.stories.js","messages":[],"errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/stories/SearchBox.stories.data.js","messages":[],"errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/stories/SearchBox.stories.js","messages":[],"errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/stories/Sidebar.stories.data.js","messages":[],"errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/stories/Sidebar.stories.js","messages":[],"errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/stories/legacy.stories.js","messages":[],"errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/stories/skin.stories.data.js","messages":[],"errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/stories/types.js","messages":[],"errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/stories/utils.js","messages":[],"errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/.eslintrc.json","messages":[],"errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[]},{"filePath":"/src/repo/tests/resource-loader-bundlesize.js","messages":[],"errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[]},{"filePath":"/src/repo/tsconfig.json","messages":[],"errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[]}]

$ npm ci
npm WARN prepare removing existing node_modules/ before installation

> spawn-sync@1.0.15 postinstall /src/repo/node_modules/spawn-sync
> node postinstall


> pre-commit@1.2.2 install /src/repo/node_modules/pre-commit
> node install.js

pre-commit:
pre-commit: Detected an existing git pre-commit hook
pre-commit: Old pre-commit hook backuped to pre-commit.old
pre-commit:

> core-js@3.9.1 postinstall /src/repo/node_modules/eslint-plugin-compat/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"


> iltorb@2.4.5 install /src/repo/node_modules/iltorb
> node ./scripts/install.js || node-gyp rebuild

info looking for cached prebuild @ /cache/_cacache/_prebuilds/2a34dd-iltorb-v2.4.5-node-v64-linux-x64.tar.gz
info found cached prebuild 
info unpacking @ /cache/_cacache/_prebuilds/2a34dd-iltorb-v2.4.5-node-v64-linux-x64.tar.gz
info unpack resolved to /src/repo/node_modules/iltorb/build/bindings/iltorb.node
info unpack required /src/repo/node_modules/iltorb/build/bindings/iltorb.node successfully
info install Successfully installed iltorb binary!

> core-js@3.6.4 postinstall /src/repo/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"


> fsevents@1.2.11 install /src/repo/node_modules/fsevents
> node-gyp rebuild

make: Entering directory '/src/repo/node_modules/fsevents/build'
  SOLINK_MODULE(target) Release/obj.target/.node
  COPY Release/.node
make: Leaving directory '/src/repo/node_modules/fsevents/build'

> ejs@2.7.4 postinstall /src/repo/node_modules/ejs
> node ./postinstall.js

Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)


> core-js@2.6.11 postinstall /src/repo/node_modules/babel-runtime/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"


> core-js-pure@3.6.4 postinstall /src/repo/node_modules/core-js-pure
> node -e "try{require('./postinstall')}catch(e){}"

added 1590 packages in 40.647s

$ npm test

> @ test /src/repo
> npm -s run lint && tsc && npm -s run doc


/src/repo/resources/skins.vector.js/searchLoader.js
  17:3  warning  performance is not supported in Safari 5.1, iOS Safari 6.0-6.1  compat/compat
  18:3  warning  performance is not supported in Safari 5.1, iOS Safari 6.0-6.1  compat/compat
  19:3  warning  performance is not supported in Safari 5.1, iOS Safari 6.0-6.1  compat/compat
  20:3  warning  performance is not supported in Safari 5.1, iOS Safari 6.0-6.1  compat/compat

/src/repo/resources/skins.vector.search/instrumentation.js
  15:36  warning  performance is not supported in Safari 5.1, iOS Safari 6.0-6.1  compat/compat
  17:3   warning  performance is not supported in Safari 5.1, iOS Safari 6.0-6.1  compat/compat
  18:3   warning  performance is not supported in Safari 5.1, iOS Safari 6.0-6.1  compat/compat
  19:3   warning  performance is not supported in Safari 5.1, iOS Safari 6.0-6.1  compat/compat
  20:3   warning  performance is not supported in Safari 5.1, iOS Safari 6.0-6.1  compat/compat
  40:2   warning  performance is not supported in Safari 5.1, iOS Safari 6.0-6.1  compat/compat

✖ 10 problems (0 errors, 10 warnings)

Checked 1 message directory.
(node:572) DeprecationWarning: Extend-mode configuration is deprecated, please use full-control mode instead.

See https://storybook.js.org/docs/configurations/custom-webpack-config/#full-control-mode
Browserslist: caniuse-lite is outdated. Please run the following command: `npm update`
WARN asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
WARN This can impact web performance.
WARN Assets: 
WARN   vendors~main.b51b0773719396eb8482.bundle.js (735 KiB)
WARN entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
WARN Entrypoints:
WARN   main (912 KiB)
WARN       runtime~main.b51b0773719396eb8482.bundle.js
WARN       vendors~main.b51b0773719396eb8482.bundle.js
WARN       main.b51b0773719396eb8482.bundle.js
WARN 
WARN webpack performance recommendations: 
WARN You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.
WARN For more info visit https://webpack.js.org/guides/code-splitting/

Upgrading c:mediawiki/minus-x from 1.1.0 -> 1.1.1
$ composer update
Loading composer repositories with package information
Warning from https://repo.packagist.org: You are using an outdated version of Composer. Composer 2 is now available and you should upgrade. See https://getcomposer.org/2
Updating dependencies (including require-dev)
Package operations: 0 installs, 1 update, 0 removals
  - Updating mediawiki/minus-x (1.1.0 => 1.1.1): Loading from cache
Writing lock file
Generating autoload files
13 packages you are using are looking for funding.
Use the `composer fund` command to find out more!

$ composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Generating autoload files
13 packages you are using are looking for funding.
Use the `composer fund` command to find out more!

$ composer test
> parallel-lint . --exclude node_modules --exclude vendor
PHP 7.3.19 | 10 parallel jobs
......................                                       22/22 (100 %)


Checked 22 files in 0.1 seconds
No syntax error found
> phpcs -p -s
...................... 22 / 22 (100%)


Time: 4.65 secs; Memory: 10MB

> minus-x check .
MinusX
======
Processing /src/repo...
.............................................................
.............................................................
.............................................................
.............................................................
.............................................................
.............................................................
.............................................................
.............................................................
.............................................................
.............................................................
.........E........E.E.EE...........EEE...........E...E..E..EE
.............................................................
................................
Error: /src/repo/docs/js/wmf/fonts/OFL.txt should not be executable
Error: /src/repo/docs/js/wmf/fonts/Charter_italic.woff should not be executable
Error: /src/repo/docs/js/wmf/fonts/Charter_italic.ttf should not be executable
Error: /src/repo/docs/js/wmf/fonts/Charter_bold-italic.eot should not be executable
Error: /src/repo/docs/js/wmf/fonts/Charter_bold-italic.ttf should not be executable
Error: /src/repo/docs/js/wmf/fonts/Charter_regular.woff should not be executable
Error: /src/repo/docs/js/wmf/fonts/Charter_italic.eot should not be executable
Error: /src/repo/docs/js/wmf/fonts/Charter_regular.eot should not be executable
Error: /src/repo/docs/js/wmf/fonts/Charter_bold.eot should not be executable
Error: /src/repo/docs/js/wmf/fonts/Charter_bold.woff should not be executable
Error: /src/repo/docs/js/wmf/fonts/Charter_bold.ttf should not be executable
Error: /src/repo/docs/js/wmf/fonts/Charter_regular.ttf should not be executable
Error: /src/repo/docs/js/wmf/fonts/Charter_bold-italic.woff should not be executable
Script minus-x check . handling the test event returned with error code 1

Traceback (most recent call last):
  File "/venv/lib/python3.7/site-packages/libup-0.0.1-py3.7.egg/libup/ng.py", line 1188, in main
    libup.run(args.repo, args.output, args.branch)
  File "/venv/lib/python3.7/site-packages/libup-0.0.1-py3.7.egg/libup/ng.py", line 1131, in run
    self.composer_upgrade(plan)
  File "/venv/lib/python3.7/site-packages/libup-0.0.1-py3.7.egg/libup/ng.py", line 684, in composer_upgrade
    self.composer_test()
  File "/venv/lib/python3.7/site-packages/libup-0.0.1-py3.7.egg/libup/ng.py", line 246, in composer_test
    self.check_call(['composer', 'test'])
  File "/venv/lib/python3.7/site-packages/libup-0.0.1-py3.7.egg/libup/shell.py", line 38, in check_call
    res.check_returncode()
  File "/usr/lib/python3.7/subprocess.py", line 428, in check_returncode
    self.stderr)
subprocess.CalledProcessError: Command '['composer', 'test']' returned non-zero exit status 1.

composer dependencies

Dependencies
Development dependencies

npm dependencies

Development dependencies

Logs

Source code is licensed under the AGPL.