@gravity-ui/app-builder 0.42.0-beta.3 → 0.42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -52,6 +52,7 @@ function compile(ts, { projectPath, configFileName = 'tsconfig.json', logger })
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
if (hasErrors(allDiagnostics)) {
|
|
55
|
+
allDiagnostics.forEach(reportDiagnostic);
|
|
55
56
|
logger.error(`Error compile, elapsed time ${(0, pretty_time_1.elapsedTime)(start)}`);
|
|
56
57
|
process.exit(1);
|
|
57
58
|
}
|
|
@@ -4,6 +4,10 @@ exports.watch = watch;
|
|
|
4
4
|
const transformers_1 = require("./transformers");
|
|
5
5
|
const utils_1 = require("./utils");
|
|
6
6
|
const diagnostic_1 = require("./diagnostic");
|
|
7
|
+
/** @see https://github.com/microsoft/TypeScript/blob/9059e5bda0bb603ae6b41eca09dcd2a071af45fd/src/compiler/diagnosticMessages.json#L5400-L5403 */
|
|
8
|
+
const COMPILATION_COMPLETE_WITH_ERROR = 6193;
|
|
9
|
+
/** @see https://github.com/microsoft/TypeScript/blob/9059e5bda0bb603ae6b41eca09dcd2a071af45fd/src/compiler/diagnosticMessages.json#L5404-L5407 */
|
|
10
|
+
const COMPILATION_COMPLETE_WITH_N_ERRORS = 6194;
|
|
7
11
|
function watch(ts, projectPath, { logger, onAfterFilesEmitted, enableSourceMap, }) {
|
|
8
12
|
logger.message('Start compilation in watch mode');
|
|
9
13
|
logger.message(`Typescript v${ts.version}`);
|
|
@@ -65,7 +69,8 @@ function watch(ts, projectPath, { logger, onAfterFilesEmitted, enableSourceMap,
|
|
|
65
69
|
if (diagnostic.messageText) {
|
|
66
70
|
logger.message(ts.flattenDiagnosticMessageText(diagnostic.messageText, ts.sys.newLine));
|
|
67
71
|
}
|
|
68
|
-
if (diagnostic.code ===
|
|
72
|
+
if (diagnostic.code === COMPILATION_COMPLETE_WITH_ERROR ||
|
|
73
|
+
diagnostic.code === COMPILATION_COMPLETE_WITH_N_ERRORS) {
|
|
69
74
|
onAfterFilesEmitted?.();
|
|
70
75
|
}
|
|
71
76
|
}
|
package/package.json
CHANGED