mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 09:08:48 +01:00
Merge branch 'main' into joh/voluminous-lobster
This commit is contained in:
@@ -9,7 +9,6 @@ const fs_1 = require("fs");
|
||||
const path = require("path");
|
||||
const crypto = require("crypto");
|
||||
const utils = require("./utils");
|
||||
const log = require("fancy-log");
|
||||
const colors = require("ansi-colors");
|
||||
const ts = require("typescript");
|
||||
const Vinyl = require("vinyl");
|
||||
@@ -23,11 +22,7 @@ function normalize(path) {
|
||||
return path.replace(/\\/g, '/');
|
||||
}
|
||||
function createTypeScriptBuilder(config, projectFile, cmd) {
|
||||
function _log(topic, message) {
|
||||
if (config.verbose) {
|
||||
log(colors.cyan(topic), message);
|
||||
}
|
||||
}
|
||||
const _log = config.logFn;
|
||||
const host = new LanguageServiceHost(cmd, projectFile, _log);
|
||||
const service = ts.createLanguageService(host, ts.createDocumentRegistry());
|
||||
const lastBuildVersion = Object.create(null);
|
||||
@@ -290,12 +285,10 @@ function createTypeScriptBuilder(config, projectFile, cmd) {
|
||||
});
|
||||
oldErrors = newErrors;
|
||||
// print stats
|
||||
if (config.verbose) {
|
||||
const headNow = process.memoryUsage().heapUsed;
|
||||
const MB = 1024 * 1024;
|
||||
log('[tsb]', 'time:', colors.yellow((Date.now() - t1) + 'ms'), 'mem:', colors.cyan(Math.ceil(headNow / MB) + 'MB'), colors.bgCyan('delta: ' + Math.ceil((headNow - headUsed) / MB)));
|
||||
headUsed = headNow;
|
||||
}
|
||||
const headNow = process.memoryUsage().heapUsed;
|
||||
const MB = 1024 * 1024;
|
||||
_log('[tsb]', `time: ${colors.yellow((Date.now() - t1) + 'ms')} + \nmem: ${colors.cyan(Math.ceil(headNow / MB) + 'MB')} ${colors.bgCyan('delta: ' + Math.ceil((headNow - headUsed) / MB))}`);
|
||||
headUsed = headNow;
|
||||
});
|
||||
}
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user