mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-23 22:13:34 +00:00
build: Updating dependencies
composer: * mediawiki/mediawiki-codesniffer: 36.0.0 → 37.0.0 npm: * postcss: 7.0.35 → 7.0.36 * https://npmjs.com/advisories/1693 (CVE-2021-23368) * glob-parent: 5.1.1 → 5.1.2 * https://npmjs.com/advisories/1751 (CVE-2020-28469) * trim-newlines: 1.0.0 → 3.0.1 * https://npmjs.com/advisories/1753 (CVE-2021-33623) Change-Id: Ia15aa76cb4abbfe42215532edf52b08c75f72034
This commit is contained in:
parent
d37cde0de0
commit
30b68f3a74
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"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",
|
||||
|
|
|
@ -28,7 +28,7 @@ trait ApiParsoidTrait {
|
|||
/**
|
||||
* @return LoggerInterface
|
||||
*/
|
||||
protected function getLogger() : LoggerInterface {
|
||||
protected function getLogger(): LoggerInterface {
|
||||
return $this->logger ?: new NullLogger();
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ trait ApiParsoidTrait {
|
|||
*
|
||||
* @return VirtualRESTService the VirtualRESTService object to use
|
||||
*/
|
||||
protected function getVRSObject() : VirtualRESTService {
|
||||
protected function getVRSObject(): VirtualRESTService {
|
||||
global $wgVisualEditorParsoidAutoConfig;
|
||||
// the params array to create the service object with
|
||||
$params = [];
|
||||
|
@ -96,7 +96,7 @@ trait ApiParsoidTrait {
|
|||
*
|
||||
* @return VirtualRESTServiceClient
|
||||
*/
|
||||
protected function getVRSClient() : VirtualRESTServiceClient {
|
||||
protected function getVRSClient(): VirtualRESTServiceClient {
|
||||
if ( !$this->serviceClient ) {
|
||||
$this->serviceClient = new VirtualRESTServiceClient(
|
||||
MediaWikiServices::getInstance()->getHttpRequestFactory()->createMultiClient() );
|
||||
|
@ -117,7 +117,7 @@ trait ApiParsoidTrait {
|
|||
*/
|
||||
protected function requestRestbase(
|
||||
Title $title, string $method, string $path, array $params, array $reqheaders = []
|
||||
) : array {
|
||||
): array {
|
||||
$request = [
|
||||
'method' => $method,
|
||||
'url' => '/restbase/local/v1/' . $path
|
||||
|
@ -182,7 +182,7 @@ trait ApiParsoidTrait {
|
|||
* @param Title $title Page title
|
||||
* @return RevisionRecord A revision record
|
||||
*/
|
||||
protected function getLatestRevision( Title $title ) : RevisionRecord {
|
||||
protected function getLatestRevision( Title $title ): RevisionRecord {
|
||||
$revisionLookup = MediaWikiServices::getInstance()->getRevisionLookup();
|
||||
$latestRevision = $revisionLookup->getRevisionByTitle( $title );
|
||||
if ( $latestRevision !== null ) {
|
||||
|
@ -203,7 +203,7 @@ trait ApiParsoidTrait {
|
|||
* Should be an integer but will validate and convert user input strings.
|
||||
* @return RevisionRecord A revision record
|
||||
*/
|
||||
protected function getValidRevision( Title $title, $oldid = null ) : RevisionRecord {
|
||||
protected function getValidRevision( Title $title, $oldid = null ): RevisionRecord {
|
||||
$revisionLookup = MediaWikiServices::getInstance()->getRevisionLookup();
|
||||
if ( $oldid === null || $oldid === 0 ) {
|
||||
return $this->getLatestRevision( $title );
|
||||
|
@ -222,7 +222,7 @@ trait ApiParsoidTrait {
|
|||
* @param RevisionRecord $revision Page revision
|
||||
* @return array The RESTBase server's response
|
||||
*/
|
||||
protected function requestRestbasePageHtml( RevisionRecord $revision ) : array {
|
||||
protected function requestRestbasePageHtml( RevisionRecord $revision ): array {
|
||||
$title = Title::newFromLinkTarget( $revision->getPageAsLinkTarget() );
|
||||
return $this->requestRestbase(
|
||||
$title,
|
||||
|
@ -245,7 +245,7 @@ trait ApiParsoidTrait {
|
|||
*/
|
||||
protected function transformHTML(
|
||||
Title $title, string $html, int $oldid = null, string $etag = null
|
||||
) : array {
|
||||
): array {
|
||||
$data = [ 'html' => $html, 'scrub_wikitext' => 1 ];
|
||||
$path = 'transform/html/to/wikitext/' . urlencode( $title->getPrefixedDBkey() ) .
|
||||
( $oldid === null ? '' : '/' . $oldid );
|
||||
|
@ -287,7 +287,7 @@ trait ApiParsoidTrait {
|
|||
*/
|
||||
protected function transformWikitext(
|
||||
Title $title, string $wikitext, bool $bodyOnly, int $oldid = null, bool $stash = false
|
||||
) : array {
|
||||
): array {
|
||||
return $this->requestRestbase(
|
||||
$title,
|
||||
'POST',
|
||||
|
@ -307,7 +307,7 @@ trait ApiParsoidTrait {
|
|||
* @param Title $title
|
||||
* @return Language Content language
|
||||
*/
|
||||
public static function getPageLanguage( Title $title ) : Language {
|
||||
public static function getPageLanguage( Title $title ): Language {
|
||||
if ( $title->isSpecial( 'CollabPad' ) ) {
|
||||
// Use the site language for CollabPad, as getPageLanguage just
|
||||
// returns the interface language for special pages.
|
||||
|
|
22
package-lock.json
generated
22
package-lock.json
generated
|
@ -3404,9 +3404,9 @@
|
|||
}
|
||||
},
|
||||
"glob-parent": {
|
||||
"version": "5.1.1",
|
||||
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz",
|
||||
"integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==",
|
||||
"version": "5.1.2",
|
||||
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
|
||||
"integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-glob": "^4.0.1"
|
||||
|
@ -5738,9 +5738,9 @@
|
|||
}
|
||||
},
|
||||
"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",
|
||||
|
@ -6888,8 +6888,8 @@
|
|||
"hosted-git-info": {
|
||||
"version": "2.8.9",
|
||||
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz",
|
||||
"dev": true,
|
||||
"integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw=="
|
||||
"integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==",
|
||||
"dev": true
|
||||
},
|
||||
"normalize-package-data": {
|
||||
"version": "2.5.0",
|
||||
|
@ -6971,9 +6971,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
|
||||
},
|
||||
"type-fest": {
|
||||
|
|
Loading…
Reference in a new issue