Files
Jordi Enric 24e81e543e ci(api-types): summarize production type differences (#50263)
## Problem

The production API types check reports mismatched filenames without
showing which declarations differ, making drift difficult to diagnose.

## Fix
<img width="1771" height="1012" alt="Shotbase
Capture-AB6E5CC9-905B-46E3-AD7B-A2DE868D9E95"
src="https://github.com/user-attachments/assets/81666e89-b79f-4456-a187-43af16ce2bec"
/>

Print a unified diff for each mismatched file with line numbers and
committed/production labels. Append escaped, bounded previews to the
GitHub Actions summary, with full diffs in the step logs, while
preserving the failing check.

## How to test

- Run `node --test
packages/api-types/scripts/verify-production-types.test.mjs` (all six
tests pass).
- Tests cover diff direction and line numbers, multiple files, summary
appending and escaping, preview truncation, local logging without an
Actions summary, and diff command failures.
- Both changed files were formatted with the repository Prettier
configuration.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added detailed difference reporting when generated production types do
not match committed types.
* CI logs now include readable unified diffs, with large outputs safely
truncated and escaped.
* GitHub Actions summaries can include mismatched type files and their
differences while preserving existing summary content.

* **Bug Fixes**
* Improved diagnostics for missing type files and type verification
failures.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-09-16 12:46:10 +02:00
..
2026-08-13 11:17:18 +02:00