@marko/type-check 1.0.0 → 1.0.1
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.
- package/dist/cli.js +7 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -68,7 +68,8 @@ function run(opts) {
|
|
|
68
68
|
const report = {
|
|
69
69
|
out: [],
|
|
70
70
|
display,
|
|
71
|
-
formatSettings
|
|
71
|
+
formatSettings,
|
|
72
|
+
hasErrors: false
|
|
72
73
|
};
|
|
73
74
|
const extraExtensions = import_language_tools.Processors.extensions.map((extension) => ({
|
|
74
75
|
extension,
|
|
@@ -344,7 +345,8 @@ function run(opts) {
|
|
|
344
345
|
parsedCommandLine.fileNames = [...finalRootNames];
|
|
345
346
|
return parsedCommandLine;
|
|
346
347
|
};
|
|
347
|
-
|
|
348
|
+
import_tsserverlibrary.default.createSolutionBuilder(solutionHost, [configFile], {}).build();
|
|
349
|
+
process.exitCode = report.hasErrors ? 1 : 0;
|
|
348
350
|
console.log(
|
|
349
351
|
report.out.join(
|
|
350
352
|
report.formatSettings.newLineCharacter + report.formatSettings.newLineCharacter
|
|
@@ -395,6 +397,9 @@ function reportDiagnostic(report, diag) {
|
|
|
395
397
|
)
|
|
396
398
|
);
|
|
397
399
|
}
|
|
400
|
+
if (!report.hasErrors && diag.category === import_tsserverlibrary.default.DiagnosticCategory.Error) {
|
|
401
|
+
report.hasErrors = true;
|
|
402
|
+
}
|
|
398
403
|
if (diag.relatedInformation && report.display === Display.codeframe) {
|
|
399
404
|
reportRelatedDiagnostics(report, diag.relatedInformation);
|
|
400
405
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marko/type-check",
|
|
3
3
|
"description": "A CLI to type check Marko projects",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.1",
|
|
5
5
|
"bugs": "https://github.com/marko-js/language-server/issues/new?template=Bug_report.md",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@babel/code-frame": "^7.22.13",
|