1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
Description: This patch is made for the following reasons:
* The upstream author uses a old version of ansi-colors. But debian
contains the new version of this package.
* Old ansi-colors uses bgcyan for outputting the message whereas new
ansi-colors uses bgCyan. For avoiding warning about this, I've been
updated src/builder.ts and lib/builder.js files.
* Added <void> in a Promise code of src/builder.ts for avoiding warning about that.
--- a/lib/builder.js
+++ b/lib/builder.js
@@ -281,7 +281,7 @@
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('Δ' + Math.ceil((headNow - headUsed) / MB)));
+ log('[tsb]', 'time:', colors.yellow((Date.now() - t1) + 'ms'), 'mem:', colors.cyan(Math.ceil(headNow / MB) + 'MB'), colors.bgCyan('Δ' + Math.ceil((headNow - headUsed) / MB)));
headUsed = headNow;
}
});
--- a/src/builder.ts
+++ b/src/builder.ts
@@ -198,7 +198,7 @@
}
}
- return new Promise(resolve => {
+ return new Promise<void>(resolve => {
let semanticCheckInfo = new Map<string, number>();
let seenAsDependentFile = new Set<string>();
@@ -357,7 +357,7 @@
const MB = 1024 * 1024;
log('[tsb]',
'time:', colors.yellow((Date.now() - t1) + 'ms'),
- 'mem:', colors.cyan(Math.ceil(headNow / MB) + 'MB'), colors.bgcyan('Δ' + Math.ceil((headNow - headUsed) / MB))
+ 'mem:', colors.cyan(Math.ceil(headNow / MB) + 'MB'), colors.bgCyan('Δ' + Math.ceil((headNow - headUsed) / MB))
);
headUsed = headNow;
}
|