Update to use TS 4.1 for building VS Code
This commit is contained in:
parent
d1b49cd8b9
commit
50cc1d0e97
22 changed files with 35 additions and 35 deletions
|
@ -45,7 +45,7 @@
|
||||||
"minimist": "^1.2.3",
|
"minimist": "^1.2.3",
|
||||||
"request": "^2.85.0",
|
"request": "^2.85.0",
|
||||||
"terser": "4.3.8",
|
"terser": "4.3.8",
|
||||||
"typescript": "^4.1.0-dev.20200824",
|
"typescript": "^4.1.0-dev.20200916",
|
||||||
"vsce": "1.48.0",
|
"vsce": "1.48.0",
|
||||||
"vscode-telemetry-extractor": "^1.6.0",
|
"vscode-telemetry-extractor": "^1.6.0",
|
||||||
"xml2js": "^0.4.17"
|
"xml2js": "^0.4.17"
|
||||||
|
|
|
@ -2535,10 +2535,10 @@ typescript@^3.0.1:
|
||||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.5.3.tgz#c830f657f93f1ea846819e929092f5fe5983e977"
|
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.5.3.tgz#c830f657f93f1ea846819e929092f5fe5983e977"
|
||||||
integrity sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g==
|
integrity sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g==
|
||||||
|
|
||||||
typescript@^4.1.0-dev.20200824:
|
typescript@^4.1.0-dev.20200916:
|
||||||
version "4.1.0-dev.20200824"
|
version "4.1.0-dev.20200916"
|
||||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.0-dev.20200824.tgz#34c92d9b6e5124600658c0d4e9b8c125beaf577d"
|
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.0-dev.20200916.tgz#b2c803a39d9335086033009903b03e7e53e39223"
|
||||||
integrity sha512-hTJfocmebnMKoqRw/xs3bL61z87XXtvOUwYtM7zaCX9mAvnfdo1x1bzQlLZAsvdzRIgAHPJQYbqYHKygWkDw6g==
|
integrity sha512-ly2k/AZ3AyfIyLWhBSnW3x7aDufIS9uNRagFZin36jXb6DvZEZwtyx138u8iSvtKE1AV/VNyWLLBkZYojgBM1g==
|
||||||
|
|
||||||
typical@^4.0.0:
|
typical@^4.0.0:
|
||||||
version "4.0.0"
|
version "4.0.0"
|
||||||
|
|
|
@ -445,7 +445,7 @@ export class Git {
|
||||||
const [, letter] = match;
|
const [, letter] = match;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const networkPath = await new Promise<string>(resolve =>
|
const networkPath = await new Promise<string | undefined>(resolve =>
|
||||||
realpath.native(`${letter}:`, { encoding: 'utf8' }, (err, resolvedPath) =>
|
realpath.native(`${letter}:`, { encoding: 'utf8' }, (err, resolvedPath) =>
|
||||||
resolve(err !== null ? undefined : resolvedPath),
|
resolve(err !== null ? undefined : resolvedPath),
|
||||||
),
|
),
|
||||||
|
|
|
@ -336,7 +336,7 @@ export function* splitInChunks(array: string[], maxChunkLength: number): Iterabl
|
||||||
|
|
||||||
interface ILimitedTaskFactory<T> {
|
interface ILimitedTaskFactory<T> {
|
||||||
factory: () => Promise<T>;
|
factory: () => Promise<T>;
|
||||||
c: (value?: T | Promise<T>) => void;
|
c: (value: T | Promise<T>) => void;
|
||||||
e: (error?: any) => void;
|
e: (error?: any) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ export interface PromiseAdapter<T, U> {
|
||||||
(
|
(
|
||||||
value: T,
|
value: T,
|
||||||
resolve:
|
resolve:
|
||||||
(value?: U | PromiseLike<U>) => void,
|
(value: U | PromiseLike<U>) => void,
|
||||||
reject:
|
reject:
|
||||||
(reason: any) => void
|
(reason: any) => void
|
||||||
): any;
|
): any;
|
||||||
|
|
|
@ -12,7 +12,7 @@ export class Delayer<T> {
|
||||||
public defaultDelay: number;
|
public defaultDelay: number;
|
||||||
private timeout: any; // Timer
|
private timeout: any; // Timer
|
||||||
private completionPromise: Promise<T> | null;
|
private completionPromise: Promise<T> | null;
|
||||||
private onSuccess: ((value?: T | Thenable<T> | undefined) => void) | null;
|
private onSuccess: ((value: T | PromiseLike<T> | undefined) => void) | null;
|
||||||
private task: ITask<T> | null;
|
private task: ITask<T> | null;
|
||||||
|
|
||||||
constructor(defaultDelay: number) {
|
constructor(defaultDelay: number) {
|
||||||
|
@ -30,7 +30,7 @@ export class Delayer<T> {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.completionPromise) {
|
if (!this.completionPromise) {
|
||||||
this.completionPromise = new Promise<T>((resolve) => {
|
this.completionPromise = new Promise<T | undefined>((resolve) => {
|
||||||
this.onSuccess = resolve;
|
this.onSuccess = resolve;
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.completionPromise = null;
|
this.completionPromise = null;
|
||||||
|
|
|
@ -105,7 +105,7 @@ export class Delayer<T> {
|
||||||
public defaultDelay: number;
|
public defaultDelay: number;
|
||||||
private timeout: NodeJS.Timer | null;
|
private timeout: NodeJS.Timer | null;
|
||||||
private completionPromise: Promise<T> | null;
|
private completionPromise: Promise<T> | null;
|
||||||
private onResolve: ((value: T | Thenable<T> | undefined) => void) | null;
|
private onResolve: ((value: T | PromiseLike<T> | undefined) => void) | null;
|
||||||
private task: ITask<T> | null;
|
private task: ITask<T> | null;
|
||||||
|
|
||||||
constructor(defaultDelay: number) {
|
constructor(defaultDelay: number) {
|
||||||
|
@ -121,7 +121,7 @@ export class Delayer<T> {
|
||||||
this.cancelTimeout();
|
this.cancelTimeout();
|
||||||
|
|
||||||
if (!this.completionPromise) {
|
if (!this.completionPromise) {
|
||||||
this.completionPromise = new Promise<T>((resolve) => {
|
this.completionPromise = new Promise<T | undefined>((resolve) => {
|
||||||
this.onResolve = resolve;
|
this.onResolve = resolve;
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.completionPromise = null;
|
this.completionPromise = null;
|
||||||
|
|
|
@ -120,7 +120,7 @@ async function buildCombinedFix(
|
||||||
// #region Source Actions
|
// #region Source Actions
|
||||||
|
|
||||||
abstract class SourceAction extends vscode.CodeAction {
|
abstract class SourceAction extends vscode.CodeAction {
|
||||||
abstract async build(
|
abstract build(
|
||||||
client: ITypeScriptServiceClient,
|
client: ITypeScriptServiceClient,
|
||||||
file: string,
|
file: string,
|
||||||
diagnostics: readonly vscode.Diagnostic[],
|
diagnostics: readonly vscode.Diagnostic[],
|
||||||
|
|
|
@ -134,7 +134,7 @@ class DocumentSemanticTokensProvider implements vscode.DocumentSemanticTokensPro
|
||||||
|
|
||||||
function waitForDocumentChangesToEnd(document: vscode.TextDocument) {
|
function waitForDocumentChangesToEnd(document: vscode.TextDocument) {
|
||||||
let version = document.version;
|
let version = document.version;
|
||||||
return new Promise((s) => {
|
return new Promise<void>((s) => {
|
||||||
let iv = setInterval(_ => {
|
let iv = setInterval(_ => {
|
||||||
if (document.version === version) {
|
if (document.version === version) {
|
||||||
clearInterval(iv);
|
clearInterval(iv);
|
||||||
|
|
|
@ -17,7 +17,7 @@ async function updateConfig(newConfig: VsCodeConfiguration): Promise<VsCodeConfi
|
||||||
const config = vscode.workspace.getConfiguration(undefined);
|
const config = vscode.workspace.getConfiguration(undefined);
|
||||||
for (const configKey of Object.keys(newConfig)) {
|
for (const configKey of Object.keys(newConfig)) {
|
||||||
oldConfig[configKey] = config.get(configKey);
|
oldConfig[configKey] = config.get(configKey);
|
||||||
await new Promise((resolve, reject) =>
|
await new Promise<void>((resolve, reject) =>
|
||||||
config.update(configKey, newConfig[configKey], vscode.ConfigurationTarget.Global)
|
config.update(configKey, newConfig[configKey], vscode.ConfigurationTarget.Global)
|
||||||
.then(() => resolve(), reject));
|
.then(() => resolve(), reject));
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,7 +68,7 @@ export function withRandomFileEditor(
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export const wait = (ms: number) => new Promise<undefined>(resolve => setTimeout(() => resolve(), ms));
|
export const wait = (ms: number) => new Promise<void>(resolve => setTimeout(() => resolve(), ms));
|
||||||
|
|
||||||
export const joinLines = (...args: string[]) => args.join(os.platform() === 'win32' ? '\r\n' : '\n');
|
export const joinLines = (...args: string[]) => args.join(os.platform() === 'win32' ? '\r\n' : '\n');
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ export async function updateConfig(documentUri: vscode.Uri, newConfig: VsCodeCon
|
||||||
|
|
||||||
for (const configKey of Object.keys(newConfig)) {
|
for (const configKey of Object.keys(newConfig)) {
|
||||||
oldConfig[configKey] = config.get(configKey);
|
oldConfig[configKey] = config.get(configKey);
|
||||||
await new Promise((resolve, reject) =>
|
await new Promise<void>((resolve, reject) =>
|
||||||
config.update(configKey, newConfig[configKey], vscode.ConfigurationTarget.Global)
|
config.update(configKey, newConfig[configKey], vscode.ConfigurationTarget.Global)
|
||||||
.then(() => resolve(), reject));
|
.then(() => resolve(), reject));
|
||||||
}
|
}
|
||||||
|
|
|
@ -215,7 +215,7 @@ export class ProcessBasedTsServer extends Disposable implements ITypeScriptServe
|
||||||
let result: Promise<ServerResponse.Response<Proto.Response>> | undefined;
|
let result: Promise<ServerResponse.Response<Proto.Response>> | undefined;
|
||||||
if (executeInfo.expectsResult) {
|
if (executeInfo.expectsResult) {
|
||||||
result = new Promise<ServerResponse.Response<Proto.Response>>((resolve, reject) => {
|
result = new Promise<ServerResponse.Response<Proto.Response>>((resolve, reject) => {
|
||||||
this._callbacks.add(request.seq, { onSuccess: resolve, onError: reject, queuingStartTime: Date.now(), isAsync: executeInfo.isAsync }, executeInfo.isAsync);
|
this._callbacks.add(request.seq, { onSuccess: resolve as () => ServerResponse.Response<Proto.Response> | undefined, onError: reject, queuingStartTime: Date.now(), isAsync: executeInfo.isAsync }, executeInfo.isAsync);
|
||||||
|
|
||||||
if (executeInfo.token) {
|
if (executeInfo.token) {
|
||||||
executeInfo.token.onCancellationRequested(() => {
|
executeInfo.token.onCancellationRequested(() => {
|
||||||
|
|
|
@ -1028,7 +1028,7 @@ class ServerInitializingIndicator extends Disposable {
|
||||||
vscode.window.withProgress({
|
vscode.window.withProgress({
|
||||||
location: vscode.ProgressLocation.Window,
|
location: vscode.ProgressLocation.Window,
|
||||||
title: localize('serverLoading.progress', "Initializing JS/TS language features"),
|
title: localize('serverLoading.progress', "Initializing JS/TS language features"),
|
||||||
}, () => new Promise((resolve, reject) => {
|
}, () => new Promise<void>((resolve, reject) => {
|
||||||
this._task = { project: projectName, resolve, reject };
|
this._task = { project: projectName, resolve, reject };
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ export class Delayer<T> {
|
||||||
public defaultDelay: number;
|
public defaultDelay: number;
|
||||||
private timeout: any; // Timer
|
private timeout: any; // Timer
|
||||||
private completionPromise: Promise<T | null> | null;
|
private completionPromise: Promise<T | null> | null;
|
||||||
private onSuccess: ((value?: T | Thenable<T>) => void) | null;
|
private onSuccess: ((value: T | PromiseLike<T> | undefined) => void) | null;
|
||||||
private task: ITask<T> | null;
|
private task: ITask<T> | null;
|
||||||
|
|
||||||
constructor(defaultDelay: number) {
|
constructor(defaultDelay: number) {
|
||||||
|
@ -30,7 +30,7 @@ export class Delayer<T> {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.completionPromise) {
|
if (!this.completionPromise) {
|
||||||
this.completionPromise = new Promise<T>((resolve) => {
|
this.completionPromise = new Promise<T | undefined>((resolve) => {
|
||||||
this.onSuccess = resolve;
|
this.onSuccess = resolve;
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.completionPromise = null;
|
this.completionPromise = null;
|
||||||
|
|
|
@ -75,7 +75,7 @@ export class AtaProgressReporter extends Disposable {
|
||||||
|
|
||||||
private _onBegin(eventId: number): void {
|
private _onBegin(eventId: number): void {
|
||||||
const handle = setTimeout(() => this._onEndOrTimeout(eventId), typingsInstallTimeout);
|
const handle = setTimeout(() => this._onEndOrTimeout(eventId), typingsInstallTimeout);
|
||||||
const promise = new Promise(resolve => {
|
const promise = new Promise<void>(resolve => {
|
||||||
this._promises.set(eventId, () => {
|
this._promises.set(eventId, () => {
|
||||||
clearTimeout(handle);
|
clearTimeout(handle);
|
||||||
resolve();
|
resolve();
|
||||||
|
|
|
@ -536,7 +536,7 @@ suite('vscode API - workspace', () => {
|
||||||
assert.equal(callCount, 1);
|
assert.equal(callCount, 1);
|
||||||
assert.equal(doc.getText(), 'call0');
|
assert.equal(doc.getText(), 'call0');
|
||||||
|
|
||||||
return new Promise(resolve => {
|
return new Promise<void>(resolve => {
|
||||||
|
|
||||||
let subscription = vscode.workspace.onDidChangeTextDocument(event => {
|
let subscription = vscode.workspace.onDidChangeTextDocument(event => {
|
||||||
assert.ok(event.document === doc);
|
assert.ok(event.document === doc);
|
||||||
|
|
|
@ -166,7 +166,7 @@
|
||||||
"style-loader": "^1.0.0",
|
"style-loader": "^1.0.0",
|
||||||
"ts-loader": "^4.4.2",
|
"ts-loader": "^4.4.2",
|
||||||
"tsec": "googleinterns/tsec",
|
"tsec": "googleinterns/tsec",
|
||||||
"typescript": "^4.1.0-dev.20200824",
|
"typescript": "^4.1.0-dev.20200916",
|
||||||
"typescript-formatter": "7.1.0",
|
"typescript-formatter": "7.1.0",
|
||||||
"underscore": "^1.8.2",
|
"underscore": "^1.8.2",
|
||||||
"vinyl": "^2.0.0",
|
"vinyl": "^2.0.0",
|
||||||
|
|
2
src/vs/monaco.d.ts
vendored
2
src/vs/monaco.d.ts
vendored
|
@ -4075,7 +4075,7 @@ declare namespace monaco.editor {
|
||||||
suggestOnTriggerCharacters: IEditorOption<EditorOption.suggestOnTriggerCharacters, boolean>;
|
suggestOnTriggerCharacters: IEditorOption<EditorOption.suggestOnTriggerCharacters, boolean>;
|
||||||
suggestSelection: IEditorOption<EditorOption.suggestSelection, 'first' | 'recentlyUsed' | 'recentlyUsedByPrefix'>;
|
suggestSelection: IEditorOption<EditorOption.suggestSelection, 'first' | 'recentlyUsed' | 'recentlyUsedByPrefix'>;
|
||||||
tabCompletion: IEditorOption<EditorOption.tabCompletion, 'on' | 'off' | 'onlySnippets'>;
|
tabCompletion: IEditorOption<EditorOption.tabCompletion, 'on' | 'off' | 'onlySnippets'>;
|
||||||
unusualLineTerminators: IEditorOption<EditorOption.unusualLineTerminators, 'off' | 'prompt' | 'auto'>;
|
unusualLineTerminators: IEditorOption<EditorOption.unusualLineTerminators, 'auto' | 'off' | 'prompt'>;
|
||||||
useTabStops: IEditorOption<EditorOption.useTabStops, boolean>;
|
useTabStops: IEditorOption<EditorOption.useTabStops, boolean>;
|
||||||
wordSeparators: IEditorOption<EditorOption.wordSeparators, string>;
|
wordSeparators: IEditorOption<EditorOption.wordSeparators, string>;
|
||||||
wordWrap: IEditorOption<EditorOption.wordWrap, 'on' | 'off' | 'wordWrapColumn' | 'bounded'>;
|
wordWrap: IEditorOption<EditorOption.wordWrap, 'on' | 'off' | 'wordWrapColumn' | 'bounded'>;
|
||||||
|
|
|
@ -23,7 +23,7 @@ suite('ContextKeyService', () => {
|
||||||
|
|
||||||
let complete: () => void;
|
let complete: () => void;
|
||||||
let reject: (err: Error) => void;
|
let reject: (err: Error) => void;
|
||||||
const p = new Promise((_complete, _reject) => {
|
const p = new Promise<void>((_complete, _reject) => {
|
||||||
complete = _complete;
|
complete = _complete;
|
||||||
reject = _reject;
|
reject = _reject;
|
||||||
});
|
});
|
||||||
|
|
|
@ -745,7 +745,7 @@ export class CompositeDragAndDropObserver extends Disposable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function toggleDropEffect(dataTransfer: DataTransfer | null, dropEffect: string, shouldHaveIt: boolean) {
|
export function toggleDropEffect(dataTransfer: DataTransfer | null, dropEffect: 'none' | 'copy' | 'link' | 'move', shouldHaveIt: boolean) {
|
||||||
if (!dataTransfer) {
|
if (!dataTransfer) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -624,7 +624,7 @@ export class RawDebugSession implements IDisposable {
|
||||||
}
|
}
|
||||||
|
|
||||||
private send<R extends DebugProtocol.Response>(command: string, args: any, token?: CancellationToken, timeout?: number): Promise<R | undefined> {
|
private send<R extends DebugProtocol.Response>(command: string, args: any, token?: CancellationToken, timeout?: number): Promise<R | undefined> {
|
||||||
return new Promise<DebugProtocol.Response>((completeDispatch, errorDispatch) => {
|
return new Promise<DebugProtocol.Response | undefined>((completeDispatch, errorDispatch) => {
|
||||||
if (!this.debugAdapter) {
|
if (!this.debugAdapter) {
|
||||||
if (this.inShutdown) {
|
if (this.inShutdown) {
|
||||||
// We are in shutdown silently complete
|
// We are in shutdown silently complete
|
||||||
|
|
|
@ -9280,10 +9280,10 @@ typescript@^2.6.2:
|
||||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.6.2.tgz#3c5b6fd7f6de0914269027f03c0946758f7673a4"
|
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.6.2.tgz#3c5b6fd7f6de0914269027f03c0946758f7673a4"
|
||||||
integrity sha1-PFtv1/beCRQmkCfwPAlGdY92c6Q=
|
integrity sha1-PFtv1/beCRQmkCfwPAlGdY92c6Q=
|
||||||
|
|
||||||
typescript@^4.1.0-dev.20200824:
|
typescript@^4.1.0-dev.20200916:
|
||||||
version "4.1.0-dev.20200824"
|
version "4.1.0-dev.20200916"
|
||||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.0-dev.20200824.tgz#34c92d9b6e5124600658c0d4e9b8c125beaf577d"
|
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.0-dev.20200916.tgz#b2c803a39d9335086033009903b03e7e53e39223"
|
||||||
integrity sha512-hTJfocmebnMKoqRw/xs3bL61z87XXtvOUwYtM7zaCX9mAvnfdo1x1bzQlLZAsvdzRIgAHPJQYbqYHKygWkDw6g==
|
integrity sha512-ly2k/AZ3AyfIyLWhBSnW3x7aDufIS9uNRagFZin36jXb6DvZEZwtyx138u8iSvtKE1AV/VNyWLLBkZYojgBM1g==
|
||||||
|
|
||||||
uc.micro@^1.0.1, uc.micro@^1.0.3:
|
uc.micro@^1.0.1, uc.micro@^1.0.3:
|
||||||
version "1.0.3"
|
version "1.0.3"
|
||||||
|
|
Loading…
Reference in a new issue