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

yarn-easy-patch

v1.1.1

Published

A simpler alternative to the cumbersome yarn patch workflow - automatically creates patches from your node_modules changes

Readme

yarn-easy-patch

A simpler alternative to the cumbersome yarn patch workflow.

The Problem

The standard Yarn patch workflow is an unusable aberration:

  1. Run yarn patch <package> to get a temp folder
  2. Manually edit files in that temp folder
  3. Run yarn patch-commit to create the patch

But often, you've already made changes directly in node_modules while debugging. Now you need to recreate those changes in the temp folder? 😩

The Solution

yarn-easy-patch automates this by:

  1. Detecting existing patches and applying them to node_modules first
  2. Running yarn patch to create the temp folder
  3. Automatically copying your changes from node_modules to the temp folder
  4. Running yarn patch-commit to create the patch
  5. Cleaning up old patch files if a new one was created

Just make your changes in node_modules, then run one command!

Installation

Run directly (no install needed)

yarn dlx yarn-easy-patch <package-name>

Install globally

npm install -g yarn-easy-patch

Then run:

yarn-easy-patch <package-name>

Usage

# Make your changes directly in node_modules
vim node_modules/some-package/lib/index.js

# Create the patch
yarn dlx yarn-easy-patch some-package

The patch file will be created in your .yarn/patches/ directory and your package.json will be updated with the patch resolution.

Incremental Patching

If you already have a patch for a package and want to add more changes, yarn-easy-patch will:

  1. Detect the existing patch in .yarn/patches/
  2. Apply it to node_modules before you make additional changes
  3. Create a new combined patch with both old and new changes
  4. Remove the old patch file automatically

This lets you incrementally build on existing patches without losing previous work.

Options

yarn-easy-patch <package-name> [options]

Options:
  -h, --help              Show help message
  -v, --version           Show version number
  --patches-dir <path>    Directory to look for existing patches
                          (default: .yarn/patches)

Examples

# Basic usage
yarn dlx yarn-easy-patch react-native

# Scoped packages
yarn dlx yarn-easy-patch @babel/core

# Custom patches directory
yarn dlx yarn-easy-patch some-package --patches-dir ./my-patches

Requirements

  • Node.js >= 16
  • Yarn Berry (Yarn 2+)
  • rsync (pre-installed on macOS/Linux)

How It Works

  1. Checks for existing patches in .yarn/patches/ and attempts to apply them to node_modules
  2. Runs yarn patch <package> which creates a temporary folder
  3. Uses rsync to copy your modified files from node_modules/<package>/ to the temp folder
  4. Runs the yarn patch-commit command to generate the .patch file
  5. Removes old patch files if a new one with a different hash was created

License

MIT