# ds300/patch-package

Fix broken node modules instantly  🏃🏽‍♀️💨

Repository: https://github.com/ds300/patch-package
Canonical: https://ross.abutalabs.com/products/patch-package
Language: TypeScript
License: MIT
License Family: permissive
Topics: javascript, javascript-tools, nodejs, node, node-js, node-modules, patch, patcher, diff, dependencies, dependency-manager, package-manager, package-management, postinstall
Last push: 2025-09-30T07:56:17+00:00

## Health v2 (maintenance only)
Score: 43/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 44, release rhythm 8, longevity 100
- inputs: {"age_days": 3404, "days_push": 337, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 11219, forks 325 (observed 2026-08-28T04:10:46.466808+00:00)

## What it is
patch-package is an npm/yarn tool that lets developers instantly create and persist fixes to node_modules dependencies as .patch files. Patches are automatically reapplied via a postinstall hook so fixes survive dependency installs and can be shared with a team.

## Use cases
- fix a bug in an npm dependency without waiting for an upstream PR
- keep local patches to node_modules applied after every install
- share dependency fixes with a team via committed patch files
- work around a broken release of a package instantly
- patch dependencies in CI or Docker builds reproducibly

## When to choose
- you use npm (>=5) or yarn v1 and need to modify a dependency's source
- upstream fixes are slow to land and you need an immediate workaround
- you want dependency fixes versioned in git alongside your app

## When to avoid
- you use yarn 2+ or pnpm, which have native `patch` commands
- you maintain a library to be published rather than an application
- the fix is large enough that a fork is more maintainable

## Facets
- artifact type: cli-tool
- maturity: stable
- function: package-manager, developer-tools, build-tool
- domain: developer-tools, web-development
- platform: cli, cross-platform
- tags: npm, yarn, node-modules, patching, postinstall, dependencies, command-line, nodejs

## Member repositories
- ds300/patch-package (main) score 43

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:46.466808+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:16:26.570770+00:00, confidence not recorded.
  - readme: https://github.com/ds300/patch-package (fetched 2026-08-28T04:10:46.466808+00:00, sha 3734a74721b1)
  - registry_npm: https://registry.npmjs.org/patch-package (fetched 2026-08-29T08:15:18.393813+00:00, sha 009c78f84dcc)
- Data as of 2026-08-30T08:39:29.467469+00:00.
