From 142e2e4fa5814cb61fae535929654f1370e8f6f8 Mon Sep 17 00:00:00 2001 From: Gordon Bockus Date: Wed, 6 Jul 2022 10:33:02 -0500 Subject: [PATCH 1/2] fix: add caret to command and fix tests @W-11385241@ --- packages/apex-node/package.json | 2 +- .../test/execute/executeService.test.ts | 11 +- .../test/streaming/streamingClient.test.ts | 11 +- .../apex-node/test/tests/asyncTests.test.ts | 11 +- .../apex-node/test/tests/codeCoverage.test.ts | 11 +- packages/apex-node/yarn.lock | 28 ++-- packages/plugin-apex/package.json | 4 +- packages/plugin-apex/yarn.lock | 127 +++++++++++++++--- 8 files changed, 143 insertions(+), 62 deletions(-) diff --git a/packages/apex-node/package.json b/packages/apex-node/package.json index dd3d1913..4ae851bc 100644 --- a/packages/apex-node/package.json +++ b/packages/apex-node/package.json @@ -6,7 +6,7 @@ "bugs": "https://github.com/forcedotcom/salesforcedx-apex/issues", "main": "lib/src/index.js", "dependencies": { - "@salesforce/core": "^3.13.0", + "@salesforce/core": "^3.23.3", "faye": "1.4.0", "glob": "^8.0.3", "istanbul-lib-coverage": "^3.2.0", diff --git a/packages/apex-node/test/execute/executeService.test.ts b/packages/apex-node/test/execute/executeService.test.ts index 71383146..4718e3b2 100644 --- a/packages/apex-node/test/execute/executeService.test.ts +++ b/packages/apex-node/test/execute/executeService.test.ts @@ -5,7 +5,7 @@ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ -import { AuthInfo, Connection } from '@salesforce/core'; +import { Connection } from '@salesforce/core'; import { MockTestOrgData, testSetup } from '@salesforce/core/lib/testSetup'; import { assert, expect } from 'chai'; import * as fs from 'fs'; @@ -30,7 +30,7 @@ describe('Apex Execute Tests', async () => { beforeEach(async () => { sandboxStub = createSandbox(); - $$.setConfigStubContents('GlobalInfo', { + $$.setConfigStubContents('AuthInfoConfig', { contents: { orgs: { [testData.username]: await testData.getConfig() @@ -42,11 +42,8 @@ describe('Apex Execute Tests', async () => { .stub(Connection.prototype, 'retrieveMaxApiVersion') .resolves('50.0'); - mockConnection = await Connection.create({ - authInfo: await AuthInfo.create({ - username: testData.username - }) - }); + await $$.stubAuths(testData); + mockConnection = await testData.getConnection(); sandboxStub.stub(fs, 'readFileSync').returns('System.assert(true);'); fsStub = sandboxStub.stub(fs, 'existsSync').returns(true); diff --git a/packages/apex-node/test/streaming/streamingClient.test.ts b/packages/apex-node/test/streaming/streamingClient.test.ts index 10fc97ea..9c9b4e63 100644 --- a/packages/apex-node/test/streaming/streamingClient.test.ts +++ b/packages/apex-node/test/streaming/streamingClient.test.ts @@ -5,7 +5,7 @@ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ -import { AuthInfo, Connection } from '@salesforce/core'; +import { Connection } from '@salesforce/core'; import { MockTestOrgData, testSetup } from '@salesforce/core/lib/testSetup'; import { assert, createSandbox, SinonSandbox } from 'sinon'; import { StreamingClient } from '../../src/streaming'; @@ -42,7 +42,7 @@ const testResultMsg: TestResultMessage = { describe('Streaming API Client', () => { beforeEach(async () => { sandboxStub = createSandbox(); - $$.setConfigStubContents('GlobalInfo', { + $$.setConfigStubContents('AuthInfoConfig', { contents: { orgs: { [testData.username]: await testData.getConfig() @@ -53,11 +53,8 @@ describe('Streaming API Client', () => { sandboxStub .stub(Connection.prototype, 'retrieveMaxApiVersion') .resolves('50.0'); - mockConnection = await Connection.create({ - authInfo: await AuthInfo.create({ - username: testData.username - }) - }); + await $$.stubAuths(testData); + mockConnection = await testData.getConnection(); }); afterEach(() => { diff --git a/packages/apex-node/test/tests/asyncTests.test.ts b/packages/apex-node/test/tests/asyncTests.test.ts index be38364d..22dd990c 100644 --- a/packages/apex-node/test/tests/asyncTests.test.ts +++ b/packages/apex-node/test/tests/asyncTests.test.ts @@ -4,7 +4,7 @@ * Licensed under the BSD 3-Clause license. * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ -import { AuthInfo, Connection } from '@salesforce/core'; +import { Connection } from '@salesforce/core'; import { MockTestOrgData, testSetup } from '@salesforce/core/lib/testSetup'; import { assert, expect } from 'chai'; import { @@ -85,7 +85,7 @@ describe('Run Apex tests asynchronously', () => { beforeEach(async () => { sandboxStub = createSandbox(); - $$.setConfigStubContents('GlobalInfo', { + $$.setConfigStubContents('AuthInfoConfig', { contents: { orgs: { [testData.username]: await testData.getConfig() @@ -96,11 +96,8 @@ describe('Run Apex tests asynchronously', () => { sandboxStub .stub(Connection.prototype, 'retrieveMaxApiVersion') .resolves('50.0'); - mockConnection = await Connection.create({ - authInfo: await AuthInfo.create({ - username: testData.username - }) - }); + await $$.stubAuths(testData); + mockConnection = await testData.getConnection(); sandboxStub.stub(mockConnection, 'instanceUrl').get(() => { return 'https://na139.salesforce.com'; }); diff --git a/packages/apex-node/test/tests/codeCoverage.test.ts b/packages/apex-node/test/tests/codeCoverage.test.ts index 9a21a4fe..8711bf28 100644 --- a/packages/apex-node/test/tests/codeCoverage.test.ts +++ b/packages/apex-node/test/tests/codeCoverage.test.ts @@ -5,7 +5,7 @@ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ -import { AuthInfo, Connection } from '@salesforce/core'; +import { Connection } from '@salesforce/core'; import { MockTestOrgData, testSetup } from '@salesforce/core/lib/testSetup'; import { expect } from 'chai'; import { createSandbox, SinonSandbox, SinonStub } from 'sinon'; @@ -28,7 +28,7 @@ const testData = new MockTestOrgData(); describe('Get code coverage results', () => { beforeEach(async () => { sandboxStub = createSandbox(); - $$.setConfigStubContents('GlobalInfo', { + $$.setConfigStubContents('AuthInfoConfig', { contents: { orgs: { [testData.username]: await testData.getConfig() @@ -39,11 +39,8 @@ describe('Get code coverage results', () => { sandboxStub .stub(Connection.prototype, 'retrieveMaxApiVersion') .resolves('50.0'); - mockConnection = await Connection.create({ - authInfo: await AuthInfo.create({ - username: testData.username - }) - }); + await $$.stubAuths(testData); + mockConnection = await testData.getConnection(); toolingQueryStub = sandboxStub.stub(mockConnection.tooling, 'query'); }); diff --git a/packages/apex-node/yarn.lock b/packages/apex-node/yarn.lock index 54b49d90..8e53a909 100644 --- a/packages/apex-node/yarn.lock +++ b/packages/apex-node/yarn.lock @@ -170,13 +170,13 @@ mv "~2" safe-json-stringify "~1" -"@salesforce/core@^3.13.0": - version "3.18.2" - resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-3.18.2.tgz#2e11dce0ecdc3028e6f8e69f673d6ee293ba2e9e" - integrity sha512-dbNZYHWLgV5ejP6F0dnQk2DPO3W3Q1deta/1S2N1bvJzb925lUxJdI4klKw/K2YwPbiUulhJE8phMkSGWR41NQ== +"@salesforce/core@^3.23.3": + version "3.23.4" + resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-3.23.4.tgz#89c348c5573f30dd3d23a266de928464f534c7bc" + integrity sha512-gJB2NbWjxcN0SqOy3GLyzwUytYR1bmXZvUi7r8j0Eeu2L7qJFoYBgtkXBfIk7F/urFqYd4VRlXCeJj6ZQEWImw== dependencies: "@salesforce/bunyan" "^2.0.0" - "@salesforce/kit" "^1.5.34" + "@salesforce/kit" "^1.5.41" "@salesforce/schemas" "^1.1.0" "@salesforce/ts-types" "^1.5.20" "@types/graceful-fs" "^4.1.5" @@ -190,15 +190,15 @@ form-data "^4.0.0" graceful-fs "^4.2.9" js2xmlparser "^4.0.1" - jsforce "2.0.0-beta.9" + jsforce "2.0.0-beta.14" jsonwebtoken "8.5.1" mkdirp "1.0.4" ts-retry-promise "^0.6.0" -"@salesforce/kit@^1.5.34": - version "1.5.41" - resolved "https://registry.yarnpkg.com/@salesforce/kit/-/kit-1.5.41.tgz#3248d4d28fe24ed47827716cfe416c21a2a90651" - integrity sha512-nhi7jw3LNITl7rHSnCLnEDTaq6nvolSMFBg7poniG84Q7kJPezgTEj5OKAyQ9hJoRE4u59n5M5bUFvwRoXmJzQ== +"@salesforce/kit@^1.5.41": + version "1.5.44" + resolved "https://registry.yarnpkg.com/@salesforce/kit/-/kit-1.5.44.tgz#f070257679f40750e67919020c7e8240b219bf26" + integrity sha512-QHwmJFgvF0YyBAvPkSMy2opyIgKzATF8lwYHewCr2obyqDiVi9OJkYWgQETkKTpfLzSjWqdsfiVAdlnRcj+xQQ== dependencies: "@salesforce/ts-types" "^1.5.20" shx "^0.3.3" @@ -1423,10 +1423,10 @@ jsesc@^2.5.1: resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== -jsforce@2.0.0-beta.9: - version "2.0.0-beta.9" - resolved "https://registry.yarnpkg.com/jsforce/-/jsforce-2.0.0-beta.9.tgz#692f205151551a601cb17fc6b891ecbb230eff58" - integrity sha512-DsmjBiLaAL4ECmpNjwcMuYoA2o7v42cnokmTvNtnsOoABb7goIZp/PIXRHhmN44HJxNw2RpEpjMv0rJNOkrAtg== +jsforce@2.0.0-beta.14: + version "2.0.0-beta.14" + resolved "https://registry.yarnpkg.com/jsforce/-/jsforce-2.0.0-beta.14.tgz#237753bdabb7e80447b5b266eaefc4abf8b6c951" + integrity sha512-j66PaKroshB4VZbfKBAx9+lJy8etFfGG1hGFsI7ufwxvacXxLTAxZwOEZPkYPMigiHrPlEMtIwh5NqwBsIn9HA== dependencies: "@babel/runtime" "^7.12.5" "@babel/runtime-corejs3" "^7.12.5" diff --git a/packages/plugin-apex/package.json b/packages/plugin-apex/package.json index 012eccc2..ba80ddf2 100644 --- a/packages/plugin-apex/package.json +++ b/packages/plugin-apex/package.json @@ -8,8 +8,8 @@ "dependencies": { "@oclif/core": "^1.5.2", "@salesforce/apex-node": "1.0.0", - "@salesforce/command": "5.1.0", - "@salesforce/core": "^3.13.0", + "@salesforce/command": "^5.1.0", + "@salesforce/core": "^3.23.3", "chalk": "^4.1.0", "tslib": "^1" }, diff --git a/packages/plugin-apex/yarn.lock b/packages/plugin-apex/yarn.lock index 76820c96..63ec1c12 100644 --- a/packages/plugin-apex/yarn.lock +++ b/packages/plugin-apex/yarn.lock @@ -543,7 +543,7 @@ dependencies: fancy-test "^1.4.10" -"@oclif/test@^2", "@oclif/test@^2.1.0": +"@oclif/test@^2": version "2.1.0" resolved "https://registry.yarnpkg.com/@oclif/test/-/test-2.1.0.tgz#e5a0ba619c890770782e48c82d18f5921e2d2b9f" integrity sha512-o+JTv3k28aMUxywJUlJY1/DORLqumoZFRII492phOmtXM16rD6Luy3z1qinT4BvEtPj2BzOPd2whr/VdYszaYw== @@ -652,6 +652,18 @@ dependencies: "@octokit/openapi-types" "^11.2.0" +"@salesforce/apex-node@1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@salesforce/apex-node/-/apex-node-1.0.0.tgz#95c99c6d18ed34f42741b505555da4ca10bfe60f" + integrity sha512-ZuR53tDq+/mVnhzjN+XwKeR6fzCWq2jjm2Tnsjzp36w9K9i8zZaqQfDb8vMaae7IezgnCX+yuyu8cN98MxZy0w== + dependencies: + "@salesforce/core" "^3.13.0" + faye "1.4.0" + glob "^8.0.3" + istanbul-lib-coverage "^3.2.0" + istanbul-lib-report "^3.0.0" + istanbul-reports "^3.1.4" + "@salesforce/bunyan@^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@salesforce/bunyan/-/bunyan-2.0.0.tgz#8dbe377f2cf7d35348a23260416fee15adba5f97" @@ -664,19 +676,6 @@ mv "~2" safe-json-stringify "~1" -"@salesforce/command@5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@salesforce/command/-/command-5.1.0.tgz#01db9e353a894f46920709f9465b3939d17f0a1c" - integrity sha512-W19ee7SVRuFdxQL1G8SxRjfY5YXdKPMwlEcS5yr6zj61Ahx/tYNEy5TmneYoVk/JmZbAewlnMtxHrAZw3I7Kjw== - dependencies: - "@oclif/core" "^1.7.0" - "@oclif/plugin-help" "^5.1.11" - "@oclif/test" "^2.1.0" - "@salesforce/core" "^3.15.3" - "@salesforce/kit" "^1.5.34" - "@salesforce/ts-types" "^1.5.20" - chalk "^2.4.2" - "@salesforce/command@^4.2.2": version "4.2.2" resolved "https://registry.yarnpkg.com/@salesforce/command/-/command-4.2.2.tgz#2d1c301d771a6a6aac3cf25f14f18e829bf37b1d" @@ -693,6 +692,18 @@ chalk "^2.4.2" cli-ux "^4.9.3" +"@salesforce/command@^5.1.0": + version "5.2.1" + resolved "https://registry.yarnpkg.com/@salesforce/command/-/command-5.2.1.tgz#b102003252ba89c9894ab93b5d23946dbea88784" + integrity sha512-78JWHof7N/bH6hFKj6hQOucnk+YfH9E+9Zcm23ykmk4LPig4q4dkqgTEC563KSjCTZ3wtd7rUqEhy3HOK7sH2g== + dependencies: + "@oclif/core" "^1.7.0" + "@oclif/plugin-help" "^5.1.11" + "@salesforce/core" "^3.20.1" + "@salesforce/kit" "^1.5.34" + "@salesforce/ts-types" "^1.5.20" + chalk "^2.4.2" + "@salesforce/core@^2.35.0", "@salesforce/core@^2.36.4": version "2.37.1" resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-2.37.1.tgz#bfb6634e068278c7761d694a15e09a680b407137" @@ -717,7 +728,7 @@ semver "^7.3.5" ts-retry-promise "^0.6.0" -"@salesforce/core@^3.13.0", "@salesforce/core@^3.15.3": +"@salesforce/core@^3.13.0": version "3.18.2" resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-3.18.2.tgz#2e11dce0ecdc3028e6f8e69f673d6ee293ba2e9e" integrity sha512-dbNZYHWLgV5ejP6F0dnQk2DPO3W3Q1deta/1S2N1bvJzb925lUxJdI4klKw/K2YwPbiUulhJE8phMkSGWR41NQ== @@ -742,6 +753,31 @@ mkdirp "1.0.4" ts-retry-promise "^0.6.0" +"@salesforce/core@^3.20.1", "@salesforce/core@^3.23.3": + version "3.23.4" + resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-3.23.4.tgz#89c348c5573f30dd3d23a266de928464f534c7bc" + integrity sha512-gJB2NbWjxcN0SqOy3GLyzwUytYR1bmXZvUi7r8j0Eeu2L7qJFoYBgtkXBfIk7F/urFqYd4VRlXCeJj6ZQEWImw== + dependencies: + "@salesforce/bunyan" "^2.0.0" + "@salesforce/kit" "^1.5.41" + "@salesforce/schemas" "^1.1.0" + "@salesforce/ts-types" "^1.5.20" + "@types/graceful-fs" "^4.1.5" + "@types/mkdirp" "^1.0.2" + "@types/semver" "^7.3.9" + ajv "^8.11.0" + archiver "^5.3.0" + change-case "^4.1.2" + debug "^3.2.7" + faye "^1.4.0" + form-data "^4.0.0" + graceful-fs "^4.2.9" + js2xmlparser "^4.0.1" + jsforce "2.0.0-beta.14" + jsonwebtoken "8.5.1" + mkdirp "1.0.4" + ts-retry-promise "^0.6.0" + "@salesforce/dev-config@3.0.1": version "3.0.1" resolved "https://registry.yarnpkg.com/@salesforce/dev-config/-/dev-config-3.0.1.tgz#631a952abfd69e7cdb0fb312ba4b1656ae632b90" @@ -756,6 +792,15 @@ shx "^0.3.3" tslib "^2.2.0" +"@salesforce/kit@^1.5.41": + version "1.5.44" + resolved "https://registry.yarnpkg.com/@salesforce/kit/-/kit-1.5.44.tgz#f070257679f40750e67919020c7e8240b219bf26" + integrity sha512-QHwmJFgvF0YyBAvPkSMy2opyIgKzATF8lwYHewCr2obyqDiVi9OJkYWgQETkKTpfLzSjWqdsfiVAdlnRcj+xQQ== + dependencies: + "@salesforce/ts-types" "^1.5.20" + shx "^0.3.3" + tslib "^2.2.0" + "@salesforce/plugin-command-reference@^1.3.16": version "1.3.19" resolved "https://registry.yarnpkg.com/@salesforce/plugin-command-reference/-/plugin-command-reference-1.3.19.tgz#0988d20019ef6e29571c0aec7265c92ecb96dbdf" @@ -2569,7 +2614,7 @@ faye-websocket@>=0.9.1: dependencies: websocket-driver ">=0.5.1" -faye@^1.4.0: +faye@1.4.0, faye@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/faye/-/faye-1.4.0.tgz#01d3d26ed5642c1cb203eed358afb1c1444b8669" integrity sha512-kRrIg4be8VNYhycS2PY//hpBJSzZPr/DBbcy9VWelhZMW3KhyLkQR0HL0k0MNpmVoNFF4EdfMFkNAWjTP65g6w== @@ -2913,7 +2958,7 @@ glob@^7.0.0, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@^7.2.0: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^8.0.1: +glob@^8.0.1, glob@^8.0.3: version "8.0.3" resolved "https://registry.yarnpkg.com/glob/-/glob-8.0.3.tgz#415c6eb2deed9e502c68fa44a272e6da6eeca42e" integrity sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ== @@ -3564,6 +3609,11 @@ istanbul-lib-coverage@^2.0.5: resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz#675f0ab69503fad4b1d849f736baaca803344f49" integrity sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA== +istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz#189e7909d0a39fa5a3dfad5b03f71947770191d3" + integrity sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw== + istanbul-lib-hook@^2.0.7: version "2.0.7" resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-2.0.7.tgz#c95695f383d4f8f60df1f04252a9550e15b5b133" @@ -3593,6 +3643,15 @@ istanbul-lib-report@^2.0.8: make-dir "^2.1.0" supports-color "^6.1.0" +istanbul-lib-report@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#7518fe52ea44de372f460a76b5ecda9ffb73d8a6" + integrity sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw== + dependencies: + istanbul-lib-coverage "^3.0.0" + make-dir "^3.0.0" + supports-color "^7.1.0" + istanbul-lib-source-maps@^3.0.6: version "3.0.6" resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.6.tgz#284997c48211752ec486253da97e3879defba8c8" @@ -3611,6 +3670,14 @@ istanbul-reports@^2.2.4: dependencies: html-escaper "^2.0.0" +istanbul-reports@^3.1.4: + version "3.1.4" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.1.4.tgz#1b6f068ecbc6c331040aab5741991273e609e40c" + integrity sha512-r1/DshN4KSE7xWEknZLLLLDn5CJybV3nw01VTkp6D5jzLuELlcbudfj/eSQFvrKsJuTVCGnePO7ho82Nw9zzfw== + dependencies: + html-escaper "^2.0.0" + istanbul-lib-report "^3.0.0" + jake@^10.8.5: version "10.8.5" resolved "https://registry.yarnpkg.com/jake/-/jake-10.8.5.tgz#f2183d2c59382cb274226034543b9c03b8164c46" @@ -3656,6 +3723,32 @@ jsesc@^2.5.1: resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== +jsforce@2.0.0-beta.14: + version "2.0.0-beta.14" + resolved "https://registry.yarnpkg.com/jsforce/-/jsforce-2.0.0-beta.14.tgz#237753bdabb7e80447b5b266eaefc4abf8b6c951" + integrity sha512-j66PaKroshB4VZbfKBAx9+lJy8etFfGG1hGFsI7ufwxvacXxLTAxZwOEZPkYPMigiHrPlEMtIwh5NqwBsIn9HA== + dependencies: + "@babel/runtime" "^7.12.5" + "@babel/runtime-corejs3" "^7.12.5" + "@types/node" "^12.19.9" + abort-controller "^3.0.0" + base64url "^3.0.1" + commander "^4.0.1" + core-js "^3.6.4" + csv-parse "^4.8.2" + csv-stringify "^5.3.4" + faye "^1.4.0" + form-data "^4.0.0" + fs-extra "^8.1.0" + https-proxy-agent "^5.0.0" + inquirer "^7.0.0" + multistream "^3.1.0" + node-fetch "^2.6.1" + open "^7.0.0" + regenerator-runtime "^0.13.3" + strip-ansi "^6.0.0" + xml2js "^0.4.22" + jsforce@2.0.0-beta.9: version "2.0.0-beta.9" resolved "https://registry.yarnpkg.com/jsforce/-/jsforce-2.0.0-beta.9.tgz#692f205151551a601cb17fc6b891ecbb230eff58" From 18d3f546a905bf89d8804fbf126386e8f6282eef Mon Sep 17 00:00:00 2001 From: Gordon Bockus Date: Wed, 6 Jul 2022 11:09:03 -0500 Subject: [PATCH 2/2] chore: remove unnecessary stub from tests. update yarn.lock --- .../test/execute/executeService.test.ts | 7 -- .../test/streaming/streamingClient.test.ts | 7 -- .../apex-node/test/tests/asyncTests.test.ts | 8 +- .../apex-node/test/tests/codeCoverage.test.ts | 8 +- packages/plugin-apex/yarn.lock | 89 +------------------ 5 files changed, 4 insertions(+), 115 deletions(-) diff --git a/packages/apex-node/test/execute/executeService.test.ts b/packages/apex-node/test/execute/executeService.test.ts index 4718e3b2..c0d0168a 100644 --- a/packages/apex-node/test/execute/executeService.test.ts +++ b/packages/apex-node/test/execute/executeService.test.ts @@ -30,13 +30,6 @@ describe('Apex Execute Tests', async () => { beforeEach(async () => { sandboxStub = createSandbox(); - $$.setConfigStubContents('AuthInfoConfig', { - contents: { - orgs: { - [testData.username]: await testData.getConfig() - } - } - }); // Stub retrieveMaxApiVersion to get over "Domain Not Found: The org cannot be found" error sandboxStub .stub(Connection.prototype, 'retrieveMaxApiVersion') diff --git a/packages/apex-node/test/streaming/streamingClient.test.ts b/packages/apex-node/test/streaming/streamingClient.test.ts index 9c9b4e63..9b451a9f 100644 --- a/packages/apex-node/test/streaming/streamingClient.test.ts +++ b/packages/apex-node/test/streaming/streamingClient.test.ts @@ -42,13 +42,6 @@ const testResultMsg: TestResultMessage = { describe('Streaming API Client', () => { beforeEach(async () => { sandboxStub = createSandbox(); - $$.setConfigStubContents('AuthInfoConfig', { - contents: { - orgs: { - [testData.username]: await testData.getConfig() - } - } - }); // Stub retrieveMaxApiVersion to get over "Domain Not Found: The org cannot be found" error sandboxStub .stub(Connection.prototype, 'retrieveMaxApiVersion') diff --git a/packages/apex-node/test/tests/asyncTests.test.ts b/packages/apex-node/test/tests/asyncTests.test.ts index 22dd990c..af438c78 100644 --- a/packages/apex-node/test/tests/asyncTests.test.ts +++ b/packages/apex-node/test/tests/asyncTests.test.ts @@ -85,13 +85,7 @@ describe('Run Apex tests asynchronously', () => { beforeEach(async () => { sandboxStub = createSandbox(); - $$.setConfigStubContents('AuthInfoConfig', { - contents: { - orgs: { - [testData.username]: await testData.getConfig() - } - } - }); + // Stub retrieveMaxApiVersion to get over "Domain Not Found: The org cannot be found" error sandboxStub .stub(Connection.prototype, 'retrieveMaxApiVersion') diff --git a/packages/apex-node/test/tests/codeCoverage.test.ts b/packages/apex-node/test/tests/codeCoverage.test.ts index 8711bf28..acb5648d 100644 --- a/packages/apex-node/test/tests/codeCoverage.test.ts +++ b/packages/apex-node/test/tests/codeCoverage.test.ts @@ -28,13 +28,7 @@ const testData = new MockTestOrgData(); describe('Get code coverage results', () => { beforeEach(async () => { sandboxStub = createSandbox(); - $$.setConfigStubContents('AuthInfoConfig', { - contents: { - orgs: { - [testData.username]: await testData.getConfig() - } - } - }); + // Stub retrieveMaxApiVersion to get over "Domain Not Found: The org cannot be found" error sandboxStub .stub(Connection.prototype, 'retrieveMaxApiVersion') diff --git a/packages/plugin-apex/yarn.lock b/packages/plugin-apex/yarn.lock index 63ec1c12..f78a9456 100644 --- a/packages/plugin-apex/yarn.lock +++ b/packages/plugin-apex/yarn.lock @@ -652,18 +652,6 @@ dependencies: "@octokit/openapi-types" "^11.2.0" -"@salesforce/apex-node@1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@salesforce/apex-node/-/apex-node-1.0.0.tgz#95c99c6d18ed34f42741b505555da4ca10bfe60f" - integrity sha512-ZuR53tDq+/mVnhzjN+XwKeR6fzCWq2jjm2Tnsjzp36w9K9i8zZaqQfDb8vMaae7IezgnCX+yuyu8cN98MxZy0w== - dependencies: - "@salesforce/core" "^3.13.0" - faye "1.4.0" - glob "^8.0.3" - istanbul-lib-coverage "^3.2.0" - istanbul-lib-report "^3.0.0" - istanbul-reports "^3.1.4" - "@salesforce/bunyan@^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@salesforce/bunyan/-/bunyan-2.0.0.tgz#8dbe377f2cf7d35348a23260416fee15adba5f97" @@ -728,31 +716,6 @@ semver "^7.3.5" ts-retry-promise "^0.6.0" -"@salesforce/core@^3.13.0": - version "3.18.2" - resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-3.18.2.tgz#2e11dce0ecdc3028e6f8e69f673d6ee293ba2e9e" - integrity sha512-dbNZYHWLgV5ejP6F0dnQk2DPO3W3Q1deta/1S2N1bvJzb925lUxJdI4klKw/K2YwPbiUulhJE8phMkSGWR41NQ== - dependencies: - "@salesforce/bunyan" "^2.0.0" - "@salesforce/kit" "^1.5.34" - "@salesforce/schemas" "^1.1.0" - "@salesforce/ts-types" "^1.5.20" - "@types/graceful-fs" "^4.1.5" - "@types/mkdirp" "^1.0.2" - "@types/semver" "^7.3.9" - ajv "^8.11.0" - archiver "^5.3.0" - change-case "^4.1.2" - debug "^3.2.7" - faye "^1.4.0" - form-data "^4.0.0" - graceful-fs "^4.2.9" - js2xmlparser "^4.0.1" - jsforce "2.0.0-beta.9" - jsonwebtoken "8.5.1" - mkdirp "1.0.4" - ts-retry-promise "^0.6.0" - "@salesforce/core@^3.20.1", "@salesforce/core@^3.23.3": version "3.23.4" resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-3.23.4.tgz#89c348c5573f30dd3d23a266de928464f534c7bc" @@ -2614,7 +2577,7 @@ faye-websocket@>=0.9.1: dependencies: websocket-driver ">=0.5.1" -faye@1.4.0, faye@^1.4.0: +faye@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/faye/-/faye-1.4.0.tgz#01d3d26ed5642c1cb203eed358afb1c1444b8669" integrity sha512-kRrIg4be8VNYhycS2PY//hpBJSzZPr/DBbcy9VWelhZMW3KhyLkQR0HL0k0MNpmVoNFF4EdfMFkNAWjTP65g6w== @@ -2958,7 +2921,7 @@ glob@^7.0.0, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@^7.2.0: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^8.0.1, glob@^8.0.3: +glob@^8.0.1: version "8.0.3" resolved "https://registry.yarnpkg.com/glob/-/glob-8.0.3.tgz#415c6eb2deed9e502c68fa44a272e6da6eeca42e" integrity sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ== @@ -3609,11 +3572,6 @@ istanbul-lib-coverage@^2.0.5: resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz#675f0ab69503fad4b1d849f736baaca803344f49" integrity sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA== -istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz#189e7909d0a39fa5a3dfad5b03f71947770191d3" - integrity sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw== - istanbul-lib-hook@^2.0.7: version "2.0.7" resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-2.0.7.tgz#c95695f383d4f8f60df1f04252a9550e15b5b133" @@ -3643,15 +3601,6 @@ istanbul-lib-report@^2.0.8: make-dir "^2.1.0" supports-color "^6.1.0" -istanbul-lib-report@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#7518fe52ea44de372f460a76b5ecda9ffb73d8a6" - integrity sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw== - dependencies: - istanbul-lib-coverage "^3.0.0" - make-dir "^3.0.0" - supports-color "^7.1.0" - istanbul-lib-source-maps@^3.0.6: version "3.0.6" resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.6.tgz#284997c48211752ec486253da97e3879defba8c8" @@ -3670,14 +3619,6 @@ istanbul-reports@^2.2.4: dependencies: html-escaper "^2.0.0" -istanbul-reports@^3.1.4: - version "3.1.4" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.1.4.tgz#1b6f068ecbc6c331040aab5741991273e609e40c" - integrity sha512-r1/DshN4KSE7xWEknZLLLLDn5CJybV3nw01VTkp6D5jzLuELlcbudfj/eSQFvrKsJuTVCGnePO7ho82Nw9zzfw== - dependencies: - html-escaper "^2.0.0" - istanbul-lib-report "^3.0.0" - jake@^10.8.5: version "10.8.5" resolved "https://registry.yarnpkg.com/jake/-/jake-10.8.5.tgz#f2183d2c59382cb274226034543b9c03b8164c46" @@ -3749,32 +3690,6 @@ jsforce@2.0.0-beta.14: strip-ansi "^6.0.0" xml2js "^0.4.22" -jsforce@2.0.0-beta.9: - version "2.0.0-beta.9" - resolved "https://registry.yarnpkg.com/jsforce/-/jsforce-2.0.0-beta.9.tgz#692f205151551a601cb17fc6b891ecbb230eff58" - integrity sha512-DsmjBiLaAL4ECmpNjwcMuYoA2o7v42cnokmTvNtnsOoABb7goIZp/PIXRHhmN44HJxNw2RpEpjMv0rJNOkrAtg== - dependencies: - "@babel/runtime" "^7.12.5" - "@babel/runtime-corejs3" "^7.12.5" - "@types/node" "^12.19.9" - abort-controller "^3.0.0" - base64url "^3.0.1" - commander "^4.0.1" - core-js "^3.6.4" - csv-parse "^4.8.2" - csv-stringify "^5.3.4" - faye "^1.4.0" - form-data "^4.0.0" - fs-extra "^8.1.0" - https-proxy-agent "^5.0.0" - inquirer "^7.0.0" - multistream "^3.1.0" - node-fetch "^2.6.1" - open "^7.0.0" - regenerator-runtime "^0.13.3" - strip-ansi "^6.0.0" - xml2js "^0.4.22" - jsforce@^1.11.0: version "1.11.0" resolved "https://registry.yarnpkg.com/jsforce/-/jsforce-1.11.0.tgz#7e853b82c534f1fe8e18f432a344bae81881a133"