@rrlab/ts-plugin 1.0.0 → 1.0.1-git-e008b4d.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.
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { InstallContext, InstallResult, ToolService, TypeCheckOptions, TypeChecker, UninstallContext, UninstallResult } from "@rrlab/cli/plugin";
1
+ import { InstallContext, InstallResult, RunReport, ToolService, TypeCheckOptions, TypeChecker, UninstallContext, UninstallResult } from "@rrlab/cli/plugin";
2
2
  import { ShellService } from "@vlandoss/clibuddy";
3
3
 
4
4
  //#region src/tool-versions.d.ts
@@ -14,7 +14,7 @@ declare const TOOL_VERSIONS: {
14
14
  //#region src/index.d.ts
15
15
  declare class TscService extends ToolService implements TypeChecker {
16
16
  constructor(shellService: ShellService);
17
- check(options?: TypeCheckOptions): Promise<void>;
17
+ check(options?: TypeCheckOptions): Promise<RunReport>;
18
18
  }
19
19
  declare function install(ctx: InstallContext): Promise<InstallResult>;
20
20
  declare function uninstall(ctx: UninstallContext): Promise<UninstallResult>;
package/dist/index.mjs CHANGED
@@ -24,10 +24,7 @@ var TscService = class extends ToolService {
24
24
  });
25
25
  }
26
26
  async check(options = {}) {
27
- await this.exec(["--noEmit"], {
28
- cwd: options.cwd,
29
- verbose: !options.cwd
30
- });
27
+ return this.runReport(["--noEmit", "--pretty"], { cwd: options.cwd });
31
28
  }
32
29
  };
33
30
  const PRESETS = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rrlab/ts-plugin",
3
- "version": "1.0.0",
3
+ "version": "1.0.1-git-e008b4d.0",
4
4
  "description": "TypeScript plugin for @rrlab/cli — provides the tsc capability.",
5
5
  "homepage": "https://github.com/variableland/dx/tree/main/run-run/ts-plugin#readme",
6
6
  "bugs": {
@@ -34,17 +34,17 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "comment-json": "4.2.5",
37
- "@vlandoss/clibuddy": "0.6.1"
37
+ "@vlandoss/clibuddy": "0.6.2-git-e008b4d.0"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "typescript": ">=5.0.0",
41
- "@rrlab/cli": "^1.0.0"
41
+ "@rrlab/cli": "^1.0.1-git-e008b4d.0"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@types/semver": "^7.7.1",
45
45
  "semver": "^7.8.1",
46
46
  "typescript": "6.0.3",
47
- "@rrlab/cli": "1.0.0",
47
+ "@rrlab/cli": "1.0.1-git-e008b4d.0",
48
48
  "@rrlab/tsdown-config": "^0.1.0"
49
49
  },
50
50
  "scripts": {
package/src/index.ts CHANGED
@@ -7,6 +7,7 @@ import {
7
7
  type InstallContext,
8
8
  type InstallResult,
9
9
  pickPreset,
10
+ type RunReport,
10
11
  ToolService,
11
12
  type TypeChecker,
12
13
  type TypeCheckOptions,
@@ -28,8 +29,10 @@ export class TscService extends ToolService implements TypeChecker {
28
29
  super({ pkg: "typescript", bin: "tsc", ui: UI, shellService, from: FROM });
29
30
  }
30
31
 
31
- async check(options: TypeCheckOptions = {}): Promise<void> {
32
- await this.exec(["--noEmit"], { cwd: options.cwd, verbose: !options.cwd });
32
+ async check(options: TypeCheckOptions = {}): Promise<RunReport> {
33
+ // `--pretty` forces color + formatting even when captured (tsc otherwise
34
+ // drops color off a TTY); see decisions/013.
35
+ return this.runReport(["--noEmit", "--pretty"], { cwd: options.cwd });
33
36
  }
34
37
  }
35
38