提交 cf446b92 编写于 作者: M Matt Bierner

Build VS Code using TS 3.6

Fixes #80079

Updates our build to use TS 3.6. Fixes a few changes to dom apis and adds a monkey patch for the node typings break in 3.6
上级 31857fa2
......@@ -101,7 +101,7 @@ function fromLocalWebpack(extensionPath) {
result.emit('error', compilation.warnings.join('\n'));
}
};
const webpackConfig = Object.assign({}, require(webpackConfigPath), { mode: 'production' });
const webpackConfig = Object.assign(Object.assign({}, require(webpackConfigPath)), { mode: 'production' });
const relativeOutputPath = path.relative(extensionPath, webpackConfig.output.path);
return webpackGulp(webpackConfig, webpack, webpackDone)
.pipe(es.through(function (data) {
......
......@@ -176,6 +176,7 @@ class XLF {
this.buffer.push(line.toString());
}
}
exports.XLF = XLF;
XLF.parsePseudo = function (xlfString) {
return new Promise((resolve) => {
let parser = new xml2js.Parser();
......@@ -248,7 +249,6 @@ XLF.parse = function (xlfString) {
});
});
};
exports.XLF = XLF;
class Limiter {
constructor(maxDegreeOfParalellism) {
this.maxDegreeOfParalellism = maxDegreeOfParalellism;
......
......@@ -80,6 +80,19 @@ if (fs.existsSync(processTreeDts)) {
fs.unlinkSync(processTreeDts);
}
// Rewrite the @types/node typings avoid a conflict with es2018 typings.
// This is caused by our build not understanding `typesVersions` in the package.json
//
// TODO: Fix this
{
console.log('Rewriting node_modules/@types/node to workaround lack of typesVersions support');
const indexPath = path.join('node_modules', '@types', 'node', 'index.d.ts');
const contents = fs.readFileSync(indexPath).toString()
.replace(/interface IteratorResult<T> \{ \}/, '// VSCODE EDIT — remove IteratorResult\n// interface IteratorResult<T> { }');
fs.writeFileSync(indexPath, contents);
}
function getInstalledVersion(packageName, cwd) {
const opts = {};
if (cwd) {
......
......@@ -42,7 +42,7 @@
"request": "^2.85.0",
"terser": "^4.2.1",
"tslint": "^5.9.1",
"typescript": "3.5.2",
"typescript": "3.6.2",
"vsce": "1.48.0",
"vscode-telemetry-extractor": "^1.5.4",
"xml2js": "^0.4.17"
......
......@@ -2288,10 +2288,10 @@ typed-rest-client@^0.9.0:
tunnel "0.0.4"
underscore "1.8.3"
typescript@3.5.2:
version "3.5.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.5.2.tgz#a09e1dc69bc9551cadf17dba10ee42cf55e5d56c"
integrity sha512-7KxJovlYhTX5RaRbUdkAXN1KUZ8PwWlTzQdHV6xNqvuFOs7+WBo10TQUqT19Q/Jz2hk5v9TQDIhyLhhJY4p5AA==
typescript@3.6.2:
version "3.6.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.6.2.tgz#105b0f1934119dde543ac8eb71af3a91009efe54"
integrity sha512-lmQ4L+J6mnu3xweP8+rOrUwzmN+MRAj7TgtJtDaXE5PMyX2kCrklhg3rvOsOIfNeAWMQWO2F1GPc1kMD2vLAfw==
typescript@^3.0.1:
version "3.5.3"
......
......@@ -758,7 +758,7 @@ export class MenuBar extends Disposable {
if (menuBarMenu.titleElement.children.length) {
let child = menuBarMenu.titleElement.children.item(0) as HTMLElement;
if (child) {
child.style.textDecoration = (this.options.alwaysOnMnemonics || visible) ? 'underline' : null;
child.style.textDecoration = (this.options.alwaysOnMnemonics || visible) ? 'underline' : '';
}
}
});
......
......@@ -24,7 +24,7 @@
(<any>self).postMessage(msg, transfer);
}, null);
self.onmessage = (e) => messageHandler.onmessage(e.data);
self.onmessage = (e: MessageEvent) => messageHandler.onmessage(e.data);
while (beforeReadyMessages.length > 0) {
self.onmessage(beforeReadyMessages.shift()!);
}
......@@ -34,7 +34,7 @@
let isFirstMessage = true;
let beforeReadyMessages: MessageEvent[] = [];
self.onmessage = (message) => {
self.onmessage = (message: MessageEvent) => {
if (!isFirstMessage) {
beforeReadyMessages.push(message);
return;
......
......@@ -54,6 +54,11 @@ const enum TextAreaInputEventType {
blur
}
interface CompositionEvent extends UIEvent {
readonly data: string;
readonly locale: string;
}
/**
* Writes screen reader content to the textarea and is able to analyze its input events to generate:
* - onCut
......
......@@ -19,12 +19,12 @@ export function initialize(foreignModule: any) {
(<any>self).postMessage(msg);
}, (host: EditorWorkerHost) => new EditorSimpleWorker(host, foreignModule));
self.onmessage = (e) => {
self.onmessage = (e: MessageEvent) => {
simpleWorker.onmessage(e.data);
};
}
self.onmessage = (e) => {
self.onmessage = (e: MessageEvent) => {
// Ignore first message in this case and initialize if not yet initialized
if (!initialized) {
initialize(null);
......
......@@ -554,7 +554,7 @@ export class TitlebarPart extends Part implements ITitleService {
rightMarker < (this.element.clientWidth + this.title.clientWidth) / 2) {
this.title.style.position = null;
this.title.style.left = null;
this.title.style.transform = null;
this.title.style.transform = '';
return;
}
}
......
......@@ -169,7 +169,7 @@ export class ExperimentService extends Disposable implements IExperimentService
this.storageService.store(storageKey, JSON.stringify(experimentState), StorageScope.GLOBAL);
}
protected getExperiments(): Promise<IRawExperiment[]> {
protected getExperiments(): Promise<IRawExperiment[] | null> {
if (!this.productService.experimentsUrl || this.configurationService.getValue('workbench.enableExperiments') === false) {
return Promise.resolve([]);
}
......
......@@ -305,7 +305,7 @@ export class LinuxExternalTerminalService implements IExternalTerminalService {
if (!LinuxExternalTerminalService._DEFAULT_TERMINAL_LINUX_READY) {
LinuxExternalTerminalService._DEFAULT_TERMINAL_LINUX_READY = new Promise<string>(c => {
if (env.isLinux) {
Promise.all([pfs.exists('/etc/debian_version'), process.lazyEnv || Promise.resolve(undefined)]).then(([isDebian]) => {
Promise.all([pfs.exists('/etc/debian_version'), Promise.resolve(process.lazyEnv) || Promise.resolve(undefined)]).then(([isDebian]) => {
if (isDebian) {
c('x-terminal-emulator');
} else if (process.env.DESKTOP_SESSION === 'gnome' || process.env.DESKTOP_SESSION === 'gnome-classic') {
......
......@@ -40,7 +40,7 @@ export class OpenAnythingHandler extends QuickOpenHandler {
private openSymbolHandler: OpenSymbolHandler;
private openFileHandler: OpenFileHandler;
private searchDelayer: ThrottledDelayer<QuickOpenModel>;
private searchDelayer: ThrottledDelayer<QuickOpenModel | null>;
private isClosed: boolean;
private scorerCache: ScorerCache;
private includeSymbols: boolean;
......@@ -83,7 +83,7 @@ export class OpenAnythingHandler extends QuickOpenHandler {
});
}
getResults(searchValue: string, token: CancellationToken): Promise<QuickOpenModel> {
getResults(searchValue: string, token: CancellationToken): Promise<QuickOpenModel | null> {
this.isClosed = false; // Treat this call as the handler being in use
// Find a suitable range from the pattern looking for ":" and "#"
......@@ -99,7 +99,7 @@ export class OpenAnythingHandler extends QuickOpenHandler {
}
// The throttler needs a factory for its promises
const resultsPromise = () => {
const resultsPromise = (): Promise<QuickOpenModel | null> => {
const resultPromises: Promise<QuickOpenModel | FileQuickOpenModel>[] = [];
// File Results
......
......@@ -568,7 +568,7 @@ export abstract class TerminalService implements ITerminalService {
const options: IPickOptions<IQuickPickItem> = {
placeHolder: nls.localize('terminal.integrated.chooseWindowsShell', "Select your preferred terminal shell, you can change this later in your settings")
};
const quickPickItems = shells.map(s => {
const quickPickItems = shells.map((s): IQuickPickItem => {
return { label: s.label, description: s.path };
});
return this._quickInputService.pick(quickPickItems, options).then(async value => {
......
......@@ -9036,10 +9036,10 @@ typescript-formatter@7.1.0:
commandpost "^1.0.0"
editorconfig "^0.15.0"
typescript@3.5.2:
version "3.5.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.5.2.tgz#a09e1dc69bc9551cadf17dba10ee42cf55e5d56c"
integrity sha512-7KxJovlYhTX5RaRbUdkAXN1KUZ8PwWlTzQdHV6xNqvuFOs7+WBo10TQUqT19Q/Jz2hk5v9TQDIhyLhhJY4p5AA==
typescript@3.6:
version "3.6.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.6.2.tgz#105b0f1934119dde543ac8eb71af3a91009efe54"
integrity sha512-lmQ4L+J6mnu3xweP8+rOrUwzmN+MRAj7TgtJtDaXE5PMyX2kCrklhg3rvOsOIfNeAWMQWO2F1GPc1kMD2vLAfw==
typescript@^2.6.2:
version "2.6.2"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册