Skip to content

chore(core): regenerate the API report for useLongPress's touch end - #9795

Merged
cixzhang merged 1 commit into
meta:mainfrom
vjeux:chore/core-api-report-long-press
Nov 3, 2026
Merged

cixzhang merged 1 commit into
meta:mainfrom
vjeux:chore/core-api-report-long-press

Conversation

@vjeux

@vjeux vjeux commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Maintainer impact

packages/core/api-report.md is behind the code. #9455 changed useLongPress's onTouchEnd and onTouchCancel handlers to take the touch event, and the committed report still lists them without a parameter. So pnpm api:report --check fails on main, and every pull request's API comparison starts from a stale report.

Intended invariant

The committed report equals what pnpm api:report writes for main.

Change

  • Regenerates packages/core/api-report.md with pnpm api:report. Only the two UseLongPressHandlers rows change:
    • onTouchCancel: (e?: React.TouchEvent) => void
    • onTouchEnd: (e?: React.TouchEvent) => void
  • No hand edits, and no other report changes.

Evidence

  • Failure before the change: on a fresh build of main (2188aa9), pnpm api:report --check exits 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.
  • Success after the change: pnpm api:report --check exits 0.
  • Product/runtime behavior verified unchanged: no source file changes.
  • CI impact: none; no workflow, action or CI script changes.
  • Not in this change: the generator writes no tags on a hook's or a function's overload lines, while a component's overload lines carry their own @deprecated and @experimental. A deprecated hook overload therefore loses its tag in the report. That is a separate generator fix with its own test.

Scope

  • No intended public API, product behavior, visual direction, or policy change.
  • Product changes discovered during the work were removed or split.
  • Public text and artifacts contain no internal Meta context.

Testing

Local gates at fcb285e, on main 2188aa9 after pnpm build:

  • pnpm api:report --check: exits 0 with this report, and exits 1 on main ("stale: packages/core/api-report.md");
  • node scripts/api-report/cli.mjs --surface <dir>: 11 reports, of which only core's differs from main's committed one, by the 2 rows above;
  • pnpm review:pre: no findings.

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`.
@vercel

vercel Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 3, 2026 6:37pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 3, 2026
@astracat-bot

astracat-bot Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 3, 2026, 6:45 PM UTC

@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · fcb285e

Storybook · Sandbox · built from this PR's head

Current run: The current CI run concluded failure. Current analysis is unavailable.


Generated by PR Enrichment workflow | View current CI run

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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]

@vjeux
vjeux marked this pull request as ready for review November 3, 2026 19:02
@cixzhang cixzhang added the ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) label Nov 3, 2026
@cixzhang
cixzhang marked this pull request as draft November 3, 2026 19:09
@cixzhang
cixzhang marked this pull request as ready for review November 3, 2026 19:09
@cixzhang
cixzhang merged commit 1a258ba into meta:main Nov 3, 2026
191 of 197 checks passed
@vjeux
vjeux deleted the chore/core-api-report-long-press branch November 3, 2026 20:00

This branch was successfully deployed

1 active deployment
Preview — fcb285e6 Deployed Nov 3, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants