React migration audit grep patterns
react-audit-grep-patterns
Find React upgrade audit patterns for deprecated APIs, lifecycle methods, batching, tests and dependency conflicts before React 18.3.1 or React 19 migration.
Introduction source: author · GitHub, Inc. · b6483db44fb602654bca6a097185fcaddb305f97 Reference
Author's original introduction
Provides the complete, verified grep scan command library for auditing React codebases before a React 18.3.1 or React 19 upgrade. Use this skill whenever running a migration audit - for both the react18-auditor and react19-auditor agents. Contains every grep pattern needed to find deprecated APIs, removed APIs, unsafe lifecycle methods, batching vulnerabilities, test file issues, dependency conflicts, and React 19 specific removals. Always use this skill when writing audit scan commands - do not rely on memory for grep syntax, especially for the multi-line async setState patterns which require context flags.
SkillPi interpretation
- Tasks
- Look up grep command patterns for React 16/17 to 18.3.1 and React 18 to 19 audits, including test and dependency scans.
- Audience
- Developers auditing a React codebase before migration; the source also addresses react18-auditor and react19-auditor agents.
- Inputs and outputs
- Input: a React codebase and upgrade target. Output: relevant scan commands and matching lines or filenames; this document links the detailed reference files.
- Software, accounts and paid services
- A shell with grep and access to the codebase and the skill's reference files. The shown include flags target .js/.jsx. No paid account is specified. Confirm actual file access and external-service permissions in your host. Domains referenced in the documents (not a runtime allowlist): No HTTP(S) domain stated.
- Limits and differences
- Bundled references match the pinned source and passed static evidence checks; command behavior, dependency compatibility and migration outcomes still require testing in the target project.
- Testing
- Not tested
Security rating and access scope
caution · Static evidence review; not a runtime safety guarantee.
A shell with grep and access to the codebase and the skill's reference files. The shown include flags target .js/.jsx. No paid account is specified. Confirm actual file access and external-service permissions in your host. Domains referenced in the documents (not a runtime allowlist): No HTTP(S) domain stated.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
Original SKILL.md
--- name: react-audit-grep-patterns description: 'Provides the complete, verified grep scan command library for auditing React codebases before a React 18.3.1 or React 19 upgrade. Use this skill whenever running a migration audit - for both the react18-auditor and react19-auditor agents. Contains every grep pattern needed to find deprecated APIs, removed APIs, unsafe lifecycle methods, batching vulnerabilities, test file issues, dependency conflicts, and React 19 specific removals. Always use this skill when writing audit scan commands - do not rely on memory for grep syntax, especially for the multi-line async setState patterns which require context flags.' --- # React Audit Grep Patterns Complete scan command library for React 18.3.1 and React 19 migration audits. ## Usage Read the relevant section for your target: - **`references/react18-scans.md`** - all scans for React 16/17 → 18.3.1 audit - **`references/react19-scans.md`** - all scans for React 18 → 19 audit - **`references/test-scans.md`** - test file specific scans (used by both auditors) - **`references/dep-scans.md`** - dependency and peer conflict scans ## Base Patterns Used Across All Scans ```bash # Standard flags used throughout: # -r = recursive # -n = show line numbers # -l = show filenames only (for counting affected files) # --include="*.js" --include="*.jsx" = JS/JSX files only # | grep -v "\.test\.\|\.spec\.\|__tests__" = exclude test files # | grep -v "node_modules" = safety (usually handled by not scanning node_modules) # 2>/dev/null = suppress "no files found" errors # Source files only (exclude tests): SRC_FLAGS='--include="*.js" --include="*.jsx"' EXCLUDE_TESTS='grep -v "\.test\.\|\.spec\.\|__tests__"' # Test files only: TEST_FLAGS='--include="*.test.js" --include="*.test.jsx" --include="*.spec.js" --include="*.spec.jsx"' ```
Copyright and license notice
MIT License Copyright GitHub, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
User discussion