From b858aa8ac8a1ab76a624aba632beb95945624553 Mon Sep 17 00:00:00 2001 From: Ben Zhang Date: Fri, 21 Jun 2024 16:08:02 -0700 Subject: [PATCH 1/4] fix: update sfdx command to sf to match dependent command id change --- src/commands/wizard/authorizeCommand.ts | 2 +- src/commands/wizard/deployToOrgCommand.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/wizard/authorizeCommand.ts b/src/commands/wizard/authorizeCommand.ts index dc5e357..4d673f3 100644 --- a/src/commands/wizard/authorizeCommand.ts +++ b/src/commands/wizard/authorizeCommand.ts @@ -24,7 +24,7 @@ export class AuthorizeCommand { if (!result || result.title === l10n.t('No')) { return Promise.resolve(false); } else { - await commands.executeCommand('sfdx.org.login.web'); + await commands.executeCommand('sf.org.login.web'); await window.showInformationMessage( l10n.t( "Once you've authorized your Org, click here to continue." diff --git a/src/commands/wizard/deployToOrgCommand.ts b/src/commands/wizard/deployToOrgCommand.ts index a945326..7a826c1 100644 --- a/src/commands/wizard/deployToOrgCommand.ts +++ b/src/commands/wizard/deployToOrgCommand.ts @@ -36,7 +36,7 @@ export class DeployToOrgCommand { const forceAppPath = path.join(workspaceFolderPath, 'force-app'); const forceAppUri = Uri.file(forceAppPath); await commands.executeCommand( - 'sfdx.force.source.deploy.source.path', + 'sf.deploy.source.path', forceAppUri ); return Promise.resolve(true); From 202d8871356a9fb17f9403d4afe44523268a9858 Mon Sep 17 00:00:00 2001 From: Ben Zhang Date: Mon, 24 Jun 2024 12:18:36 -0700 Subject: [PATCH 2/4] prettify the code --- src/commands/wizard/deployToOrgCommand.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/commands/wizard/deployToOrgCommand.ts b/src/commands/wizard/deployToOrgCommand.ts index 7a826c1..278643f 100644 --- a/src/commands/wizard/deployToOrgCommand.ts +++ b/src/commands/wizard/deployToOrgCommand.ts @@ -35,10 +35,7 @@ export class DeployToOrgCommand { currentWorkspace.workspaceFolders[0].uri.fsPath; const forceAppPath = path.join(workspaceFolderPath, 'force-app'); const forceAppUri = Uri.file(forceAppPath); - await commands.executeCommand( - 'sf.deploy.source.path', - forceAppUri - ); + await commands.executeCommand('sf.deploy.source.path', forceAppUri); return Promise.resolve(true); } } From 792857c1f922f47ffd9c58897cee268d12dcf91f Mon Sep 17 00:00:00 2001 From: Kevin Hawkins Date: Mon, 24 Jun 2024 12:08:50 -0700 Subject: [PATCH 3/4] Telling VSCode that Prettier is the default formatter --- .vscode/settings.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 30bf8c2..f66cbb3 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -7,5 +7,7 @@ "out": true // set this to false to include "out" folder in search results }, // Turn off tsc task auto detection since we have the necessary tasks as npm scripts - "typescript.tsc.autoDetect": "off" + "typescript.tsc.autoDetect": "off", + // Prettier is this project's code formatter. + "editor.defaultFormatter": "esbenp.prettier-vscode" } \ No newline at end of file From 44cbeb802ed0d227d96b3eb96ce14528b6e9ae8a Mon Sep 17 00:00:00 2001 From: Kevin Hawkins Date: Mon, 24 Jun 2024 12:56:31 -0700 Subject: [PATCH 4/4] Fixing Windows test running --- src/test/runTest.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/test/runTest.ts b/src/test/runTest.ts index f66c10a..6cd7217 100644 --- a/src/test/runTest.ts +++ b/src/test/runTest.ts @@ -38,15 +38,16 @@ async function main() { // support in the `engines` section of our package. const vscodeExecutablePath = await downloadAndUnzipVSCode(VSCODE_TEST_VERSION); - const [cliPath, ...args] = + const [cliPath, ...cliArgs] = resolveCliArgsFromVSCodeExecutablePath(vscodeExecutablePath); // Install the Salesforce Extensions, which is a pre-req for our // extension. Bail if there's an error. + const isWindows = process.platform === 'win32'; const installExtensionDepsOuput = spawnSync( - cliPath, - [...args, '--install-extension', CORE_EXTENSION_ID], - { stdio: 'inherit', encoding: 'utf-8' } + isWindows ? `"${cliPath}"` : cliPath, + [...cliArgs, '--install-extension', CORE_EXTENSION_ID], + { stdio: 'inherit', encoding: 'utf-8', shell: isWindows } ); if (installExtensionDepsOuput.error) { console.error(