build: Updating dependencies

composer:
* mediawiki/mediawiki-codesniffer: 36.0.0 → 37.0.0

npm:
* svgo: 2.3.0 → 2.3.1
  * https://npmjs.com/advisories/1754 (CVE-2021-33587)
* postcss: 7.0.35 → 7.0.36
  * https://npmjs.com/advisories/1693 (CVE-2021-23368)
* trim-newlines: 3.0.0 → 3.0.1
  * https://npmjs.com/advisories/1753 (CVE-2021-33623)
* prismjs: 1.23.0 → 1.24.1
  * https://npmjs.com/advisories/1762 (CVE-2021-32723)

Change-Id: Ief0fe110b6746c209085502cf4639429a4116ab5
This commit is contained in:
libraryupgrader 2021-07-23 19:53:14 +00:00
parent 4050aaa645
commit 8dc9511bbc
11 changed files with 57 additions and 60 deletions

View File

@ -33,7 +33,7 @@
"installer-name": "Vector"
},
"require-dev": {
"mediawiki/mediawiki-codesniffer": "36.0.0",
"mediawiki/mediawiki-codesniffer": "37.0.0",
"mediawiki/mediawiki-phan-config": "0.10.6",
"mediawiki/minus-x": "1.1.1",
"php-parallel-lint/php-console-highlighter": "0.5.0",

View File

@ -134,7 +134,7 @@ final class FeatureManager {
*
* @throws \InvalidArgumentException If the feature isn't registered
*/
public function isFeatureEnabled( string $feature ) : bool {
public function isFeatureEnabled( string $feature ): bool {
if ( !array_key_exists( $feature, $this->features ) ) {
throw new \InvalidArgumentException( "The feature \"{$feature}\" isn't registered." );
}
@ -200,7 +200,7 @@ final class FeatureManager {
*
* @throws \InvalidArgumentException If the requirement isn't registered
*/
public function isRequirementMet( string $name ) : bool {
public function isRequirementMet( string $name ): bool {
if ( !array_key_exists( $name, $this->requirements ) ) {
throw new \InvalidArgumentException( "Requirement \"{$name}\" isn't registered." );
}

View File

@ -37,11 +37,11 @@ interface Requirement {
* Gets the name of the requirement.
* @return string
*/
public function getName() : string;
public function getName(): string;
/**
* Gets whether the requirement is met.
* @return bool
*/
public function isMet() : bool;
public function isMet(): bool;
}

View File

@ -98,14 +98,14 @@ final class DynamicConfigRequirement implements Requirement {
/**
* @inheritDoc
*/
public function getName() : string {
public function getName(): string {
return $this->requirementName;
}
/**
* @inheritDoc
*/
public function isMet() : bool {
public function isMet(): bool {
return (bool)$this->config->get( $this->configName );
}
}

View File

@ -72,7 +72,7 @@ final class LatestSkinVersionRequirement implements Requirement {
/**
* @inheritDoc
*/
public function getName() : string {
public function getName(): string {
return Constants::REQUIREMENT_LATEST_SKIN_VERSION;
}
@ -80,7 +80,7 @@ final class LatestSkinVersionRequirement implements Requirement {
* @inheritDoc
* @throws \ConfigException
*/
public function isMet() : bool {
public function isMet(): bool {
return $this->skinVersionLookup->getVersion() === Constants::SKIN_VERSION_LATEST;
}
}

View File

@ -143,7 +143,7 @@ final class OverridableConfigRequirement implements Requirement {
/**
* @inheritDoc
*/
public function getName() : string {
public function getName(): string {
return $this->requirementName;
}
@ -154,7 +154,7 @@ final class OverridableConfigRequirement implements Requirement {
*
* @inheritDoc
*/
public function isMet() : bool {
public function isMet(): bool {
// Check query parameter.
if ( $this->request->getCheck( $this->overrideName ) ) {
return $this->request->getBool( $this->overrideName );

View File

@ -57,14 +57,14 @@ class SimpleRequirement implements Requirement {
/**
* @inheritDoc
*/
public function getName() : string {
public function getName(): string {
return $this->name;
}
/**
* @inheritDoc
*/
public function isMet() : bool {
public function isMet(): bool {
return $this->isMet;
}
}

View File

@ -60,7 +60,7 @@ final class WvuiSearchTreatmentRequirement implements Requirement {
/**
* @inheritDoc
*/
public function getName() : string {
public function getName(): string {
return Constants::REQUIREMENT_USE_WVUI_SEARCH;
}
@ -71,7 +71,7 @@ final class WvuiSearchTreatmentRequirement implements Requirement {
* @inheritDoc
* @throws \ConfigException
*/
public function isMet() : bool {
public function isMet(): bool {
// Determine the search widget treatment to send to the user
$shouldUseWvuiSearch = (bool)$this->config->get( Constants::CONFIG_KEY_USE_WVUI_SEARCH );

View File

@ -61,7 +61,7 @@ class SkinVector extends SkinMustache {
*
* @return bool
*/
private function isLegacy() : bool {
private function isLegacy(): bool {
$isLatestSkinFeatureEnabled = MediaWikiServices::getInstance()
->getService( Constants::SERVICE_FEATURE_MANAGER )
->isFeatureEnabled( Constants::FEATURE_LATEST_SKIN );
@ -111,7 +111,7 @@ class SkinVector extends SkinMustache {
* Calls getLanguages with caching.
* @return array
*/
private function getLanguagesCached() : array {
private function getLanguagesCached(): array {
if ( $this->languages !== null ) {
return $this->languages;
}
@ -125,7 +125,7 @@ class SkinVector extends SkinMustache {
* other than view is being used.
* @return bool
*/
private function canHaveLanguages() : bool {
private function canHaveLanguages(): bool {
$action = Action::getActionName( $this->getContext() );
if ( $action !== 'view' ) {
return false;
@ -246,7 +246,7 @@ class SkinVector extends SkinMustache {
* @param array $searchBoxData representing search box.
* @return array
*/
private function getUserLinksTemplateData( $menuData, $isAnon, $searchBoxData ) : array {
private function getUserLinksTemplateData( $menuData, $isAnon, $searchBoxData ): array {
$returnto = $this->getReturnToParam();
$useCombinedLoginLink = $this->useCombinedLoginLink();
$htmlCreateAccount = $this->getCreateAccountHTML( $returnto );
@ -285,7 +285,7 @@ class SkinVector extends SkinMustache {
/**
* @inheritDoc
*/
public function getTemplateData() : array {
public function getTemplateData(): array {
$skin = $this;
$out = $skin->getOutput();
$title = $out->getTitle();
@ -397,7 +397,7 @@ class SkinVector extends SkinMustache {
* @return string Either `Constants::SEARCH_BOX_INPUT_LOCATION_DEFAULT` or
* `Constants::SEARCH_BOX_INPUT_LOCATION_MOVED`
*/
private function getSearchBoxInputLocation() : string {
private function getSearchBoxInputLocation(): string {
if ( $this->isLegacy() ) {
return Constants::SEARCH_BOX_INPUT_LOCATION_DEFAULT;
}
@ -414,7 +414,7 @@ class SkinVector extends SkinMustache {
*
* @return bool
*/
private function shouldSearchExpand() : bool {
private function shouldSearchExpand(): bool {
$featureManager = VectorServices::getFeatureManager();
return $featureManager->isFeatureEnabled( Constants::FEATURE_USE_WVUI_SEARCH ) &&
@ -522,7 +522,7 @@ class SkinVector extends SkinMustache {
protected function getPortletData(
$label,
array $urls = []
) : array {
): array {
switch ( $label ) {
case 'user-menu':
$type = $this->shouldConsolidateUserLinks() ? self::MENU_TYPE_DROPDOWN : self::MENU_TYPE_DEFAULT;

69
package-lock.json generated
View File

@ -9982,9 +9982,9 @@
"dev": true
},
"postcss": {
"version": "7.0.35",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz",
"integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==",
"version": "7.0.36",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz",
"integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==",
"dev": true,
"requires": {
"chalk": "^2.4.2",
@ -10308,13 +10308,10 @@
}
},
"prismjs": {
"version": "1.23.0",
"resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.23.0.tgz",
"integrity": "sha512-c29LVsqOaLbBHuIbsTxaKENh1N2EQBOHaWv7gkHN4dgRbxSREqDnDbtFJYdpPauS4YCplMSNCABQ6Eeor69bAA==",
"dev": true,
"requires": {
"clipboard": "^2.0.0"
}
"version": "1.24.1",
"resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.24.1.tgz",
"integrity": "sha512-mNPsedLuk90RVJioIky8ANZEwYm5w9LcvCXrxHlwf4fNVSn8jEipMybMkWUyyF0JhnC+C4VcOVSBuHRKs1L5Ow==",
"dev": true
},
"private": {
"version": "0.1.8",
@ -12726,15 +12723,15 @@
"dev": true
},
"svgo": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/svgo/-/svgo-2.3.0.tgz",
"integrity": "sha512-fz4IKjNO6HDPgIQxu4IxwtubtbSfGEAJUq/IXyTPIkGhWck/faiiwfkvsB8LnBkKLvSoyNNIY6d13lZprJMc9Q==",
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/svgo/-/svgo-2.3.1.tgz",
"integrity": "sha512-riDDIQgXpEnn0BEl9Gvhh1LNLIyiusSpt64IR8upJu7MwxnzetmF/Y57pXQD2NMX2lVyMRzXt5f2M5rO4wG7Dw==",
"dev": true,
"requires": {
"@trysound/sax": "0.1.1",
"chalk": "^4.1.0",
"commander": "^7.1.0",
"css-select": "^3.1.2",
"css-select": "^4.1.3",
"css-tree": "^1.1.2",
"csso": "^4.2.0",
"stable": "^0.1.8"
@ -12750,9 +12747,9 @@
}
},
"chalk": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
"integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
"integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
@ -12781,32 +12778,32 @@
"dev": true
},
"css-select": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/css-select/-/css-select-3.1.2.tgz",
"integrity": "sha512-qmss1EihSuBNWNNhHjxzxSfJoFBM/lERB/Q4EnsJQQC62R2evJDW481091oAdOr9uh46/0n4nrg0It5cAnj1RA==",
"version": "4.1.3",
"resolved": "https://registry.npmjs.org/css-select/-/css-select-4.1.3.tgz",
"integrity": "sha512-gT3wBNd9Nj49rAbmtFHj1cljIAOLYSX1nZ8CB7TBO3INYckygm5B7LISU/szY//YmdiSLbJvDLOx9VnMVpMBxA==",
"dev": true,
"requires": {
"boolbase": "^1.0.0",
"css-what": "^4.0.0",
"domhandler": "^4.0.0",
"domutils": "^2.4.3",
"css-what": "^5.0.0",
"domhandler": "^4.2.0",
"domutils": "^2.6.0",
"nth-check": "^2.0.0"
}
},
"css-what": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/css-what/-/css-what-4.0.0.tgz",
"integrity": "sha512-teijzG7kwYfNVsUh2H/YN62xW3KK9YhXEgSlbxMlcyjPNvdKJqFx5lrwlJgoFP1ZHlB89iGDlo/JyshKeRhv5A==",
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/css-what/-/css-what-5.0.1.tgz",
"integrity": "sha512-FYDTSHb/7KXsWICVsxdmiExPjCfRC4qRFBdVwv7Ax9hMnvMmEjP9RfxTEZ3qPZGmADDn2vAKSo9UcN1jKVYscg==",
"dev": true
},
"dom-serializer": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.3.1.tgz",
"integrity": "sha512-Pv2ZluG5ife96udGgEDovOOOA5UELkltfJpnIExPrAk1LTvecolUGn6lIaoLh86d83GiB86CjzciMd9BuRB71Q==",
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.3.2.tgz",
"integrity": "sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig==",
"dev": true,
"requires": {
"domelementtype": "^2.0.1",
"domhandler": "^4.0.0",
"domhandler": "^4.2.0",
"entities": "^2.0.0"
}
},
@ -12826,9 +12823,9 @@
}
},
"domutils": {
"version": "2.6.0",
"resolved": "https://registry.npmjs.org/domutils/-/domutils-2.6.0.tgz",
"integrity": "sha512-y0BezHuy4MDYxh6OvolXYsH+1EMGmFbwv5FKW7ovwMG6zTPWqNPq3WF9ayZssFq+UlKdffGLbOEaghNdaOm1WA==",
"version": "2.7.0",
"resolved": "https://registry.npmjs.org/domutils/-/domutils-2.7.0.tgz",
"integrity": "sha512-8eaHa17IwJUPAiB+SoTYBo5mCdeMgdcAoXJ59m6DT1vw+5iLS3gNoqYaRowaBKtGVrOF1Jz4yDTgYKLK2kvfJg==",
"dev": true,
"requires": {
"dom-serializer": "^1.0.1",
@ -13222,9 +13219,9 @@
}
},
"trim-newlines": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.0.tgz",
"integrity": "sha512-C4+gOpvmxaSMKuEf9Qc134F1ZuOHVXKRbtEflf4NTtuuJDEIJ9p5PXsalL8SkeRw+qit1Mo+yuvMPAKwWg/1hA==",
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz",
"integrity": "sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==",
"dev": true
},
"trough": {

View File

@ -35,7 +35,7 @@
"node-fetch": "2.6.1",
"pre-commit": "1.2.2",
"stylelint-config-wikimedia": "0.10.3",
"svgo": "2.3.0",
"svgo": "2.3.1",
"typescript": "3.8.3",
"vue": "2.6.11"
}