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..c0d0168a 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,23 +30,13 @@ describe('Apex Execute Tests', async () => { beforeEach(async () => { sandboxStub = createSandbox(); - $$.setConfigStubContents('GlobalInfo', { - 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') .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..9b451a9f 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,22 +42,12 @@ const testResultMsg: TestResultMessage = { describe('Streaming API Client', () => { beforeEach(async () => { sandboxStub = createSandbox(); - $$.setConfigStubContents('GlobalInfo', { - 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') .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..af438c78 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,22 +85,13 @@ describe('Run Apex tests asynchronously', () => { beforeEach(async () => { sandboxStub = createSandbox(); - $$.setConfigStubContents('GlobalInfo', { - 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') .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..acb5648d 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,22 +28,13 @@ const testData = new MockTestOrgData(); describe('Get code coverage results', () => { beforeEach(async () => { sandboxStub = createSandbox(); - $$.setConfigStubContents('GlobalInfo', { - 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') .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..f78a9456 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== @@ -664,19 +664,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 +680,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,13 +716,13 @@ semver "^7.3.5" ts-retry-promise "^0.6.0" -"@salesforce/core@^3.13.0", "@salesforce/core@^3.15.3": - 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.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.34" + "@salesforce/kit" "^1.5.41" "@salesforce/schemas" "^1.1.0" "@salesforce/ts-types" "^1.5.20" "@types/graceful-fs" "^4.1.5" @@ -737,7 +736,7 @@ 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" @@ -756,6 +755,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" @@ -3656,10 +3664,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"