@vscode/test-electron
Advanced tools
Comparing version 2.2.1 to 2.2.2
# Changelog | ||
### 2.2.2 | 2022-01-09 | ||
- Add default for platform in `resolveCliPathFromVSCodeExecutablePath` to match docs | ||
### 2.2.1 | 2022-12-06 | ||
@@ -4,0 +8,0 @@ |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const child_process_1 = require("child_process"); | ||
const fs_1 = require("fs"); | ||
@@ -9,2 +10,3 @@ const os_1 = require("os"); | ||
const progress_1 = require("./progress"); | ||
const util_1 = require("./util"); | ||
const platforms = ['darwin', 'darwin-arm64', 'win32-archive', 'win32-x64-archive', 'linux-x64', 'linux-arm64', 'linux-armhf']; | ||
@@ -27,2 +29,11 @@ vitest_1.describe('sane downloads', () => { | ||
} | ||
const exePath = util_1.resolveCliPathFromVSCodeExecutablePath(location, platform); | ||
if (!fs_1.existsSync(exePath)) { | ||
throw new Error(`expected ${exePath} to from ${location}`); | ||
} | ||
if (platform === util_1.systemDefaultPlatform) { | ||
const version = child_process_1.spawnSync(exePath, ['--version']); | ||
vitest_1.expect(version.status).to.equal(0); | ||
vitest_1.expect(version.stdout.toString().trim()).to.not.be.empty; | ||
} | ||
}); | ||
@@ -29,0 +40,0 @@ } |
@@ -30,3 +30,3 @@ /// <reference types="node" /> | ||
*/ | ||
export declare function resolveCliPathFromVSCodeExecutablePath(vscodeExecutablePath: string, platform: DownloadPlatform): string; | ||
export declare function resolveCliPathFromVSCodeExecutablePath(vscodeExecutablePath: string, platform?: DownloadPlatform): string; | ||
/** | ||
@@ -33,0 +33,0 @@ * Resolve the VS Code cli arguments from executable path returned from `downloadAndUnzipVSCode`. |
@@ -123,3 +123,3 @@ "use strict"; | ||
*/ | ||
function resolveCliPathFromVSCodeExecutablePath(vscodeExecutablePath, platform) { | ||
function resolveCliPathFromVSCodeExecutablePath(vscodeExecutablePath, platform = exports.systemDefaultPlatform) { | ||
if (windowsPlatforms.has(platform)) { | ||
@@ -126,0 +126,0 @@ if (vscodeExecutablePath.endsWith('Code - Insiders.exe')) { |
{ | ||
"name": "@vscode/test-electron", | ||
"version": "2.2.1", | ||
"version": "2.2.2", | ||
"scripts": { | ||
@@ -5,0 +5,0 @@ "compile": "tsc -p ./", |
@@ -9,3 +9,3 @@ # vscode-test | ||
- Node >= 12.x | ||
- Node >= 16.x | ||
- Windows >= Windows Server 2012+ / Win10+ (anything with Powershell >= 5.0) | ||
@@ -12,0 +12,0 @@ - macOS |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
67524
1126