Repository navigation
feat: flag Interactivity API usages that WordPress 7.2 removes - #67
Open
aryanjasala wants to merge 3 commits into
Open
aryanjasala wants to merge 3 commits into
aryanjasala wants to merge 3 commits into
Conversation
ci-check-iapi.yml runs @rtcamp/wp-tooling's iapi-check over the project and annotates each usage of an Interactivity API that WordPress 7.2 removes. wp-ci.yml runs it as the iapi job when JS, PHP or workflow files change, soft-fail unless iapi-check-fail is true, and ci-result counts it. The check ships in @rtcamp/wp-tooling 2.1.0. With an older wp-tooling the step warns that the command is missing and passes, so callers on the default ^2 install get the scan as soon as 2.1.0 is on npm.
wp-ci.yml gains an iapi-ignore-paths input, forwarded to the iapi job's ignore-paths, so a block that keeps an old directive in deprecated.js on purpose can leave that file out without skipping the whole check. It is separate from ignore-paths, which filters detect-changes. When the installed wp-tooling has no iapi-check command, the job still warns and passes, unless the caller set iapi-check-fail: then it fails, since the caller asked for a failing check.
Open
7 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does
WordPress 7.2 (due 2026-12-09) ships WordPress/gutenberg#84098, which removes three deprecated Interactivity API behaviours:
data-wp-ignore, two-hyphen unique IDs (data-wp-watch--x,data-wp-on--click--x) and!applied to a function. Code that still uses them stops working without an error. This adds a CI job that scans each plugin and theme for them and reports them on the PR, as warnings by default.Closes
N/A
Changes
New
ci-check-iapi.yml. Installs@rtcamp/wp-tooling(default^2) and runswp-tooling iapi-check --working-dir <dir> --output githubfrom the repository root, so annotations attach to the PR diff. Inputs:fail-on-findings(defaultfalse, findings are warnings),ignore-paths,working-dir,wp-tooling-ref,runs-on.New
iapijob inwp-ci.yml, in the plugin and theme presets. It scans the whole unit, not only changed files (the code that breaks is usually old), runs when JS, PHP or a workflow changed, is dropped byskip: iapi, fails only with the newiapi-check-fail: true, and is listed inci-result.Safe before the wp-tooling release. If the installed wp-tooling has no
iapi-checkcommand, the step prints a warning and passes, so this can merge before wp-tooling 2.1.0 is published without failing any caller. The exception: a caller that setiapi-check-fail: truegets a failing job instead, since it asked for a failing check (754c95b).Example, README row.
iapi-ignore-pathsinwp-ci.yml(754c95b), forwarded to the job'signore-paths, so a caller ofwp-ci.ymlcan leave a file such as a block'sdeprecated.jsout of the scan without skipping the whole check. It is separate fromignore-paths, which filters detect-changes.How I verified
validate-inputs:skip: 'iapi, a11y'on a theme drops both jobs;iapiis accepted as a known id.node-packages/wp-tooling/tests/ci/fixtures/...),--soft-failturns every finding into a::warningand exits 0, without it the run exits 1;findings,errorsandwarningsstep outputs and the summary table are written.Acceptance criteria
Runtime behavior
iapi-check-fail: truefails the jobiapi-check-failis set (checked 2026-11-06 against the published 2.0.0:iapi-check --helpexits 2, the step prints the warning and exits 0)Code quality
Housekeeping
CHANGELOG.mdedit: release-please writes it from the PR titleexamples/<workflow>.ymladded or updated to match any input changeyamllint,actionlintandbin/check-workflows.shpass locallyReviewer notes
Publish wp-tooling 2.1.0 (feat(iapi-check): flag Interactivity API usages that WordPress 7.2 removes wp-tooling#91) before the release that carries this moves
v1. Until then the job does nothing for callers and adds a warning to each JS or PHP pull request.Default-on, warn-only is the call to check. Every plugin and theme caller gets a new job and, where it applies, warnings, without opting in. Failing by default would break callers on their next run; off by default would mean nobody sees it before December 9.
package-manager-cache: falseon the setup-node step, as fix(ci): stop setup-node 7 caching in steps that install no dependencies #62 adds to the other steps that install nothing. Onmain's setup-node 4.1.0 it only logs an "Unexpected input" warning; it matters once Dependabot feat(deps): bump actions/setup-node from 4.1.0 to 7.1.0 #54 (setup-node 7) lands.A block that keeps the old names on purpose in a
deprecated.js(so stored blocks still validate) is reported too.ignore-pathson the leaf, oriapi-ignore-pathsonwp-ci.yml, handles it for now; an inline ignore comment in the CLI would be nicer and is not built.