@marko/type-check 1.0.0 → 1.0.2

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.
Files changed (2) hide show
  1. package/dist/cli.js +7 -2
  2. package/package.json +2 -2
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
- process.exitCode = import_tsserverlibrary.default.createSolutionBuilder(solutionHost, [configFile], {}).build();
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,11 +1,11 @@
1
1
  {
2
2
  "name": "@marko/type-check",
3
3
  "description": "A CLI to type check Marko projects",
4
- "version": "1.0.0",
4
+ "version": "1.0.2",
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",
8
- "@marko/language-tools": "^2.1.5",
8
+ "@marko/language-tools": "^2.1.6",
9
9
  "arg": "^5.0.2",
10
10
  "kleur": "^4.1.5",
11
11
  "strip-json-comments": "^3.1.1",