Skip to content

Commit

Permalink
fix(deps): core4, sdr9, and associated changes
Browse files Browse the repository at this point in the history
* chore: updates from devScripts

* fix(deps): corev4 and other deps

* fix(deps): core4, sdr9, and associated changes

---------

Co-authored-by: mshanemc <[email protected]>
  • Loading branch information
svc-cli-bot and mshanemc authored May 31, 2023
1 parent 95c0add commit 9f48b95
Show file tree
Hide file tree
Showing 6 changed files with 735 additions and 244 deletions.
38 changes: 19 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
"dependencies": {
"@oclif/core": "^2.8.2",
"@salesforce/apex-node": "^1.6.0",
"@salesforce/core": "^3.36.0",
"@salesforce/kit": "^3.0.0",
"@salesforce/sf-plugins-core": "^2.4.2",
"@salesforce/source-deploy-retrieve": "^8.5.1",
"@salesforce/source-tracking": "^3.1.5",
"@salesforce/core": "^4.0.1",
"@salesforce/kit": "^3.0.2",
"@salesforce/sf-plugins-core": "^3.0.2",
"@salesforce/source-deploy-retrieve": "^9.1.0",
"@salesforce/source-tracking": "^4.1.0",
"chalk": "^4.1.2",
"got": "^11.8.6",
"proxy-agent": "^5.0.0",
Expand All @@ -22,17 +22,17 @@
"devDependencies": {
"@oclif/plugin-command-snapshot": "^3.3.13",
"@oclif/plugin-help": "^5.2.6",
"@salesforce/cli-plugins-testkit": "^3.4.0",
"@salesforce/cli-plugins-testkit": "^4.0.1",
"@salesforce/dev-config": "^4.0.1",
"@salesforce/dev-scripts": "^5.1.0",
"@salesforce/plugin-command-reference": "^2.3.2",
"@salesforce/plugin-deploy-retrieve": "^1.9.0",
"@salesforce/plugin-info": "^2.6.13",
"@salesforce/plugin-settings": "^1.4.9",
"@salesforce/plugin-templates": "^55.4.15",
"@salesforce/plugin-user": "^2.3.8",
"@salesforce/prettier-config": "^0.0.2",
"@salesforce/source-testkit": "^2.0.59",
"@salesforce/dev-scripts": "^5.4.1",
"@salesforce/plugin-command-reference": "^3.0.2",
"@salesforce/plugin-deploy-retrieve": "^1.11.0",
"@salesforce/plugin-info": "^2.6.16",
"@salesforce/plugin-settings": "^1.4.10",
"@salesforce/plugin-templates": "^55.4.18",
"@salesforce/plugin-user": "^2.3.14",
"@salesforce/prettier-config": "^0.0.3",
"@salesforce/source-testkit": "^2.1.0",
"@salesforce/ts-sinon": "1.4.7",
"@swc/core": "1.3.39",
"@types/archiver": "^5.1.1",
Expand All @@ -42,7 +42,7 @@
"@typescript-eslint/eslint-plugin": "^5.42.1",
"@typescript-eslint/parser": "^5.59.0",
"archiver": "^5.3.0",
"chai": "^4.3.4",
"chai": "^4.3.7",
"chai-each": "^0.0.1",
"cross-env": "^7.0.3",
"debug": "^4.3.3",
Expand All @@ -54,12 +54,12 @@
"eslint-plugin-header": "^3.1.1",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jsdoc": "^43.0.5",
"eslint-plugin-sf-plugin": "^1.15.1",
"eslint-plugin-sf-plugin": "^1.15.5",
"fast-glob": "^3.2.12",
"husky": "^7.0.4",
"mocha": "^9.1.3",
"nyc": "^15.1.0",
"oclif": "^3.8.2",
"oclif": "^3.9.0",
"prettier": "^2.8.7",
"pretty-quick": "^3.1.3",
"shelljs": "^0.8.5",
Expand Down Expand Up @@ -283,4 +283,4 @@
"output": []
}
}
}
}
6 changes: 2 additions & 4 deletions src/deployCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {
StateAggregator,
StatusResult,
} from '@salesforce/core';
import { AnyJson, getBoolean, isString } from '@salesforce/ts-types';
import { AnyJson, getBoolean } from '@salesforce/ts-types';
import { Duration, once, ensureArray } from '@salesforce/kit';
import {
CoverageReporter,
Expand Down Expand Up @@ -171,11 +171,9 @@ export abstract class DeployCommand extends SourceCommand {
}

protected async deployRecentValidation(id: string, conn: Connection): Promise<DeployResult> {
const response = await conn.deployRecentValidation({ id, rest: this.isRest });
const validatedDeployId = await conn.metadata.deployRecentValidation({ id, rest: this.isRest });
// This is the deploy ID of the deployRecentValidation response, not
// the already validated deploy ID (i.e., validateddeployrequestid).
// REST returns an object with an ID, SOAP returns the id as a string.
const validatedDeployId = isString(response) ? response : (response as { id: string }).id;
this.updateDeployId(validatedDeployId);
this.asyncDeployResult = { id: validatedDeployId };

Expand Down
4 changes: 2 additions & 2 deletions test/commands/source/deploy.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import * as sinon from 'sinon';
import { expect } from 'chai';
import { ComponentSetBuilder, ComponentSetOptions, MetadataApiDeployOptions } from '@salesforce/source-deploy-retrieve';
import { fromStub, stubInterface, stubMethod } from '@salesforce/ts-sinon';
import { ConfigAggregator, Lifecycle, Messages, SfdxConfigAggregator, SfProject } from '@salesforce/core';
import { ConfigAggregator, Lifecycle, Messages, SfProject } from '@salesforce/core';
import { Config } from '@oclif/core';
import { SfCommand } from '@salesforce/sf-plugins-core';
import { MockTestOrgData, TestContext } from '@salesforce/core/lib/testSetup';
Expand Down Expand Up @@ -86,7 +86,7 @@ describe('force:source:deploy', () => {
const runDeployCmd = async (params: string[], options?: { sourceApiVersion?: string }) => {
const cmd = new TestDeploy(params, oclifConfigStub);
cmd.project = SfProject.getInstance();
cmd.configAggregator = await (await SfdxConfigAggregator.create({ customConfigMeta: ConfigMeta })).reload();
cmd.configAggregator = await (await ConfigAggregator.create({ customConfigMeta: ConfigMeta })).reload();
sandbox.stub(cmd.project, 'getDefaultPackage').returns({ name: '', path: '', fullPath: defaultDir });
sandbox.stub(cmd.project, 'getUniquePackageDirectories').returns([{ fullPath: defaultDir, path: '', name: '' }]);
sandbox.stub(cmd.project, 'getPackageDirectories').returns([{ fullPath: defaultDir, path: '', name: '' }]);
Expand Down
4 changes: 2 additions & 2 deletions test/coverageUtils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 { expect } from 'chai';
import { MockTestOrgData, testSetup } from '@salesforce/core/lib/testSetup';
import { MockTestOrgData, TestContext } from '@salesforce/core/lib/testSetup';
import { AuthInfo, Connection } from '@salesforce/core';
import { createSandbox, SinonSandbox } from 'sinon';
import { transformCoverageToApexCoverage } from '../src/coverageUtils';
Expand Down Expand Up @@ -178,7 +178,7 @@ const sampleRunTestResult = {
};

describe('transform md RunTestResult', () => {
const $$ = testSetup();
const $$ = new TestContext();
let mockConnection: Connection;
const testData = new MockTestOrgData();

Expand Down
8 changes: 1 addition & 7 deletions test/hooks/diagnostics.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,7 @@ import { hook } from '../../src/hooks/diagnostics';

const pluginName = '@salesforce/plugin-source';
Messages.importMessagesDirectory(__dirname);
const messages = Messages.load(pluginName, 'diagnostics', [
'apiVersionMismatch',
'apiVersionUnset',
'maxApiVersionMismatch',
'sourceApiVersionMaxMismatch',
'apiVersionMaxMismatch',
]);
const messages = Messages.loadMessages(pluginName, 'diagnostics');

describe('Doctor diagnostics', () => {
const sandbox = new TestContext().SANDBOX;
Expand Down
Loading

0 comments on commit 9f48b95

Please sign in to comment.