From 5086250fdadcaa0bf8b5f93e17f2b43133f22400 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 17 May 2023 15:58:12 +0000 Subject: [PATCH 1/2] Bump eslint-plugin-unicorn from 46.0.0 to 47.0.0 Bumps [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) from 46.0.0 to 47.0.0. - [Release notes](https://github.com/sindresorhus/eslint-plugin-unicorn/releases) - [Commits](https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v46.0.0...v47.0.0) --- updated-dependencies: - dependency-name: eslint-plugin-unicorn dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package-lock.json | 92 +++++++++++++++++++++++++---------------------- package.json | 2 +- 2 files changed, 50 insertions(+), 44 deletions(-) diff --git a/package-lock.json b/package-lock.json index e5fd4bc18..d9468e449 100644 --- a/package-lock.json +++ b/package-lock.json @@ -44,7 +44,7 @@ "eslint-plugin-jsdoc": "44.2.4", "eslint-plugin-mocha": "10.1.0", "eslint-plugin-prettier": "4.2.1", - "eslint-plugin-unicorn": "46.0.0", + "eslint-plugin-unicorn": "47.0.0", "fast-xml-parser": "4.2.2", "husky": "8.0.3", "jsdoc-to-markdown": "8.0.0", @@ -521,9 +521,9 @@ } }, "node_modules/@eslint-community/eslint-utils": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.2.0.tgz", - "integrity": "sha512-gB8T4H4DEfX2IV9zGDJPOBgP1e/DbfCPDTtEqUMckpvzS1OYtva8JdFYBqMwYk7xAQ429WGF/UPqn8uQ//h2vQ==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", "dev": true, "dependencies": { "eslint-visitor-keys": "^3.3.0" @@ -3296,43 +3296,49 @@ } }, "node_modules/eslint-plugin-unicorn": { - "version": "46.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-46.0.0.tgz", - "integrity": "sha512-j07WkC+PFZwk8J33LYp6JMoHa1lXc1u6R45pbSAipjpfpb7KIGr17VE2D685zCxR5VL4cjrl65kTJflziQWMDA==", + "version": "47.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-47.0.0.tgz", + "integrity": "sha512-ivB3bKk7fDIeWOUmmMm9o3Ax9zbMz1Bsza/R2qm46ufw4T6VBFBaJIR1uN3pCKSmSXm8/9Nri8V+iUut1NhQGA==", "dev": true, "dependencies": { "@babel/helper-validator-identifier": "^7.19.1", - "@eslint-community/eslint-utils": "^4.1.2", - "ci-info": "^3.6.1", + "@eslint-community/eslint-utils": "^4.4.0", + "ci-info": "^3.8.0", "clean-regexp": "^1.0.0", - "esquery": "^1.4.0", + "esquery": "^1.5.0", "indent-string": "^4.0.0", - "is-builtin-module": "^3.2.0", + "is-builtin-module": "^3.2.1", "jsesc": "^3.0.2", "lodash": "^4.17.21", "pluralize": "^8.0.0", "read-pkg-up": "^7.0.1", "regexp-tree": "^0.1.24", - "regjsparser": "^0.9.1", + "regjsparser": "^0.10.0", "safe-regex": "^2.1.1", "semver": "^7.3.8", "strip-indent": "^3.0.0" }, "engines": { - "node": ">=14.18" + "node": ">=16" }, "funding": { "url": "https://github.com/sindresorhus/eslint-plugin-unicorn?sponsor=1" }, "peerDependencies": { - "eslint": ">=8.28.0" + "eslint": ">=8.38.0" } }, "node_modules/eslint-plugin-unicorn/node_modules/ci-info": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.7.0.tgz", - "integrity": "sha512-2CpRNYmImPx+RXKLq6jko/L07phmS9I02TyqkcNU20GCF/GgaWvc58hPtjxDX8lPpkdwc9sNh72V9k00S7ezog==", + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", + "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], "engines": { "node": ">=8" } @@ -4928,9 +4934,9 @@ } }, "node_modules/is-builtin-module": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.0.tgz", - "integrity": "sha512-phDA4oSGt7vl1n5tJvTWooWWAsXLY+2xCnxNqvKhGEzujg+A43wPlPOyDg3C8XQHN+6k/JTQWJ/j0dQh/qr+Hw==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.1.tgz", + "integrity": "sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==", "dev": true, "dependencies": { "builtin-modules": "^3.3.0" @@ -8396,9 +8402,9 @@ } }, "node_modules/regjsparser": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.9.1.tgz", - "integrity": "sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==", + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.10.0.tgz", + "integrity": "sha512-qx+xQGZVsy55CH0a1hiVwHmqjLryfh7wQyF5HO07XJ9f7dQMY/gPQHhlyDkIzJKC+x2fUCpCcUODUUUFrm7SHA==", "dev": true, "dependencies": { "jsesc": "~0.5.0" @@ -10344,9 +10350,9 @@ } }, "@eslint-community/eslint-utils": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.2.0.tgz", - "integrity": "sha512-gB8T4H4DEfX2IV9zGDJPOBgP1e/DbfCPDTtEqUMckpvzS1OYtva8JdFYBqMwYk7xAQ429WGF/UPqn8uQ//h2vQ==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", "dev": true, "requires": { "eslint-visitor-keys": "^3.3.0" @@ -12463,33 +12469,33 @@ } }, "eslint-plugin-unicorn": { - "version": "46.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-46.0.0.tgz", - "integrity": "sha512-j07WkC+PFZwk8J33LYp6JMoHa1lXc1u6R45pbSAipjpfpb7KIGr17VE2D685zCxR5VL4cjrl65kTJflziQWMDA==", + "version": "47.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-47.0.0.tgz", + "integrity": "sha512-ivB3bKk7fDIeWOUmmMm9o3Ax9zbMz1Bsza/R2qm46ufw4T6VBFBaJIR1uN3pCKSmSXm8/9Nri8V+iUut1NhQGA==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.19.1", - "@eslint-community/eslint-utils": "^4.1.2", - "ci-info": "^3.6.1", + "@eslint-community/eslint-utils": "^4.4.0", + "ci-info": "^3.8.0", "clean-regexp": "^1.0.0", - "esquery": "^1.4.0", + "esquery": "^1.5.0", "indent-string": "^4.0.0", - "is-builtin-module": "^3.2.0", + "is-builtin-module": "^3.2.1", "jsesc": "^3.0.2", "lodash": "^4.17.21", "pluralize": "^8.0.0", "read-pkg-up": "^7.0.1", "regexp-tree": "^0.1.24", - "regjsparser": "^0.9.1", + "regjsparser": "^0.10.0", "safe-regex": "^2.1.1", "semver": "^7.3.8", "strip-indent": "^3.0.0" }, "dependencies": { "ci-info": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.7.0.tgz", - "integrity": "sha512-2CpRNYmImPx+RXKLq6jko/L07phmS9I02TyqkcNU20GCF/GgaWvc58hPtjxDX8lPpkdwc9sNh72V9k00S7ezog==", + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", + "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", "dev": true }, "jsesc": { @@ -13603,9 +13609,9 @@ "dev": true }, "is-builtin-module": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.0.tgz", - "integrity": "sha512-phDA4oSGt7vl1n5tJvTWooWWAsXLY+2xCnxNqvKhGEzujg+A43wPlPOyDg3C8XQHN+6k/JTQWJ/j0dQh/qr+Hw==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.1.tgz", + "integrity": "sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==", "dev": true, "requires": { "builtin-modules": "^3.3.0" @@ -16203,9 +16209,9 @@ } }, "regjsparser": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.9.1.tgz", - "integrity": "sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==", + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.10.0.tgz", + "integrity": "sha512-qx+xQGZVsy55CH0a1hiVwHmqjLryfh7wQyF5HO07XJ9f7dQMY/gPQHhlyDkIzJKC+x2fUCpCcUODUUUFrm7SHA==", "dev": true, "requires": { "jsesc": "~0.5.0" diff --git a/package.json b/package.json index c06aca5d2..ca03eead0 100644 --- a/package.json +++ b/package.json @@ -90,7 +90,7 @@ "eslint-plugin-jsdoc": "44.2.4", "eslint-plugin-mocha": "10.1.0", "eslint-plugin-prettier": "4.2.1", - "eslint-plugin-unicorn": "46.0.0", + "eslint-plugin-unicorn": "47.0.0", "fast-xml-parser": "4.2.2", "husky": "8.0.3", "jsdoc-to-markdown": "8.0.0", From 0680d688274caf269c3aabff7845fba9fa654438 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Berkefeld?= Date: Wed, 17 May 2023 20:58:41 +0200 Subject: [PATCH 2/2] #0: eslint --fix --- lib/Deployer.js | 1 - lib/metadataTypes/Asset.js | 2 +- lib/metadataTypes/User.js | 4 ++-- lib/util/auth.js | 4 ++++ 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/Deployer.js b/lib/Deployer.js index 9aa8f8024..29e267c2d 100644 --- a/lib/Deployer.js +++ b/lib/Deployer.js @@ -18,7 +18,6 @@ class Deployer { /** * Creates a Deployer, uses v2 auth if v2AuthOptions are passed. * - * * @param {TYPE.Mcdevrc} properties General configuration to be used in retrieve * @param {TYPE.BuObject} buObject properties for auth */ diff --git a/lib/metadataTypes/Asset.js b/lib/metadataTypes/Asset.js index c4c370167..6c6b13dc6 100644 --- a/lib/metadataTypes/Asset.js +++ b/lib/metadataTypes/Asset.js @@ -235,7 +235,7 @@ class Asset extends MetadataType { rightOperand: { property: 'id', simpleOperator: 'greaterThan', - value: items[items.length - 1].id, + value: items.at(-1).id, }, }; lastPage = 0; diff --git a/lib/metadataTypes/User.js b/lib/metadataTypes/User.js index d53a3ff75..e2343fc1a 100644 --- a/lib/metadataTypes/User.js +++ b/lib/metadataTypes/User.js @@ -215,12 +215,12 @@ class User extends MetadataType { ); if (action === 'create') { - const createItem = metadataToCreate[metadataToCreate.length - 1]; + const createItem = metadataToCreate.at(-1); User._setPasswordForNewUser(createItem); User._prepareRoleAssignments({ after: createItem }); User._prepareBuAssignments(metadata[metadataKey], null, createItem); } else if (action === 'update') { - const updateItem = metadataToUpdate[metadataToUpdate.length - 1]; + const updateItem = metadataToUpdate.at(-1); User._prepareRoleAssignments(updateItem); User._prepareBuAssignments(metadata[metadataKey], updateItem, null); } diff --git a/lib/util/auth.js b/lib/util/auth.js index e569d1ff2..1109b945f 100644 --- a/lib/util/auth.js +++ b/lib/util/auth.js @@ -11,6 +11,7 @@ let authfile; const Auth = { /** * For each business unit, set up base credentials to be used. + * * @param {TYPE.AuthObject} authObject details for * @param {string} credential of the instance * @returns {void} @@ -47,6 +48,7 @@ const Auth = { }, /** * Returns an SDK instance to be used for API calls + * * @param {TYPE.BuObject} buObject information about current context * @returns {SDK} auth object */ @@ -71,6 +73,7 @@ const Auth = { }, /** * helper to clear all auth sessions + * * @returns {void} */ clearSessions() { @@ -80,6 +83,7 @@ const Auth = { }; /** * Returns an SDK instance to be used for API calls + * * @param {string} sessionKey key for specific BU * @param {TYPE.AuthObject} authObject credentials for specific BU * @returns {SDK} auth object