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
This commit is contained in:
Matt Bierner
2019-08-30 18:42:02 -07:00
parent 31857fa2e3
commit cf446b9233
16 changed files with 42 additions and 24 deletions

View File

@@ -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) {