bun-patch
Patch installed packages locally
TLDR
SYNOPSIS
bun patch [options] package-name
DESCRIPTION
bun patch allows you to persistently patch node_modules in a maintainable, git-friendly way. It extracts a package for editing, and after making changes, --commit creates a .patch file that is applied on future installs.
Patch files are stored in a patches directory and tracked via "patchedDependencies" in package.json. They can be committed to your repository and reused across multiple installs, projects, and machines.
You can supply a package name, a precise version (if multiple versions are installed), or the path to the package in node_modules.
PARAMETERS
--commit path-or-pkg
Generate a .patch file from modifications. Accepts package name or path to patched package.--patches-dir dir
Directory to store patch files. Default: patches.
CAVEATS
Patches are stored in a patches directory and must be committed to version control. Patches may break when the package is updated.
SEE ALSO
bun(1), bun-install(1)

