Repository navigation
chore(core): regenerate the API report for useLongPress's touch end - #9795
Conversation
useLongPress's onTouchEnd and onTouchCancel take the touch event, so a press whose timer a busy page held back still reports from the event's stamp. The committed report still listed both without a parameter. This regenerates packages/core/api-report.md with `pnpm api:report`.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report🔎 Preview ·
|
There was a problem hiding this comment.
Approving. Core's committed API report now matches what pnpm api:report generates. Only the UseLongPressHandlers onTouchCancel and onTouchEnd rows change, to the optional touch-event parameter that useLongPress already declares. After a full build at this head, pnpm api:report --check passes for all 11 reports, and Core's report built from current main matches the committed one too. There is no public API, behavior or spec change, and nothing is left to do.
[Automated review]
Maintainer impact
packages/core/api-report.mdis behind the code. #9455 changeduseLongPress'sonTouchEndandonTouchCancelhandlers to take the touch event, and the committed report still lists them without a parameter. Sopnpm api:report --checkfails on main, and every pull request's API comparison starts from a stale report.Intended invariant
The committed report equals what
pnpm api:reportwrites for main.Change
packages/core/api-report.mdwithpnpm api:report. Only the twoUseLongPressHandlersrows change:onTouchCancel: (e?: React.TouchEvent) => voidonTouchEnd: (e?: React.TouchEvent) => voidEvidence
main(2188aa9),pnpm api:report --checkexits 1. The generated surface (node scripts/api-report/cli.mjs --surface <dir>) writes 11 reports, and only core's differs from the committed one, by these 2 rows.pnpm api:report --checkexits 0.@deprecatedand@experimental. A deprecated hook overload therefore loses its tag in the report. That is a separate generator fix with its own test.Scope
Testing
Local gates at fcb285e, on
main2188aa9 afterpnpm build:pnpm api:report --check: exits 0 with this report, and exits 1 onmain("stale: packages/core/api-report.md");node scripts/api-report/cli.mjs --surface <dir>: 11 reports, of which only core's differs frommain's committed one, by the 2 rows above;pnpm review:pre: no findings.