From 0e3f25d079a024404614af48409d9e621ecfc5bd Mon Sep 17 00:00:00 2001 From: Andrew Casey Date: Wed, 1 Jul 2020 13:55:35 -0700 Subject: [PATCH] Copy typesMap.json in produceLKG.ts (#39329) * Copy typesMap.json in produceLKG.ts It doesn't change very often and there's a hardcoded backup, but this seems like a booby trap. * Remove unused import --- scripts/produceLKG.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/produceLKG.ts b/scripts/produceLKG.ts index 762290bcfa6..7439abe9fce 100644 --- a/scripts/produceLKG.ts +++ b/scripts/produceLKG.ts @@ -3,7 +3,6 @@ import childProcess = require("child_process"); import fs = require("fs-extra"); import path = require("path"); -import removeInternal = require("remove-internal"); import glob = require("glob"); const root = path.join(__dirname, ".."); @@ -15,6 +14,7 @@ async function produceLKG() { console.log(`Building LKG from ${source} to ${dest}`); await copyLibFiles(); await copyLocalizedDiagnostics(); + await copyTypesMap(); await buildProtocol(); await copyScriptOutputs(); await copyDeclarationOutputs(); @@ -40,6 +40,10 @@ async function copyLocalizedDiagnostics() { } } +async function copyTypesMap() { + await copyFromBuiltLocal("typesMap.json"); // Cannot accommodate copyright header +} + async function buildProtocol() { const protocolScript = path.join(__dirname, "buildProtocol.js"); if (!fs.existsSync(protocolScript)) {