Merge from vscode fcf3346a8e9f5ee1e00674461d9e2c2292a14ee3 (#12295)

* Merge from vscode fcf3346a8e9f5ee1e00674461d9e2c2292a14ee3

* Fix test build break

* Update distro

* Fix build errors

* Update distro

* Update REH build file

* Update build task names for REL

* Fix product build yaml

* Fix product REH task name

* Fix type in task name

* Update linux build step

* Update windows build tasks

* Turn off server publish

* Disable REH

* Fix typo

* Bump distro

* Update vscode tests

* Bump distro

* Fix type in disto

* Bump distro

* Turn off docker build

* Remove docker step from release

Co-authored-by: ADS Merger <andresse@microsoft.com>
Co-authored-by: Karl Burtram <karlb@microsoft.com>
This commit is contained in:
Christopher Suh
2020-10-03 14:42:05 -04:00
committed by GitHub
parent 58d02b76db
commit 6ff1e3866b
687 changed files with 10507 additions and 9104 deletions

View File

@@ -18,7 +18,7 @@ import { CommandOptions, ForkOptions, SuccessData, Source, TerminateResponse, Te
import { getPathFromAmdModule } from 'vs/base/common/amd';
export { CommandOptions, ForkOptions, SuccessData, Source, TerminateResponse, TerminateResponseCode };
export type ValueCallback<T> = (value?: T | Promise<T>) => void;
export type ValueCallback<T> = (value: T | Promise<T>) => void;
export type ErrorCallback = (error?: any) => void;
export type ProgressCallback<T> = (progress: T) => void;
@@ -98,7 +98,7 @@ export abstract class AbstractProcess<TProgressData> {
private childProcess: cp.ChildProcess | null;
protected childProcessPromise: Promise<cp.ChildProcess> | null;
private pidResolve?: ValueCallback<number>;
private pidResolve: ValueCallback<number> | undefined;
protected terminateRequested: boolean;
private static WellKnowCommands: IStringDictionary<boolean> = {

View File

@@ -193,6 +193,11 @@ export function listProcesses(rootPid: number): Promise<ProcessItem> {
processInfo.load = parseFloat(cpuUsage[i]);
}
if (!rootItem) {
reject(new Error(`Root process ${rootPid} not found`));
return;
}
resolve(rootItem);
}
});
@@ -228,7 +233,11 @@ export function listProcesses(rootPid: number): Promise<ProcessItem> {
if (process.platform === 'linux') {
calculateLinuxCpuUsage();
} else {
resolve(rootItem);
if (!rootItem) {
reject(new Error(`Root process ${rootPid} not found`));
} else {
resolve(rootItem);
}
}
}
});

View File

@@ -40,7 +40,7 @@ const JSCHARDET_TO_ICONV_ENCODINGS: { [name: string]: string } = {
const UTF8 = 'utf8';
export async function resolveTerminalEncoding(verbose?: boolean): Promise<string> {
let rawEncodingPromise: Promise<string>;
let rawEncodingPromise: Promise<string | undefined>;
// Support a global environment variable to win over other mechanics
const cliEncodingEnv = process.env['VSCODE_CLI_ENCODING'];
@@ -54,7 +54,7 @@ export async function resolveTerminalEncoding(verbose?: boolean): Promise<string
// Windows: educated guess
else if (isWindows) {
rawEncodingPromise = new Promise<string>(resolve => {
rawEncodingPromise = new Promise<string | undefined>(resolve => {
if (verbose) {
console.log('Running "chcp" to detect terminal encoding...');
}

View File

@@ -12,6 +12,7 @@ import { mkdirp, rimraf } from 'vs/base/node/pfs';
import { open as _openZip, Entry, ZipFile } from 'yauzl';
import * as yazl from 'yazl';
import { CancellationToken } from 'vs/base/common/cancellation';
import { assertIsDefined } from 'vs/base/common/types';
export interface IExtractOptions {
overwrite?: boolean;
@@ -161,24 +162,24 @@ function extractZip(zipfile: ZipFile, targetPath: string, options: IOptions, tok
}
function openZip(zipFile: string, lazy: boolean = false): Promise<ZipFile> {
return new Promise((resolve, reject) => {
return new Promise<ZipFile>((resolve, reject) => {
_openZip(zipFile, lazy ? { lazyEntries: true } : undefined!, (error?: Error, zipfile?: ZipFile) => {
if (error) {
reject(toExtractError(error));
} else {
resolve(zipfile);
resolve(assertIsDefined(zipfile));
}
});
});
}
function openZipStream(zipFile: ZipFile, entry: Entry): Promise<Readable> {
return new Promise((resolve, reject) => {
return new Promise<Readable>((resolve, reject) => {
zipFile.openReadStream(entry, (error?: Error, stream?: Readable) => {
if (error) {
reject(toExtractError(error));
} else {
resolve(stream);
resolve(assertIsDefined(stream));
}
});
});