From 5b5803bee27c94dcc9cf575b5445bdf1f605d8f1 Mon Sep 17 00:00:00 2001 From: CristiCanizales Date: Fri, 26 Jan 2024 13:35:50 -0300 Subject: [PATCH] chore: ignore conflicts on push setting --- packages/salesforcedx-vscode-core/package.json | 4 ++-- packages/salesforcedx-vscode-core/package.nls.ja.json | 2 +- packages/salesforcedx-vscode-core/package.nls.json | 2 +- packages/salesforcedx-vscode-core/src/constants.ts | 4 ++-- .../src/settings/pushOrDeployOnSave.ts | 2 +- .../src/settings/sfdxCoreSettings.ts | 6 +++--- .../settings/pushOrDeployOnSave.test.ts | 8 ++++---- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/salesforcedx-vscode-core/package.json b/packages/salesforcedx-vscode-core/package.json index f057b718c5..4c2c6ee516 100644 --- a/packages/salesforcedx-vscode-core/package.json +++ b/packages/salesforcedx-vscode-core/package.json @@ -924,10 +924,10 @@ "default": false, "description": "%setting_clear_output_tab_description%" }, - "salesforcedx-vscode-core.push-or-deploy-on-save.overrideConflictsOnPush": { + "salesforcedx-vscode-core.push-or-deploy-on-save.ignoreConflictsOnPush": { "type": "boolean", "default": false, - "description": "%override_conflicts_on_push_description%" + "description": "%ignore_conflicts_on_push_description%" }, "salesforcedx-vscode-core.show-cli-success-msg": { "type": "boolean", diff --git a/packages/salesforcedx-vscode-core/package.nls.ja.json b/packages/salesforcedx-vscode-core/package.nls.ja.json index 180836b2af..b8a9d62c50 100644 --- a/packages/salesforcedx-vscode-core/package.nls.ja.json +++ b/packages/salesforcedx-vscode-core/package.nls.ja.json @@ -56,7 +56,7 @@ "org_logout_all_text": "SFDX: すべての認証済み組織からログアウト", "org_logout_default_text": "SFDX: Log Out from Default Org", "org_open_default_scratch_org_text": "SFDX: デフォルトの組織を開く", - "override_conflicts_on_push_description": "保存時の project:deploy:start コマンド実行時に、常に --forceoverwrite オプションを使用するかどうかを指定します。", + "ignore_conflicts_on_push_description": "保存時の project:deploy:start コマンド実行時に、常に --ignore-conflicts オプションを使用するかどうかを指定します。", "project_generate_text": "SFDX: プロジェクトを作成", "project_generate_with_manifest_text": "SFDX: マニフェストファイルを使用してプロジェクトを作成", "push_or_deploy_on_save_enabled_description": "ローカルのソースファイルを保存した際に、自動的に project:deploy:start コマンド (ソースが追跡される組織) または、force:source:deploy コマンド (ソースが追跡されない組織) を実行するかどうかを指定します。", diff --git a/packages/salesforcedx-vscode-core/package.nls.json b/packages/salesforcedx-vscode-core/package.nls.json index 72b7309d6c..18a74d157d 100644 --- a/packages/salesforcedx-vscode-core/package.nls.json +++ b/packages/salesforcedx-vscode-core/package.nls.json @@ -62,7 +62,7 @@ "org_logout_all_text": "SFDX: Log Out from All Authorized Orgs", "org_logout_default_text": "SFDX: Log Out from Default Org", "org_open_default_scratch_org_text": "SFDX: Open Default Org", - "override_conflicts_on_push_description": "Specifies whether to always use --forceoverwrite when you run project:deploy:start on save", + "ignore_conflicts_on_push_description": "Specifies whether to always use --ignore-conflicts when you run project:deploy:start on save", "prefer_deploy_on_save_enabled_description": "Specifies whether to always run deploy instead of push when a local source file is saved and `Push or deploy on save` is enabled.", "project_generate_text": "SFDX: Create Project", "project_generate_with_manifest_text": "SFDX: Create Project with Manifest", diff --git a/packages/salesforcedx-vscode-core/src/constants.ts b/packages/salesforcedx-vscode-core/src/constants.ts index 5c192e553e..1678630fd2 100644 --- a/packages/salesforcedx-vscode-core/src/constants.ts +++ b/packages/salesforcedx-vscode-core/src/constants.ts @@ -36,8 +36,8 @@ export const INTERNAL_DEVELOPMENT_FLAG = 'internal-development'; export const PUSH_OR_DEPLOY_ON_SAVE_ENABLED = 'push-or-deploy-on-save.enabled'; export const PREFER_DEPLOY_ON_SAVE_ENABLED = 'push-or-deploy-on-save.preferDeployOnSave'; -export const PUSH_OR_DEPLOY_ON_SAVE_OVERRIDE_CONFLICTS = - 'push-or-deploy-on-save.overrideConflictsOnPush'; +export const PUSH_OR_DEPLOY_ON_SAVE_IGNORE_CONFLICTS = + 'push-or-deploy-on-save.ignoreConflictsOnPush'; export const RETRIEVE_TEST_CODE_COVERAGE = 'retrieve-test-code-coverage'; export const SHOW_CLI_SUCCESS_INFO_MSG = 'show-cli-success-msg'; export const TELEMETRY_ENABLED = 'telemetry.enabled'; diff --git a/packages/salesforcedx-vscode-core/src/settings/pushOrDeployOnSave.ts b/packages/salesforcedx-vscode-core/src/settings/pushOrDeployOnSave.ts index 01d2350834..873b48e5bd 100644 --- a/packages/salesforcedx-vscode-core/src/settings/pushOrDeployOnSave.ts +++ b/packages/salesforcedx-vscode-core/src/settings/pushOrDeployOnSave.ts @@ -75,7 +75,7 @@ export class DeployQueue { private async executePushCommand() { const ignoreConflictsCommand = - sfdxCoreSettings.getPushOrDeployOnSaveOverrideConflicts() + sfdxCoreSettings.getPushOrDeployOnSaveIgnoreConflicts() ? '.ignore.conflicts' : ''; const command = `sfdx.project.deploy.start${ignoreConflictsCommand}`; diff --git a/packages/salesforcedx-vscode-core/src/settings/sfdxCoreSettings.ts b/packages/salesforcedx-vscode-core/src/settings/sfdxCoreSettings.ts index ef3c431002..cd672fd718 100644 --- a/packages/salesforcedx-vscode-core/src/settings/sfdxCoreSettings.ts +++ b/packages/salesforcedx-vscode-core/src/settings/sfdxCoreSettings.ts @@ -18,7 +18,7 @@ import { ENV_SF_LOG_LEVEL, PREFER_DEPLOY_ON_SAVE_ENABLED, PUSH_OR_DEPLOY_ON_SAVE_ENABLED, - PUSH_OR_DEPLOY_ON_SAVE_OVERRIDE_CONFLICTS, + PUSH_OR_DEPLOY_ON_SAVE_IGNORE_CONFLICTS, RETRIEVE_TEST_CODE_COVERAGE, SHOW_CLI_SUCCESS_INFO_MSG, TELEMETRY_ENABLED @@ -65,9 +65,9 @@ export class SfdxCoreSettings { return this.getConfigValue(PUSH_OR_DEPLOY_ON_SAVE_ENABLED, false); } - public getPushOrDeployOnSaveOverrideConflicts(): boolean { + public getPushOrDeployOnSaveIgnoreConflicts(): boolean { return this.getConfigValue( - PUSH_OR_DEPLOY_ON_SAVE_OVERRIDE_CONFLICTS, + PUSH_OR_DEPLOY_ON_SAVE_IGNORE_CONFLICTS, false ); } diff --git a/packages/salesforcedx-vscode-core/test/vscode-integration/settings/pushOrDeployOnSave.test.ts b/packages/salesforcedx-vscode-core/test/vscode-integration/settings/pushOrDeployOnSave.test.ts index c4e8905567..30334e478e 100644 --- a/packages/salesforcedx-vscode-core/test/vscode-integration/settings/pushOrDeployOnSave.test.ts +++ b/packages/salesforcedx-vscode-core/test/vscode-integration/settings/pushOrDeployOnSave.test.ts @@ -191,12 +191,12 @@ describe('Push or Deploy on Save', () => { expect(appendLineStub.getCall(0).args[0]).to.equal(error); }); - it('should call project:deploy:start when getPushOrDeployOnSaveOverrideConflicts is false', async () => { + it('should call project:deploy:start when getPushOrDeployOnSaveIgnoreConflicts is false', async () => { getWorkspaceOrgTypeStub.resolves(OrgType.SourceTracked); sandbox .stub( SfdxCoreSettings.prototype, - 'getPushOrDeployOnSaveOverrideConflicts' + 'getPushOrDeployOnSaveIgnoreConflicts' ) .returns(false); @@ -210,12 +210,12 @@ describe('Push or Deploy on Save', () => { expect(appendLineStub.calledOnce).to.be.false; }); - it('should call project:deploy:start --ignore-conflicts when getPushOrDeployOnSaveOverrideConflicts is true', async () => { + it('should call project:deploy:start --ignore-conflicts when getPushOrDeployOnSaveIgnoreConflicts is true', async () => { getWorkspaceOrgTypeStub.resolves(OrgType.SourceTracked); sandbox .stub( SfdxCoreSettings.prototype, - 'getPushOrDeployOnSaveOverrideConflicts' + 'getPushOrDeployOnSaveIgnoreConflicts' ) .returns(true);