Files
rtk-ai__rtk/tests/fixtures/tsc_global_config_error_raw.txt
xiaozh 6232c377e8 fix(tsc): count global diagnostics and keep the failure head
Review round 2 of #2232.

- Diagnostics without a file prefix (`error TS5023:`, `error TS5058:`,
  `error TS2688:`) match a third pattern, so they are counted, emitted as
  blocks on the streaming path and grouped under `global (N errors)` on
  the `rtk pipe --filter tsc` path. Output made only of global
  diagnostics no longer reports "TypeScript compilation completed"
  (#3220); the summary reads `TypeScript: N errors` when no file-scoped
  diagnostic exists.
- `parse_diagnostic` returns a borrowed `Diagnostic` instead of raw
  captures indexed by position.
- The exit-non-zero/no-diagnostics branch keeps the first and the last
  `reduced(CAP_WARNINGS, 5)` non-empty lines instead of a plain tail: tsc
  and npx print the cause first and boilerplate after it. Only retained
  lines are ANSI-stripped, and the pipe path borrows plain input instead
  of copying it.
- `--pretty` tests use a real TypeScript 6.0.3 capture and state that the
  code frame after the blank line is dropped on purpose. New fixtures
  cover a global config error and bare `tsc` without a project.
2026-08-29 10:19:51 +08:00

4 lines
199 B
Plaintext

error TS2688: Cannot find type definition file for 'nonexistent-types-pkg'.
The file is in the program because:
Entry point of type library 'nonexistent-types-pkg' specified in compilerOptions