wikibase/javascript-api: main (log #1038943)

sourcepatches

This run took 70 seconds.

From 944d9657b2fbce0b7c7201aa1b8894b28078ca9f Mon Sep 17 00:00:00 2001
From: libraryupgrader <tools.libraryupgrader@tools.wmflabs.org>
Date: Sat, 27 May 2023 02:41:42 +0000
Subject: [PATCH] build: Updating eslint-config-wikimedia to 0.25.0

Change-Id: Ic9f77a2393053a95d87382d4f6375b9831d4d87a
---
 package-lock.json      | 82 ++++++++++++++++++++++++++----------------
 package.json           |  2 +-
 tests/RepoApi.tests.js |  3 ++
 3 files changed, 55 insertions(+), 32 deletions(-)

diff --git a/package-lock.json b/package-lock.json
index ddcbf00..5bd7ac8 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -13,7 +13,7 @@
 				"wikibase-data-values": "^0.10.0"
 			},
 			"devDependencies": {
-				"eslint-config-wikimedia": "0.24.0",
+				"eslint-config-wikimedia": "0.25.0",
 				"grunt": "1.6.1",
 				"grunt-contrib-qunit": "^5.1.0",
 				"grunt-eslint": "24.0.1",
@@ -577,9 +577,9 @@
 			}
 		},
 		"node_modules/browserslist-config-wikimedia": {
-			"version": "0.4.0",
-			"resolved": "https://registry.npmjs.org/browserslist-config-wikimedia/-/browserslist-config-wikimedia-0.4.0.tgz",
-			"integrity": "sha512-U/fmsaGlCKOqRIjKqXwQ44qFqiStngRTphj1Cf6IHV6J8OK8T0gu9dKc7Ljq4v7bwhnhN+YCCa4fA3nZlPNivQ==",
+			"version": "0.5.0",
+			"resolved": "https://registry.npmjs.org/browserslist-config-wikimedia/-/browserslist-config-wikimedia-0.5.0.tgz",
+			"integrity": "sha512-t+tvSnTeVhVF2lNRxoAlE51/ZCfUs5SNNZUnWu2N8xXOGMPTMyKk5l4mayvDdm+5L8oqmnALU+TjnN2Z+ZTCTw==",
 			"dev": true
 		},
 		"node_modules/buffer": {
@@ -1091,22 +1091,23 @@
 			}
 		},
 		"node_modules/eslint-config-wikimedia": {
-			"version": "0.24.0",
-			"resolved": "https://registry.npmjs.org/eslint-config-wikimedia/-/eslint-config-wikimedia-0.24.0.tgz",
-			"integrity": "sha512-8oH/YhJ87ONSmuRfATgx8U7Jcwz3tBemrh6YOezIfj9f2QfE71ZhaKZrNPdfS7vIklLor/cB9vX7sxN10nz8xw==",
+			"version": "0.25.0",
+			"resolved": "https://registry.npmjs.org/eslint-config-wikimedia/-/eslint-config-wikimedia-0.25.0.tgz",
+			"integrity": "sha512-xLvXPyPmBLMPCE/FDy69ViFNsA3+uvFpH63IKtiqS9Olv1kWU2TWFlpJMFFEu0RWVnbciUKFOoLy3P36UvNHag==",
 			"dev": true,
 			"dependencies": {
-				"browserslist-config-wikimedia": "^0.4.0",
+				"browserslist-config-wikimedia": "^0.5.0",
 				"eslint": "^8.31.0",
 				"eslint-plugin-compat": "^4.0.2",
 				"eslint-plugin-es-x": "^5.2.1",
 				"eslint-plugin-jsdoc": "39.2.2",
 				"eslint-plugin-json-es": "^1.5.7",
-				"eslint-plugin-mediawiki": "^0.4.0",
+				"eslint-plugin-mediawiki": "^0.5.0",
 				"eslint-plugin-mocha": "^9.0.0",
 				"eslint-plugin-no-jquery": "^2.7.0",
 				"eslint-plugin-node": "^11.1.0",
-				"eslint-plugin-qunit": "^7.2.0",
+				"eslint-plugin-qunit": "^7.3.0",
+				"eslint-plugin-security": "^1.7.1",
 				"eslint-plugin-unicorn": "^42.0.0",
 				"eslint-plugin-vue": "^8.7.1",
 				"eslint-plugin-wdio": "^7.19.4",
@@ -1249,9 +1250,9 @@
 			}
 		},
 		"node_modules/eslint-plugin-mediawiki": {
-			"version": "0.4.0",
-			"resolved": "https://registry.npmjs.org/eslint-plugin-mediawiki/-/eslint-plugin-mediawiki-0.4.0.tgz",
-			"integrity": "sha512-Eufptb8lrElYwIONvgxlMBnPD6PYT4xAFprWlBxV5brCmUh8MZ41+lMxt2TPwEC6C85ngflkVez8BV8tWS9RyQ==",
+			"version": "0.5.0",
+			"resolved": "https://registry.npmjs.org/eslint-plugin-mediawiki/-/eslint-plugin-mediawiki-0.5.0.tgz",
+			"integrity": "sha512-rjkHFyv3VDan/dmu7YpD1Rl9h64NOlz4mqqesRN316R+571+ymmb6lXVOdNMbT8H1iPhmtHc+nijVLVkn7pYDw==",
 			"dev": true,
 			"dependencies": {
 				"eslint-plugin-vue": "^8.7.1",
@@ -1401,6 +1402,15 @@
 				"node": ">=10"
 			}
 		},
+		"node_modules/eslint-plugin-security": {
+			"version": "1.7.1",
+			"resolved": "https://registry.npmjs.org/eslint-plugin-security/-/eslint-plugin-security-1.7.1.tgz",
+			"integrity": "sha512-sMStceig8AFglhhT2LqlU5r+/fn9OwsA72O5bBuQVTssPCdQAOQzL+oMn/ZcpeUY6KcNfLJArgcrsSULNjYYdQ==",
+			"dev": true,
+			"dependencies": {
+				"safe-regex": "^2.1.1"
+			}
+		},
 		"node_modules/eslint-plugin-unicorn": {
 			"version": "42.0.0",
 			"resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-42.0.0.tgz",
@@ -3559,9 +3569,9 @@
 			}
 		},
 		"node_modules/postcss-selector-parser": {
-			"version": "6.0.11",
-			"resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.11.tgz",
-			"integrity": "sha512-zbARubNdogI9j7WY4nQJBiNqQf3sLS3wCP4WfOidu+p28LofJqDH1tcXypGrcmMHhDk2t9wGhCsYe/+szLTy1g==",
+			"version": "6.0.13",
+			"resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz",
+			"integrity": "sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==",
 			"dev": true,
 			"dependencies": {
 				"cssesc": "^3.0.0",
@@ -5058,9 +5068,9 @@
 			}
 		},
 		"browserslist-config-wikimedia": {
-			"version": "0.4.0",
-			"resolved": "https://registry.npmjs.org/browserslist-config-wikimedia/-/browserslist-config-wikimedia-0.4.0.tgz",
-			"integrity": "sha512-U/fmsaGlCKOqRIjKqXwQ44qFqiStngRTphj1Cf6IHV6J8OK8T0gu9dKc7Ljq4v7bwhnhN+YCCa4fA3nZlPNivQ==",
+			"version": "0.5.0",
+			"resolved": "https://registry.npmjs.org/browserslist-config-wikimedia/-/browserslist-config-wikimedia-0.5.0.tgz",
+			"integrity": "sha512-t+tvSnTeVhVF2lNRxoAlE51/ZCfUs5SNNZUnWu2N8xXOGMPTMyKk5l4mayvDdm+5L8oqmnALU+TjnN2Z+ZTCTw==",
 			"dev": true
 		},
 		"buffer": {
@@ -5516,22 +5526,23 @@
 			}
 		},
 		"eslint-config-wikimedia": {
-			"version": "0.24.0",
-			"resolved": "https://registry.npmjs.org/eslint-config-wikimedia/-/eslint-config-wikimedia-0.24.0.tgz",
-			"integrity": "sha512-8oH/YhJ87ONSmuRfATgx8U7Jcwz3tBemrh6YOezIfj9f2QfE71ZhaKZrNPdfS7vIklLor/cB9vX7sxN10nz8xw==",
+			"version": "0.25.0",
+			"resolved": "https://registry.npmjs.org/eslint-config-wikimedia/-/eslint-config-wikimedia-0.25.0.tgz",
+			"integrity": "sha512-xLvXPyPmBLMPCE/FDy69ViFNsA3+uvFpH63IKtiqS9Olv1kWU2TWFlpJMFFEu0RWVnbciUKFOoLy3P36UvNHag==",
 			"dev": true,
 			"requires": {
-				"browserslist-config-wikimedia": "^0.4.0",
+				"browserslist-config-wikimedia": "^0.5.0",
 				"eslint": "^8.31.0",
 				"eslint-plugin-compat": "^4.0.2",
 				"eslint-plugin-es-x": "^5.2.1",
 				"eslint-plugin-jsdoc": "39.2.2",
 				"eslint-plugin-json-es": "^1.5.7",
-				"eslint-plugin-mediawiki": "^0.4.0",
+				"eslint-plugin-mediawiki": "^0.5.0",
 				"eslint-plugin-mocha": "^9.0.0",
 				"eslint-plugin-no-jquery": "^2.7.0",
 				"eslint-plugin-node": "^11.1.0",
-				"eslint-plugin-qunit": "^7.2.0",
+				"eslint-plugin-qunit": "^7.3.0",
+				"eslint-plugin-security": "^1.7.1",
 				"eslint-plugin-unicorn": "^42.0.0",
 				"eslint-plugin-vue": "^8.7.1",
 				"eslint-plugin-wdio": "^7.19.4",
@@ -5628,9 +5639,9 @@
 			}
 		},
 		"eslint-plugin-mediawiki": {
-			"version": "0.4.0",
-			"resolved": "https://registry.npmjs.org/eslint-plugin-mediawiki/-/eslint-plugin-mediawiki-0.4.0.tgz",
-			"integrity": "sha512-Eufptb8lrElYwIONvgxlMBnPD6PYT4xAFprWlBxV5brCmUh8MZ41+lMxt2TPwEC6C85ngflkVez8BV8tWS9RyQ==",
+			"version": "0.5.0",
+			"resolved": "https://registry.npmjs.org/eslint-plugin-mediawiki/-/eslint-plugin-mediawiki-0.5.0.tgz",
+			"integrity": "sha512-rjkHFyv3VDan/dmu7YpD1Rl9h64NOlz4mqqesRN316R+571+ymmb6lXVOdNMbT8H1iPhmtHc+nijVLVkn7pYDw==",
 			"dev": true,
 			"requires": {
 				"eslint-plugin-vue": "^8.7.1",
@@ -5729,6 +5740,15 @@
 				}
 			}
 		},
+		"eslint-plugin-security": {
+			"version": "1.7.1",
+			"resolved": "https://registry.npmjs.org/eslint-plugin-security/-/eslint-plugin-security-1.7.1.tgz",
+			"integrity": "sha512-sMStceig8AFglhhT2LqlU5r+/fn9OwsA72O5bBuQVTssPCdQAOQzL+oMn/ZcpeUY6KcNfLJArgcrsSULNjYYdQ==",
+			"dev": true,
+			"requires": {
+				"safe-regex": "^2.1.1"
+			}
+		},
 		"eslint-plugin-unicorn": {
 			"version": "42.0.0",
 			"resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-42.0.0.tgz",
@@ -7310,9 +7330,9 @@
 			"dev": true
 		},
 		"postcss-selector-parser": {
-			"version": "6.0.11",
-			"resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.11.tgz",
-			"integrity": "sha512-zbARubNdogI9j7WY4nQJBiNqQf3sLS3wCP4WfOidu+p28LofJqDH1tcXypGrcmMHhDk2t9wGhCsYe/+szLTy1g==",
+			"version": "6.0.13",
+			"resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz",
+			"integrity": "sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==",
 			"dev": true,
 			"requires": {
 				"cssesc": "^3.0.0",
diff --git a/package.json b/package.json
index 70d0939..fae4f3d 100644
--- a/package.json
+++ b/package.json
@@ -28,7 +28,7 @@
 		"wikibase-data-values": "^0.10.0"
 	},
 	"devDependencies": {
-		"eslint-config-wikimedia": "0.24.0",
+		"eslint-config-wikimedia": "0.25.0",
 		"grunt": "1.6.1",
 		"grunt-contrib-qunit": "^5.1.0",
 		"grunt-eslint": "24.0.1",
diff --git a/tests/RepoApi.tests.js b/tests/RepoApi.tests.js
index ea126c8..9d570aa 100644
--- a/tests/RepoApi.tests.js
+++ b/tests/RepoApi.tests.js
@@ -1,4 +1,7 @@
 /**
+ * @param wb
+ * @param QUnit
+ * @param sinon
  * @license GPL-2.0+
  * @author H. Snater < mediawiki@snater.com >
  */
-- 
2.30.2

$ date
--- stdout ---
Sat May 27 02:40:40 UTC 2023

--- end ---
$ git clone file:///srv/git/wikibase-javascript-api.git repo --depth=1 -b master
--- stderr ---
Cloning into 'repo'...
--- stdout ---

--- end ---
$ git config user.name libraryupgrader
--- stdout ---

--- end ---
$ git config user.email tools.libraryupgrader@tools.wmflabs.org
--- stdout ---

--- end ---
$ git submodule update --init
--- stdout ---

--- end ---
$ grr init
--- stdout ---
Installed commit-msg hook.

--- end ---
$ git show-ref refs/heads/master
--- stdout ---
0a2a361ae81f5dc6a88623b71b09be7a5a03a90a refs/heads/master

--- end ---
$ /usr/bin/npm audit --json --legacy-peer-deps
--- stdout ---
{
  "auditReportVersion": 2,
  "vulnerabilities": {
    "phantomjs-prebuilt": {
      "name": "phantomjs-prebuilt",
      "severity": "moderate",
      "isDirect": true,
      "via": [
        "request"
      ],
      "effects": [],
      "range": "*",
      "nodes": [
        "node_modules/phantomjs-prebuilt"
      ],
      "fixAvailable": false
    },
    "request": {
      "name": "request",
      "severity": "moderate",
      "isDirect": false,
      "via": [
        {
          "source": 1091725,
          "name": "request",
          "dependency": "request",
          "title": "Server-Side Request Forgery in Request",
          "url": "https://github.com/advisories/GHSA-p8p7-x288-28g6",
          "severity": "moderate",
          "cwe": [
            "CWE-918"
          ],
          "cvss": {
            "score": 6.1,
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
          },
          "range": "<=2.88.2"
        }
      ],
      "effects": [
        "phantomjs-prebuilt"
      ],
      "range": "*",
      "nodes": [
        "node_modules/request"
      ],
      "fixAvailable": false
    }
  },
  "metadata": {
    "vulnerabilities": {
      "info": 0,
      "low": 0,
      "moderate": 2,
      "high": 0,
      "critical": 0,
      "total": 2
    },
    "dependencies": {
      "prod": 3,
      "dev": 409,
      "optional": 2,
      "peer": 0,
      "peerOptional": 0,
      "total": 411
    }
  }
}

--- end ---
Upgrading n:eslint-config-wikimedia from 0.24.0 -> 0.25.0
$ /usr/bin/npm install
--- stderr ---
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated phantomjs-prebuilt@2.1.16: this package is now deprecated
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated puppeteer@5.5.0: Version no longer supported. Upgrade to @latest
--- stdout ---

added 412 packages, and audited 413 packages in 12s

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

2 moderate severity vulnerabilities

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.

--- end ---
$ package-lock-lint package-lock.json
--- stdout ---
Checking package-lock.json

--- end ---
$ /usr/bin/npm install grunt-eslint@24.0.1 --save-exact
--- stdout ---

up to date, audited 413 packages in 894ms

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

2 moderate severity vulnerabilities

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.

--- end ---
$ package-lock-lint package-lock.json
--- stdout ---
Checking package-lock.json

--- end ---
$ ./node_modules/.bin/eslint package.json src/namespace.js src/RepoApiError.js Gruntfile.js tests/mediaWiki.mock.js tests/RepoApi.tests.js src/FormatValueCaller.js src/ParseValueCaller.js tests/RepoApiError.tests.js composer.json src/getLocationAgnosticMwApi.js package-lock.json src/RepoApi.js --fix
--- stdout ---

/src/repo/src/FormatValueCaller.js
  15:0  warning  The type 'dataTypes' is undefined   jsdoc/no-undefined-types
  31:0  warning  The type 'dataTypes' is undefined   jsdoc/no-undefined-types
  41:0  warning  The type 'dataValues' is undefined  jsdoc/no-undefined-types

/src/repo/src/RepoApi.js
   24:0  warning  The type 'mediaWiki' is undefined         jsdoc/no-undefined-types
   31:3  warning  Potential timing attack, left side: true  security/detect-possible-timing-attacks
   42:0  warning  The type 'mediaWiki' is undefined         jsdoc/no-undefined-types
   67:0  warning  The type 'jqXHR' is undefined             jsdoc/no-undefined-types
  102:0  warning  The type 'jqXHR' is undefined             jsdoc/no-undefined-types
  148:0  warning  The type 'jqXHR' is undefined             jsdoc/no-undefined-types
  196:0  warning  The type 'jqXHR' is undefined             jsdoc/no-undefined-types
  244:0  warning  The type 'jqXHR' is undefined             jsdoc/no-undefined-types
  293:0  warning  The type 'jqXHR' is undefined             jsdoc/no-undefined-types
  328:0  warning  The type 'jqXHR' is undefined             jsdoc/no-undefined-types
  370:0  warning  The type 'jqXHR' is undefined             jsdoc/no-undefined-types
  414:0  warning  The type 'jqXHR' is undefined             jsdoc/no-undefined-types
  458:0  warning  The type 'jqXHR' is undefined             jsdoc/no-undefined-types
  495:0  warning  The type 'jqXHR' is undefined             jsdoc/no-undefined-types
  537:0  warning  The type 'jqXHR' is undefined             jsdoc/no-undefined-types
  583:0  warning  The type 'jqXHR' is undefined             jsdoc/no-undefined-types
  647:0  warning  The type 'jqXHR' is undefined             jsdoc/no-undefined-types
  679:0  warning  The type 'jqXHR' is undefined             jsdoc/no-undefined-types

/src/repo/src/getLocationAgnosticMwApi.js
  32:0  warning  The type 'mediaWiki' is undefined  jsdoc/no-undefined-types

/src/repo/tests/RepoApi.tests.js
  2:0  warning  Missing JSDoc @param "wb" type     jsdoc/require-param-type
  3:0  warning  Missing JSDoc @param "QUnit" type  jsdoc/require-param-type
  4:0  warning  Missing JSDoc @param "sinon" type  jsdoc/require-param-type

✖ 25 problems (0 errors, 25 warnings)


--- end ---
$ ./node_modules/.bin/eslint package.json src/namespace.js src/RepoApiError.js Gruntfile.js tests/mediaWiki.mock.js tests/RepoApi.tests.js src/FormatValueCaller.js src/ParseValueCaller.js tests/RepoApiError.tests.js composer.json src/getLocationAgnosticMwApi.js package-lock.json src/RepoApi.js -f json
--- stdout ---
[{"filePath":"/src/repo/Gruntfile.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[]},{"filePath":"/src/repo/composer.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[]},{"filePath":"/src/repo/package-lock.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[]},{"filePath":"/src/repo/package.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[]},{"filePath":"/src/repo/src/FormatValueCaller.js","messages":[{"ruleId":"jsdoc/no-undefined-types","severity":1,"message":"The type 'dataTypes' is undefined.","line":15,"column":null,"nodeType":"Block","endLine":15,"endColumn":null},{"ruleId":"jsdoc/no-undefined-types","severity":1,"message":"The type 'dataTypes' is undefined.","line":31,"column":null,"nodeType":"Block","endLine":31,"endColumn":null},{"ruleId":"jsdoc/no-undefined-types","severity":1,"message":"The type 'dataValues' is undefined.","line":41,"column":null,"nodeType":"Block","endLine":41,"endColumn":null}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":"( function ( wb ) {\n\t'use strict';\n\n\tvar MODULE = wb.api;\n\n\t/**\n\t * @class wikibase.api.FormatValueCaller\n\t * @since 1.0\n\t * @license GPL-2.0+\n\t * @author H. Snater < mediawiki@snater.com >\n\t *\n\t * @constructor\n\t *\n\t * @param {wikibase.api.RepoApi} api\n\t * @param {dataTypes.DataTypeStore} dataTypeStore\n\t */\n\tvar SELF = MODULE.FormatValueCaller = function WbApiFormatValueCaller( api, dataTypeStore ) {\n\t\tthis._api = api;\n\t\tthis._dataTypeStore = dataTypeStore;\n\t};\n\n\t$.extend( SELF.prototype, {\n\n\t\t/**\n\t\t * @property {wikibase.api.RepoApi}\n\t\t * @private\n\t\t */\n\t\t_api: null,\n\n\t\t/**\n\t\t * @property {dataTypes.DataTypeStore}\n\t\t * @private\n\t\t */\n\t\t_dataTypeStore: null,\n\n\t\t/**\n\t\t * Makes a request to the API to format values on the server side. Will return a\n\t\t * `jQuery.Promise` which will be resolved if formatting is successful or rejected if it\n\t\t * fails or the API cannot be reached.\n\t\t *\n\t\t * @param {dataValues.DataValue} dataValue\n\t\t * @param {string|Object} [dataType] `DataType` id.\n\t\t *        Assumed to be `outputFormat` if the `dataTypeStore` the `FormatValueCaller` has\n\t\t *        been initialized with, does not contain a data type whose id matches the string\n\t\t *        supplied via this argument.\n\t\t *        Assumed to be `options` if {Object} and no additional arguments are provided.\n\t\t * @param {string|Object} [outputFormat]\n\t\t *        Assumed to be `options` if {Object} and no additional arguments are provided.\n\t\t * @param {string|Object} [propertyId]\n\t\t *        Assumed to be `options` if {Object} and no additional arguments are provided.\n\t\t * @param {Object} [options]\n\t\t * @return {Object} jQuery.Promise\n\t\t * @return {Function} return.done\n\t\t * @return {string} return.done.formattedValue Formatted `DataValue`.\n\t\t * @return {Function} return.fail\n\t\t * @return {wikibase.api.RepoApiError} error\n\t\t */\n\t\tformatValue: function ( dataValue, dataType, outputFormat, propertyId, options ) {\n\n\t\t\t// Evaluate optional arguments:\n\t\t\tif ( outputFormat === undefined ) {\n\t\t\t\tif ( $.isPlainObject( dataType ) ) {\n\t\t\t\t\toptions = dataType;\n\t\t\t\t\tdataType = undefined;\n\t\t\t\t} else if ( !this._dataTypeStore.hasDataType( dataType ) ) {\n\t\t\t\t\toutputFormat = dataType;\n\t\t\t\t\tdataType = undefined;\n\t\t\t\t}\n\t\t\t} else if ( propertyId === undefined ) {\n\t\t\t\tif ( $.isPlainObject( outputFormat ) ) {\n\t\t\t\t\toptions = outputFormat;\n\t\t\t\t\toutputFormat = undefined;\n\t\t\t\t}\n\t\t\t} else if ( options === undefined ) {\n\t\t\t\tif ( $.isPlainObject( propertyId ) ) {\n\t\t\t\t\toptions = propertyId;\n\t\t\t\t\tpropertyId = undefined;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar deferred = $.Deferred();\n\n\t\t\tthis._api.formatValue(\n\t\t\t\t{\n\t\t\t\t\tvalue: dataValue.toJSON(),\n\t\t\t\t\ttype: dataValue.getType()\n\t\t\t\t},\n\t\t\t\toptions,\n\t\t\t\tdataType,\n\t\t\t\toutputFormat,\n\t\t\t\tpropertyId\n\t\t\t).done( function ( apiResult ) {\n\t\t\t\tif ( apiResult.result ) {\n\t\t\t\t\tdeferred.resolve( apiResult.result );\n\t\t\t\t} else {\n\t\t\t\t\tdeferred.reject( new wb.api.RepoApiError(\n\t\t\t\t\t\t'unexpected-result',\n\t\t\t\t\t\t'The formatter API returned an unexpected result'\n\t\t\t\t\t) );\n\t\t\t\t}\n\t\t\t} ).fail( function ( errorCode, error ) {\n\t\t\t\tdeferred.reject( wb.api.RepoApiError.newFromApiResponse( error ) );\n\t\t\t} );\n\n\t\t\treturn deferred.promise();\n\t\t}\n\n\t} );\n\n}( wikibase ) );\n","usedDeprecatedRules":[]},{"filePath":"/src/repo/src/ParseValueCaller.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[]},{"filePath":"/src/repo/src/RepoApi.js","messages":[{"ruleId":"jsdoc/no-undefined-types","severity":1,"message":"The type 'mediaWiki' is undefined.","line":24,"column":null,"nodeType":"Block","endLine":24,"endColumn":null},{"ruleId":"security/detect-possible-timing-attacks","severity":1,"message":"Potential timing attack, left side: true","line":31,"column":3,"nodeType":"IfStatement","endLine":33,"endColumn":4},{"ruleId":"jsdoc/no-undefined-types","severity":1,"message":"The type 'mediaWiki' is undefined.","line":42,"column":null,"nodeType":"Block","endLine":42,"endColumn":null},{"ruleId":"jsdoc/no-undefined-types","severity":1,"message":"The type 'jqXHR' is undefined.","line":67,"column":null,"nodeType":"Block","endLine":67,"endColumn":null},{"ruleId":"jsdoc/no-undefined-types","severity":1,"message":"The type 'jqXHR' is undefined.","line":102,"column":null,"nodeType":"Block","endLine":102,"endColumn":null},{"ruleId":"jsdoc/no-undefined-types","severity":1,"message":"The type 'jqXHR' is undefined.","line":148,"column":null,"nodeType":"Block","endLine":148,"endColumn":null},{"ruleId":"jsdoc/no-undefined-types","severity":1,"message":"The type 'jqXHR' is undefined.","line":196,"column":null,"nodeType":"Block","endLine":196,"endColumn":null},{"ruleId":"jsdoc/no-undefined-types","severity":1,"message":"The type 'jqXHR' is undefined.","line":244,"column":null,"nodeType":"Block","endLine":244,"endColumn":null},{"ruleId":"jsdoc/no-undefined-types","severity":1,"message":"The type 'jqXHR' is undefined.","line":293,"column":null,"nodeType":"Block","endLine":293,"endColumn":null},{"ruleId":"jsdoc/no-undefined-types","severity":1,"message":"The type 'jqXHR' is undefined.","line":328,"column":null,"nodeType":"Block","endLine":328,"endColumn":null},{"ruleId":"jsdoc/no-undefined-types","severity":1,"message":"The type 'jqXHR' is undefined.","line":370,"column":null,"nodeType":"Block","endLine":370,"endColumn":null},{"ruleId":"jsdoc/no-undefined-types","severity":1,"message":"The type 'jqXHR' is undefined.","line":414,"column":null,"nodeType":"Block","endLine":414,"endColumn":null},{"ruleId":"jsdoc/no-undefined-types","severity":1,"message":"The type 'jqXHR' is undefined.","line":458,"column":null,"nodeType":"Block","endLine":458,"endColumn":null},{"ruleId":"jsdoc/no-undefined-types","severity":1,"message":"The type 'jqXHR' is undefined.","line":495,"column":null,"nodeType":"Block","endLine":495,"endColumn":null},{"ruleId":"jsdoc/no-undefined-types","severity":1,"message":"The type 'jqXHR' is undefined.","line":537,"column":null,"nodeType":"Block","endLine":537,"endColumn":null},{"ruleId":"jsdoc/no-undefined-types","severity":1,"message":"The type 'jqXHR' is undefined.","line":583,"column":null,"nodeType":"Block","endLine":583,"endColumn":null},{"ruleId":"jsdoc/no-undefined-types","severity":1,"message":"The type 'jqXHR' is undefined.","line":647,"column":null,"nodeType":"Block","endLine":647,"endColumn":null},{"ruleId":"jsdoc/no-undefined-types","severity":1,"message":"The type 'jqXHR' is undefined.","line":679,"column":null,"nodeType":"Block","endLine":679,"endColumn":null}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":18,"fixableErrorCount":0,"fixableWarningCount":0,"source":"( function ( wb ) {\n\t'use strict';\n\n\tvar MODULE = wb.api;\n\n\t/**\n\t * Constructor to create an API object for interaction with the repo Wikibase API.\n\t * Functions of `wikibase.api.RepoApi` act on serializations. Before passing native\n\t * `wikibase.datamodel` objects to a function, such objects need to be serialized, just like return\n\t * values of `wikibase.api.RepoApi` may be used to construct `wikibase.datamodel` objects.\n\t * @see wikibase.datamodel\n\t * @see wikibase.serialization\n\t *\n\t * @class wikibase.api.RepoApi\n\t * @since 1.0\n\t * @license GPL-2.0+\n\t * @author Daniel Werner < daniel.a.r.werner@gmail.com >\n\t * @author Tobias Gritschacher\n\t * @author H. Snater < mediawiki@snater.com >\n\t * @author Marius Hoch < hoo@online.de >\n\t *\n\t * @constructor\n\t *\n\t * @param {mediaWiki.Api} api\n\t * @param {string|null} uselang\n\t * @param {string[]} [tags] Change tags to add to edits made through this instance.\n\t *\n\t * @throws {Error} if no `mediaWiki.Api` instance is provided.\n\t */\n\tvar SELF = MODULE.RepoApi = function WbApiRepoApi( api, uselang, tags ) {\n\t\tif ( api === undefined ) {\n\t\t\tthrow new Error( 'mediaWiki.Api instance needs to be provided' );\n\t\t}\n\n\t\tthis._api = api;\n\t\tthis._uselang = uselang;\n\t\tthis._tags = tags || [];\n\t};\n\n\t$.extend( SELF.prototype, {\n\t\t/**\n\t\t * @property {mediaWiki.Api}\n\t\t * @private\n\t\t */\n\t\t_api: null,\n\n\t\t/**\n\t\t * @property {string|null}\n\t\t * @private\n\t\t */\n\t\t_uselang: null,\n\n\t\t/**\n\t\t * @property {string[]}\n\t\t * @private\n\t\t */\n\t\t_tags: null,\n\n\t\t/**\n\t\t * Creates a new entity with the given type and data.\n\t\t *\n\t\t * @param {string} type The type of the `Entity` that should be created.\n\t\t * @param {Object} [data={}] The `Entity` data (may be omitted to create an empty `Entity`).\n\t\t * @return {Object} jQuery.Promise\n\t\t * @return {Function} return.done\n\t\t * @return {*} return.done.result\n\t\t * @return {jqXHR} return.done.jqXHR\n\t\t * @return {Function} return.fail\n\t\t * @return {string} return.fail.code\n\t\t * @return {*} return.fail.error\n\t\t *\n\t\t * @throws {Error} if a parameter is not specified properly.\n\t\t */\n\t\tcreateEntity: function ( type, data ) {\n\t\t\tif ( typeof type !== 'string' || data && typeof data !== 'object' ) {\n\t\t\t\tthrow new Error( 'Parameter not specified properly' );\n\t\t\t}\n\n\t\t\tvar params = {\n\t\t\t\taction: 'wbeditentity',\n\t\t\t\tnew: type,\n\t\t\t\tdata: JSON.stringify( data || {} )\n\t\t\t};\n\n\t\t\tif ( this._tags.length ) {\n\t\t\t\tparams.tags = this.normalizeMultiValue( this._tags );\n\t\t\t}\n\n\t\t\treturn this.post( params );\n\t\t},\n\n\t\t/**\n\t\t * Edits an `Entity`.\n\t\t *\n\t\t * @param {string} id `Entity` id.\n\t\t * @param {number} baseRevId Revision id the edit shall be performed on.\n\t\t * @param {Object} data The `Entity`'s structure.\n\t\t * @param {boolean} [clear] Whether to clear whole entity before editing.\n\t\t * @return {Object} jQuery.Promise\n\t\t * @return {Function} return.done\n\t\t * @return {*} return.done.result\n\t\t * @return {jqXHR} return.done.jqXHR\n\t\t * @return {Function} return.fail\n\t\t * @return {string} return.fail.code\n\t\t * @return {*} return.fail.error\n\t\t *\n\t\t * @throws {Error} if a parameter is not specified properly.\n\t\t */\n\t\teditEntity: function ( id, baseRevId, data, clear ) {\n\t\t\tif (\n\t\t\t\ttypeof id !== 'string'\n\t\t\t\t|| typeof baseRevId !== 'number'\n\t\t\t\t|| typeof data !== 'object'\n\t\t\t\t|| clear && typeof clear !== 'boolean'\n\t\t\t) {\n\t\t\t\tthrow new Error( 'Parameter not specified properly' );\n\t\t\t}\n\n\t\t\tvar params = {\n\t\t\t\taction: 'wbeditentity',\n\t\t\t\tid: id,\n\t\t\t\tbaserevid: baseRevId,\n\t\t\t\tdata: JSON.stringify( data )\n\t\t\t};\n\n\t\t\tif ( clear ) {\n\t\t\t\tparams.clear = clear;\n\t\t\t}\n\n\t\t\tif ( this._tags.length ) {\n\t\t\t\tparams.tags = this.normalizeMultiValue( this._tags );\n\t\t\t}\n\n\t\t\treturn this.post( params );\n\t\t},\n\n\t\t/**\n\t\t * Formats values (`dataValues.DataValue`s).\n\t\t *\n\t\t * @param {Object} dataValue `DataValue` serialization.\n\t\t * @param {Object} [options]\n\t\t * @param {string} [dataType] `dataTypes.DataType` id.\n\t\t * @param {string} [outputFormat]\n\t\t * @param {string} [propertyId] replaces `dataType`\n\t\t * @return {Object} jQuery.Promise\n\t\t * @return {Function} return.done\n\t\t * @return {*} return.done.result\n\t\t * @return {jqXHR} return.done.jqXHR\n\t\t * @return {Function} return.fail\n\t\t * @return {string} return.fail.code\n\t\t * @return {*} return.fail.error\n\t\t *\n\t\t * @throws {Error} if a parameter is not specified properly.\n\t\t */\n\t\tformatValue: function ( dataValue, options, dataType, outputFormat, propertyId ) {\n\t\t\tif (\n\t\t\t\ttypeof dataValue !== 'object'\n\t\t\t\t|| options && typeof options !== 'object'\n\t\t\t\t|| dataType && typeof dataType !== 'string'\n\t\t\t\t|| outputFormat && typeof outputFormat !== 'string'\n\t\t\t\t|| propertyId && typeof propertyId !== 'string'\n\t\t\t) {\n\t\t\t\tthrow new Error( 'Parameter not specified properly' );\n\t\t\t}\n\n\t\t\tvar params = {\n\t\t\t\taction: 'wbformatvalue',\n\t\t\t\tdatavalue: JSON.stringify( dataValue )\n\t\t\t};\n\n\t\t\tif ( outputFormat ) {\n\t\t\t\tparams.generate = outputFormat;\n\t\t\t}\n\n\t\t\tif ( propertyId ) {\n\t\t\t\tparams.property = propertyId;\n\t\t\t} else if ( dataType ) {\n\t\t\t\tparams.datatype = dataType;\n\t\t\t}\n\n\t\t\treturn this.get( params, options );\n\t\t},\n\n\t\t/**\n\t\t * Gets one or more `Entity`s.\n\t\t *\n\t\t * @param {string|string[]} ids `Entity` id(s).\n\t\t * @param {string|string[]|null} [props] Key(s) of property/ies to retrieve from the API.\n\t\t *        Omitting/`null` will return all properties.\n\t\t * @param {string|string[]|null} [languages] Language code(s) of the languages the\n\t\t *        property/ies values should be retrieved in. Omitting/`null` returns values in all\n\t\t *        languages.\n\t\t * @return {Object} jQuery.Promise\n\t\t * @return {Function} return.done\n\t\t * @return {*} return.done.result\n\t\t * @return {jqXHR} return.done.jqXHR\n\t\t * @return {Function} return.fail\n\t\t * @return {string} return.fail.code\n\t\t * @return {*} return.fail.error\n\t\t *\n\t\t * @throws {Error} if a parameter is not specified properly.\n\t\t */\n\t\tgetEntities: function ( ids, props, languages ) {\n\t\t\tif (\n\t\t\t\t( typeof ids !== 'string' && !Array.isArray( ids ) )\n\t\t\t\t|| props && ( typeof props !== 'string' && !Array.isArray( props ) )\n\t\t\t\t|| languages && ( typeof languages !== 'string' && !Array.isArray( languages ) )\n\t\t\t) {\n\t\t\t\tthrow new Error( 'Parameter not specified properly' );\n\t\t\t}\n\n\t\t\tvar params = {\n\t\t\t\taction: 'wbgetentities',\n\t\t\t\tids: this.normalizeMultiValue( ids )\n\t\t\t};\n\n\t\t\tif ( props ) {\n\t\t\t\tparams.props = this.normalizeMultiValue( props );\n\t\t\t}\n\n\t\t\tif ( languages ) {\n\t\t\t\tparams.languages = this.normalizeMultiValue( languages );\n\t\t\t}\n\n\t\t\treturn this.get( params );\n\t\t},\n\n\t\t/**\n\t\t * Gets an `Entity` which is linked with on or more specific sites/pages.\n\t\t *\n\t\t * @param {string|string[]} sites `Site`(s). May be used with `titles`. May not be a list when\n\t\t *        `titles` is a list.\n\t\t * @param {string|string[]} titles Linked page(s). May be used with `sites`. May not be a list\n\t\t *        when `sites` is a list.\n\t\t * @param {string|string[]|null} [props] Key(s) of property/ies to retrieve from the API.\n\t\t *        Omitting/`null` returns all properties.\n\t\t * @param {string|string[]|null} [languages] Language code(s) of the languages the\n\t\t *        property/ies values should be retrieved in. Omitting/`null` returns values in all\n\t\t *        languages.\n\t\t * @param {boolean} [normalize] Whether to normalize titles server side\n\t\t * @return {Object} jQuery.Promise\n\t\t * @return {Function} return.done\n\t\t * @return {*} return.done.result\n\t\t * @return {jqXHR} return.done.jqXHR\n\t\t * @return {Function} return.fail\n\t\t * @return {string} return.fail.code\n\t\t * @return {*} return.fail.error\n\t\t *\n\t\t * @throws {Error} if a parameter is not specified properly.\n\t\t * @throws {Error} if both, `sites` and `titles`, are passed as `array`s.\n\t\t */\n\t\tgetEntitiesByPage: function ( sites, titles, props, languages, normalize ) {\n\t\t\tif (\n\t\t\t\t( typeof sites !== 'string' && !Array.isArray( sites ) )\n\t\t\t\t|| ( typeof titles !== 'string' && !Array.isArray( titles ) )\n\t\t\t\t|| props && ( typeof props !== 'string' && !Array.isArray( props ) )\n\t\t\t\t|| languages && ( typeof languages !== 'string' && !Array.isArray( languages ) )\n\t\t\t) {\n\t\t\t\tthrow new Error( 'Parameter not specified properly' );\n\t\t\t}\n\n\t\t\tif ( Array.isArray( sites ) && Array.isArray( titles ) ) {\n\t\t\t\tthrow new Error( 'sites and titles may not be passed as arrays at the same time' );\n\t\t\t}\n\n\t\t\tvar params = {\n\t\t\t\taction: 'wbgetentities',\n\t\t\t\tsites: this.normalizeMultiValue( sites ),\n\t\t\t\ttitles: this.normalizeMultiValue( titles ),\n\t\t\t\tnormalize: typeof normalize === 'boolean' ? normalize : undefined\n\t\t\t};\n\n\t\t\tif ( props ) {\n\t\t\t\tparams.props = this.normalizeMultiValue( props );\n\t\t\t}\n\n\t\t\tif ( languages ) {\n\t\t\t\tparams.languages = this.normalizeMultiValue( languages );\n\t\t\t}\n\n\t\t\treturn this.get( params );\n\t\t},\n\n\t\t/**\n\t\t * Parses values (`dataValues.DataValue`s).\n\t\t *\n\t\t * @param {string} parser Parser id.\n\t\t * @param {string[]} values `DataValue` serializations.\n\t\t * @param {Object} [options]\n\t\t * @return {Object} jQuery.Promise\n\t\t * @return {Function} return.done\n\t\t * @return {*} return.done.result\n\t\t * @return {jqXHR} return.done.jqXHR\n\t\t * @return {Function} return.fail\n\t\t * @return {string} return.fail.code\n\t\t * @return {*} return.fail.error\n\t\t *\n\t\t * @throws {Error} if a parameter is not specified properly.\n\t\t */\n\t\tparseValue: function ( parser, values, options ) {\n\t\t\tif (\n\t\t\t\ttypeof parser !== 'string'\n\t\t\t\t|| !Array.isArray( values )\n\t\t\t\t|| options && typeof options !== 'object'\n\t\t\t) {\n\t\t\t\tthrow new Error( 'Parameter not specified properly' );\n\t\t\t}\n\n\t\t\tvar params = {\n\t\t\t\taction: 'wbparsevalue',\n\t\t\t\tparser: parser,\n\t\t\t\tvalues: this.normalizeMultiValue( values )\n\t\t\t};\n\n\t\t\treturn this.get( params, options );\n\t\t},\n\n\t\t/**\n\t\t * Sets the label of an `Entity`.\n\t\t *\n\t\t * @param {string} id `Entity` id.\n\t\t * @param {number} baseRevId Revision id the edit shall be performed on.\n\t\t * @param {string} label New label text.\n\t\t * @param {string} language Language code of the language the new label should be set in.\n\t\t * @return {Object} jQuery.Promise\n\t\t * @return {Function} return.done\n\t\t * @return {*} return.done.result\n\t\t * @return {jqXHR} return.done.jqXHR\n\t\t * @return {Function} return.fail\n\t\t * @return {string} return.fail.code\n\t\t * @return {*} return.fail.error\n\t\t *\n\t\t * @throws {Error} if a parameter is not specified properly.\n\t\t */\n\t\tsetLabel: function ( id, baseRevId, label, language ) {\n\t\t\tif (\n\t\t\t\ttypeof id !== 'string'\n\t\t\t\t|| typeof baseRevId !== 'number'\n\t\t\t\t|| typeof label !== 'string'\n\t\t\t\t|| typeof language !== 'string'\n\t\t\t) {\n\t\t\t\tthrow new Error( 'Parameter not specified properly' );\n\t\t\t}\n\n\t\t\tvar params = {\n\t\t\t\taction: 'wbsetlabel',\n\t\t\t\tid: id,\n\t\t\t\tvalue: label,\n\t\t\t\tlanguage: language,\n\t\t\t\tbaserevid: baseRevId\n\t\t\t};\n\n\t\t\tif ( this._tags.length ) {\n\t\t\t\tparams.tags = this.normalizeMultiValue( this._tags );\n\t\t\t}\n\n\t\t\treturn this.post( params );\n\t\t},\n\n\t\t/**\n\t\t * Sets the description of an `Entity`.\n\t\t *\n\t\t * @param {string} id `Entity` id.\n\t\t * @param {number} baseRevId Revision id the edit shall be performed on.\n\t\t * @param {string} description New description text.\n\t\t * @param {string} language Language code of the language the new description should be set in.\n\t\t * @return {Object} jQuery.Promise\n\t\t * @return {Function} return.done\n\t\t * @return {*} return.done.result\n\t\t * @return {jqXHR} return.done.jqXHR\n\t\t * @return {Function} return.fail\n\t\t * @return {string} return.fail.code\n\t\t * @return {*} return.fail.error\n\t\t *\n\t\t * @throws {Error} if a parameter is not specified properly.\n\t\t */\n\t\tsetDescription: function ( id, baseRevId, description, language ) {\n\t\t\tif (\n\t\t\t\ttypeof id !== 'string'\n\t\t\t\t|| typeof baseRevId !== 'number'\n\t\t\t\t|| typeof description !== 'string'\n\t\t\t\t|| typeof language !== 'string'\n\t\t\t) {\n\t\t\t\tthrow new Error( 'Parameter not specified properly' );\n\t\t\t}\n\n\t\t\tvar params = {\n\t\t\t\taction: 'wbsetdescription',\n\t\t\t\tid: id,\n\t\t\t\tvalue: description,\n\t\t\t\tlanguage: language,\n\t\t\t\tbaserevid: baseRevId\n\t\t\t};\n\n\t\t\tif ( this._tags.length ) {\n\t\t\t\tparams.tags = this.normalizeMultiValue( this._tags );\n\t\t\t}\n\n\t\t\treturn this.post( params );\n\t\t},\n\n\t\t/**\n\t\t * Adds and/or remove a number of aliases of an `Entity`.\n\t\t *\n\t\t * @param {string} id `Entity` id.\n\t\t * @param {number} baseRevId Revision id the edit shall be performed on.\n\t\t * @param {string[]} add Aliases to add.\n\t\t * @param {string[]} remove Aliases to remove.\n\t\t * @param {string} language Language code of the language the aliases should be added/removed\n\t\t *        in.\n\t\t * @return {Object} jQuery.Promise\n\t\t * @return {Function} return.done\n\t\t * @return {*} return.done.result\n\t\t * @return {jqXHR} return.done.jqXHR\n\t\t * @return {Function} return.fail\n\t\t * @return {string} return.fail.code\n\t\t * @return {*} return.fail.error\n\t\t *\n\t\t * @throws {Error} if a parameter is not specified properly.\n\t\t */\n\t\tsetAliases: function ( id, baseRevId, add, remove, language ) {\n\t\t\tif (\n\t\t\t\ttypeof id !== 'string'\n\t\t\t\t|| typeof baseRevId !== 'number'\n\t\t\t\t|| !Array.isArray( add )\n\t\t\t\t|| !Array.isArray( remove )\n\t\t\t\t|| typeof language !== 'string'\n\t\t\t) {\n\t\t\t\tthrow new Error( 'Parameter not specified properly' );\n\t\t\t}\n\n\t\t\tvar params = {\n\t\t\t\taction: 'wbsetaliases',\n\t\t\t\tid: id,\n\t\t\t\tadd: this.normalizeMultiValue( add ),\n\t\t\t\tremove: this.normalizeMultiValue( remove ),\n\t\t\t\tlanguage: language,\n\t\t\t\tbaserevid: baseRevId\n\t\t\t};\n\n\t\t\tif ( this._tags.length ) {\n\t\t\t\tparams.tags = this.normalizeMultiValue( this._tags );\n\t\t\t}\n\n\t\t\treturn this.post( params );\n\t\t},\n\n\t\t/**\n\t\t * Creates/Updates an entire `Claim`.\n\t\t *\n\t\t * @param {Object} claim `Claim` serialization.\n\t\t * @param {number} baseRevId Revision id the edit shall be performed on.\n\t\t * @param {number} [index] The `Claim`'s index. Only needs to be specified if the `Claim`'s\n\t\t *        index within the list of all `Claim`s of the parent `Entity` shall be changed.\n\t\t * @return {Object} jQuery.Promise\n\t\t * @return {Function} return.done\n\t\t * @return {*} return.done.result\n\t\t * @return {jqXHR} return.done.jqXHR\n\t\t * @return {Function} return.fail\n\t\t * @return {string} return.fail.code\n\t\t * @return {*} return.fail.error\n\t\t *\n\t\t * @throws {Error} if a parameter is not specified properly.\n\t\t */\n\t\tsetClaim: function ( claim, baseRevId, index ) {\n\t\t\tif ( typeof claim !== 'object' || typeof baseRevId !== 'number' ) {\n\t\t\t\tthrow new Error( 'Parameter not specified properly' );\n\t\t\t}\n\n\t\t\tvar params = {\n\t\t\t\taction: 'wbsetclaim',\n\t\t\t\tclaim: JSON.stringify( claim ),\n\t\t\t\tbaserevid: baseRevId\n\t\t\t};\n\n\t\t\tif ( typeof index === 'number' ) {\n\t\t\t\tparams.index = index;\n\t\t\t}\n\n\t\t\tif ( this._tags.length ) {\n\t\t\t\tparams.tags = this.normalizeMultiValue( this._tags );\n\t\t\t}\n\n\t\t\treturn this.post( params );\n\t\t},\n\n\t\t/**\n\t\t * Removes a `Claim`.\n\t\t *\n\t\t * @param {string} claimGuid The GUID of the `Claim` to be removed.\n\t\t * @param {number} [claimRevisionId] Revision id the edit shall be performed on.\n\t\t * @return {Object} jQuery.Promise\n\t\t * @return {Function} return.done\n\t\t * @return {*} return.done.result\n\t\t * @return {jqXHR} return.done.jqXHR\n\t\t * @return {Function} return.fail\n\t\t * @return {string} return.fail.code\n\t\t * @return {*} return.fail.error\n\t\t *\n\t\t * @throws {Error} if a parameter is not specified properly.\n\t\t */\n\t\tremoveClaim: function ( claimGuid, claimRevisionId ) {\n\t\t\tif (\n\t\t\t\ttypeof claimGuid !== 'string'\n\t\t\t\t|| claimRevisionId && typeof claimRevisionId !== 'number'\n\t\t\t) {\n\t\t\t\tthrow new Error( 'Parameter not specified properly' );\n\t\t\t}\n\n\t\t\tvar params = {\n\t\t\t\taction: 'wbremoveclaims',\n\t\t\t\tclaim: claimGuid\n\t\t\t};\n\n\t\t\tif ( claimRevisionId ) {\n\t\t\t\tparams.baserevid = claimRevisionId;\n\t\t\t}\n\n\t\t\tif ( this._tags.length ) {\n\t\t\t\tparams.tags = this.normalizeMultiValue( this._tags );\n\t\t\t}\n\n\t\t\treturn this.post( params );\n\t\t},\n\n\t\t/**\n\t\t * Sets a `SiteLink` for an item via the API.\n\t\t *\n\t\t * @param {string} id `Entity` id.\n\t\t * @param {number} baseRevId Revision id the edit shall be performed on.\n\t\t * @param {string} site Site of the link.\n\t\t * @param {string} title Title to link to.\n\t\t * @param {string[]|string} [badges] List of `Entity` ids to be assigned as badges.\n\t\t * @return {Object} jQuery.Promise\n\t\t * @return {Function} return.done\n\t\t * @return {*} return.done.result\n\t\t * @return {jqXHR} return.done.jqXHR\n\t\t * @return {Function} return.fail\n\t\t * @return {string} return.fail.code\n\t\t * @return {*} return.fail.error\n\t\t *\n\t\t * @throws {Error} if a parameter is not specified properly.\n\t\t */\n\t\tsetSitelink: function ( id, baseRevId, site, title, badges ) {\n\t\t\tif ( typeof id !== 'string'\n\t\t\t|| typeof baseRevId !== 'number'\n\t\t\t|| typeof site !== 'string'\n\t\t\t|| typeof title !== 'string'\n\t\t\t|| badges && typeof badges !== 'string' && !Array.isArray( badges )\n\t\t\t) {\n\t\t\t\tthrow new Error( 'Parameter not specified properly' );\n\t\t\t}\n\n\t\t\tvar params = {\n\t\t\t\taction: 'wbsetsitelink',\n\t\t\t\tid: id,\n\t\t\t\tlinksite: site,\n\t\t\t\tlinktitle: title,\n\t\t\t\tbaserevid: baseRevId\n\t\t\t};\n\n\t\t\tif ( badges ) {\n\t\t\t\tparams.badges = this.normalizeMultiValue( badges );\n\t\t\t}\n\n\t\t\tif ( this._tags.length ) {\n\t\t\t\tparams.tags = this.normalizeMultiValue( this._tags );\n\t\t\t}\n\n\t\t\treturn this.post( params );\n\t\t},\n\n\t\t/**\n\t\t * Sets a site link for an item via the API.\n\t\t *\n\t\t * @param {string} fromId `Entity` id to merge from.\n\t\t * @param {string} toId `Entity` id to merge to.\n\t\t * @param {string[]|string} [ignoreConflicts] Elements of the `Item` to ignore conflicts for.\n\t\t * @param {string} [summary] Summary for the edit.\n\t\t * @return {Object} jQuery.Promise\n\t\t * @return {Function} return.done\n\t\t * @return {*} return.done.result\n\t\t * @return {jqXHR} return.done.jqXHR\n\t\t * @return {Function} return.fail\n\t\t * @return {string} return.fail.code\n\t\t * @return {*} return.fail.error\n\t\t *\n\t\t * @throws {Error} if a parameter is not specified properly.\n\t\t */\n\t\tmergeItems: function ( fromId, toId, ignoreConflicts, summary ) {\n\t\t\tif ( typeof fromId !== 'string'\n\t\t\t|| typeof toId !== 'string'\n\t\t\t|| ignoreConflicts\n\t\t\t\t&& typeof ignoreConflicts !== 'string'\n\t\t\t\t&& !Array.isArray( ignoreConflicts )\n\t\t\t|| summary && typeof summary !== 'string'\n\t\t\t) {\n\t\t\t\tthrow new Error( 'Parameter not specified properly' );\n\t\t\t}\n\n\t\t\tvar params = {\n\t\t\t\taction: 'wbmergeitems',\n\t\t\t\tfromid: fromId,\n\t\t\t\ttoid: toId\n\t\t\t};\n\n\t\t\tif ( ignoreConflicts ) {\n\t\t\t\tparams.ignoreconflicts = this.normalizeMultiValue( ignoreConflicts );\n\t\t\t}\n\n\t\t\tif ( summary ) {\n\t\t\t\tparams.summary = summary;\n\t\t\t}\n\n\t\t\tif ( this._tags.length ) {\n\t\t\t\tparams.tags = this.normalizeMultiValue( this._tags );\n\t\t\t}\n\n\t\t\treturn this.post( params );\n\t\t},\n\n\t\t/**\n\t\t * Converts the given value into a string usable by the API.\n\t\t * @private\n\t\t *\n\t\t * @param {string[]|string|null} [value]\n\t\t * @return {string}\n\t\t */\n\t\tnormalizeMultiValue: function ( value ) {\n\t\t\tif ( Array.isArray( value ) ) {\n\t\t\t\tvalue = value.join( '\\x1f' );\n\t\t\t}\n\n\t\t\t// We must enforce the alternative separation character, see ApiBase.php::explodeMultiValue.\n\t\t\treturn value ? '\\x1f' + value : '';\n\t\t},\n\n\t\t/**\n\t\t * Submits a GET request to the API with added 'errorformat' and 'uselang' parameters as\n\t\t * well as stringified options.\n\t\t *\n\t\t * @param {Object} params parameters for the API call.\n\t\t * @param {Object} [options]\n\t\t * @return {Object} jQuery.Promise\n\t\t * @return {Function} return.done\n\t\t * @return {*} return.done.result\n\t\t * @return {jqXHR} return.done.jqXHR\n\t\t * @return {Function} return.fail\n\t\t * @return {string} return.fail.code\n\t\t * @return {*} return.fail.error\n\t\t */\n\t\tget: function ( params, options ) {\n\t\t\tparams.errorformat = 'plaintext';\n\t\t\tif ( this._uselang ) {\n\t\t\t\tparams.uselang = this._uselang;\n\t\t\t}\n\n\t\t\tif ( options ) {\n\t\t\t\tparams.options = JSON.stringify( options );\n\n\t\t\t\t// override 'uselang' parameter if passed via options\n\t\t\t\tif ( options.lang ) {\n\t\t\t\t\tparams.uselang = options.lang;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn this._api.get( params );\n\t\t},\n\n\t\t/**\n\t\t * Submits the AJAX request to the API of the repo and triggers on the response. This will\n\t\t * automatically add the required 'token' information for editing into the given parameters\n\t\t * sent to the API. Additionally, it sets the 'errorformat' and 'uselang' parameters.\n\t\t *\n\t\t * @param {Object} params parameters for the API call.\n\t\t * @return {Object} jQuery.Promise\n\t\t * @return {Function} return.done\n\t\t * @return {*} return.done.result\n\t\t * @return {jqXHR} return.done.jqXHR\n\t\t * @return {Function} return.fail\n\t\t * @return {string} return.fail.code\n\t\t * @return {*} return.fail.error A plain object with information about the error if `code` is\n\t\t *         \"http\", a string, if the call was successful but the response is empty or the result\n\t\t *         result if it contains an `error` field.\n\t\t *\n\t\t * @throws {Error} if a parameter is not specified properly.\n\t\t */\n\t\tpost: function ( params ) {\n\t\t\t/**\n\t\t\t * Unconditionally set the bot parameter to match the UI behavior of core.\n\t\t\t * In normal page editing, if you have the \"bot\" user right and edit through the GUI\n\t\t\t * interface, your edit is marked as bot no matter what.\n\t\t\t * @see https://gerrit.wikimedia.org/r/71246\n\t\t\t * @see https://phabricator.wikimedia.org/T189477\n\t\t\t */\n\t\t\tparams.bot = 1;\n\n\t\t\t// assert the api user matches the browser user in case one has logged out after page load.\n\t\t\tif ( !mw.user.isAnon() ) {\n\t\t\t\tparams.assertuser = mw.user.getName();\n\t\t\t}\n\n\t\t\tparams.errorformat = 'plaintext';\n\t\t\tif ( this._uselang ) {\n\t\t\t\tparams.uselang = this._uselang;\n\t\t\t}\n\n\t\t\tObject.keys( params ).forEach( function ( key ) {\n\t\t\t\tif ( key === undefined || params[ key ] === null ) {\n\t\t\t\t\tthrow new Error( 'Parameter \"' + key + '\" is not specified properly.' );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\treturn this._api.postWithToken( 'csrf', params );\n\t\t}\n\t} );\n\n}( wikibase ) );\n","usedDeprecatedRules":[]},{"filePath":"/src/repo/src/RepoApiError.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[]},{"filePath":"/src/repo/src/getLocationAgnosticMwApi.js","messages":[{"ruleId":"jsdoc/no-undefined-types","severity":1,"message":"The type 'mediaWiki' is undefined.","line":32,"column":null,"nodeType":"Block","endLine":32,"endColumn":null}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"( function ( wb ) {\n\t'use strict';\n\n\t/**\n\t * @ignore\n\t *\n\t * @param {string} url\n\t * @return {string}\n\t */\n\tfunction getHost( url ) {\n\t\t// Internet Explorer returns an incomplete host (without port) when the protocol is missing.\n\t\tif ( /^\\/\\//.test( url ) ) {\n\t\t\turl = location.protocol + url;\n\t\t}\n\n\t\tvar parser = document.createElement( 'A' );\n\t\tparser.href = url;\n\t\treturn parser.host;\n\t}\n\n\t// TODO: Merge this into mw.Api\n\t/**\n\t * Returns a `mediaWiki.Api` instance which can transparently interact with remote APIs.\n\t * @member wikibase.api\n\t * @method getLocationAgnosticMwApi\n\t * @since 1.0\n\t * @license GPL-2.0+\n\t * @author Adrian Lang < adrian.lang@wikimedia.de >\n\t *\n\t * @param {string} apiEndpoint\n\t * @param {Object} [options]\n\t * @return {mediaWiki.Api}\n\t */\n\twb.api.getLocationAgnosticMwApi = function ( apiEndpoint, options ) {\n\t\tif ( getHost( apiEndpoint ) !== getHost( location.href ) ) {\n\t\t\t// Use mw.ForeignApi if the api we want to use is on a different domain.\n\t\t\treturn new mw.ForeignApi( apiEndpoint, options );\n\t\t}\n\n\t\tvar mwApiOptions = $.extend( {}, options, {\n\t\t\tajax: {\n\t\t\t\turl: apiEndpoint\n\t\t\t}\n\t\t} );\n\n\t\treturn new mw.Api( mwApiOptions );\n\t};\n\n}( wikibase ) );\n","usedDeprecatedRules":[]},{"filePath":"/src/repo/src/namespace.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[]},{"filePath":"/src/repo/tests/RepoApi.tests.js","messages":[{"ruleId":"jsdoc/require-param-type","severity":1,"message":"Missing JSDoc @param \"wb\" type.","line":2,"column":null,"nodeType":"Block","endLine":2,"endColumn":null},{"ruleId":"jsdoc/require-param-type","severity":1,"message":"Missing JSDoc @param \"QUnit\" type.","line":3,"column":null,"nodeType":"Block","endLine":3,"endColumn":null},{"ruleId":"jsdoc/require-param-type","severity":1,"message":"Missing JSDoc @param \"sinon\" type.","line":4,"column":null,"nodeType":"Block","endLine":4,"endColumn":null}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":"/**\n * @param wb\n * @param QUnit\n * @param sinon\n * @license GPL-2.0+\n * @author H. Snater < mediawiki@snater.com >\n */\n( function ( wb, QUnit, sinon ) {\n\t'use strict';\n\n\tQUnit.module( 'wikibase.api.RepoApi', {\n\t\tbeforeEach: function () {\n\t\t\tmw._mockUser = null;\n\t\t}\n\t} );\n\n\t/**\n * Instantiates a `wikibase.api.RepoApi` object with the relevant method being overwritten and\n * having applied a SinonJS spy.\n *\n * @param {string} [getOrPost='post'] Whether to mock/spy the `get` or `post` request.\n * @param {string[]} [tags] Which tags to configure in the RepoApi.\n * @return {Object}\n */\n\tfunction mockApi( getOrPost, tags ) {\n\t\tvar api = {\n\t\t\t\tpostWithToken: function () {},\n\t\t\t\tget: function () {}\n\t\t\t},\n\t\t\tspyMethod = getOrPost !== 'get' ? 'postWithToken' : 'get';\n\n\t\treturn {\n\t\t\tspy: sinon.spy( api, spyMethod ),\n\t\t\tapi: new wb.api.RepoApi( api, 'testlanguage', tags || [ 'a', 'b' ] )\n\t\t};\n\t}\n\n\t/**\n * Returns all request parameters submitted to the function performing the `get` or `post` request.\n *\n * @param {Object} spy The SinonJS spy to extract the parameters from.\n * @param {number} [callIndex=0] The call index if multiple API calls have been performed on the same spy.\n * @return {Object}\n */\n\tfunction getParams( spy, callIndex ) {\n\t\tcallIndex = callIndex || 0;\n\t\treturn spy.displayName === 'postWithToken' ? spy.args[ callIndex ][ 1 ] : spy.args[ callIndex ][ 0 ];\n\t}\n\n\t/**\n * Returns a specific parameter submitted to the function performing the `get` or `post` request.\n *\n * @param {Object} spy The SinonJS spy to extract the parameters from.\n * @param {string} paramName\n * @param {number} [callIndex=0] The call index if multiple API calls have been performed on the same spy.\n * @return {string}\n */\n\tfunction getParam( spy, paramName, callIndex ) {\n\t\treturn getParams( spy, callIndex || 0 )[ paramName ];\n\t}\n\n\tQUnit.test( 'createEntity()', function ( assert ) {\n\t\tvar mock = mockApi();\n\n\t\tmock.api.createEntity( 'item' );\n\t\tmock.api.createEntity( 'property', { 'I am': 'data' } );\n\n\t\tassert.true( mock.spy.calledTwice, 'Triggered API calls.' );\n\n\t\tassert.strictEqual(\n\t\t\tgetParam( mock.spy, 'action' ),\n\t\t\t'wbeditentity',\n\t\t\t'Verified API module being called.'\n\t\t);\n\n\t\tassert.strictEqual(\n\t\t\tgetParam( mock.spy, 'new' ),\n\t\t\t'item',\n\t\t\t'Verified submitting entity type.'\n\t\t);\n\n\t\tassert.strictEqual(\n\t\t\tgetParam( mock.spy, 'data' ),\n\t\t\tJSON.stringify( {} ),\n\t\t\t'Verified not submitting any data by default.'\n\t\t);\n\n\t\tassert.strictEqual(\n\t\t\tgetParam( mock.spy, 'data', 1 ),\n\t\t\tJSON.stringify( { 'I am': 'data' } ),\n\t\t\t'Verified submitting \"data\" field.'\n\t\t);\n\n\t\tassert.strictEqual( getParam( mock.spy, 'errorformat' ), 'plaintext' );\n\t\tassert.strictEqual( getParam( mock.spy, 'uselang' ), 'testlanguage' );\n\t\tassert.strictEqual( getParam( mock.spy, 'tags' ), '\\x1fa\\x1fb' );\n\t} );\n\n\tQUnit.test( 'editEntity()', function ( assert ) {\n\t\tvar mock = mockApi();\n\n\t\tmock.api.editEntity( 'entity id', 12345, { 'I am': 'entity data' }, true );\n\n\t\tassert.true( mock.spy.calledOnce, 'Triggered API call.' );\n\n\t\tassert.strictEqual(\n\t\t\tgetParam( mock.spy, 'action' ),\n\t\t\t'wbeditentity',\n\t\t\t'Verified API module being called.'\n\t\t);\n\n\t\tassert.strictEqual( getParam( mock.spy, 'id' ), 'entity id' );\n\t\tassert.strictEqual( getParam( mock.spy, 'baserevid' ), 12345 );\n\t\tassert.strictEqual( getParam( mock.spy, 'data' ), JSON.stringify( { 'I am': 'entity data' } ) );\n\t\tassert.strictEqual( getParam( mock.spy, 'clear' ), true );\n\t\tassert.strictEqual( getParam( mock.spy, 'errorformat' ), 'plaintext' );\n\t\tassert.strictEqual( getParam( mock.spy, 'uselang' ), 'testlanguage' );\n\t\tassert.strictEqual( getParam( mock.spy, 'tags' ), '\\x1fa\\x1fb' );\n\t} );\n\n\tQUnit.test( 'formatValue()', function ( assert ) {\n\t\tvar mock = mockApi( 'get' );\n\n\t\tmock.api.formatValue(\n\t\t\t{ 'I am': 'DataValue serialization' },\n\t\t\t{ lang: 'language code', option: 'option value' },\n\t\t\t'data type id',\n\t\t\t'output format'\n\t\t);\n\n\t\tmock.api.formatValue( { 'I am': 'DataValue serialization' } );\n\n\t\t// make sure that property id overrides data type id\n\t\tmock.api.formatValue(\n\t\t\t{ 'I am': 'DataValue serialization' },\n\t\t\t{ option: 'option value' },\n\t\t\t'data type id',\n\t\t\t'output format',\n\t\t\t'property id'\n\t\t);\n\n\t\tassert.true( mock.spy.calledThrice, 'Triggered API call.' );\n\n\t\tassert.strictEqual(\n\t\t\tgetParam( mock.spy, 'action' ),\n\t\t\t'wbformatvalue',\n\t\t\t'Verified API module being called.'\n\t\t);\n\n\t\tassert.strictEqual(\n\t\t\tgetParam( mock.spy, 'datavalue' ),\n\t\t\tJSON.stringify( { 'I am': 'DataValue serialization' } )\n\t\t);\n\t\tassert.strictEqual(\n\t\t\tgetParam( mock.spy, 'options' ),\n\t\t\tJSON.stringify( { lang: 'language code', option: 'option value' } )\n\t\t);\n\t\tassert.strictEqual( getParam( mock.spy, 'datatype' ), 'data type id' );\n\t\tassert.strictEqual( getParam( mock.spy, 'generate' ), 'output format' );\n\t\tassert.strictEqual( getParam( mock.spy, 'property' ), undefined );\n\t\tassert.strictEqual( getParam( mock.spy, 'errorformat' ), 'plaintext' );\n\t\tassert.strictEqual( getParam( mock.spy, 'uselang' ), 'language code' );\n\n\t\tassert.strictEqual(\n\t\t\tgetParam( mock.spy, 'datavalue', 1 ),\n\t\t\tJSON.stringify( { 'I am': 'DataValue serialization' } )\n\t\t);\n\t\tassert.strictEqual( getParam( mock.spy, 'options', 1 ), undefined );\n\t\tassert.strictEqual( getParam( mock.spy, 'datatype', 1 ), undefined );\n\t\tassert.strictEqual( getParam( mock.spy, 'generate', 1 ), undefined );\n\t\tassert.strictEqual( getParam( mock.spy, 'property', 1 ), undefined );\n\n\t\tassert.strictEqual(\n\t\t\tgetParam( mock.spy, 'datavalue', 2 ),\n\t\t\tJSON.stringify( { 'I am': 'DataValue serialization' } )\n\t\t);\n\t\tassert.strictEqual(\n\t\t\tgetParam( mock.spy, 'options', 2 ),\n\t\t\tJSON.stringify( { option: 'option value' } )\n\t\t);\n\t\tassert.strictEqual( getParam( mock.spy, 'datatype', 2 ), undefined );\n\t\tassert.strictEqual( getParam( mock.spy, 'generate', 2 ), 'output format' );\n\t\tassert.strictEqual( getParam( mock.spy, 'property', 2 ), 'property id' );\n\t} );\n\n\tQUnit.test( 'getEntities()', function ( assert ) {\n\t\tvar mock = mockApi( 'get' );\n\n\t\tmock.api.getEntities(\n\t\t\t[ 'entity id 1', 'entity id 2' ],\n\t\t\t[ 'property1', 'property2' ],\n\t\t\t[ 'language code 1', 'language code 2' ]\n\t\t);\n\n\t\tmock.api.getEntities(\n\t\t\t'entity id',\n\t\t\t'property',\n\t\t\t'language code'\n\t\t);\n\n\t\tmock.api.getEntities( 'entity id' );\n\n\t\tassert.true( mock.spy.calledThrice, 'Triggered API calls.' );\n\n\t\tassert.strictEqual(\n\t\t\tgetParam( mock.spy, 'action' ),\n\t\t\t'wbgetentities',\n\t\t\t'Verified API module being called.'\n\t\t);\n\n\t\tassert.strictEqual( getParam( mock.spy, 'ids' ), '\\x1fentity id 1\\x1fentity id 2' );\n\t\tassert.strictEqual( getParam( mock.spy, 'props' ), '\\x1fproperty1\\x1fproperty2' );\n\t\tassert.strictEqual( getParam( mock.spy, 'languages' ), '\\x1flanguage code 1\\x1flanguage code 2' );\n\t\tassert.strictEqual( getParam( mock.spy, 'errorformat' ), 'plaintext' );\n\t\tassert.strictEqual( getParam( mock.spy, 'uselang' ), 'testlanguage' );\n\n\t\tassert.strictEqual( getParam( mock.spy, 'ids', 1 ), '\\x1fentity id' );\n\t\tassert.strictEqual( getParam( mock.spy, 'props', 1 ), '\\x1fproperty' );\n\t\tassert.strictEqual( getParam( mock.spy, 'languages', 1 ), '\\x1flanguage code' );\n\n\t\tassert.strictEqual( getParam( mock.spy, 'ids', 2 ), '\\x1fentity id' );\n\t\tassert.strictEqual( getParam( mock.spy, 'props', 2 ), undefined );\n\t\tassert.strictEqual( getParam( mock.spy, 'languages', 2 ), undefined );\n\t} );\n\n\tQUnit.test( 'getEntitiesByPage()', function ( assert ) {\n\t\tvar mock = mockApi( 'get' );\n\n\t\tmock.api.getEntitiesByPage(\n\t\t\t[ 'site id 1', 'site id 2' ],\n\t\t\t'title',\n\t\t\t[ 'property1', 'property2' ],\n\t\t\t[ 'language code 1', 'language code 2' ],\n\t\t\ttrue\n\t\t);\n\n\t\tmock.api.getEntitiesByPage(\n\t\t\t'site id',\n\t\t\t[ 'title1', 'title2' ],\n\t\t\t[ 'property1', 'property2' ],\n\t\t\t[ 'language code 1', 'language code 2' ],\n\t\t\ttrue\n\t\t);\n\n\t\tmock.api.getEntitiesByPage(\n\t\t\t'site id',\n\t\t\t'title',\n\t\t\t'property',\n\t\t\t'language code',\n\t\t\tfalse\n\t\t);\n\n\t\tmock.api.getEntitiesByPage( 'site id', 'title' );\n\t\tmock.api.getEntitiesByPage( [ 'site id' ], 'title' );\n\t\tmock.api.getEntitiesByPage( 'site id', [ 'title' ] );\n\n\t\tassert.strictEqual( mock.spy.callCount, 6, 'Triggered API calls.' );\n\n\t\tassert.strictEqual(\n\t\t\tgetParam( mock.spy, 'action' ),\n\t\t\t'wbgetentities',\n\t\t\t'Verified API module being called.'\n\t\t);\n\n\t\tassert.strictEqual( getParam( mock.spy, 'sites' ), '\\x1fsite id 1\\x1fsite id 2' );\n\t\tassert.strictEqual( getParam( mock.spy, 'titles' ), '\\x1ftitle' );\n\t\tassert.strictEqual( getParam( mock.spy, 'props' ), '\\x1fproperty1\\x1fproperty2' );\n\t\tassert.strictEqual( getParam( mock.spy, 'languages' ), '\\x1flanguage code 1\\x1flanguage code 2' );\n\t\tassert.strictEqual( getParam( mock.spy, 'normalize' ), true );\n\t\tassert.strictEqual( getParam( mock.spy, 'errorformat' ), 'plaintext' );\n\t\tassert.strictEqual( getParam( mock.spy, 'uselang' ), 'testlanguage' );\n\n\t\tassert.strictEqual( getParam( mock.spy, 'sites', 1 ), '\\x1fsite id' );\n\t\tassert.strictEqual( getParam( mock.spy, 'titles', 1 ), '\\x1ftitle1\\x1ftitle2' );\n\t\tassert.strictEqual( getParam( mock.spy, 'props', 1 ), '\\x1fproperty1\\x1fproperty2' );\n\t\tassert.strictEqual( getParam( mock.spy, 'languages' ), '\\x1flanguage code 1\\x1flanguage code 2' );\n\t\tassert.strictEqual( getParam( mock.spy, 'normalize', 1 ), true );\n\n\t\tassert.strictEqual( getParam( mock.spy, 'sites', 2 ), '\\x1fsite id' );\n\t\tassert.strictEqual( getParam( mock.spy, 'titles', 2 ), '\\x1ftitle' );\n\t\tassert.strictEqual( getParam( mock.spy, 'props', 2 ), '\\x1fproperty' );\n\t\tassert.strictEqual( getParam( mock.spy, 'languages', 2 ), '\\x1flanguage code' );\n\t\tassert.strictEqual( getParam( mock.spy, 'normalize', 2 ), false );\n\n\t\tassert.strictEqual( getParam( mock.spy, 'sites', 3 ), '\\x1fsite id' );\n\t\tassert.strictEqual( getParam( mock.spy, 'titles', 3 ), '\\x1ftitle' );\n\t\tassert.strictEqual( getParam( mock.spy, 'props', 3 ), undefined );\n\t\tassert.strictEqual( getParam( mock.spy, 'languages', 3 ), undefined );\n\t\tassert.strictEqual( getParam( mock.spy, 'normalize', 3 ), undefined );\n\n\t\tassert.strictEqual( getParam( mock.spy, 'sites', 4 ), '\\x1fsite id' );\n\t\tassert.strictEqual( getParam( mock.spy, 'titles', 4 ), '\\x1ftitle' );\n\t\tassert.strictEqual( getParam( mock.spy, 'props', 4 ), undefined );\n\t\tassert.strictEqual( getParam( mock.spy, 'languages', 4 ), undefined );\n\t\tassert.strictEqual( getParam( mock.spy, 'normalize', 4 ), undefined );\n\n\t\tassert.strictEqual( getParam( mock.spy, 'sites', 5 ), '\\x1fsite id' );\n\t\tassert.strictEqual( getParam( mock.spy, 'titles', 5 ), '\\x1ftitle' );\n\t\tassert.strictEqual( getParam( mock.spy, 'props', 5 ), undefined );\n\t\tassert.strictEqual( getParam( mock.spy, 'languages', 5 ), undefined );\n\t\tassert.strictEqual( getParam( mock.spy, 'normalize', 5 ), undefined );\n\t} );\n\n\tQUnit.test( 'parseValue()', function ( assert ) {\n\t\tvar mock = mockApi( 'get' );\n\n\t\tmock.api.parseValue(\n\t\t\t'parser id',\n\t\t\t[ 'serialization1', 'serialization2' ],\n\t\t\t{ lang: 'language code', option: 'option value' }\n\t\t);\n\t\tmock.api.parseValue( 'parser id', [ 'serialization with p|pe' ] );\n\n\t\tassert.true( mock.spy.calledTwice, 'Triggered API call.' );\n\n\t\tassert.strictEqual(\n\t\t\tgetParam( mock.spy, 'action' ),\n\t\t\t'wbparsevalue',\n\t\t\t'Verified API module being called.'\n\t\t);\n\n\t\tassert.strictEqual( getParam( mock.spy, 'parser' ), 'parser id' );\n\t\tassert.strictEqual( getParam( mock.spy, 'values' ), '\\x1fserialization1\\x1fserialization2' );\n\t\tassert.strictEqual( getParam( mock.spy, 'errorformat' ), 'plaintext' );\n\t\tassert.strictEqual( getParam( mock.spy, 'uselang' ), 'language code' );\n\t\tassert.strictEqual(\n\t\t\tgetParam( mock.spy, 'options' ),\n\t\t\tJSON.stringify( { lang: 'language code', option: 'option value' } )\n\t\t);\n\n\t\tassert.strictEqual( getParam( mock.spy, 'parser', 1 ), 'parser id' );\n\t\tassert.strictEqual( getParam( mock.spy, 'values', 1 ), '\\x1fserialization with p|pe' );\n\t\tassert.strictEqual( getParam( mock.spy, 'errorformat', 1 ), 'plaintext' );\n\t\tassert.strictEqual( getParam( mock.spy, 'uselang', 1 ), 'testlanguage' );\n\t\tassert.strictEqual( getParam( mock.spy, 'options', 1 ), undefined );\n\t} );\n\n\tQUnit.test( 'setLabel(), setDescription()', function ( assert ) {\n\t\tvar subjects = [ 'Label', 'Description' ];\n\n\t\tfor ( var i = 0; i < subjects.length; i++ ) {\n\t\t\tvar mock = mockApi();\n\n\t\t\tmock.api[ 'set' + subjects[ i ] ]( 'entity id', 12345, 'text', 'language code' );\n\n\t\t\tassert.true( mock.spy.calledOnce, 'Triggered API call.' );\n\n\t\t\tassert.strictEqual(\n\t\t\t\tgetParam( mock.spy, 'action' ),\n\t\t\t\t'wbset' + subjects[ i ].toLowerCase(),\n\t\t\t\t'Verified API module being called.'\n\t\t\t);\n\n\t\t\tassert.strictEqual( getParam( mock.spy, 'id' ), 'entity id' );\n\t\t\tassert.strictEqual( getParam( mock.spy, 'baserevid' ), 12345 );\n\t\t\tassert.strictEqual( getParam( mock.spy, 'value' ), 'text' );\n\t\t\tassert.strictEqual( getParam( mock.spy, 'language' ), 'language code' );\n\t\t\tassert.strictEqual( getParam( mock.spy, 'tags' ), '\\x1fa\\x1fb' );\n\t\t}\n\t} );\n\n\tQUnit.test( 'setAliases()', function ( assert ) {\n\t\tvar mock = mockApi();\n\n\t\tmock.api.setAliases(\n\t\t\t'entity id', 12345, [ 'alias1', 'alias2' ], [ 'alias-remove with p|pe' ], 'language code'\n\t\t);\n\n\t\tassert.true( mock.spy.calledOnce, 'Triggered API call.' );\n\n\t\tassert.strictEqual(\n\t\t\tgetParam( mock.spy, 'action' ),\n\t\t\t'wbsetaliases',\n\t\t\t'Verified API module being called.'\n\t\t);\n\n\t\tassert.strictEqual( getParam( mock.spy, 'id' ), 'entity id' );\n\t\tassert.strictEqual( getParam( mock.spy, 'baserevid' ), 12345 );\n\t\tassert.strictEqual( getParam( mock.spy, 'add' ), '\\x1falias1\\x1falias2' );\n\t\tassert.strictEqual( getParam( mock.spy, 'remove' ), '\\x1falias-remove with p|pe' );\n\t\tassert.strictEqual( getParam( mock.spy, 'language' ), 'language code' );\n\t\tassert.strictEqual( getParam( mock.spy, 'errorformat' ), 'plaintext' );\n\t\tassert.strictEqual( getParam( mock.spy, 'uselang' ), 'testlanguage' );\n\t\tassert.strictEqual( getParam( mock.spy, 'tags' ), '\\x1fa\\x1fb' );\n\t} );\n\n\tQUnit.test( 'setClaim()', function ( assert ) {\n\t\tvar mock = mockApi();\n\n\t\tmock.api.setClaim( { 'I am': 'a Claim serialization' }, 12345, 67890 );\n\t\tmock.api.setClaim( { 'I am': 'a Claim serialization' }, 12345 );\n\n\t\tassert.true( mock.spy.calledTwice, 'Triggered API call.' );\n\n\t\tassert.strictEqual(\n\t\t\tgetParam( mock.spy, 'action' ),\n\t\t\t'wbsetclaim',\n\t\t\t'Verified API module being called.'\n\t\t);\n\n\t\tassert.strictEqual(\n\t\t\tgetParam( mock.spy, 'claim' ),\n\t\t\tJSON.stringify( { 'I am': 'a Claim serialization' } )\n\t\t);\n\t\tassert.strictEqual( getParam( mock.spy, 'baserevid' ), 12345 );\n\t\tassert.strictEqual( getParam( mock.spy, 'index' ), 67890 );\n\t\tassert.strictEqual( getParam( mock.spy, 'errorformat' ), 'plaintext' );\n\t\tassert.strictEqual( getParam( mock.spy, 'uselang' ), 'testlanguage' );\n\t\tassert.strictEqual( getParam( mock.spy, 'tags' ), '\\x1fa\\x1fb' );\n\n\t\tassert.strictEqual(\n\t\t\tgetParam( mock.spy, 'claim', 1 ),\n\t\t\tJSON.stringify( { 'I am': 'a Claim serialization' } )\n\t\t);\n\t\tassert.strictEqual( getParam( mock.spy, 'baserevid', 1 ), 12345 );\n\t\tassert.strictEqual( getParam( mock.spy, 'index', 1 ), undefined );\n\t} );\n\n\tQUnit.test( 'removeClaim()', function ( assert ) {\n\t\tvar mock = mockApi();\n\n\t\tmock.api.removeClaim( 'claim GUID', 12345 );\n\t\tmock.api.removeClaim( 'claim GUID' );\n\n\t\tassert.true( mock.spy.calledTwice, 'Triggered API call.' );\n\n\t\tassert.strictEqual(\n\t\t\tgetParam( mock.spy, 'action' ),\n\t\t\t'wbremoveclaims',\n\t\t\t'Verified API module being called.'\n\t\t);\n\n\t\tassert.strictEqual( getParam( mock.spy, 'claim' ), 'claim GUID' );\n\t\tassert.strictEqual( getParam( mock.spy, 'baserevid' ), 12345 );\n\t\tassert.strictEqual( getParam( mock.spy, 'errorformat' ), 'plaintext' );\n\t\tassert.strictEqual( getParam( mock.spy, 'uselang' ), 'testlanguage' );\n\t\tassert.strictEqual( getParam( mock.spy, 'tags' ), '\\x1fa\\x1fb' );\n\n\t\tassert.strictEqual( getParam( mock.spy, 'claim', 1 ), 'claim GUID' );\n\t\tassert.strictEqual( getParam( mock.spy, 'baserevid', 1 ), undefined );\n\t} );\n\n\tQUnit.test( 'removeClaim() without tags', function ( assert ) {\n\t\tvar mock = mockApi( undefined, [] );\n\n\t\tmock.api.removeClaim( 'claim GUID', 12345 );\n\n\t\tassert.true( mock.spy.calledOnce, 'Triggered API call.' );\n\n\t\tassert.strictEqual( getParam( mock.spy, 'action' ), 'wbremoveclaims' );\n\t\tassert.strictEqual( getParam( mock.spy, 'tags' ), undefined );\n\t} );\n\n\tQUnit.test( 'setSitelink()', function ( assert ) {\n\t\tvar mock = mockApi();\n\n\t\tmock.api.setSitelink(\n\t\t\t'entity id', 12345, 'site id', 'page name', [ 'entity id of badge1', 'entity id of badge 2' ]\n\t\t);\n\t\tmock.api.setSitelink( 'entity id', 12345, 'site id', 'page name' );\n\n\t\tassert.true( mock.spy.calledTwice, 'Triggered API call.' );\n\n\t\tassert.strictEqual(\n\t\t\tgetParam( mock.spy, 'action' ),\n\t\t\t'wbsetsitelink',\n\t\t\t'Verified API module being called.'\n\t\t);\n\n\t\tassert.strictEqual( getParam( mock.spy, 'id' ), 'entity id' );\n\t\tassert.strictEqual( getParam( mock.spy, 'baserevid' ), 12345 );\n\t\tassert.strictEqual( getParam( mock.spy, 'linksite' ), 'site id' );\n\t\tassert.strictEqual( getParam( mock.spy, 'linktitle' ), 'page name' );\n\t\tassert.strictEqual(\n\t\t\tgetParam( mock.spy, 'badges' ),\n\t\t\t'\\x1fentity id of badge1\\x1fentity id of badge 2'\n\t\t);\n\t\tassert.strictEqual( getParam( mock.spy, 'errorformat' ), 'plaintext' );\n\t\tassert.strictEqual( getParam( mock.spy, 'uselang' ), 'testlanguage' );\n\t\tassert.strictEqual( getParam( mock.spy, 'tags' ), '\\x1fa\\x1fb' );\n\n\t\tassert.strictEqual( getParam( mock.spy, 'id', 1 ), 'entity id' );\n\t\tassert.strictEqual( getParam( mock.spy, 'baserevid', 1 ), 12345 );\n\t\tassert.strictEqual( getParam( mock.spy, 'linksite', 1 ), 'site id' );\n\t\tassert.strictEqual( getParam( mock.spy, 'linktitle', 1 ), 'page name' );\n\t\tassert.strictEqual( getParam( mock.spy, 'badges', 1 ), undefined );\n\t} );\n\n\tQUnit.test( 'mergeItems() - no ignoreConflicts', function ( assert ) {\n\t\tvar mock = mockApi();\n\n\t\tmock.api.mergeItems( 'entity id from', 'entity id to' );\n\n\t\tassert.true( mock.spy.calledOnce, 'Triggered API calls.' );\n\n\t\tassert.strictEqual(\n\t\t\tgetParam( mock.spy, 'action' ),\n\t\t\t'wbmergeitems',\n\t\t\t'Verified API module being called.'\n\t\t);\n\n\t\tassert.strictEqual( getParam( mock.spy, 'fromid' ), 'entity id from' );\n\t\tassert.strictEqual( getParam( mock.spy, 'toid' ), 'entity id to' );\n\t\tassert.strictEqual( getParam( mock.spy, 'ignoreconflicts' ), undefined );\n\t\tassert.strictEqual( getParam( mock.spy, 'summary' ), undefined );\n\t\tassert.strictEqual( getParam( mock.spy, 'errorformat' ), 'plaintext' );\n\t\tassert.strictEqual( getParam( mock.spy, 'uselang' ), 'testlanguage' );\n\t\tassert.strictEqual( getParam( mock.spy, 'tags' ), '\\x1fa\\x1fb' );\n\t} );\n\n\tQUnit.test( 'mergeItems() - single ignoreConflicts', function ( assert ) {\n\t\tvar mock = mockApi();\n\n\t\tmock.api.mergeItems(\n\t\t\t'entity id from',\n\t\t\t'entity id to',\n\t\t\t'property to ignore conflict for',\n\t\t\t'edit summary'\n\t\t);\n\n\t\tassert.true( mock.spy.calledOnce, 'Triggered API calls.' );\n\n\t\tassert.strictEqual(\n\t\t\tgetParam( mock.spy, 'action' ),\n\t\t\t'wbmergeitems',\n\t\t\t'Verified API module being called.'\n\t\t);\n\n\t\tassert.strictEqual( getParam( mock.spy, 'fromid' ), 'entity id from' );\n\t\tassert.strictEqual( getParam( mock.spy, 'toid' ), 'entity id to' );\n\t\tassert.strictEqual(\n\t\t\tgetParam( mock.spy, 'ignoreconflicts' ),\n\t\t\t'\\x1fproperty to ignore conflict for'\n\t\t);\n\t\tassert.strictEqual( getParam( mock.spy, 'summary' ), 'edit summary' );\n\t} );\n\n\tQUnit.test( 'mergeItems() - multiple ignoreConflicts', function ( assert ) {\n\t\tvar mock = mockApi();\n\n\t\tmock.api.mergeItems(\n\t\t\t'entity id from',\n\t\t\t'entity id to',\n\t\t\t[ 'property to ignore conflict for 1', 'property to ignore conflict for 2' ],\n\t\t\t'edit summary'\n\t\t);\n\n\t\tassert.true( mock.spy.calledOnce, 'Triggered API calls.' );\n\n\t\tassert.strictEqual(\n\t\t\tgetParam( mock.spy, 'action' ),\n\t\t\t'wbmergeitems',\n\t\t\t'Verified API module being called.'\n\t\t);\n\n\t\tassert.strictEqual( getParam( mock.spy, 'fromid' ), 'entity id from' );\n\t\tassert.strictEqual( getParam( mock.spy, 'toid' ), 'entity id to' );\n\t\tassert.strictEqual(\n\t\t\tgetParam( mock.spy, 'ignoreconflicts' ),\n\t\t\t'\\x1fproperty to ignore conflict for 1\\x1fproperty to ignore conflict for 2'\n\t\t);\n\t\tassert.strictEqual( getParam( mock.spy, 'summary' ), 'edit summary' );\n\t} );\n\n\tQUnit.test( 'normalizeMultiValue()', function ( assert ) {\n\t\tvar mock = mockApi();\n\n\t\tassert.strictEqual( mock.api.normalizeMultiValue( [] ), '', 'empty array -> empty string' );\n\t\tassert.strictEqual(\n\t\t\tmock.api.normalizeMultiValue( [ 'val1', 'val2' ] ),\n\t\t\t'\\x1fval1\\x1fval2',\n\t\t\t'array values are prefixed with `\\\\x1f`'\n\t\t);\n\t} );\n\n\tQUnit.test( 'check post asserts user when logged in ', function ( assert ) {\n\t\tvar mock = mockApi();\n\t\tmw._mockUser = 'fooBarUser';\n\t\tmock.api.post( { action: 'foobar' } );\n\t\tassert.strictEqual( getParam( mock.spy, 'assertuser' ), 'fooBarUser' );\n\t} );\n\n\tQUnit.test( 'check post does not assert user when not logged in ', function ( assert ) {\n\t\tvar mock = mockApi();\n\n\t\tmock.api.post( { action: 'foobar' } );\n\t\tassert.strictEqual( getParam( mock.spy, 'assertuser' ), undefined );\n\t} );\n\n}( wikibase, QUnit, sinon ) );\n","usedDeprecatedRules":[]},{"filePath":"/src/repo/tests/RepoApiError.tests.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[]},{"filePath":"/src/repo/tests/mediaWiki.mock.js","messages":[],"suppressedMessages":[{"ruleId":"no-implicit-globals","severity":2,"message":"Unexpected assignment to read-only global variable.","line":2,"column":1,"nodeType":"AssignmentExpression","messageId":"assignmentToReadonlyGlobal","endLine":20,"endColumn":2,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-global-assign","severity":2,"message":"Read-only global 'mw' should not be modified.","line":2,"column":1,"nodeType":"Identifier","messageId":"globalShouldNotBeModified","endLine":2,"endColumn":3,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[]}]

--- end ---
$ /usr/bin/npm ci --legacy-peer-deps
--- stderr ---
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated phantomjs-prebuilt@2.1.16: this package is now deprecated
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated puppeteer@5.5.0: Version no longer supported. Upgrade to @latest
--- stdout ---

added 412 packages, and audited 413 packages in 10s

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

2 moderate severity vulnerabilities

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.

--- end ---
$ /usr/bin/npm test
--- stdout ---

> wikibase-api@3.1.1 test
> grunt test

Running "eslint:all" (eslint) task

/src/repo/src/FormatValueCaller.js
  15:0  warning  The type 'dataTypes' is undefined   jsdoc/no-undefined-types
  31:0  warning  The type 'dataTypes' is undefined   jsdoc/no-undefined-types
  41:0  warning  The type 'dataValues' is undefined  jsdoc/no-undefined-types

/src/repo/src/RepoApi.js
   24:0  warning  The type 'mediaWiki' is undefined         jsdoc/no-undefined-types
   31:3  warning  Potential timing attack, left side: true  security/detect-possible-timing-attacks
   42:0  warning  The type 'mediaWiki' is undefined         jsdoc/no-undefined-types
   67:0  warning  The type 'jqXHR' is undefined             jsdoc/no-undefined-types
  102:0  warning  The type 'jqXHR' is undefined             jsdoc/no-undefined-types
  148:0  warning  The type 'jqXHR' is undefined             jsdoc/no-undefined-types
  196:0  warning  The type 'jqXHR' is undefined             jsdoc/no-undefined-types
  244:0  warning  The type 'jqXHR' is undefined             jsdoc/no-undefined-types
  293:0  warning  The type 'jqXHR' is undefined             jsdoc/no-undefined-types
  328:0  warning  The type 'jqXHR' is undefined             jsdoc/no-undefined-types
  370:0  warning  The type 'jqXHR' is undefined             jsdoc/no-undefined-types
  414:0  warning  The type 'jqXHR' is undefined             jsdoc/no-undefined-types
  458:0  warning  The type 'jqXHR' is undefined             jsdoc/no-undefined-types
  495:0  warning  The type 'jqXHR' is undefined             jsdoc/no-undefined-types
  537:0  warning  The type 'jqXHR' is undefined             jsdoc/no-undefined-types
  583:0  warning  The type 'jqXHR' is undefined             jsdoc/no-undefined-types
  647:0  warning  The type 'jqXHR' is undefined             jsdoc/no-undefined-types
  679:0  warning  The type 'jqXHR' is undefined             jsdoc/no-undefined-types

/src/repo/src/getLocationAgnosticMwApi.js
  32:0  warning  The type 'mediaWiki' is undefined  jsdoc/no-undefined-types

/src/repo/tests/RepoApi.tests.js
  2:0  warning  Missing JSDoc @param "wb" type     jsdoc/require-param-type
  3:0  warning  Missing JSDoc @param "QUnit" type  jsdoc/require-param-type
  4:0  warning  Missing JSDoc @param "sinon" type  jsdoc/require-param-type

✖ 25 problems (0 errors, 25 warnings)


Running "qunit:all" (qunit) task
Testing tests/index.html Failed to load resource: net::ERR_FILE_NOT_FOUND
.......................OK
>> 23 tests completed with 0 failed, 0 skipped, and 0 todo. 
>> 206 assertions (in 62ms), passed: 206, failed: 0

Done.

--- end ---
$ /usr/bin/npm audit --json --legacy-peer-deps
--- stdout ---
{
  "auditReportVersion": 2,
  "vulnerabilities": {
    "phantomjs-prebuilt": {
      "name": "phantomjs-prebuilt",
      "severity": "moderate",
      "isDirect": true,
      "via": [
        "request"
      ],
      "effects": [],
      "range": "*",
      "nodes": [
        "node_modules/phantomjs-prebuilt"
      ],
      "fixAvailable": false
    },
    "request": {
      "name": "request",
      "severity": "moderate",
      "isDirect": false,
      "via": [
        {
          "source": 1091725,
          "name": "request",
          "dependency": "request",
          "title": "Server-Side Request Forgery in Request",
          "url": "https://github.com/advisories/GHSA-p8p7-x288-28g6",
          "severity": "moderate",
          "cwe": [
            "CWE-918"
          ],
          "cvss": {
            "score": 6.1,
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
          },
          "range": "<=2.88.2"
        }
      ],
      "effects": [
        "phantomjs-prebuilt"
      ],
      "range": "*",
      "nodes": [
        "node_modules/request"
      ],
      "fixAvailable": false
    }
  },
  "metadata": {
    "vulnerabilities": {
      "info": 0,
      "low": 0,
      "moderate": 2,
      "high": 0,
      "critical": 0,
      "total": 2
    },
    "dependencies": {
      "prod": 3,
      "dev": 410,
      "optional": 2,
      "peer": 0,
      "peerOptional": 0,
      "total": 412
    }
  }
}

--- end ---
Attempting to npm audit fix
$ /usr/bin/npm audit fix --dry-run --only=dev --json --legacy-peer-deps
--- stderr ---
npm WARN invalid config only="dev" set in command line options
npm WARN invalid config Must be one of: null, prod, production
--- stdout ---
{
  "added": 0,
  "removed": 0,
  "changed": 0,
  "audited": 413,
  "funding": 49,
  "audit": {
    "auditReportVersion": 2,
    "vulnerabilities": {
      "phantomjs-prebuilt": {
        "name": "phantomjs-prebuilt",
        "severity": "moderate",
        "isDirect": true,
        "via": [
          "request"
        ],
        "effects": [],
        "range": "*",
        "nodes": [
          "node_modules/phantomjs-prebuilt"
        ],
        "fixAvailable": false
      },
      "request": {
        "name": "request",
        "severity": "moderate",
        "isDirect": false,
        "via": [
          {
            "source": 1091725,
            "name": "request",
            "dependency": "request",
            "title": "Server-Side Request Forgery in Request",
            "url": "https://github.com/advisories/GHSA-p8p7-x288-28g6",
            "severity": "moderate",
            "cwe": [
              "CWE-918"
            ],
            "cvss": {
              "score": 6.1,
              "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
            },
            "range": "<=2.88.2"
          }
        ],
        "effects": [
          "phantomjs-prebuilt"
        ],
        "range": "*",
        "nodes": [
          "node_modules/request"
        ],
        "fixAvailable": false
      }
    },
    "metadata": {
      "vulnerabilities": {
        "info": 0,
        "low": 0,
        "moderate": 2,
        "high": 0,
        "critical": 0,
        "total": 2
      },
      "dependencies": {
        "prod": 3,
        "dev": 410,
        "optional": 2,
        "peer": 0,
        "peerOptional": 0,
        "total": 412
      }
    }
  }
}

--- end ---
{"added": 0, "removed": 0, "changed": 0, "audited": 413, "funding": 49, "audit": {"auditReportVersion": 2, "vulnerabilities": {"phantomjs-prebuilt": {"name": "phantomjs-prebuilt", "severity": "moderate", "isDirect": true, "via": ["request"], "effects": [], "range": "*", "nodes": ["node_modules/phantomjs-prebuilt"], "fixAvailable": false}, "request": {"name": "request", "severity": "moderate", "isDirect": false, "via": [{"source": 1091725, "name": "request", "dependency": "request", "title": "Server-Side Request Forgery in Request", "url": "https://github.com/advisories/GHSA-p8p7-x288-28g6", "severity": "moderate", "cwe": ["CWE-918"], "cvss": {"score": 6.1, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"}, "range": "<=2.88.2"}], "effects": ["phantomjs-prebuilt"], "range": "*", "nodes": ["node_modules/request"], "fixAvailable": false}}, "metadata": {"vulnerabilities": {"info": 0, "low": 0, "moderate": 2, "high": 0, "critical": 0, "total": 2}, "dependencies": {"prod": 3, "dev": 410, "optional": 2, "peer": 0, "peerOptional": 0, "total": 412}}}}
$ /usr/bin/npm audit fix --only=dev --legacy-peer-deps
--- stderr ---
npm WARN invalid config only="dev" set in command line options
npm WARN invalid config Must be one of: null, prod, production
--- stdout ---

up to date, audited 413 packages in 950ms

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

# npm audit report

request  *
Severity: moderate
Server-Side Request Forgery in Request - https://github.com/advisories/GHSA-p8p7-x288-28g6
No fix available
node_modules/request
  phantomjs-prebuilt  *
  Depends on vulnerable versions of request
  node_modules/phantomjs-prebuilt

2 moderate severity vulnerabilities

Some issues need review, and may require choosing
a different dependency.

--- end ---
$ package-lock-lint package-lock.json
--- stdout ---
Checking package-lock.json

--- end ---
Verifying that tests still pass
$ /usr/bin/npm ci --legacy-peer-deps
--- stderr ---
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated phantomjs-prebuilt@2.1.16: this package is now deprecated
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated puppeteer@5.5.0: Version no longer supported. Upgrade to @latest
--- stdout ---

added 412 packages, and audited 413 packages in 11s

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

2 moderate severity vulnerabilities

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.

--- end ---
$ /usr/bin/npm test
--- stdout ---

> wikibase-api@3.1.1 test
> grunt test

Running "eslint:all" (eslint) task

/src/repo/src/FormatValueCaller.js
  15:0  warning  The type 'dataTypes' is undefined   jsdoc/no-undefined-types
  31:0  warning  The type 'dataTypes' is undefined   jsdoc/no-undefined-types
  41:0  warning  The type 'dataValues' is undefined  jsdoc/no-undefined-types

/src/repo/src/RepoApi.js
   24:0  warning  The type 'mediaWiki' is undefined         jsdoc/no-undefined-types
   31:3  warning  Potential timing attack, left side: true  security/detect-possible-timing-attacks
   42:0  warning  The type 'mediaWiki' is undefined         jsdoc/no-undefined-types
   67:0  warning  The type 'jqXHR' is undefined             jsdoc/no-undefined-types
  102:0  warning  The type 'jqXHR' is undefined             jsdoc/no-undefined-types
  148:0  warning  The type 'jqXHR' is undefined             jsdoc/no-undefined-types
  196:0  warning  The type 'jqXHR' is undefined             jsdoc/no-undefined-types
  244:0  warning  The type 'jqXHR' is undefined             jsdoc/no-undefined-types
  293:0  warning  The type 'jqXHR' is undefined             jsdoc/no-undefined-types
  328:0  warning  The type 'jqXHR' is undefined             jsdoc/no-undefined-types
  370:0  warning  The type 'jqXHR' is undefined             jsdoc/no-undefined-types
  414:0  warning  The type 'jqXHR' is undefined             jsdoc/no-undefined-types
  458:0  warning  The type 'jqXHR' is undefined             jsdoc/no-undefined-types
  495:0  warning  The type 'jqXHR' is undefined             jsdoc/no-undefined-types
  537:0  warning  The type 'jqXHR' is undefined             jsdoc/no-undefined-types
  583:0  warning  The type 'jqXHR' is undefined             jsdoc/no-undefined-types
  647:0  warning  The type 'jqXHR' is undefined             jsdoc/no-undefined-types
  679:0  warning  The type 'jqXHR' is undefined             jsdoc/no-undefined-types

/src/repo/src/getLocationAgnosticMwApi.js
  32:0  warning  The type 'mediaWiki' is undefined  jsdoc/no-undefined-types

/src/repo/tests/RepoApi.tests.js
  2:0  warning  Missing JSDoc @param "wb" type     jsdoc/require-param-type
  3:0  warning  Missing JSDoc @param "QUnit" type  jsdoc/require-param-type
  4:0  warning  Missing JSDoc @param "sinon" type  jsdoc/require-param-type

✖ 25 problems (0 errors, 25 warnings)


Running "qunit:all" (qunit) task
Testing tests/index.html Failed to load resource: net::ERR_FILE_NOT_FOUND
.......................OK
>> 23 tests completed with 0 failed, 0 skipped, and 0 todo. 
>> 206 assertions (in 56ms), passed: 206, failed: 0

Done.

--- end ---
$ package-lock-lint package-lock.json
--- stdout ---
Checking package-lock.json

--- end ---
build: Updating eslint-config-wikimedia to 0.25.0

$ git add .
--- stdout ---

--- end ---
$ git commit -F /tmp/tmpawwn0kck
--- stdout ---
[master 944d965] build: Updating eslint-config-wikimedia to 0.25.0
 3 files changed, 55 insertions(+), 32 deletions(-)

--- end ---
$ git format-patch HEAD~1 --stdout
--- stdout ---
From 944d9657b2fbce0b7c7201aa1b8894b28078ca9f Mon Sep 17 00:00:00 2001
From: libraryupgrader <tools.libraryupgrader@tools.wmflabs.org>
Date: Sat, 27 May 2023 02:41:42 +0000
Subject: [PATCH] build: Updating eslint-config-wikimedia to 0.25.0

Change-Id: Ic9f77a2393053a95d87382d4f6375b9831d4d87a
---
 package-lock.json      | 82 ++++++++++++++++++++++++++----------------
 package.json           |  2 +-
 tests/RepoApi.tests.js |  3 ++
 3 files changed, 55 insertions(+), 32 deletions(-)

diff --git a/package-lock.json b/package-lock.json
index ddcbf00..5bd7ac8 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -13,7 +13,7 @@
 				"wikibase-data-values": "^0.10.0"
 			},
 			"devDependencies": {
-				"eslint-config-wikimedia": "0.24.0",
+				"eslint-config-wikimedia": "0.25.0",
 				"grunt": "1.6.1",
 				"grunt-contrib-qunit": "^5.1.0",
 				"grunt-eslint": "24.0.1",
@@ -577,9 +577,9 @@
 			}
 		},
 		"node_modules/browserslist-config-wikimedia": {
-			"version": "0.4.0",
-			"resolved": "https://registry.npmjs.org/browserslist-config-wikimedia/-/browserslist-config-wikimedia-0.4.0.tgz",
-			"integrity": "sha512-U/fmsaGlCKOqRIjKqXwQ44qFqiStngRTphj1Cf6IHV6J8OK8T0gu9dKc7Ljq4v7bwhnhN+YCCa4fA3nZlPNivQ==",
+			"version": "0.5.0",
+			"resolved": "https://registry.npmjs.org/browserslist-config-wikimedia/-/browserslist-config-wikimedia-0.5.0.tgz",
+			"integrity": "sha512-t+tvSnTeVhVF2lNRxoAlE51/ZCfUs5SNNZUnWu2N8xXOGMPTMyKk5l4mayvDdm+5L8oqmnALU+TjnN2Z+ZTCTw==",
 			"dev": true
 		},
 		"node_modules/buffer": {
@@ -1091,22 +1091,23 @@
 			}
 		},
 		"node_modules/eslint-config-wikimedia": {
-			"version": "0.24.0",
-			"resolved": "https://registry.npmjs.org/eslint-config-wikimedia/-/eslint-config-wikimedia-0.24.0.tgz",
-			"integrity": "sha512-8oH/YhJ87ONSmuRfATgx8U7Jcwz3tBemrh6YOezIfj9f2QfE71ZhaKZrNPdfS7vIklLor/cB9vX7sxN10nz8xw==",
+			"version": "0.25.0",
+			"resolved": "https://registry.npmjs.org/eslint-config-wikimedia/-/eslint-config-wikimedia-0.25.0.tgz",
+			"integrity": "sha512-xLvXPyPmBLMPCE/FDy69ViFNsA3+uvFpH63IKtiqS9Olv1kWU2TWFlpJMFFEu0RWVnbciUKFOoLy3P36UvNHag==",
 			"dev": true,
 			"dependencies": {
-				"browserslist-config-wikimedia": "^0.4.0",
+				"browserslist-config-wikimedia": "^0.5.0",
 				"eslint": "^8.31.0",
 				"eslint-plugin-compat": "^4.0.2",
 				"eslint-plugin-es-x": "^5.2.1",
 				"eslint-plugin-jsdoc": "39.2.2",
 				"eslint-plugin-json-es": "^1.5.7",
-				"eslint-plugin-mediawiki": "^0.4.0",
+				"eslint-plugin-mediawiki": "^0.5.0",
 				"eslint-plugin-mocha": "^9.0.0",
 				"eslint-plugin-no-jquery": "^2.7.0",
 				"eslint-plugin-node": "^11.1.0",
-				"eslint-plugin-qunit": "^7.2.0",
+				"eslint-plugin-qunit": "^7.3.0",
+				"eslint-plugin-security": "^1.7.1",
 				"eslint-plugin-unicorn": "^42.0.0",
 				"eslint-plugin-vue": "^8.7.1",
 				"eslint-plugin-wdio": "^7.19.4",
@@ -1249,9 +1250,9 @@
 			}
 		},
 		"node_modules/eslint-plugin-mediawiki": {
-			"version": "0.4.0",
-			"resolved": "https://registry.npmjs.org/eslint-plugin-mediawiki/-/eslint-plugin-mediawiki-0.4.0.tgz",
-			"integrity": "sha512-Eufptb8lrElYwIONvgxlMBnPD6PYT4xAFprWlBxV5brCmUh8MZ41+lMxt2TPwEC6C85ngflkVez8BV8tWS9RyQ==",
+			"version": "0.5.0",
+			"resolved": "https://registry.npmjs.org/eslint-plugin-mediawiki/-/eslint-plugin-mediawiki-0.5.0.tgz",
+			"integrity": "sha512-rjkHFyv3VDan/dmu7YpD1Rl9h64NOlz4mqqesRN316R+571+ymmb6lXVOdNMbT8H1iPhmtHc+nijVLVkn7pYDw==",
 			"dev": true,
 			"dependencies": {
 				"eslint-plugin-vue": "^8.7.1",
@@ -1401,6 +1402,15 @@
 				"node": ">=10"
 			}
 		},
+		"node_modules/eslint-plugin-security": {
+			"version": "1.7.1",
+			"resolved": "https://registry.npmjs.org/eslint-plugin-security/-/eslint-plugin-security-1.7.1.tgz",
+			"integrity": "sha512-sMStceig8AFglhhT2LqlU5r+/fn9OwsA72O5bBuQVTssPCdQAOQzL+oMn/ZcpeUY6KcNfLJArgcrsSULNjYYdQ==",
+			"dev": true,
+			"dependencies": {
+				"safe-regex": "^2.1.1"
+			}
+		},
 		"node_modules/eslint-plugin-unicorn": {
 			"version": "42.0.0",
 			"resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-42.0.0.tgz",
@@ -3559,9 +3569,9 @@
 			}
 		},
 		"node_modules/postcss-selector-parser": {
-			"version": "6.0.11",
-			"resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.11.tgz",
-			"integrity": "sha512-zbARubNdogI9j7WY4nQJBiNqQf3sLS3wCP4WfOidu+p28LofJqDH1tcXypGrcmMHhDk2t9wGhCsYe/+szLTy1g==",
+			"version": "6.0.13",
+			"resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz",
+			"integrity": "sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==",
 			"dev": true,
 			"dependencies": {
 				"cssesc": "^3.0.0",
@@ -5058,9 +5068,9 @@
 			}
 		},
 		"browserslist-config-wikimedia": {
-			"version": "0.4.0",
-			"resolved": "https://registry.npmjs.org/browserslist-config-wikimedia/-/browserslist-config-wikimedia-0.4.0.tgz",
-			"integrity": "sha512-U/fmsaGlCKOqRIjKqXwQ44qFqiStngRTphj1Cf6IHV6J8OK8T0gu9dKc7Ljq4v7bwhnhN+YCCa4fA3nZlPNivQ==",
+			"version": "0.5.0",
+			"resolved": "https://registry.npmjs.org/browserslist-config-wikimedia/-/browserslist-config-wikimedia-0.5.0.tgz",
+			"integrity": "sha512-t+tvSnTeVhVF2lNRxoAlE51/ZCfUs5SNNZUnWu2N8xXOGMPTMyKk5l4mayvDdm+5L8oqmnALU+TjnN2Z+ZTCTw==",
 			"dev": true
 		},
 		"buffer": {
@@ -5516,22 +5526,23 @@
 			}
 		},
 		"eslint-config-wikimedia": {
-			"version": "0.24.0",
-			"resolved": "https://registry.npmjs.org/eslint-config-wikimedia/-/eslint-config-wikimedia-0.24.0.tgz",
-			"integrity": "sha512-8oH/YhJ87ONSmuRfATgx8U7Jcwz3tBemrh6YOezIfj9f2QfE71ZhaKZrNPdfS7vIklLor/cB9vX7sxN10nz8xw==",
+			"version": "0.25.0",
+			"resolved": "https://registry.npmjs.org/eslint-config-wikimedia/-/eslint-config-wikimedia-0.25.0.tgz",
+			"integrity": "sha512-xLvXPyPmBLMPCE/FDy69ViFNsA3+uvFpH63IKtiqS9Olv1kWU2TWFlpJMFFEu0RWVnbciUKFOoLy3P36UvNHag==",
 			"dev": true,
 			"requires": {
-				"browserslist-config-wikimedia": "^0.4.0",
+				"browserslist-config-wikimedia": "^0.5.0",
 				"eslint": "^8.31.0",
 				"eslint-plugin-compat": "^4.0.2",
 				"eslint-plugin-es-x": "^5.2.1",
 				"eslint-plugin-jsdoc": "39.2.2",
 				"eslint-plugin-json-es": "^1.5.7",
-				"eslint-plugin-mediawiki": "^0.4.0",
+				"eslint-plugin-mediawiki": "^0.5.0",
 				"eslint-plugin-mocha": "^9.0.0",
 				"eslint-plugin-no-jquery": "^2.7.0",
 				"eslint-plugin-node": "^11.1.0",
-				"eslint-plugin-qunit": "^7.2.0",
+				"eslint-plugin-qunit": "^7.3.0",
+				"eslint-plugin-security": "^1.7.1",
 				"eslint-plugin-unicorn": "^42.0.0",
 				"eslint-plugin-vue": "^8.7.1",
 				"eslint-plugin-wdio": "^7.19.4",
@@ -5628,9 +5639,9 @@
 			}
 		},
 		"eslint-plugin-mediawiki": {
-			"version": "0.4.0",
-			"resolved": "https://registry.npmjs.org/eslint-plugin-mediawiki/-/eslint-plugin-mediawiki-0.4.0.tgz",
-			"integrity": "sha512-Eufptb8lrElYwIONvgxlMBnPD6PYT4xAFprWlBxV5brCmUh8MZ41+lMxt2TPwEC6C85ngflkVez8BV8tWS9RyQ==",
+			"version": "0.5.0",
+			"resolved": "https://registry.npmjs.org/eslint-plugin-mediawiki/-/eslint-plugin-mediawiki-0.5.0.tgz",
+			"integrity": "sha512-rjkHFyv3VDan/dmu7YpD1Rl9h64NOlz4mqqesRN316R+571+ymmb6lXVOdNMbT8H1iPhmtHc+nijVLVkn7pYDw==",
 			"dev": true,
 			"requires": {
 				"eslint-plugin-vue": "^8.7.1",
@@ -5729,6 +5740,15 @@
 				}
 			}
 		},
+		"eslint-plugin-security": {
+			"version": "1.7.1",
+			"resolved": "https://registry.npmjs.org/eslint-plugin-security/-/eslint-plugin-security-1.7.1.tgz",
+			"integrity": "sha512-sMStceig8AFglhhT2LqlU5r+/fn9OwsA72O5bBuQVTssPCdQAOQzL+oMn/ZcpeUY6KcNfLJArgcrsSULNjYYdQ==",
+			"dev": true,
+			"requires": {
+				"safe-regex": "^2.1.1"
+			}
+		},
 		"eslint-plugin-unicorn": {
 			"version": "42.0.0",
 			"resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-42.0.0.tgz",
@@ -7310,9 +7330,9 @@
 			"dev": true
 		},
 		"postcss-selector-parser": {
-			"version": "6.0.11",
-			"resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.11.tgz",
-			"integrity": "sha512-zbARubNdogI9j7WY4nQJBiNqQf3sLS3wCP4WfOidu+p28LofJqDH1tcXypGrcmMHhDk2t9wGhCsYe/+szLTy1g==",
+			"version": "6.0.13",
+			"resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz",
+			"integrity": "sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==",
 			"dev": true,
 			"requires": {
 				"cssesc": "^3.0.0",
diff --git a/package.json b/package.json
index 70d0939..fae4f3d 100644
--- a/package.json
+++ b/package.json
@@ -28,7 +28,7 @@
 		"wikibase-data-values": "^0.10.0"
 	},
 	"devDependencies": {
-		"eslint-config-wikimedia": "0.24.0",
+		"eslint-config-wikimedia": "0.25.0",
 		"grunt": "1.6.1",
 		"grunt-contrib-qunit": "^5.1.0",
 		"grunt-eslint": "24.0.1",
diff --git a/tests/RepoApi.tests.js b/tests/RepoApi.tests.js
index ea126c8..9d570aa 100644
--- a/tests/RepoApi.tests.js
+++ b/tests/RepoApi.tests.js
@@ -1,4 +1,7 @@
 /**
+ * @param wb
+ * @param QUnit
+ * @param sinon
  * @license GPL-2.0+
  * @author H. Snater < mediawiki@snater.com >
  */
-- 
2.30.2


--- end ---
Source code is licensed under the AGPL.