Upgrade React Native version in example/ directory using rn-diff-purge methodology. Use when the user wants to upgrade react-native, migrate to a new RN version, or update React Native dependencies in the example app. Handles diff retrieval, systematic file changes, dependency updates, and conflict resolution.
Read example/package.json to identify the current react-native version.
curl -s "https://raw.githubusercontent.com/react-native-community/rn-diff-purge/diffs/diffs/{currentVersion}..{toVersion}.diff" | awk '/^GIT binary patch$/,/^diff --git/ {if (/^diff --git/) print; next} 1'
For binary files (e.g., gradle-wrapper.jar):