npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-native-legacy-patches

v1.0.0

Published

Patches and utilities to run legacy React Native projects on modern Android versions (API 34/35+)

Readme

react-native-legacy-patches

A zero-dependency CLI utility to apply essential compatibility patches and code modifications to legacy React Native projects (e.g. React Native 0.62.x and packages like reanimated v1, touch-id, widget-center) to compile and run on modern Android versions (Android 14+ / API 34 & 35).

The Problems This Solves

  1. Gradle 7.x & 8.x Compatibility (Plugin with id 'maven' not found): Older versions of native libraries (like react-native-reanimated v1 and react-native-widget-center) use the deprecated maven plugin in their build.gradle. Gradle 7+ completely removed it. This package patches them to use maven-publish instead.

  2. Android 14+ Broadcast Receiver Security Crashes (SecurityException: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified): On Android 14 (API 34) and higher, registering a dynamic broadcast receiver without specifying export flags is a security violation and crashes the app immediately on startup. This tool patches MainApplication.java to override and inject the safety flags globally, and also includes patches for the internal code of React Native.


Usage

You can run this tool directly without installation using npx:

1. List Available Patches

See which npm packages have compatibility patches available:

npx react-native-legacy-patches --list

2. Apply a Specific Patch

Apply the patch for a single library (e.g. react-native-reanimated):

npx react-native-legacy-patches --patch react-native-reanimated

This copies the .patch file into your local patches/ folder and applies it using patch-package.

3. Apply All Patches

Copy and apply all legacy compatibility patches at once:

npx react-native-legacy-patches --all

4. Patch MainApplication.java (Android 14+ Compatibility)

Automatically scans your project's android/ directory and overrides registerReceiver in your MainApplication.java to prevent runtime SecurityException crashes:

npx react-native-legacy-patches --patch-app

Manual Integration / Local Setup

If you want to install it as a development dependency:

npm install --save-dev react-native-legacy-patches

Then add it to your package script or run locally:

npx react-native-legacy-patches --all

Contributing / Adding New Patches

To add a new patch to this repository:

  1. Make your changes to the target package inside node_modules/.
  2. Run npx patch-package <package-name> to generate the patch in your project's patches/ folder.
  3. Copy the generated .patch file into the patches/ folder of this repository.
  4. The CLI will automatically detect the new patch and list it.