{"id":18585334,"url":"https://github.com/tyhopp/patch-files","last_synced_at":"2025-04-30T19:32:43.345Z","repository":{"id":146547948,"uuid":"554896465","full_name":"tyhopp/patch-files","owner":"tyhopp","description":"Manage patches for node_modules","archived":false,"fork":false,"pushed_at":"2024-09-21T09:04:07.000Z","size":55,"stargazers_count":5,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-30T19:13:00.892Z","etag":null,"topics":["dependencies","diff","javascript","node","node-js","node-modules","nodejs","patch","patch-package","zero-dependency"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tyhopp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-20T15:30:05.000Z","updated_at":"2025-02-22T16:21:05.000Z","dependencies_parsed_at":"2023-03-26T12:47:01.492Z","dependency_job_id":null,"html_url":"https://github.com/tyhopp/patch-files","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyhopp%2Fpatch-files","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyhopp%2Fpatch-files/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyhopp%2Fpatch-files/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyhopp%2Fpatch-files/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tyhopp","download_url":"https://codeload.github.com/tyhopp/patch-files/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251769207,"owners_count":21640862,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dependencies","diff","javascript","node","node-js","node-modules","nodejs","patch","patch-package","zero-dependency"],"created_at":"2024-11-07T00:33:08.268Z","updated_at":"2025-04-30T19:32:43.287Z","avatar_url":"https://github.com/tyhopp.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# patch-files\n\nCreate and apply patches for file changes in `node_modules`.\n\nA small (4.1kb minified + gzipped), fast alternative to [`patch-package`](https://github.com/ds300/patch-package). See the [table of differences](#how-is-patch-files-different-from-patch-package) below.\n\n## Usage\n\nKeep in mind that `patch-files`:\n\n- Requires Node 18 or greater\n- Should be run from the root of your project\n\nTo create a patch for a single file:\n\n```bash\nnpx patch-files@latest node_modules/a/a.js\n```\n\nTo create a patch for multiple files:\n\n```bash\nnpx patch-files@latest node_modules/a/a.js,node_modules/b/b.js\n```\n\nTo apply patches:\n\n```bash\nnpx patch-files@latest\n```\n\nTwo directories are created:\n\n- `patch-files` is where patch files are written\n- `patch-files-cache` is where the files fetched for comparison are written\n\nYou can apply patches in a `postinstall` script so patches are applied whenever you install your node modules:\n\n```json\n{\n  \"scripts\": {\n    \"postinstall\": \"npx patch-files@latest\"\n  }\n}\n```\n\n## How is `patch-files` different from `patch-package`?\n\n| `patch-files`                                                                               | `patch-package`                                                                                 |\n| ------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |\n| 4.1kb minified + gzipped [as of v6.0.0](https://bundlephobia.com/package/patch-files@6.0.0) | 124.8kb minified + gzipped [as of v6.5.0](https://bundlephobia.com/package/patch-package@6.5.0) |\n| 0 dependencies                                                                              | 14 dependencies                                                                                 |\n| Downloads individual file(s) for comparison                                                 | Downloads entire npm modules for comparison                                                     |\n| Does not depend on Git                                                                      | Depends on Git                                                                                  |\n| Relies on CDNs [jsdelivr](https://www.jsdelivr.com/) or [unpkg](https://unpkg.com)          | Relies on the npm registry                                                                      |\n| Requires Node 18 or greater                                                                 | Requires Node 10 or greater                                                                     |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftyhopp%2Fpatch-files","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftyhopp%2Fpatch-files","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftyhopp%2Fpatch-files/lists"}