From ffa24894104e83005013011d02580dad814e1897 Mon Sep 17 00:00:00 2001 From: Kevin Hawkins Date: Mon, 24 Jun 2024 12:08:50 -0700 Subject: [PATCH 1/2] 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 180d0fb82a821c62057a057e706972d9d613928b Mon Sep 17 00:00:00 2001 From: Kevin Hawkins Date: Mon, 24 Jun 2024 12:56:31 -0700 Subject: [PATCH 2/2] 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(