joh/ts transpile (#152199)

transpile-only tasks for client and extensions

* extract transpile into its own file
* add transpile-client task, polish transpiler
* add transpile-extensions, improve transpile logic
* move declaration of "const enum" above it usage so that it can be used with const-enum-inlining
* (ugly) make d.ts transpilation configurable because it is needed for extensions but a problem for client
* hack my way around so that `getOwnEmitOutputFilePath` is reusable by our transpile
* honor `noEmit` flag
This commit is contained in:
Johannes Rieken
2022-06-15 16:52:48 +02:00
committed by GitHub
parent 600bfb5995
commit 9e21aff42e
11 changed files with 581 additions and 84 deletions

View File

@@ -8,6 +8,12 @@ import { createServer, Server } from 'net';
import * as vscode from 'vscode';
import * as nls from 'vscode-nls';
const enum State {
Disabled = 'disabled',
OnlyWithFlag = 'onlyWithFlag',
Smart = 'smart',
Always = 'always',
}
const localize = nls.loadMessageBundle();
const TEXT_STATUSBAR_LABEL = {
[State.Disabled]: localize('status.text.auto.attach.disabled', 'Auto Attach: Disabled'),
@@ -62,12 +68,6 @@ const SETTINGS_CAUSE_REFRESH = new Set(
['autoAttachSmartPattern', SETTING_STATE].map(s => `${SETTING_SECTION}.${s}`),
);
const enum State {
Disabled = 'disabled',
OnlyWithFlag = 'onlyWithFlag',
Smart = 'smart',
Always = 'always',
}
let currentState: Promise<{ context: vscode.ExtensionContext; state: State | null }>;
let statusItem: vscode.StatusBarItem | undefined; // and there is no status bar item