Skip to content

Documentation

react-native-doctor-ci

Policy-as-code CI gate for React Native dependency health: fail pull requests that add abandoned, non-New-Architecture, or npm-deprecated dependencies, with inline annotations and an allowlist workflow.

Unmaintained dependencies are one of the most reported pains in React Native, and the New Architecture era raised the stakes: a package that was fine when it was added quietly stops getting releases, never gains New Architecture support, or gets deprecated on npm — and you find out during an upgrade, months after the PR that introduced it merged.

Lookup tools exist; the React Native Directory will tell you a package's status if you go ask. rn-doctor is the missing enforcement half: a check that runs on every pull request, fails when someone adds a dying dependency, and annotates the exact package.json line — so the conversation happens at review time, when swapping the package costs five minutes instead of a quarter.

rn-doctor failing a pull request with an inline annotation on the package.json line that adds a dying dependency
npx --yes --package react-native-doctor-ci rn-doctor   # check the current project
rn-doctor --changed-only --base origin/main            # PR mode: only new/changed deps
rn-doctor --workspaces                                 # monorepo: every workspace manifest
rn-doctor --json                                       # stable machine-readable report

Pure TypeScript, zero native code, one runtime dependency. Node >= 20.

What it checks

Each dependency is enriched in parallel from the npm registry (latest publish time, deprecation, codegenConfig), the React Native Directory (New Architecture support, unmaintained flag), and the GitHub API (archived state, last push). Six rules evaluate the result:

RuleFires whenDefault
newArchitectureDirectory says the package does not support New Archerror
newArchUnknownNew Arch support is unknown (no data, no codegen)warn
lastPublishLatest npm publish is older than the thresholdswarn 12mo / error 24mo
githubArchivedThe GitHub repository is archivederror
npmDeprecatedThe latest version is deprecated on npmerror
directoryUnmaintainedThe RN Directory flags the package as unmaintainedwarn

Missing data degrades honestly: no token or a rate limit means fields become unknown with a warning — never a failed run, and never a fabricated verdict. Every finding carries an evidence link so you can check the claim yourself.

Where to go next

Out of scope

Security/CVE auditing (npm audit and OSV exist), fixing or upgrading packages (findings suggest npx expo install --fix or Renovate where relevant), and being a website — this is a CLI and a CI gate, nothing more.

The source lives at github.com/AmrithVengalath/react-native-doctor-ci under the MIT license.