This run took 83 seconds.
From a26d2f73f3845d2d8c37c05c6f70c1a25b72e18d Mon Sep 17 00:00:00 2001 From: libraryupgrader <tools.libraryupgrader@tools.wmflabs.org> Date: Sat, 29 Jun 2024 06:21:12 +0000 Subject: [PATCH] build: Updating npm dependencies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * eslint-config-wikimedia: 0.28.0 → 0.28.2 The following rules are failing and were disabled: * es-x/no-object-assign * ws: 7.5.5 → 7.5.10 * https://github.com/advisories/GHSA-3h5v-q93c-6h6q Change-Id: Iec901a271173958dfe106dea6e56ee62e7c87e6c --- .eslintrc.json | 3 ++- package-lock.json | 44 ++++++++++++++++----------------- package.json | 2 +- src/FormatValueCaller.js | 2 +- src/ParseValueCaller.js | 2 +- src/RepoApi.js | 2 +- src/RepoApiError.js | 2 +- src/getLocationAgnosticMwApi.js | 2 +- 8 files changed, 30 insertions(+), 29 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 47f47cc..cfca762 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -16,6 +16,7 @@ "jsdoc/newline-after-description": "off", "jsdoc/require-returns": "off", "jsdoc/require-returns-check": "off", - "no-jquery/no-extend": "warn" + "no-jquery/no-extend": "warn", + "es-x/no-object-assign": "warn" } } diff --git a/package-lock.json b/package-lock.json index 377860d..31751d3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "wikibase-data-values": "^0.10.0" }, "devDependencies": { - "eslint-config-wikimedia": "0.28.0", + "eslint-config-wikimedia": "0.28.2", "grunt": "1.6.1", "grunt-contrib-qunit": "^5.1.0", "grunt-eslint": "24.3.0", @@ -1337,9 +1337,9 @@ } }, "node_modules/eslint-config-wikimedia": { - "version": "0.28.0", - "resolved": "https://registry.npmjs.org/eslint-config-wikimedia/-/eslint-config-wikimedia-0.28.0.tgz", - "integrity": "sha512-qDkELhXoDvQP+kYYo5MilhvqJ4Agk78Pzu95K1l1h68xPEWagD4k/dvrgmVyKjcp5KyAnZr++7qChLiFhDdBDA==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/eslint-config-wikimedia/-/eslint-config-wikimedia-0.28.2.tgz", + "integrity": "sha512-5+rdnT7wH1gpKAO6tHYThg78eMhZMruJzvqku3Y5iaEY/A7kSKLFpA/vOj/snys9fKjDHC9BXmArQh+agkOoJQ==", "dev": true, "dependencies": { "browserslist-config-wikimedia": "^0.7.0", @@ -1352,7 +1352,7 @@ "eslint-plugin-mediawiki": "^0.7.0", "eslint-plugin-mocha": "^10.4.3", "eslint-plugin-n": "^17.7.0", - "eslint-plugin-no-jquery": "^2.7.0", + "eslint-plugin-no-jquery": "^3.0.1", "eslint-plugin-qunit": "^8.1.1", "eslint-plugin-security": "^1.7.1", "eslint-plugin-unicorn": "^53.0.0", @@ -1617,12 +1617,12 @@ } }, "node_modules/eslint-plugin-no-jquery": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-no-jquery/-/eslint-plugin-no-jquery-2.7.0.tgz", - "integrity": "sha512-Aeg7dA6GTH1AcWLlBtWNzOU9efK5KpNi7b0EhBO0o0M+awyzguUUo8gF6hXGjQ9n5h8/uRtYv9zOqQkeC5CG0w==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-no-jquery/-/eslint-plugin-no-jquery-3.0.2.tgz", + "integrity": "sha512-n/+6p6PFhWDNPVLJj1463hw4OTIRBbROGcbhmtOHTgw7yihSKzkwZiQ00EJTneyeR3jRiw5lpWSMCCBhtb8t2g==", "dev": true, "peerDependencies": { - "eslint": ">=2.3.0" + "eslint": ">=8.0.0" } }, "node_modules/eslint-plugin-qunit": { @@ -4983,9 +4983,9 @@ "dev": true }, "node_modules/ws": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.5.tgz", - "integrity": "sha512-BAkMFcAzl8as1G/hArkxOxq3G7pjUqQ3gzYbLL0/5zNkph70e+lCoxBGnm6AW1+/aiNeV4fnKqZ8m4GZewmH2w==", + "version": "7.5.10", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", + "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", "dev": true, "engines": { "node": ">=8.3.0" @@ -6103,9 +6103,9 @@ } }, "eslint-config-wikimedia": { - "version": "0.28.0", - "resolved": "https://registry.npmjs.org/eslint-config-wikimedia/-/eslint-config-wikimedia-0.28.0.tgz", - "integrity": "sha512-qDkELhXoDvQP+kYYo5MilhvqJ4Agk78Pzu95K1l1h68xPEWagD4k/dvrgmVyKjcp5KyAnZr++7qChLiFhDdBDA==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/eslint-config-wikimedia/-/eslint-config-wikimedia-0.28.2.tgz", + "integrity": "sha512-5+rdnT7wH1gpKAO6tHYThg78eMhZMruJzvqku3Y5iaEY/A7kSKLFpA/vOj/snys9fKjDHC9BXmArQh+agkOoJQ==", "dev": true, "requires": { "browserslist-config-wikimedia": "^0.7.0", @@ -6118,7 +6118,7 @@ "eslint-plugin-mediawiki": "^0.7.0", "eslint-plugin-mocha": "^10.4.3", "eslint-plugin-n": "^17.7.0", - "eslint-plugin-no-jquery": "^2.7.0", + "eslint-plugin-no-jquery": "^3.0.1", "eslint-plugin-qunit": "^8.1.1", "eslint-plugin-security": "^1.7.1", "eslint-plugin-unicorn": "^53.0.0", @@ -6292,9 +6292,9 @@ } }, "eslint-plugin-no-jquery": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-no-jquery/-/eslint-plugin-no-jquery-2.7.0.tgz", - "integrity": "sha512-Aeg7dA6GTH1AcWLlBtWNzOU9efK5KpNi7b0EhBO0o0M+awyzguUUo8gF6hXGjQ9n5h8/uRtYv9zOqQkeC5CG0w==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-no-jquery/-/eslint-plugin-no-jquery-3.0.2.tgz", + "integrity": "sha512-n/+6p6PFhWDNPVLJj1463hw4OTIRBbROGcbhmtOHTgw7yihSKzkwZiQ00EJTneyeR3jRiw5lpWSMCCBhtb8t2g==", "dev": true, "requires": {} }, @@ -8805,9 +8805,9 @@ "dev": true }, "ws": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.5.tgz", - "integrity": "sha512-BAkMFcAzl8as1G/hArkxOxq3G7pjUqQ3gzYbLL0/5zNkph70e+lCoxBGnm6AW1+/aiNeV4fnKqZ8m4GZewmH2w==", + "version": "7.5.10", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", + "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", "dev": true, "requires": {} }, diff --git a/package.json b/package.json index e001a00..a5bd754 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "wikibase-data-values": "^0.10.0" }, "devDependencies": { - "eslint-config-wikimedia": "0.28.0", + "eslint-config-wikimedia": "0.28.2", "grunt": "1.6.1", "grunt-contrib-qunit": "^5.1.0", "grunt-eslint": "24.3.0", diff --git a/src/FormatValueCaller.js b/src/FormatValueCaller.js index 199b926..c293d09 100644 --- a/src/FormatValueCaller.js +++ b/src/FormatValueCaller.js @@ -19,7 +19,7 @@ this._dataTypeStore = dataTypeStore; }; - $.extend( SELF.prototype, { + Object.assign( SELF.prototype, { /** * @property {wikibase.api.RepoApi} diff --git a/src/ParseValueCaller.js b/src/ParseValueCaller.js index 4dd06c3..40569a0 100644 --- a/src/ParseValueCaller.js +++ b/src/ParseValueCaller.js @@ -20,7 +20,7 @@ this._api = api; }; - $.extend( SELF.prototype, { + Object.assign( SELF.prototype, { /** * @property {wikibase.api.RepoApi} diff --git a/src/RepoApi.js b/src/RepoApi.js index dea8f3c..3e73aa1 100644 --- a/src/RepoApi.js +++ b/src/RepoApi.js @@ -38,7 +38,7 @@ this._tags = tags || []; }; - $.extend( SELF.prototype, { + Object.assign( SELF.prototype, { /** * @property {mediaWiki.Api} * @private diff --git a/src/RepoApiError.js b/src/RepoApiError.js index 0ac8ba6..a2ee34d 100644 --- a/src/RepoApiError.js +++ b/src/RepoApiError.js @@ -36,7 +36,7 @@ }; SELF.prototype = new Error(); - $.extend( SELF.prototype, + Object.assign( SELF.prototype, { /** * Message keys of API related error messages. diff --git a/src/getLocationAgnosticMwApi.js b/src/getLocationAgnosticMwApi.js index b44028a..1b1ccda 100644 --- a/src/getLocationAgnosticMwApi.js +++ b/src/getLocationAgnosticMwApi.js @@ -38,7 +38,7 @@ return new mw.ForeignApi( apiEndpoint, options ); } - var mwApiOptions = $.extend( {}, options, { + var mwApiOptions = Object.assign( {}, options, { ajax: { url: apiEndpoint } -- 2.39.2
$ date --- stdout --- Sat Jun 29 06:19:51 UTC 2024 --- 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 --- c1e1a3a9168a793e2128003b89fd853fc449fcb5 refs/heads/master --- end --- $ /usr/bin/npm audit --json --- 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": 1096727, "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" }, "tough-cookie" ], "effects": [ "phantomjs-prebuilt" ], "range": "*", "nodes": [ "node_modules/request" ], "fixAvailable": false }, "tough-cookie": { "name": "tough-cookie", "severity": "moderate", "isDirect": false, "via": [ { "source": 1097682, "name": "tough-cookie", "dependency": "tough-cookie", "title": "tough-cookie Prototype Pollution vulnerability", "url": "https://github.com/advisories/GHSA-72xf-g2v4-qvf3", "severity": "moderate", "cwe": [ "CWE-1321" ], "cvss": { "score": 6.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N" }, "range": "<4.1.3" } ], "effects": [ "request" ], "range": "<4.1.3", "nodes": [ "node_modules/tough-cookie" ], "fixAvailable": false }, "ws": { "name": "ws", "severity": "high", "isDirect": false, "via": [ { "source": 1097616, "name": "ws", "dependency": "ws", "title": "ws affected by a DoS when handling a request with many HTTP headers", "url": "https://github.com/advisories/GHSA-3h5v-q93c-6h6q", "severity": "high", "cwe": [ "CWE-476" ], "cvss": { "score": 7.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H" }, "range": ">=7.0.0 <7.5.10" } ], "effects": [], "range": "7.0.0 - 7.5.9", "nodes": [ "node_modules/ws" ], "fixAvailable": true } }, "metadata": { "vulnerabilities": { "info": 0, "low": 0, "moderate": 3, "high": 1, "critical": 0, "total": 4 }, "dependencies": { "prod": 3, "dev": 440, "optional": 2, "peer": 1, "peerOptional": 0, "total": 442 } } } --- end --- Upgrading n:eslint-config-wikimedia from 0.28.0 -> 0.28.2 $ /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 442 packages, and audited 443 packages in 14s 67 packages are looking for funding run `npm fund` for details 4 vulnerabilities (3 moderate, 1 high) To address issues that do not require attention, run: npm audit fix 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.3.0 --save-exact --- stdout --- up to date, audited 443 packages in 1s 67 packages are looking for funding run `npm fund` for details 4 vulnerabilities (3 moderate, 1 high) To address issues that do not require attention, run: npm audit fix 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/ParseValueCaller.js src/getLocationAgnosticMwApi.js src/FormatValueCaller.js Gruntfile.js tests/RepoApi.tests.js composer.json src/RepoApi.js tests/RepoApiError.tests.js tests/mediaWiki.mock.js src/RepoApiError.js package-lock.json --fix --- stdout --- /src/repo/src/FormatValueCaller.js 15:1 warning The type 'dataTypes' is undefined jsdoc/no-undefined-types 22:2 error ES2015 'Object.assign' method is forbidden es-x/no-object-assign 31:1 warning The type 'dataTypes' is undefined jsdoc/no-undefined-types 41:1 warning The type 'dataValues' is undefined jsdoc/no-undefined-types /src/repo/src/ParseValueCaller.js 23:2 error ES2015 'Object.assign' method is forbidden es-x/no-object-assign /src/repo/src/RepoApi.js 25:1 warning The type 'mediaWiki' is undefined jsdoc/no-undefined-types 41:2 error ES2015 'Object.assign' method is forbidden es-x/no-object-assign 43:1 warning The type 'mediaWiki' is undefined jsdoc/no-undefined-types 68:1 warning The type 'jqXHR' is undefined jsdoc/no-undefined-types 103:1 warning The type 'jqXHR' is undefined jsdoc/no-undefined-types 149:1 warning The type 'jqXHR' is undefined jsdoc/no-undefined-types 197:1 warning The type 'jqXHR' is undefined jsdoc/no-undefined-types 245:1 warning The type 'jqXHR' is undefined jsdoc/no-undefined-types 294:1 warning The type 'jqXHR' is undefined jsdoc/no-undefined-types 329:1 warning The type 'jqXHR' is undefined jsdoc/no-undefined-types 371:1 warning The type 'jqXHR' is undefined jsdoc/no-undefined-types 415:1 warning The type 'jqXHR' is undefined jsdoc/no-undefined-types 459:1 warning The type 'jqXHR' is undefined jsdoc/no-undefined-types 496:1 warning The type 'jqXHR' is undefined jsdoc/no-undefined-types 538:1 warning The type 'jqXHR' is undefined jsdoc/no-undefined-types 584:1 warning The type 'jqXHR' is undefined jsdoc/no-undefined-types 649:1 warning The type 'jqXHR' is undefined jsdoc/no-undefined-types 681:1 warning The type 'jqXHR' is undefined jsdoc/no-undefined-types /src/repo/src/RepoApiError.js 39:2 error ES2015 'Object.assign' method is forbidden es-x/no-object-assign /src/repo/src/getLocationAgnosticMwApi.js 33:1 warning The type 'mediaWiki' is undefined jsdoc/no-undefined-types 41:22 error ES2015 'Object.assign' method is forbidden es-x/no-object-assign /src/repo/tests/RepoApi.tests.js 2:1 warning Missing JSDoc @param "wb" type jsdoc/require-param-type 3:1 warning Missing JSDoc @param "QUnit" type jsdoc/require-param-type 4:1 warning Missing JSDoc @param "sinon" type jsdoc/require-param-type /src/repo/tests/RepoApiError.tests.js 2:1 warning Missing JSDoc @param "wb" type jsdoc/require-param-type 3:1 warning Missing JSDoc @param "QUnit" type jsdoc/require-param-type 4:1 warning Missing JSDoc @param "sinon" type jsdoc/require-param-type ✖ 32 problems (5 errors, 27 warnings) --- end --- $ ./node_modules/.bin/eslint package.json src/namespace.js src/ParseValueCaller.js src/getLocationAgnosticMwApi.js src/FormatValueCaller.js Gruntfile.js tests/RepoApi.tests.js composer.json src/RepoApi.js tests/RepoApiError.tests.js tests/mediaWiki.mock.js src/RepoApiError.js package-lock.json -f json --- stdout --- [{"filePath":"/src/repo/Gruntfile.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"array-bracket-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"computed-property-spacing","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"indent","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multi-spaces","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"spaced-comment","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/composer.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"indent","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"no-extra-parens","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"array-bracket-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"computed-property-spacing","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multi-spaces","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"spaced-comment","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/package-lock.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"indent","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"no-extra-parens","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"array-bracket-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"computed-property-spacing","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multi-spaces","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"spaced-comment","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/package.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"indent","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"no-extra-parens","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"array-bracket-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"computed-property-spacing","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multi-spaces","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"spaced-comment","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/src/FormatValueCaller.js","messages":[{"ruleId":"jsdoc/no-undefined-types","severity":1,"message":"The type 'dataTypes' is undefined.","line":15,"column":1,"nodeType":"Block","endLine":15,"endColumn":1},{"ruleId":"es-x/no-object-assign","severity":2,"message":"ES2015 'Object.assign' method is forbidden.","line":22,"column":2,"nodeType":"MemberExpression","messageId":"forbidden","endLine":22,"endColumn":15},{"ruleId":"jsdoc/no-undefined-types","severity":1,"message":"The type 'dataTypes' is undefined.","line":31,"column":1,"nodeType":"Block","endLine":31,"endColumn":1},{"ruleId":"jsdoc/no-undefined-types","severity":1,"message":"The type 'dataValues' is undefined.","line":41,"column":1,"nodeType":"Block","endLine":41,"endColumn":1}],"suppressedMessages":[],"errorCount":1,"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\tObject.assign( 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":[{"ruleId":"array-bracket-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"computed-property-spacing","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"indent","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multi-spaces","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"spaced-comment","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/src/ParseValueCaller.js","messages":[{"ruleId":"es-x/no-object-assign","severity":2,"message":"ES2015 'Object.assign' method is forbidden.","line":23,"column":2,"nodeType":"MemberExpression","messageId":"forbidden","endLine":23,"endColumn":15}],"suppressedMessages":[],"errorCount":1,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"( function ( wb ) {\n\t'use strict';\n\n\tvar MODULE = wb.api;\n\n\t/**\n\t * Provides functionality to parse a value using the API.\n\t *\n\t * @class wikibase.api.ParseValueCaller\n\t * @since 1.0\n\t * @license GPL-2.0+\n\t * @author Jeroen De Dauw < jeroendedauw@gmail.com >\n\t * @author H. Snater < mediawiki@snater.com >\n\t *\n\t * @constructor\n\t *\n\t * @param {wikibase.api.RepoApi} api\n\t */\n\tvar SELF = MODULE.ParseValueCaller = function WbApiParseValueCaller( api ) {\n\t\tthis._api = api;\n\t};\n\n\tObject.assign( 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 * Makes a request to the API to parse values on the server side. Will return a jQuery.Promise\n\t\t * which will be resolved if the call is successful or rejected if the API fails or can't be\n\t\t * reached.\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 {Object[]} return.done.serializations `DataValue` serializations.\n\t\t * @return {Function} return.fail\n\t\t * @return {wikibase.api.RepoApiError} return.fail.error\n\t\t */\n\t\tparseValues: function ( parser, values, options ) {\n\t\t\tvar deferred = $.Deferred();\n\n\t\t\toptions = options || {};\n\n\t\t\tthis._api.parseValue( parser, values, options ).done( function ( response ) {\n\t\t\t\tif ( !response.results ) {\n\t\t\t\t\tdeferred.reject( new wb.api.RepoApiError(\n\t\t\t\t\t\t'result-unexpected',\n\t\t\t\t\t\t'The parse API returned an unexpected result'\n\t\t\t\t\t) );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvar dataValuesSerializations = [];\n\n\t\t\t\tfor ( var i in response.results ) {\n\t\t\t\t\tvar result = response.results[ i ];\n\n\t\t\t\t\tif ( result.error ) {\n\t\t\t\t\t\t// This is a really strange error format, and it's not supported by\n\t\t\t\t\t\t// wikibase.api.RepoApiError.newFromApiResponse, so we have to parse it manually\n\t\t\t\t\t\t// here. See bug 72947.\n\t\t\t\t\t\tdeferred.reject( new wb.api.RepoApiError(\n\t\t\t\t\t\t\tresult.messages[ 0 ].name,\n\t\t\t\t\t\t\tresult.messages[ 0 ].html[ '*' ]\n\t\t\t\t\t\t) );\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( !( result.value && result.type ) ) {\n\t\t\t\t\t\tdeferred.reject( new wb.api.RepoApiError(\n\t\t\t\t\t\t\t'result-unexpected',\n\t\t\t\t\t\t\t'Unknown API error'\n\t\t\t\t\t\t) );\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tdataValuesSerializations.push( {\n\t\t\t\t\t\ttype: result.type,\n\t\t\t\t\t\tvalue: result.value\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\tdeferred.resolve( dataValuesSerializations );\n\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\t} );\n\n}( wikibase ) );\n","usedDeprecatedRules":[{"ruleId":"array-bracket-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"computed-property-spacing","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"indent","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multi-spaces","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"spaced-comment","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/src/RepoApi.js","messages":[{"ruleId":"jsdoc/no-undefined-types","severity":1,"message":"The type 'mediaWiki' is undefined.","line":25,"column":1,"nodeType":"Block","endLine":25,"endColumn":1},{"ruleId":"es-x/no-object-assign","severity":2,"message":"ES2015 'Object.assign' method is forbidden.","line":41,"column":2,"nodeType":"MemberExpression","messageId":"forbidden","endLine":41,"endColumn":15},{"ruleId":"jsdoc/no-undefined-types","severity":1,"message":"The type 'mediaWiki' is undefined.","line":43,"column":1,"nodeType":"Block","endLine":43,"endColumn":1},{"ruleId":"jsdoc/no-undefined-types","severity":1,"message":"The type 'jqXHR' is undefined.","line":68,"column":1,"nodeType":"Block","endLine":68,"endColumn":1},{"ruleId":"jsdoc/no-undefined-types","severity":1,"message":"The type 'jqXHR' is undefined.","line":103,"column":1,"nodeType":"Block","endLine":103,"endColumn":1},{"ruleId":"jsdoc/no-undefined-types","severity":1,"message":"The type 'jqXHR' is undefined.","line":149,"column":1,"nodeType":"Block","endLine":149,"endColumn":1},{"ruleId":"jsdoc/no-undefined-types","severity":1,"message":"The type 'jqXHR' is undefined.","line":197,"column":1,"nodeType":"Block","endLine":197,"endColumn":1},{"ruleId":"jsdoc/no-undefined-types","severity":1,"message":"The type 'jqXHR' is undefined.","line":245,"column":1,"nodeType":"Block","endLine":245,"endColumn":1},{"ruleId":"jsdoc/no-undefined-types","severity":1,"message":"The type 'jqXHR' is undefined.","line":294,"column":1,"nodeType":"Block","endLine":294,"endColumn":1},{"ruleId":"jsdoc/no-undefined-types","severity":1,"message":"The type 'jqXHR' is undefined.","line":329,"column":1,"nodeType":"Block","endLine":329,"endColumn":1},{"ruleId":"jsdoc/no-undefined-types","severity":1,"message":"The type 'jqXHR' is undefined.","line":371,"column":1,"nodeType":"Block","endLine":371,"endColumn":1},{"ruleId":"jsdoc/no-undefined-types","severity":1,"message":"The type 'jqXHR' is undefined.","line":415,"column":1,"nodeType":"Block","endLine":415,"endColumn":1},{"ruleId":"jsdoc/no-undefined-types","severity":1,"message":"The type 'jqXHR' is undefined.","line":459,"column":1,"nodeType":"Block","endLine":459,"endColumn":1},{"ruleId":"jsdoc/no-undefined-types","severity":1,"message":"The type 'jqXHR' is undefined.","line":496,"column":1,"nodeType":"Block","endLine":496,"endColumn":1},{"ruleId":"jsdoc/no-undefined-types","severity":1,"message":"The type 'jqXHR' is undefined.","line":538,"column":1,"nodeType":"Block","endLine":538,"endColumn":1},{"ruleId":"jsdoc/no-undefined-types","severity":1,"message":"The type 'jqXHR' is undefined.","line":584,"column":1,"nodeType":"Block","endLine":584,"endColumn":1},{"ruleId":"jsdoc/no-undefined-types","severity":1,"message":"The type 'jqXHR' is undefined.","line":649,"column":1,"nodeType":"Block","endLine":649,"endColumn":1},{"ruleId":"jsdoc/no-undefined-types","severity":1,"message":"The type 'jqXHR' is undefined.","line":681,"column":1,"nodeType":"Block","endLine":681,"endColumn":1}],"suppressedMessages":[],"errorCount":1,"fatalErrorCount":0,"warningCount":17,"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 *\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\tObject.assign( 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 *\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 *\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} else {\n\t\t\t\t// Edits by anonymous users may result in tempuser creation, triggering a redirect.\n\t\t\t\t// Set returnto so that user is redirected back to the same page.\n\t\t\t\tparams.returnto = mw.config.get( 'wgPageName' );\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":[{"ruleId":"array-bracket-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"computed-property-spacing","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"indent","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multi-spaces","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"spaced-comment","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/src/RepoApiError.js","messages":[{"ruleId":"es-x/no-object-assign","severity":2,"message":"ES2015 'Object.assign' method is forbidden.","line":39,"column":2,"nodeType":"MemberExpression","messageId":"forbidden","endLine":39,"endColumn":15}],"suppressedMessages":[],"errorCount":1,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"( function ( wb ) {\n\t'use strict';\n\n\tvar MODULE = wb.api;\n\n\t/**\n\t * Wikibase Repo API Error.\n\t *\n\t * @class wikibase.api.RepoApiError\n\t * @extends Error\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 {string} code Error code (used to determine the actual error message).\n\t * @param {string} detailedMessage HTML\n\t * @param {string[]} [parameters]\n\t * @param {string} [action] Generic API action (e.g. \"save\" or \"cancel\") used to determine a\n\t * specific message.\n\t */\n\tvar SELF = MODULE.RepoApiError = function WbRepoApiError(\n\t\tcode,\n\t\tdetailedMessage,\n\t\tparameters,\n\t\taction\n\t) {\n\t\tthis.code = code;\n\t\tthis.detailedMessage = detailedMessage;\n\t\tthis.action = action;\n\n\t\t// native Error attributes\n\t\tthis.name = 'Wikibase Repo API Error';\n\t\tthis.message = this.getMessage( parameters );\n\t};\n\tSELF.prototype = new Error();\n\n\tObject.assign( SELF.prototype,\n\t\t{\n\t\t\t/**\n\t\t\t * Message keys of API related error messages.\n\t\t\t *\n\t\t\t * @property {Object}\n\t\t\t * @private\n\t\t\t * @readonly\n\t\t\t */\n\t\t\tAPI_ERROR_MESSAGE: {\n\t\t\t\tGENERIC: {\n\t\t\t\t\tDEFAULT: 'wikibase-error-unexpected',\n\t\t\t\t\tUNKNOWN: 'wikibase-error-unknown',\n\t\t\t\t\tsave: 'wikibase-error-save-generic',\n\t\t\t\t\tremove: 'wikibase-error-remove-generic'\n\t\t\t\t},\n\t\t\t\ttimeout: {\n\t\t\t\t\tsave: 'wikibase-error-save-timeout',\n\t\t\t\t\tremove: 'wikibase-error-remove-timeout'\n\t\t\t\t},\n\t\t\t\t'no-external-page': 'wikibase-error-ui-no-external-page',\n\t\t\t\t'edit-conflict': 'wikibase-error-ui-edit-conflict',\n\t\t\t\t'failed-modify': 'wikibase-linkitem-failed-modify' // T243969\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Returns a short message string.\n\t\t\t *\n\t\t\t * @param {string[]} [parameters]\n\t\t\t * @return {string}\n\t\t\t */\n\t\t\tgetMessage: function ( parameters ) {\n\t\t\t\tvar msgKey = this.API_ERROR_MESSAGE[ this.code ];\n\n\t\t\t\tif ( !msgKey || typeof msgKey !== 'string' ) {\n\t\t\t\t\tif ( msgKey && this.action && msgKey[ this.action ] ) {\n\t\t\t\t\t\tmsgKey = msgKey[ this.action ];\n\t\t\t\t\t} else if ( this.action && this.API_ERROR_MESSAGE.GENERIC[ this.action ] ) {\n\t\t\t\t\t\tmsgKey = this.API_ERROR_MESSAGE.GENERIC[ this.action ];\n\t\t\t\t\t} else if ( !parameters || parameters.length === 0 ) {\n\t\t\t\t\t\tmsgKey = this.API_ERROR_MESSAGE.GENERIC.UNKNOWN;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmsgKey = this.API_ERROR_MESSAGE.GENERIC.DEFAULT;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn mw.msg.apply( mw.msg, [ msgKey ].concat( parameters || [] ) );\n\t\t\t}\n\n\t\t} );\n\n\t/**\n\t * Creates a new RepoApiError out of the values returned from the API.\n\t *\n\t * @static\n\t *\n\t * @param {Object} details Object returned from the API containing detailed information.\n\t * @param {string} [apiAction] API action (e.g. 'save', 'remove') that may be passed to\n\t * determine a specific message.\n\t * @return {wikibase.api.RepoApiError}\n\t */\n\tSELF.newFromApiResponse = function ( details, apiAction ) {\n\t\tvar errorCode = '',\n\t\t\tparameters = [],\n\t\t\tdetailedMessage = '';\n\n\t\tif ( details.error ) {\n\t\t\terrorCode = details.error.code;\n\t\t\tif ( details.error.messages ) {\n\t\t\t\t// HTML message in a format only Wikibase supports, see ApiErrorReporter. The data\n\t\t\t\t// structure supports multiple messages, but this is not relevant in the cases\n\t\t\t\t// API_ERROR_MESSAGE supports. Assume the first message parameters are compatible.\n\t\t\t\tparameters = details.error.messages[ 0 ] && details.error.messages[ 0 ].parameters;\n\t\t\t\tdetailedMessage = messagesObjectToHtml( details.error.messages );\n\t\t\t} else if ( details.error.info ) {\n\t\t\t\t// Wikibase API no-HTML error message fall-back.\n\t\t\t\tdetailedMessage = mw.html.escape( String( details.error.info ) );\n\t\t\t}\n\t\t} else if ( details.errors ) {\n\t\t\t// API response, when 'errorformat=plaintext' was requested\n\t\t\tvar preferredError = 0,\n\t\t\t\tcurError, i;\n\n\t\t\t// If we have multiple errors, report the nicest formatted one.\n\t\t\t// Note: Multiple errors are often redundant, thus have the same root cause.\n\t\t\tfor ( i = 0; i < details.errors.length; i++ ) {\n\t\t\t\tcurError = details.errors[ i ];\n\t\t\t\tif ( curError.data && curError.data.messages ) {\n\t\t\t\t\tpreferredError = i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcurError = details.errors[ preferredError ];\n\t\t\terrorCode = curError.code;\n\t\t\tif ( curError.data && curError.data.messages ) {\n\t\t\t\tparameters = curError.data.messages[ 0 ] && curError.data.messages[ 0 ].parameters;\n\t\t\t\tdetailedMessage = messagesObjectToHtml( curError.data.messages );\n\t\t\t} else if ( curError[ '*' ] ) {\n\t\t\t\tdetailedMessage = mw.html.escape( String( curError[ '*' ] ) );\n\t\t\t}\n\t\t} else if ( details.exception ) {\n\t\t// Failed MediaWiki API call.\n\t\t\terrorCode = details.textStatus;\n\t\t\tdetailedMessage = mw.html.escape( String( details.exception ) );\n\t\t}\n\n\t\treturn new SELF( errorCode, detailedMessage, parameters, apiAction );\n\t};\n\n\t/**\n\t * @ignore\n\t *\n\t * @param {Object} messages Object returned from the API.\n\t * @return {string|undefined} HTML list, single message or undefined if no HTML could be found.\n\t */\n\tfunction messagesObjectToHtml( messages ) {\n\t\t// Can't use length, it's not an array!\n\t\tif ( messages[ 1 ] && messages[ 1 ].html ) {\n\t\t\tvar html = '<ul>';\n\t\t\tfor ( var i = 0; messages[ i ]; i++ ) {\n\t\t\t\thtml += '<li>' + messages[ i ].html[ '*' ] + '</li>';\n\t\t\t}\n\t\t\treturn html + '</ul>';\n\t\t}\n\n\t\treturn messages[ 0 ] && messages[ 0 ].html && messages[ 0 ].html[ '*' ]\n\t\t\t|| messages.html && messages.html[ '*' ];\n\t}\n\n}( wikibase ) );\n","usedDeprecatedRules":[{"ruleId":"array-bracket-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"computed-property-spacing","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"indent","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multi-spaces","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"spaced-comment","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/src/getLocationAgnosticMwApi.js","messages":[{"ruleId":"jsdoc/no-undefined-types","severity":1,"message":"The type 'mediaWiki' is undefined.","line":33,"column":1,"nodeType":"Block","endLine":33,"endColumn":1},{"ruleId":"es-x/no-object-assign","severity":2,"message":"ES2015 'Object.assign' method is forbidden.","line":41,"column":22,"nodeType":"MemberExpression","messageId":"forbidden","endLine":41,"endColumn":35}],"suppressedMessages":[],"errorCount":1,"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 *\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 = Object.assign( {}, 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":[{"ruleId":"array-bracket-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"computed-property-spacing","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"indent","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multi-spaces","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"spaced-comment","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/src/namespace.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"array-bracket-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"computed-property-spacing","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"indent","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multi-spaces","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"spaced-comment","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/tests/RepoApi.tests.js","messages":[{"ruleId":"jsdoc/require-param-type","severity":1,"message":"Missing JSDoc @param \"wb\" type.","line":2,"column":1,"nodeType":"Block","endLine":2,"endColumn":1},{"ruleId":"jsdoc/require-param-type","severity":1,"message":"Missing JSDoc @param \"QUnit\" type.","line":3,"column":1,"nodeType":"Block","endLine":3,"endColumn":1},{"ruleId":"jsdoc/require-param-type","severity":1,"message":"Missing JSDoc @param \"sinon\" type.","line":4,"column":1,"nodeType":"Block","endLine":4,"endColumn":1}],"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\tassert.strictEqual( getParam( mock.spy, 'returnto' ), 'currentPage' );\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\tassert.strictEqual( getParam( mock.spy, 'returnto' ), 'currentPage' );\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\t\tassert.strictEqual( getParam( mock.spy, 'returnto' ), 'currentPage' );\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\t\tassert.strictEqual( getParam( mock.spy, 'returnto' ), 'currentPage' );\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\tassert.strictEqual( getParam( mock.spy, 'returnto' ), 'currentPage' );\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\tassert.strictEqual( getParam( mock.spy, 'returnto' ), 'currentPage' );\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 and does not set returnto 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\tassert.strictEqual( getParam( mock.spy, 'returnto' ), undefined );\n\t} );\n\n\tQUnit.test( 'check post does not assert user and does set returnto 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\tassert.strictEqual( getParam( mock.spy, 'returnto' ), 'currentPage' );\n\t} );\n\n}( wikibase, QUnit, sinon ) );\n","usedDeprecatedRules":[{"ruleId":"array-bracket-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"computed-property-spacing","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"indent","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multi-spaces","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"spaced-comment","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"filePath":"/src/repo/tests/RepoApiError.tests.js","messages":[{"ruleId":"jsdoc/require-param-type","severity":1,"message":"Missing JSDoc @param \"wb\" type.","line":2,"column":1,"nodeType":"Block","endLine":2,"endColumn":1},{"ruleId":"jsdoc/require-param-type","severity":1,"message":"Missing JSDoc @param \"QUnit\" type.","line":3,"column":1,"nodeType":"Block","endLine":3,"endColumn":1},{"ruleId":"jsdoc/require-param-type","severity":1,"message":"Missing JSDoc @param \"sinon\" type.","line":4,"column":1,"nodeType":"Block","endLine":4,"endColumn":1}],"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\n( function ( wb, QUnit, sinon ) {\n\t'use strict';\n\n\tQUnit.module( 'wikibase.api.RepoApiError' );\n\n\tQUnit.test( 'Create and validate errors', function ( assert ) {\n\t\tvar error = new wb.api.RepoApiError( 'error-code', 'detailed message' );\n\n\t\tassert.strictEqual(\n\t\t\terror.code,\n\t\t\t'error-code',\n\t\t\t'Validated error code.'\n\t\t);\n\n\t\tassert.strictEqual(\n\t\t\terror.detailedMessage,\n\t\t\t'detailed message',\n\t\t\t'Validated error message.'\n\t\t);\n\n\t\tassert.strictEqual(\n\t\t\terror.message,\n\t\t\tmw.msg( 'wikibase-error-unknown' ),\n\t\t\t'Unknown error code: Used default generic unknown error message.'\n\t\t);\n\n\t\t// Check generic error message with parameters\n\t\terror = new wb.api.RepoApiError( 'error-code', 'detailed message', [ 'mock parameter' ] );\n\n\t\tassert.strictEqual(\n\t\t\terror.message,\n\t\t\tmw.msg( 'wikibase-error-unexpected' ),\n\t\t\t'Unexpected error code: Used default generic error message with parameters.'\n\t\t);\n\n\t\terror = new wb.api.RepoApiError( 'timeout', 'detailed message', [], 'remove' );\n\n\t\tassert.strictEqual(\n\t\t\terror.message,\n\t\t\tmw.msg( 'wikibase-error-remove-timeout' ),\n\t\t\t'Picked specific message according to passed \"action\" parameter.'\n\t\t);\n\n\t} );\n\n\tQUnit.test( 'Validate errors created via factory method, requested with unspecified errorformat',\n\t\tfunction ( assert ) {\n\t\t\tvar error = wb.api.RepoApiError.newFromApiResponse(\n\t\t\t\t{ error: { code: 'error-code', info: 'detailed message' } },\n\t\t\t\t'wbaction'\n\t\t\t);\n\n\t\t\tassert.strictEqual(\n\t\t\t\terror.code,\n\t\t\t\t'error-code',\n\t\t\t\t'Created error object via factory method.'\n\t\t\t);\n\n\t\t\tassert.strictEqual(\n\t\t\t\terror.detailedMessage,\n\t\t\t\t'detailed message',\n\t\t\t\t'Validated detailed message of error created via factory method.'\n\t\t\t);\n\n\t\t\tassert.strictEqual(\n\t\t\t\terror.action,\n\t\t\t\t'wbaction',\n\t\t\t\t'Validated API action'\n\t\t\t);\n\n\t\t\terror = wb.api.RepoApiError.newFromApiResponse( {\n\t\t\t\terror: { code: 'error-code', messages: { html: { '*': \"messages.html['*']\" } } }\n\t\t\t} );\n\n\t\t\tassert.strictEqual(\n\t\t\t\terror.detailedMessage,\n\t\t\t\t\"messages.html['*']\",\n\t\t\t\t'Non-array-like object structure kept for compatibility reasons'\n\t\t\t);\n\n\t\t\terror = wb.api.RepoApiError.newFromApiResponse( {\n\t\t\t\terror: {\n\t\t\t\t\tcode: 'error-code',\n\t\t\t\t\tmessages: [ { html: { '*': \"messages[0].html['*']\" } } ]\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tassert.strictEqual(\n\t\t\t\terror.detailedMessage,\n\t\t\t\t\"messages[0].html['*']\",\n\t\t\t\t'Array-like object structure with a single message'\n\t\t\t);\n\n\t\t\terror = wb.api.RepoApiError.newFromApiResponse( {\n\t\t\t\terror: { code: 'error-code', messages: [\n\t\t\t\t\t{ html: { '*': \"messages[0].html['*']\" } },\n\t\t\t\t\t{ html: { '*': \"messages[1].html['*']\" } }\n\t\t\t\t] }\n\t\t\t} );\n\n\t\t\tassert.strictEqual(\n\t\t\t\terror.detailedMessage,\n\t\t\t\t\"<ul><li>messages[0].html['*']</li><li>messages[1].html['*']</li></ul>\",\n\t\t\t\t'Array-like object structure with multiple messages'\n\t\t\t);\n\n\t\t\terror = wb.api.RepoApiError.newFromApiResponse( {\n\t\t\t\ttextStatus: 'textStatus', exception: 'exception'\n\t\t\t} );\n\n\t\t\tassert.strictEqual(\n\t\t\t\terror.code,\n\t\t\t\t'textStatus',\n\t\t\t\t'Created error via factory method passing an AJAX exception.'\n\t\t\t);\n\n\t\t\tassert.strictEqual(\n\t\t\t\terror.detailedMessage,\n\t\t\t\t'exception',\n\t\t\t\t'Validated detailed message of error created via factory method passing an AJAX '\n\t\t\t\t+ 'exception.'\n\t\t\t);\n\t\t} );\n\n\tQUnit.test( 'Validate parameterised message for API response, requested with unspecified errorformat',\n\t\tfunction ( assert ) {\n\t\t\tvar expectedMessageKey = 'wikibase-error-ui-no-external-page',\n\t\t\t\tmessageParams = [ 'external-client-parameter', 'page-parameter' ],\n\t\t\t\texpectedMessage = 'some formatted error message with parameters',\n\t\t\t\tmwMsgMock = sinon.stub( mw, 'msg' ).returns( expectedMessage ),\n\t\t\t\terror = wb.api.RepoApiError.newFromApiResponse(\n\t\t\t\t\t{ error: {\n\t\t\t\t\t\tcode: 'no-external-page',\n\t\t\t\t\t\tmessages: [ {\n\t\t\t\t\t\t\tparameters: messageParams\n\t\t\t\t\t\t} ]\n\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t'wbeditentity'\n\t\t\t\t);\n\n\t\t\tassert.true(\n\t\t\t\tmwMsgMock.calledWith( expectedMessageKey, messageParams[ 0 ], messageParams[ 1 ] ),\n\t\t\t\t'Called mw.msg with the correct msgKey and parameters to build the error message.'\n\t\t\t);\n\t\t\tassert.strictEqual(\n\t\t\t\terror.message,\n\t\t\t\texpectedMessage\n\t\t\t);\n\n\t\t\tmwMsgMock.restore();\n\t\t} );\n\n\tQUnit.test( 'Validate errors created via factory method, requested with errorformat=plaintext',\n\t\tfunction ( assert ) {\n\t\t\tvar error = wb.api.RepoApiError.newFromApiResponse( {\n\t\t\t\terrors: [ { code: 'error-code', '*': 'detailed message' } ]\n\t\t\t}\n\t\t\t);\n\n\t\t\tassert.strictEqual(\n\t\t\t\terror.code,\n\t\t\t\t'error-code',\n\t\t\t\t'Created error object via factory method.'\n\t\t\t);\n\n\t\t\tassert.strictEqual(\n\t\t\t\terror.detailedMessage,\n\t\t\t\t'detailed message',\n\t\t\t\t'Validated detailed message of error created via factory method.'\n\t\t\t);\n\n\t\t\terror = wb.api.RepoApiError.newFromApiResponse( {\n\t\t\t\terrors: [ {\n\t\t\t\t\tcode: 'error-code',\n\t\t\t\t\tdata: { messages: { html: { '*': \"messages.html['*']\" } } }\n\t\t\t\t} ]\n\t\t\t}\n\t\t\t);\n\n\t\t\tassert.strictEqual(\n\t\t\t\terror.detailedMessage,\n\t\t\t\t\"messages.html['*']\",\n\t\t\t\t'Non-array-like object structure kept for compatibility reasons'\n\t\t\t);\n\n\t\t\terror = wb.api.RepoApiError.newFromApiResponse( {\n\t\t\t\terrors: [\n\t\t\t\t\t{\n\t\t\t\t\t\tcode: 'error-code',\n\t\t\t\t\t\t'*': 'This is not very nice and will be ignored in favour of the next error.'\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tcode: 'error-code',\n\t\t\t\t\t\tdata: { messages: [\n\t\t\t\t\t\t\t{ html: { '*': \"messages[0].html['*']\" } }\n\t\t\t\t\t\t] }\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t} );\n\n\t\t\tassert.strictEqual(\n\t\t\t\terror.detailedMessage,\n\t\t\t\t\"messages[0].html['*']\",\n\t\t\t\t'Array-like object structure with a single message'\n\t\t\t);\n\n\t\t\terror = wb.api.RepoApiError.newFromApiResponse( {\n\t\t\t\terrors: [\n\t\t\t\t\t{\n\t\t\t\t\t\tcode: 'error-code',\n\t\t\t\t\t\tdata: { messages: [\n\t\t\t\t\t\t\t{ html: { '*': \"messages[0].html['*']\" } },\n\t\t\t\t\t\t\t{ html: { '*': \"messages[1].html['*']\" } }\n\t\t\t\t\t\t] }\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t} );\n\n\t\t\tassert.strictEqual(\n\t\t\t\terror.detailedMessage,\n\t\t\t\t\"<ul><li>messages[0].html['*']</li><li>messages[1].html['*']</li></ul>\",\n\t\t\t\t'Array-like object structure with multiple messages'\n\t\t\t);\n\n\t\t\terror = wb.api.RepoApiError.newFromApiResponse( {\n\t\t\t\ttextStatus: 'textStatus', exception: 'exception'\n\t\t\t} );\n\n\t\t\tassert.strictEqual(\n\t\t\t\terror.code,\n\t\t\t\t'textStatus',\n\t\t\t\t'Created error via factory method passing an AJAX exception.'\n\t\t\t);\n\n\t\t\tassert.strictEqual(\n\t\t\t\terror.detailedMessage,\n\t\t\t\t'exception',\n\t\t\t\t'Validated detailed message of error created via factory method passing an AJAX '\n\t\t\t\t+ 'exception.'\n\t\t\t);\n\t\t} );\n\n\tQUnit.test( 'Validate parameterised message for API response, requested with `errorformat=plaintext`',\n\t\tfunction ( assert ) {\n\t\t\tvar expectedMessageKey = 'wikibase-error-ui-no-external-page',\n\t\t\t\tmessageParams = [ 'external-client-parameter', 'page-parameter' ],\n\t\t\t\texpectedMessage = 'some formatted error message with parameters',\n\t\t\t\tmwMsgMock = sinon.stub( mw, 'msg' ).returns( expectedMessage ),\n\t\t\t\terror = wb.api.RepoApiError.newFromApiResponse(\n\t\t\t\t\t{ errors: [ {\n\t\t\t\t\t\tcode: 'no-external-page',\n\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\tmessages: [ {\n\t\t\t\t\t\t\t\tparameters: messageParams\n\t\t\t\t\t\t\t} ]\n\t\t\t\t\t\t}\n\t\t\t\t\t} ]\n\t\t\t\t\t},\n\t\t\t\t\t'wbeditentity'\n\t\t\t\t);\n\n\t\t\tassert.true(\n\t\t\t\tmwMsgMock.calledWith( expectedMessageKey, messageParams[ 0 ], messageParams[ 1 ] ),\n\t\t\t\t'calls mw.msg with the correct parameters to build the error message'\n\t\t\t);\n\t\t\tassert.strictEqual(\n\t\t\t\terror.message,\n\t\t\t\texpectedMessage\n\t\t\t);\n\n\t\t\tmwMsgMock.restore();\n\t\t} );\n}( wikibase, QUnit, sinon ) );\n","usedDeprecatedRules":[{"ruleId":"array-bracket-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"computed-property-spacing","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"indent","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multi-spaces","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"spaced-comment","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]},{"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":28,"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":[{"ruleId":"array-bracket-spacing","replacedBy":[]},{"ruleId":"block-spacing","replacedBy":[]},{"ruleId":"brace-style","replacedBy":[]},{"ruleId":"comma-dangle","replacedBy":[]},{"ruleId":"comma-spacing","replacedBy":[]},{"ruleId":"comma-style","replacedBy":[]},{"ruleId":"computed-property-spacing","replacedBy":[]},{"ruleId":"dot-location","replacedBy":[]},{"ruleId":"eol-last","replacedBy":[]},{"ruleId":"func-call-spacing","replacedBy":[]},{"ruleId":"indent","replacedBy":[]},{"ruleId":"key-spacing","replacedBy":[]},{"ruleId":"keyword-spacing","replacedBy":[]},{"ruleId":"linebreak-style","replacedBy":[]},{"ruleId":"max-statements-per-line","replacedBy":[]},{"ruleId":"new-parens","replacedBy":[]},{"ruleId":"no-floating-decimal","replacedBy":[]},{"ruleId":"no-multi-spaces","replacedBy":[]},{"ruleId":"no-multiple-empty-lines","replacedBy":[]},{"ruleId":"no-new-object","replacedBy":["no-object-constructor"]},{"ruleId":"no-tabs","replacedBy":[]},{"ruleId":"no-trailing-spaces","replacedBy":[]},{"ruleId":"no-whitespace-before-property","replacedBy":[]},{"ruleId":"object-curly-spacing","replacedBy":[]},{"ruleId":"quote-props","replacedBy":[]},{"ruleId":"quotes","replacedBy":[]},{"ruleId":"semi","replacedBy":[]},{"ruleId":"semi-spacing","replacedBy":[]},{"ruleId":"semi-style","replacedBy":[]},{"ruleId":"space-before-blocks","replacedBy":[]},{"ruleId":"space-before-function-paren","replacedBy":[]},{"ruleId":"space-in-parens","replacedBy":[]},{"ruleId":"space-infix-ops","replacedBy":[]},{"ruleId":"space-unary-ops","replacedBy":[]},{"ruleId":"spaced-comment","replacedBy":[]},{"ruleId":"switch-colon-spacing","replacedBy":[]},{"ruleId":"wrap-iife","replacedBy":[]},{"ruleId":"no-extra-semi","replacedBy":[]},{"ruleId":"no-mixed-spaces-and-tabs","replacedBy":[]}]}] --- end --- $ /usr/bin/npm ci --- 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 442 packages, and audited 443 packages in 14s 67 packages are looking for funding run `npm fund` for details 4 vulnerabilities (3 moderate, 1 high) To address issues that do not require attention, run: npm audit fix 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:1 warning The type 'dataTypes' is undefined jsdoc/no-undefined-types 22:2 warning ES2015 'Object.assign' method is forbidden es-x/no-object-assign 31:1 warning The type 'dataTypes' is undefined jsdoc/no-undefined-types 41:1 warning The type 'dataValues' is undefined jsdoc/no-undefined-types /src/repo/src/ParseValueCaller.js 23:2 warning ES2015 'Object.assign' method is forbidden es-x/no-object-assign /src/repo/src/RepoApi.js 25:1 warning The type 'mediaWiki' is undefined jsdoc/no-undefined-types 41:2 warning ES2015 'Object.assign' method is forbidden es-x/no-object-assign 43:1 warning The type 'mediaWiki' is undefined jsdoc/no-undefined-types 68:1 warning The type 'jqXHR' is undefined jsdoc/no-undefined-types 103:1 warning The type 'jqXHR' is undefined jsdoc/no-undefined-types 149:1 warning The type 'jqXHR' is undefined jsdoc/no-undefined-types 197:1 warning The type 'jqXHR' is undefined jsdoc/no-undefined-types 245:1 warning The type 'jqXHR' is undefined jsdoc/no-undefined-types 294:1 warning The type 'jqXHR' is undefined jsdoc/no-undefined-types 329:1 warning The type 'jqXHR' is undefined jsdoc/no-undefined-types 371:1 warning The type 'jqXHR' is undefined jsdoc/no-undefined-types 415:1 warning The type 'jqXHR' is undefined jsdoc/no-undefined-types 459:1 warning The type 'jqXHR' is undefined jsdoc/no-undefined-types 496:1 warning The type 'jqXHR' is undefined jsdoc/no-undefined-types 538:1 warning The type 'jqXHR' is undefined jsdoc/no-undefined-types 584:1 warning The type 'jqXHR' is undefined jsdoc/no-undefined-types 649:1 warning The type 'jqXHR' is undefined jsdoc/no-undefined-types 681:1 warning The type 'jqXHR' is undefined jsdoc/no-undefined-types /src/repo/src/RepoApiError.js 39:2 warning ES2015 'Object.assign' method is forbidden es-x/no-object-assign /src/repo/src/getLocationAgnosticMwApi.js 33:1 warning The type 'mediaWiki' is undefined jsdoc/no-undefined-types 41:22 warning ES2015 'Object.assign' method is forbidden es-x/no-object-assign /src/repo/tests/RepoApi.tests.js 2:1 warning Missing JSDoc @param "wb" type jsdoc/require-param-type 3:1 warning Missing JSDoc @param "QUnit" type jsdoc/require-param-type 4:1 warning Missing JSDoc @param "sinon" type jsdoc/require-param-type /src/repo/tests/RepoApiError.tests.js 2:1 warning Missing JSDoc @param "wb" type jsdoc/require-param-type 3:1 warning Missing JSDoc @param "QUnit" type jsdoc/require-param-type 4:1 warning Missing JSDoc @param "sinon" type jsdoc/require-param-type ✖ 32 problems (0 errors, 32 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. >> 215 assertions (in 65ms), passed: 215, failed: 0 Done. --- end --- $ /usr/bin/npm audit --json --- 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": 1096727, "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" }, "tough-cookie" ], "effects": [ "phantomjs-prebuilt" ], "range": "*", "nodes": [ "node_modules/request" ], "fixAvailable": false }, "tough-cookie": { "name": "tough-cookie", "severity": "moderate", "isDirect": false, "via": [ { "source": 1097682, "name": "tough-cookie", "dependency": "tough-cookie", "title": "tough-cookie Prototype Pollution vulnerability", "url": "https://github.com/advisories/GHSA-72xf-g2v4-qvf3", "severity": "moderate", "cwe": [ "CWE-1321" ], "cvss": { "score": 6.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N" }, "range": "<4.1.3" } ], "effects": [ "request" ], "range": "<4.1.3", "nodes": [ "node_modules/tough-cookie" ], "fixAvailable": false }, "ws": { "name": "ws", "severity": "high", "isDirect": false, "via": [ { "source": 1097616, "name": "ws", "dependency": "ws", "title": "ws affected by a DoS when handling a request with many HTTP headers", "url": "https://github.com/advisories/GHSA-3h5v-q93c-6h6q", "severity": "high", "cwe": [ "CWE-476" ], "cvss": { "score": 7.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H" }, "range": ">=7.0.0 <7.5.10" } ], "effects": [], "range": "7.0.0 - 7.5.9", "nodes": [ "node_modules/ws" ], "fixAvailable": true } }, "metadata": { "vulnerabilities": { "info": 0, "low": 0, "moderate": 3, "high": 1, "critical": 0, "total": 4 }, "dependencies": { "prod": 3, "dev": 440, "optional": 2, "peer": 1, "peerOptional": 0, "total": 442 } } } --- end --- Attempting to npm audit fix $ /usr/bin/npm audit fix --dry-run --only=dev --json --- 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": 1, "audited": 443, "funding": 67, "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": 1096727, "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" }, "tough-cookie" ], "effects": [ "phantomjs-prebuilt" ], "range": "*", "nodes": [ "node_modules/request" ], "fixAvailable": false }, "tough-cookie": { "name": "tough-cookie", "severity": "moderate", "isDirect": false, "via": [ { "source": 1097682, "name": "tough-cookie", "dependency": "tough-cookie", "title": "tough-cookie Prototype Pollution vulnerability", "url": "https://github.com/advisories/GHSA-72xf-g2v4-qvf3", "severity": "moderate", "cwe": [ "CWE-1321" ], "cvss": { "score": 6.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N" }, "range": "<4.1.3" } ], "effects": [ "request" ], "range": "<4.1.3", "nodes": [ "node_modules/tough-cookie" ], "fixAvailable": false }, "ws": { "name": "ws", "severity": "high", "isDirect": false, "via": [ { "source": 1097616, "name": "ws", "dependency": "ws", "title": "ws affected by a DoS when handling a request with many HTTP headers", "url": "https://github.com/advisories/GHSA-3h5v-q93c-6h6q", "severity": "high", "cwe": [ "CWE-476" ], "cvss": { "score": 7.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H" }, "range": ">=7.0.0 <7.5.10" } ], "effects": [], "range": "7.0.0 - 7.5.9", "nodes": [ "" ], "fixAvailable": true } }, "metadata": { "vulnerabilities": { "info": 0, "low": 0, "moderate": 3, "high": 1, "critical": 0, "total": 4 }, "dependencies": { "prod": 3, "dev": 440, "optional": 2, "peer": 1, "peerOptional": 0, "total": 442 } } } } --- end --- {"added": 0, "removed": 0, "changed": 1, "audited": 443, "funding": 67, "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": 1096727, "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"}, "tough-cookie"], "effects": ["phantomjs-prebuilt"], "range": "*", "nodes": ["node_modules/request"], "fixAvailable": false}, "tough-cookie": {"name": "tough-cookie", "severity": "moderate", "isDirect": false, "via": [{"source": 1097682, "name": "tough-cookie", "dependency": "tough-cookie", "title": "tough-cookie Prototype Pollution vulnerability", "url": "https://github.com/advisories/GHSA-72xf-g2v4-qvf3", "severity": "moderate", "cwe": ["CWE-1321"], "cvss": {"score": 6.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N"}, "range": "<4.1.3"}], "effects": ["request"], "range": "<4.1.3", "nodes": ["node_modules/tough-cookie"], "fixAvailable": false}, "ws": {"name": "ws", "severity": "high", "isDirect": false, "via": [{"source": 1097616, "name": "ws", "dependency": "ws", "title": "ws affected by a DoS when handling a request with many HTTP headers", "url": "https://github.com/advisories/GHSA-3h5v-q93c-6h6q", "severity": "high", "cwe": ["CWE-476"], "cvss": {"score": 7.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"}, "range": ">=7.0.0 <7.5.10"}], "effects": [], "range": "7.0.0 - 7.5.9", "nodes": [""], "fixAvailable": true}}, "metadata": {"vulnerabilities": {"info": 0, "low": 0, "moderate": 3, "high": 1, "critical": 0, "total": 4}, "dependencies": {"prod": 3, "dev": 440, "optional": 2, "peer": 1, "peerOptional": 0, "total": 442}}}} $ /usr/bin/npm audit fix --only=dev --- 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 443 packages in 1s 67 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 Depends on vulnerable versions of tough-cookie No fix available node_modules/request phantomjs-prebuilt * Depends on vulnerable versions of request node_modules/phantomjs-prebuilt tough-cookie <4.1.3 Severity: moderate tough-cookie Prototype Pollution vulnerability - https://github.com/advisories/GHSA-72xf-g2v4-qvf3 No fix available node_modules/tough-cookie 3 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 --- 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 442 packages, and audited 443 packages in 13s 67 packages are looking for funding run `npm fund` for details 3 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:1 warning The type 'dataTypes' is undefined jsdoc/no-undefined-types 22:2 warning ES2015 'Object.assign' method is forbidden es-x/no-object-assign 31:1 warning The type 'dataTypes' is undefined jsdoc/no-undefined-types 41:1 warning The type 'dataValues' is undefined jsdoc/no-undefined-types /src/repo/src/ParseValueCaller.js 23:2 warning ES2015 'Object.assign' method is forbidden es-x/no-object-assign /src/repo/src/RepoApi.js 25:1 warning The type 'mediaWiki' is undefined jsdoc/no-undefined-types 41:2 warning ES2015 'Object.assign' method is forbidden es-x/no-object-assign 43:1 warning The type 'mediaWiki' is undefined jsdoc/no-undefined-types 68:1 warning The type 'jqXHR' is undefined jsdoc/no-undefined-types 103:1 warning The type 'jqXHR' is undefined jsdoc/no-undefined-types 149:1 warning The type 'jqXHR' is undefined jsdoc/no-undefined-types 197:1 warning The type 'jqXHR' is undefined jsdoc/no-undefined-types 245:1 warning The type 'jqXHR' is undefined jsdoc/no-undefined-types 294:1 warning The type 'jqXHR' is undefined jsdoc/no-undefined-types 329:1 warning The type 'jqXHR' is undefined jsdoc/no-undefined-types 371:1 warning The type 'jqXHR' is undefined jsdoc/no-undefined-types 415:1 warning The type 'jqXHR' is undefined jsdoc/no-undefined-types 459:1 warning The type 'jqXHR' is undefined jsdoc/no-undefined-types 496:1 warning The type 'jqXHR' is undefined jsdoc/no-undefined-types 538:1 warning The type 'jqXHR' is undefined jsdoc/no-undefined-types 584:1 warning The type 'jqXHR' is undefined jsdoc/no-undefined-types 649:1 warning The type 'jqXHR' is undefined jsdoc/no-undefined-types 681:1 warning The type 'jqXHR' is undefined jsdoc/no-undefined-types /src/repo/src/RepoApiError.js 39:2 warning ES2015 'Object.assign' method is forbidden es-x/no-object-assign /src/repo/src/getLocationAgnosticMwApi.js 33:1 warning The type 'mediaWiki' is undefined jsdoc/no-undefined-types 41:22 warning ES2015 'Object.assign' method is forbidden es-x/no-object-assign /src/repo/tests/RepoApi.tests.js 2:1 warning Missing JSDoc @param "wb" type jsdoc/require-param-type 3:1 warning Missing JSDoc @param "QUnit" type jsdoc/require-param-type 4:1 warning Missing JSDoc @param "sinon" type jsdoc/require-param-type /src/repo/tests/RepoApiError.tests.js 2:1 warning Missing JSDoc @param "wb" type jsdoc/require-param-type 3:1 warning Missing JSDoc @param "QUnit" type jsdoc/require-param-type 4:1 warning Missing JSDoc @param "sinon" type jsdoc/require-param-type ✖ 32 problems (0 errors, 32 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. >> 215 assertions (in 66ms), passed: 215, failed: 0 Done. --- end --- {"1097616": {"source": 1097616, "name": "ws", "dependency": "ws", "title": "ws affected by a DoS when handling a request with many HTTP headers", "url": "https://github.com/advisories/GHSA-3h5v-q93c-6h6q", "severity": "high", "cwe": ["CWE-476"], "cvss": {"score": 7.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"}, "range": ">=7.0.0 <7.5.10"}} Upgrading n:ws from 7.5.5 -> 7.5.10 $ package-lock-lint package-lock.json --- stdout --- Checking package-lock.json --- end --- build: Updating npm dependencies * eslint-config-wikimedia: 0.28.0 → 0.28.2 The following rules are failing and were disabled: * es-x/no-object-assign * ws: 7.5.5 → 7.5.10 * https://github.com/advisories/GHSA-3h5v-q93c-6h6q $ git add . --- stdout --- --- end --- $ git commit -F /tmp/tmpbq4clmbr --- stdout --- [master a26d2f7] build: Updating npm dependencies 8 files changed, 30 insertions(+), 29 deletions(-) --- end --- $ git format-patch HEAD~1 --stdout --- stdout --- From a26d2f73f3845d2d8c37c05c6f70c1a25b72e18d Mon Sep 17 00:00:00 2001 From: libraryupgrader <tools.libraryupgrader@tools.wmflabs.org> Date: Sat, 29 Jun 2024 06:21:12 +0000 Subject: [PATCH] build: Updating npm dependencies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * eslint-config-wikimedia: 0.28.0 → 0.28.2 The following rules are failing and were disabled: * es-x/no-object-assign * ws: 7.5.5 → 7.5.10 * https://github.com/advisories/GHSA-3h5v-q93c-6h6q Change-Id: Iec901a271173958dfe106dea6e56ee62e7c87e6c --- .eslintrc.json | 3 ++- package-lock.json | 44 ++++++++++++++++----------------- package.json | 2 +- src/FormatValueCaller.js | 2 +- src/ParseValueCaller.js | 2 +- src/RepoApi.js | 2 +- src/RepoApiError.js | 2 +- src/getLocationAgnosticMwApi.js | 2 +- 8 files changed, 30 insertions(+), 29 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 47f47cc..cfca762 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -16,6 +16,7 @@ "jsdoc/newline-after-description": "off", "jsdoc/require-returns": "off", "jsdoc/require-returns-check": "off", - "no-jquery/no-extend": "warn" + "no-jquery/no-extend": "warn", + "es-x/no-object-assign": "warn" } } diff --git a/package-lock.json b/package-lock.json index 377860d..31751d3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "wikibase-data-values": "^0.10.0" }, "devDependencies": { - "eslint-config-wikimedia": "0.28.0", + "eslint-config-wikimedia": "0.28.2", "grunt": "1.6.1", "grunt-contrib-qunit": "^5.1.0", "grunt-eslint": "24.3.0", @@ -1337,9 +1337,9 @@ } }, "node_modules/eslint-config-wikimedia": { - "version": "0.28.0", - "resolved": "https://registry.npmjs.org/eslint-config-wikimedia/-/eslint-config-wikimedia-0.28.0.tgz", - "integrity": "sha512-qDkELhXoDvQP+kYYo5MilhvqJ4Agk78Pzu95K1l1h68xPEWagD4k/dvrgmVyKjcp5KyAnZr++7qChLiFhDdBDA==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/eslint-config-wikimedia/-/eslint-config-wikimedia-0.28.2.tgz", + "integrity": "sha512-5+rdnT7wH1gpKAO6tHYThg78eMhZMruJzvqku3Y5iaEY/A7kSKLFpA/vOj/snys9fKjDHC9BXmArQh+agkOoJQ==", "dev": true, "dependencies": { "browserslist-config-wikimedia": "^0.7.0", @@ -1352,7 +1352,7 @@ "eslint-plugin-mediawiki": "^0.7.0", "eslint-plugin-mocha": "^10.4.3", "eslint-plugin-n": "^17.7.0", - "eslint-plugin-no-jquery": "^2.7.0", + "eslint-plugin-no-jquery": "^3.0.1", "eslint-plugin-qunit": "^8.1.1", "eslint-plugin-security": "^1.7.1", "eslint-plugin-unicorn": "^53.0.0", @@ -1617,12 +1617,12 @@ } }, "node_modules/eslint-plugin-no-jquery": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-no-jquery/-/eslint-plugin-no-jquery-2.7.0.tgz", - "integrity": "sha512-Aeg7dA6GTH1AcWLlBtWNzOU9efK5KpNi7b0EhBO0o0M+awyzguUUo8gF6hXGjQ9n5h8/uRtYv9zOqQkeC5CG0w==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-no-jquery/-/eslint-plugin-no-jquery-3.0.2.tgz", + "integrity": "sha512-n/+6p6PFhWDNPVLJj1463hw4OTIRBbROGcbhmtOHTgw7yihSKzkwZiQ00EJTneyeR3jRiw5lpWSMCCBhtb8t2g==", "dev": true, "peerDependencies": { - "eslint": ">=2.3.0" + "eslint": ">=8.0.0" } }, "node_modules/eslint-plugin-qunit": { @@ -4983,9 +4983,9 @@ "dev": true }, "node_modules/ws": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.5.tgz", - "integrity": "sha512-BAkMFcAzl8as1G/hArkxOxq3G7pjUqQ3gzYbLL0/5zNkph70e+lCoxBGnm6AW1+/aiNeV4fnKqZ8m4GZewmH2w==", + "version": "7.5.10", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", + "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", "dev": true, "engines": { "node": ">=8.3.0" @@ -6103,9 +6103,9 @@ } }, "eslint-config-wikimedia": { - "version": "0.28.0", - "resolved": "https://registry.npmjs.org/eslint-config-wikimedia/-/eslint-config-wikimedia-0.28.0.tgz", - "integrity": "sha512-qDkELhXoDvQP+kYYo5MilhvqJ4Agk78Pzu95K1l1h68xPEWagD4k/dvrgmVyKjcp5KyAnZr++7qChLiFhDdBDA==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/eslint-config-wikimedia/-/eslint-config-wikimedia-0.28.2.tgz", + "integrity": "sha512-5+rdnT7wH1gpKAO6tHYThg78eMhZMruJzvqku3Y5iaEY/A7kSKLFpA/vOj/snys9fKjDHC9BXmArQh+agkOoJQ==", "dev": true, "requires": { "browserslist-config-wikimedia": "^0.7.0", @@ -6118,7 +6118,7 @@ "eslint-plugin-mediawiki": "^0.7.0", "eslint-plugin-mocha": "^10.4.3", "eslint-plugin-n": "^17.7.0", - "eslint-plugin-no-jquery": "^2.7.0", + "eslint-plugin-no-jquery": "^3.0.1", "eslint-plugin-qunit": "^8.1.1", "eslint-plugin-security": "^1.7.1", "eslint-plugin-unicorn": "^53.0.0", @@ -6292,9 +6292,9 @@ } }, "eslint-plugin-no-jquery": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-no-jquery/-/eslint-plugin-no-jquery-2.7.0.tgz", - "integrity": "sha512-Aeg7dA6GTH1AcWLlBtWNzOU9efK5KpNi7b0EhBO0o0M+awyzguUUo8gF6hXGjQ9n5h8/uRtYv9zOqQkeC5CG0w==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-no-jquery/-/eslint-plugin-no-jquery-3.0.2.tgz", + "integrity": "sha512-n/+6p6PFhWDNPVLJj1463hw4OTIRBbROGcbhmtOHTgw7yihSKzkwZiQ00EJTneyeR3jRiw5lpWSMCCBhtb8t2g==", "dev": true, "requires": {} }, @@ -8805,9 +8805,9 @@ "dev": true }, "ws": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.5.tgz", - "integrity": "sha512-BAkMFcAzl8as1G/hArkxOxq3G7pjUqQ3gzYbLL0/5zNkph70e+lCoxBGnm6AW1+/aiNeV4fnKqZ8m4GZewmH2w==", + "version": "7.5.10", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", + "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", "dev": true, "requires": {} }, diff --git a/package.json b/package.json index e001a00..a5bd754 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "wikibase-data-values": "^0.10.0" }, "devDependencies": { - "eslint-config-wikimedia": "0.28.0", + "eslint-config-wikimedia": "0.28.2", "grunt": "1.6.1", "grunt-contrib-qunit": "^5.1.0", "grunt-eslint": "24.3.0", diff --git a/src/FormatValueCaller.js b/src/FormatValueCaller.js index 199b926..c293d09 100644 --- a/src/FormatValueCaller.js +++ b/src/FormatValueCaller.js @@ -19,7 +19,7 @@ this._dataTypeStore = dataTypeStore; }; - $.extend( SELF.prototype, { + Object.assign( SELF.prototype, { /** * @property {wikibase.api.RepoApi} diff --git a/src/ParseValueCaller.js b/src/ParseValueCaller.js index 4dd06c3..40569a0 100644 --- a/src/ParseValueCaller.js +++ b/src/ParseValueCaller.js @@ -20,7 +20,7 @@ this._api = api; }; - $.extend( SELF.prototype, { + Object.assign( SELF.prototype, { /** * @property {wikibase.api.RepoApi} diff --git a/src/RepoApi.js b/src/RepoApi.js index dea8f3c..3e73aa1 100644 --- a/src/RepoApi.js +++ b/src/RepoApi.js @@ -38,7 +38,7 @@ this._tags = tags || []; }; - $.extend( SELF.prototype, { + Object.assign( SELF.prototype, { /** * @property {mediaWiki.Api} * @private diff --git a/src/RepoApiError.js b/src/RepoApiError.js index 0ac8ba6..a2ee34d 100644 --- a/src/RepoApiError.js +++ b/src/RepoApiError.js @@ -36,7 +36,7 @@ }; SELF.prototype = new Error(); - $.extend( SELF.prototype, + Object.assign( SELF.prototype, { /** * Message keys of API related error messages. diff --git a/src/getLocationAgnosticMwApi.js b/src/getLocationAgnosticMwApi.js index b44028a..1b1ccda 100644 --- a/src/getLocationAgnosticMwApi.js +++ b/src/getLocationAgnosticMwApi.js @@ -38,7 +38,7 @@ return new mw.ForeignApi( apiEndpoint, options ); } - var mwApiOptions = $.extend( {}, options, { + var mwApiOptions = Object.assign( {}, options, { ajax: { url: apiEndpoint } -- 2.39.2 --- end ---