From c84314ff7e3cb78facf1100235c4ead651ded946 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Feb 2024 13:57:43 +0000 Subject: [PATCH 1/2] Bump chai from 4.3.10 to 5.1.0 Bumps [chai](https://github.com/chaijs/chai) from 4.3.10 to 5.1.0. - [Release notes](https://github.com/chaijs/chai/releases) - [Changelog](https://github.com/chaijs/chai/blob/main/History.md) - [Commits](https://github.com/chaijs/chai/compare/v4.3.10...v5.1.0) --- updated-dependencies: - dependency-name: chai dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package-lock.json | 76 +++++++++++++++++++++-------------------------- package.json | 2 +- 2 files changed, 35 insertions(+), 43 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1f24a665d..bd834b745 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37,7 +37,7 @@ "assert": "2.1.0", "axios-mock-adapter": "1.22.0", "c8": "9.1.0", - "chai": "4.3.10", + "chai": "5.1.0", "chai-files": "1.4.0", "eslint": "8.56.0", "eslint-config-prettier": "9.1.0", @@ -1457,21 +1457,19 @@ } }, "node_modules/chai": { - "version": "4.3.10", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.10.tgz", - "integrity": "sha512-0UXG04VuVbruMUYbJ6JctvH0YnC/4q3/AkT18q4NaITo91CUm0liMS9VqzT9vZhVQ/1eqPanMWjBM+Juhfb/9g==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-5.1.0.tgz", + "integrity": "sha512-kDZ7MZyM6Q1DhR9jy7dalKohXQ2yrlXkk59CR52aRKxJrobmlBNqnFQxX9xOX8w+4mz8SYlKJa/7D7ddltFXCw==", "dev": true, "dependencies": { - "assertion-error": "^1.1.0", - "check-error": "^1.0.3", - "deep-eql": "^4.1.3", - "get-func-name": "^2.0.2", - "loupe": "^2.3.6", - "pathval": "^1.1.1", - "type-detect": "^4.0.8" + "assertion-error": "^2.0.1", + "check-error": "^2.0.0", + "deep-eql": "^5.0.1", + "loupe": "^3.1.0", + "pathval": "^2.0.0" }, "engines": { - "node": ">=4" + "node": ">=12" } }, "node_modules/chai-files": { @@ -1483,6 +1481,15 @@ "assertion-error": "^1.0.1" } }, + "node_modules/chai/node_modules/assertion-error": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", + "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", + "dev": true, + "engines": { + "node": ">=12" + } + }, "node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -1504,15 +1511,12 @@ "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==" }, "node_modules/check-error": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", - "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.0.0.tgz", + "integrity": "sha512-tjLAOBHKVxtPoHe/SA7kNOMvhCRdCJ3vETdeY0RuAc9popf+hyaSV6ZEg9hr4cpWF7jmo/JSWEnLDrnijS9Tog==", "dev": true, - "dependencies": { - "get-func-name": "^2.0.2" - }, "engines": { - "node": "*" + "node": ">= 16" } }, "node_modules/chokidar": { @@ -2109,13 +2113,10 @@ } }, "node_modules/deep-eql": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", - "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.1.tgz", + "integrity": "sha512-nwQCf6ne2gez3o1MxWifqkciwt0zhl0LO1/UwVu4uMBuPmflWM4oQ70XMqHqnBJA+nhzncaqL9HVL6KkHJ28lw==", "dev": true, - "dependencies": { - "type-detect": "^4.0.0" - }, "engines": { "node": ">=6" } @@ -5361,12 +5362,12 @@ } }, "node_modules/loupe": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.6.tgz", - "integrity": "sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.0.tgz", + "integrity": "sha512-qKl+FrLXUhFuHUoDJG7f8P8gEMHq9NFS0c6ghXG1J0rldmZFQZoNVv/vyirE9qwCIhWZDsvEFd1sbFu3GvRQFg==", "dev": true, "dependencies": { - "get-func-name": "^2.0.0" + "get-func-name": "^2.0.1" } }, "node_modules/lru-cache": { @@ -6272,12 +6273,12 @@ } }, "node_modules/pathval": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", - "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-2.0.0.tgz", + "integrity": "sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==", "dev": true, "engines": { - "node": "*" + "node": ">= 14.16" } }, "node_modules/picocolors": { @@ -7677,15 +7678,6 @@ "node": ">= 0.8.0" } }, - "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/type-fest": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", diff --git a/package.json b/package.json index 63a120f67..1d6de5f69 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "assert": "2.1.0", "axios-mock-adapter": "1.22.0", "c8": "9.1.0", - "chai": "4.3.10", + "chai": "5.1.0", "chai-files": "1.4.0", "eslint": "8.56.0", "eslint-config-prettier": "9.1.0", From d49a10137f2490ea6f692f851edea418756e38c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Berkefeld?= Date: Tue, 13 Feb 2024 15:18:26 +0100 Subject: [PATCH 2/2] #0: fix chai import for chai-files relates to chaijs/chai/issues/1569 --- docs/dist/documentation.md | 36 ++++++++++++++++++++++++++++ test/general.test.js | 5 +++- test/type.asset.test.js | 5 +++- test/type.attributeGroup.test.js | 4 +++- test/type.attributeSet.test.js | 4 +++- test/type.automation.test.js | 5 +++- test/type.dataExtension.test.js | 5 +++- test/type.dataExtract.test.js | 4 +++- test/type.fileTransfer.test.js | 4 +++- test/type.importFile.test.js | 4 +++- test/type.journey.test.js | 4 +++- test/type.mobileKeyword.test.js | 5 +++- test/type.mobileMessage.test.js | 5 +++- test/type.query.test.js | 5 +++- test/type.script.test.js | 5 +++- test/type.transactionalEmail.test.js | 4 +++- test/type.transactionalPush.test.js | 4 +++- test/type.transactionalSMS.test.js | 5 +++- test/type.triggeredSend.test.js | 4 +++- test/type.user.test.js | 5 +++- test/type.verification.test.js | 4 +++- 21 files changed, 106 insertions(+), 20 deletions(-) diff --git a/docs/dist/documentation.md b/docs/dist/documentation.md index 10baca458..f871d7316 100644 --- a/docs/dist/documentation.md +++ b/docs/dist/documentation.md @@ -242,6 +242,12 @@ helper for DataExtension.#fixShared_item
setupSDK(sessionKey, authObject)SDK

Returns an SDK instance to be used for API calls

+
getActualJson(customerKey, type, subtype, [buName])Promise.<string>
+

gets file from Retrieve folder

+
+
getActualFile(customerKey, type, subtype, ext)string
+

gets file from Retrieve folder

+
## Typedefs @@ -8461,6 +8467,36 @@ Returns an SDK instance to be used for API calls | sessionKey | string | key for specific BU | | authObject | TYPE.AuthObject | credentials for specific BU | + + +## getActualJson(customerKey, type, subtype, [buName]) ⇒ Promise.<string> +gets file from Retrieve folder + +**Kind**: global function +**Returns**: Promise.<string> - file in string form + +| Param | Type | Default | Description | +| --- | --- | --- | --- | +| customerKey | string | | of metadata | +| type | string | | of metadata | +| subtype | string | | of metadata | +| [buName] | string | "testBU" | used when we need to test on ParentBU | + + + +## getActualFile(customerKey, type, subtype, ext) ⇒ string +gets file from Retrieve folder + +**Kind**: global function +**Returns**: string - file path + +| Param | Type | Description | +| --- | --- | --- | +| customerKey | string | of metadata | +| type | string | of metadata | +| subtype | string | of metadata | +| ext | string | file extension | + ## TypeKeyCombo : Object.<string, string> diff --git a/test/general.test.js b/test/general.test.js index 9497b7e22..cbea04e29 100644 --- a/test/general.test.js +++ b/test/general.test.js @@ -1,4 +1,7 @@ -import chai, { assert, expect } from 'chai'; +import * as chai from 'chai'; +const assert = chai.assert; +const expect = chai.expect; + import chaiFiles from 'chai-files'; import * as testUtils from './utils.js'; import handler from '../lib/index.js'; diff --git a/test/type.asset.test.js b/test/type.asset.test.js index 959ce797e..5e2312c1c 100644 --- a/test/type.asset.test.js +++ b/test/type.asset.test.js @@ -1,6 +1,9 @@ import File from '../lib/util/file.js'; -import chai, { assert, expect } from 'chai'; +import * as chai from 'chai'; +const assert = chai.assert; +const expect = chai.expect; + import chaiFiles from 'chai-files'; import cache from '../lib/util/cache.js'; import * as testUtils from './utils.js'; diff --git a/test/type.attributeGroup.test.js b/test/type.attributeGroup.test.js index da3698f8c..8805fe36f 100644 --- a/test/type.attributeGroup.test.js +++ b/test/type.attributeGroup.test.js @@ -1,4 +1,6 @@ -import chai, { assert } from 'chai'; +import * as chai from 'chai'; +const assert = chai.assert; + import chaiFiles from 'chai-files'; import cache from '../lib/util/cache.js'; import * as testUtils from './utils.js'; diff --git a/test/type.attributeSet.test.js b/test/type.attributeSet.test.js index a4e44e3aa..d1b06114d 100644 --- a/test/type.attributeSet.test.js +++ b/test/type.attributeSet.test.js @@ -1,4 +1,6 @@ -import chai, { assert } from 'chai'; +import * as chai from 'chai'; +const assert = chai.assert; + import chaiFiles from 'chai-files'; import cache from '../lib/util/cache.js'; import * as testUtils from './utils.js'; diff --git a/test/type.automation.test.js b/test/type.automation.test.js index 543859e62..265f98c24 100644 --- a/test/type.automation.test.js +++ b/test/type.automation.test.js @@ -1,4 +1,7 @@ -import chai, { assert, expect } from 'chai'; +import * as chai from 'chai'; +const assert = chai.assert; +const expect = chai.expect; + import chaiFiles from 'chai-files'; import cache from '../lib/util/cache.js'; import * as testUtils from './utils.js'; diff --git a/test/type.dataExtension.test.js b/test/type.dataExtension.test.js index 55a116c07..c82911cba 100644 --- a/test/type.dataExtension.test.js +++ b/test/type.dataExtension.test.js @@ -1,4 +1,7 @@ -import chai, { assert, expect } from 'chai'; +import * as chai from 'chai'; +const assert = chai.assert; +const expect = chai.expect; + import chaiFiles from 'chai-files'; import cache from '../lib/util/cache.js'; import * as testUtils from './utils.js'; diff --git a/test/type.dataExtract.test.js b/test/type.dataExtract.test.js index a2beb9ffe..99842c358 100644 --- a/test/type.dataExtract.test.js +++ b/test/type.dataExtract.test.js @@ -1,4 +1,6 @@ -import chai, { assert } from 'chai'; +import * as chai from 'chai'; +const assert = chai.assert; + import chaiFiles from 'chai-files'; import cache from '../lib/util/cache.js'; import * as testUtils from './utils.js'; diff --git a/test/type.fileTransfer.test.js b/test/type.fileTransfer.test.js index b4c18386b..3c6e70bd8 100644 --- a/test/type.fileTransfer.test.js +++ b/test/type.fileTransfer.test.js @@ -1,4 +1,6 @@ -import chai, { assert } from 'chai'; +import * as chai from 'chai'; +const assert = chai.assert; + import chaiFiles from 'chai-files'; import cache from '../lib/util/cache.js'; import * as testUtils from './utils.js'; diff --git a/test/type.importFile.test.js b/test/type.importFile.test.js index 42e12a286..80f148304 100644 --- a/test/type.importFile.test.js +++ b/test/type.importFile.test.js @@ -1,4 +1,6 @@ -import chai, { assert } from 'chai'; +import * as chai from 'chai'; +const assert = chai.assert; + import chaiFiles from 'chai-files'; import cache from '../lib/util/cache.js'; import * as testUtils from './utils.js'; diff --git a/test/type.journey.test.js b/test/type.journey.test.js index aaf43e923..3e83a731e 100644 --- a/test/type.journey.test.js +++ b/test/type.journey.test.js @@ -1,4 +1,6 @@ -import chai, { assert } from 'chai'; +import * as chai from 'chai'; +const assert = chai.assert; + import chaiFiles from 'chai-files'; import cache from '../lib/util/cache.js'; import * as testUtils from './utils.js'; diff --git a/test/type.mobileKeyword.test.js b/test/type.mobileKeyword.test.js index 7ecb99b89..0bc57ec1b 100644 --- a/test/type.mobileKeyword.test.js +++ b/test/type.mobileKeyword.test.js @@ -1,4 +1,7 @@ -import chai, { assert, expect } from 'chai'; +import * as chai from 'chai'; +const assert = chai.assert; +const expect = chai.expect; + import chaiFiles from 'chai-files'; import cache from '../lib/util/cache.js'; import * as testUtils from './utils.js'; diff --git a/test/type.mobileMessage.test.js b/test/type.mobileMessage.test.js index 9e8cc1d16..d02cde0c3 100644 --- a/test/type.mobileMessage.test.js +++ b/test/type.mobileMessage.test.js @@ -1,4 +1,7 @@ -import chai, { assert, expect } from 'chai'; +import * as chai from 'chai'; +const assert = chai.assert; +const expect = chai.expect; + import chaiFiles from 'chai-files'; import cache from '../lib/util/cache.js'; import * as testUtils from './utils.js'; diff --git a/test/type.query.test.js b/test/type.query.test.js index dc2b183cd..2dbcd246a 100644 --- a/test/type.query.test.js +++ b/test/type.query.test.js @@ -1,4 +1,7 @@ -import chai, { assert, expect } from 'chai'; +import * as chai from 'chai'; +const assert = chai.assert; +const expect = chai.expect; + import chaiFiles from 'chai-files'; import cache from '../lib/util/cache.js'; import * as testUtils from './utils.js'; diff --git a/test/type.script.test.js b/test/type.script.test.js index 330553518..2503b3a48 100644 --- a/test/type.script.test.js +++ b/test/type.script.test.js @@ -1,4 +1,7 @@ -import chai, { assert, expect } from 'chai'; +import * as chai from 'chai'; +const assert = chai.assert; +const expect = chai.expect; + import chaiFiles from 'chai-files'; import cache from '../lib/util/cache.js'; import * as testUtils from './utils.js'; diff --git a/test/type.transactionalEmail.test.js b/test/type.transactionalEmail.test.js index 60dff65e8..87f15552b 100644 --- a/test/type.transactionalEmail.test.js +++ b/test/type.transactionalEmail.test.js @@ -1,4 +1,6 @@ -import chai, { assert } from 'chai'; +import * as chai from 'chai'; +const assert = chai.assert; + import chaiFiles from 'chai-files'; import cache from '../lib/util/cache.js'; import * as testUtils from './utils.js'; diff --git a/test/type.transactionalPush.test.js b/test/type.transactionalPush.test.js index dd6e6e9ec..ac6b4e0f1 100644 --- a/test/type.transactionalPush.test.js +++ b/test/type.transactionalPush.test.js @@ -1,4 +1,6 @@ -import chai, { assert } from 'chai'; +import * as chai from 'chai'; +const assert = chai.assert; + import chaiFiles from 'chai-files'; import cache from '../lib/util/cache.js'; import * as testUtils from './utils.js'; diff --git a/test/type.transactionalSMS.test.js b/test/type.transactionalSMS.test.js index 0917e7fae..137cc4404 100644 --- a/test/type.transactionalSMS.test.js +++ b/test/type.transactionalSMS.test.js @@ -1,4 +1,7 @@ -import chai, { assert, expect } from 'chai'; +import * as chai from 'chai'; +const assert = chai.assert; +const expect = chai.expect; + import chaiFiles from 'chai-files'; import cache from '../lib/util/cache.js'; import * as testUtils from './utils.js'; diff --git a/test/type.triggeredSend.test.js b/test/type.triggeredSend.test.js index 8d4e3a666..7ad9029d2 100644 --- a/test/type.triggeredSend.test.js +++ b/test/type.triggeredSend.test.js @@ -1,4 +1,6 @@ -import chai, { assert } from 'chai'; +import * as chai from 'chai'; +const assert = chai.assert; + import chaiFiles from 'chai-files'; import cache from '../lib/util/cache.js'; import * as testUtils from './utils.js'; diff --git a/test/type.user.test.js b/test/type.user.test.js index 7811b21f0..80b8740ef 100644 --- a/test/type.user.test.js +++ b/test/type.user.test.js @@ -1,4 +1,7 @@ -import chai, { assert, expect } from 'chai'; +import * as chai from 'chai'; +const assert = chai.assert; +const expect = chai.expect; + import chaiFiles from 'chai-files'; import cache from '../lib/util/cache.js'; import * as testUtils from './utils.js'; diff --git a/test/type.verification.test.js b/test/type.verification.test.js index c93a92f08..d0076e6dd 100644 --- a/test/type.verification.test.js +++ b/test/type.verification.test.js @@ -1,4 +1,6 @@ -import chai, { assert } from 'chai'; +import * as chai from 'chai'; +const assert = chai.assert; + import chaiFiles from 'chai-files'; import cache from '../lib/util/cache.js'; import * as testUtils from './utils.js';