From c664918e148459e9d5449cb28cb19e1c5610e81a Mon Sep 17 00:00:00 2001 From: Mark Wolff Date: Tue, 23 Apr 2019 09:50:04 -0700 Subject: [PATCH] update diagnostic-channel-publishers to 0.3.1 (#509) * update diagnostic-channel-publishers to 0.3.1 * updates for node12 compat * run functionals on node12 --- .travis.yml | 3 ++- Tests/Library/Util.tests.ts | 29 +++++++++++++++++++++-------- package-lock.json | 6 +++--- package.json | 2 +- 4 files changed, 27 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1cfab3be..a131481b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,7 @@ services: - docker node_js: - "node" + - "12" - "11" - "10" - "9" @@ -24,7 +25,7 @@ before_script: script: - npm test # Run funcs for current release - - if [ "$TRAVIS_NODE_VERSION" = "11" ]; then npm run functionaltest; fi + - if [ "$TRAVIS_NODE_VERSION" = "12" ]; then npm run functionaltest; fi # Run funcs for LTS releases (currently 6, 8, 10) - if [ "$TRAVIS_NODE_VERSION" = "10" ]; then npm run functionaltest; fi - if [ "$TRAVIS_NODE_VERSION" = "8" ]; then npm run functionaltest; fi diff --git a/Tests/Library/Util.tests.ts b/Tests/Library/Util.tests.ts index 429f6aca..89a2d507 100644 --- a/Tests/Library/Util.tests.ts +++ b/Tests/Library/Util.tests.ts @@ -231,14 +231,27 @@ describe("Library/Util", () => { circObj.test = true; circObj.circular = circObj; circObj.arr = [0, 1, circObj.circular]; - assert.deepEqual( - Util.validateStringMap(circObj), - { - test: "true", - circular: "Object (Error: Converting circular structure to JSON)", - arr: "Array (Error: Converting circular structure to JSON)", - } - ); + var nodeVer = process.versions.node.split("."); + if (parseInt(nodeVer[0]) >= 12) { + // node12 changed the error string + assert.deepEqual( + Util.validateStringMap(circObj), + { + test: "true", + circular: "Object (Error: Converting circular structure to JSON\n --> starting at object with constructor 'Object'\n --- property 'circular' closes the circle)", + arr: "Array (Error: Converting circular structure to JSON\n --> starting at object with constructor 'Object'\n --- property 'circular' closes the circle)", + } + ); + } else { + assert.deepEqual( + Util.validateStringMap(circObj), + { + test: "true", + circular: "Object (Error: Converting circular structure to JSON)", + arr: "Array (Error: Converting circular structure to JSON)", + } + ); + } }); }); diff --git a/package-lock.json b/package-lock.json index 8af8af95..a88d33ea 100644 --- a/package-lock.json +++ b/package-lock.json @@ -122,9 +122,9 @@ } }, "diagnostic-channel-publishers": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/diagnostic-channel-publishers/-/diagnostic-channel-publishers-0.3.0.tgz", - "integrity": "sha512-tylBZM/ZJ+ismlyop3g9ejI/0+bR/3BTo06fcE4wxq6cJZOe6XMABgRUZ+QUs+0WSnuglxmJ8Wwamnl01tV+Gw==" + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/diagnostic-channel-publishers/-/diagnostic-channel-publishers-0.3.1.tgz", + "integrity": "sha512-7qDdVYnTutptHx0CzxRAAggr4zBFoa5laFfXZoZGFHDZSnyiCNqFOGX9nwH2d2f6RbxZpNk8rQuplofGhE8JhQ==" }, "diff": { "version": "3.2.0", diff --git a/package.json b/package.json index 03993e1d..941665ce 100644 --- a/package.json +++ b/package.json @@ -61,6 +61,6 @@ "cls-hooked": "^4.2.2", "continuation-local-storage": "^3.2.1", "diagnostic-channel": "0.2.0", - "diagnostic-channel-publishers": "0.3.0" + "diagnostic-channel-publishers": "^0.3.1" } }