From 8d54197bfd0d6b5f249d08c8d49ebe4812fead84 Mon Sep 17 00:00:00 2001 From: Shazron Abdullah Date: Sun, 9 Jul 2023 21:50:34 +0800 Subject: [PATCH] chore(dev-deps): update @adobe/eslint-config-aio-lib-config to v2 and updated its peer-deps --- package.json | 15 +++++++------- src/index.js | 12 +++++------ test/mock.js | 56 ++++++++++++++++++++++++++-------------------------- 3 files changed, 42 insertions(+), 41 deletions(-) diff --git a/package.json b/package.json index 4624e98..8d78789 100644 --- a/package.json +++ b/package.json @@ -19,15 +19,16 @@ "swagger-client": "3.13.5" }, "devDependencies": { - "@adobe/eslint-config-aio-lib-config": "^1.4.0", + "@adobe/eslint-config-aio-lib-config": "^2.0.0", "dotenv": "^8.1.0", - "eslint": "^7.32.0", - "eslint-config-standard": "^16.0.3", - "eslint-plugin-import": "^2.25.3", + "eslint": "^8.44.0", + "eslint-config-standard": "^17.1.0", + "eslint-plugin-import": "^2.27.5", "eslint-plugin-jest": "^23.20.0", - "eslint-plugin-jsdoc": "^37.2.0", + "eslint-plugin-jsdoc": "^37.9.7", + "eslint-plugin-n": "^15.7.0", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-promise": "^5.2.0", + "eslint-plugin-promise": "^6.1.1", "eslint-plugin-standard": "^5.0.0", "fetch-mock": "^9.10.3", "jest": "^29.6.1", @@ -36,7 +37,7 @@ "jest-plugin-fs": "^2.9.0", "jsdoc-to-markdown": "^5.0.0", "openapi-schema-validator": "^12.1.0", - "typescript": "^4.5.4" + "typescript": "^5.1.6" }, "jest": { "testPathIgnorePatterns": [ diff --git a/src/index.js b/src/index.js index 29b55e5..0149826 100644 --- a/src/index.js +++ b/src/index.js @@ -80,7 +80,7 @@ class TargetCoreAPI { // init swagger client const spec = require('../spec/target_api.json') const swagger = new Swagger({ - spec: spec, + spec, usePromise: true }) this.sdk = (await swagger) @@ -278,7 +278,7 @@ class TargetCoreAPI { const params = {} params.id = id const body = { - name: name + name } const sdkDetails = { params, body } const headers = options.headers ? options.headers : {} @@ -308,7 +308,7 @@ class TargetCoreAPI { params.id = id const body = { - state: state + state } const sdkDetails = { params, body } const headers = options.headers ? options.headers : {} @@ -338,7 +338,7 @@ class TargetCoreAPI { params.id = id const body = { - priority: priority + priority } const sdkDetails = { params, body } const headers = options.headers ? options.headers : {} @@ -368,7 +368,7 @@ class TargetCoreAPI { params.id = id const body = { - schedule: schedule + schedule } const sdkDetails = { params, body } const headers = options.headers ? options.headers : {} @@ -1004,5 +1004,5 @@ class TargetCoreAPI { } module.exports = { - init: init + init } diff --git a/test/mock.js b/test/mock.js index 7799ccf..9056e4f 100644 --- a/test/mock.js +++ b/test/mock.js @@ -676,37 +676,37 @@ const batch = { } const data = { - activities: activities, - abActivity: abActivity, - xtActivity: xtActivity, - abActivityUpdated: abActivityUpdated, - xtActivityUpdated: xtActivityUpdated, - nameActivity: nameActivity, - changeLog: changeLog, - offers: offers, - offer: offer, - newOffer: newOffer, - updatedOffer: updatedOffer, - audiences: audiences, - audience: audience, - newAudience: newAudience, - updatedAudience: updatedAudience, - properties: properties, - property: property, - mboxes: mboxes, - mbox: mbox, - attributes: attributes, - mboxParams: mboxParams, - environments: environments, - abPerformance: abPerformance, - xtPerformance: xtPerformance, - performance: performance, - report: report, - batch: batch + activities, + abActivity, + xtActivity, + abActivityUpdated, + xtActivityUpdated, + nameActivity, + changeLog, + offers, + offer, + newOffer, + updatedOffer, + audiences, + audience, + newAudience, + updatedAudience, + properties, + property, + mboxes, + mbox, + attributes, + mboxParams, + environments, + abPerformance, + xtPerformance, + performance, + report, + batch } module.exports = { - data: data, + data, errors: { Bad_Request: BadRequest, Unauthorized_Request: UnauthorizedRequest,