GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - node-ecosystem/depatcher

BranchesTags
Open more actions menu

Latest commit

 

History

41 Commits
41 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
.vscode
.vscode
 
 
.yarn
.yarn
 
 
scripts
scripts
 
 
src
src
 
 
test
test
 
 
.editorconfig
.editorconfig
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.yarnrc.yml
.yarnrc.yml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
eslint.config.mjs
eslint.config.mjs
 
 
package.json
package.json
 
 
tsconfig.json
tsconfig.json
 
 
vite.config.ts
vite.config.ts
 
 
yarn.lock
yarn.lock
 
 

Repository files navigation

depatcher

Programmatically create and apply .patch files to your project's dependencies.
Under the hood, it leverages diff to generate diffs and package manager primitives to apply them.

Note: diff is bundled to support the patch cross package managers.

⚙️ Installation

Install as a development dependency:

Package Manager Command
npm npm install -D depatcher
yarn yarn add -D depatcher
pnpm pnpm add -D depatcher

📖 Usage

createPatch

Generates a .patch file by comparing an original file with a modified (patched) file.

import { createPatch } from 'depatcher'

createPatch(
  './original_file.js',
  './patched_file.js',
  './file.patch'
)

applyPatch

Applies .patch files to specific file paths within a target dependency.

import { applyPatch } from 'depatcher'

// applyPatch(packageName, patchMap)
await applyPatch('packageName', {
  // 'target_file_in_dependency': 'path_to_patch_file'
  '/dist/index.js': './packageName_index.patch'
})

applyPatchMultiple

Applies .patch files to multiple target dependencies efficiently.

import { applyPatchMultiple } from 'depatcher'

// applyPatchMultiple(packagePatchMap)
await applyPatchMultiple({
  packageName1: {
    '/dist/index.js': './packageName1_index.patch'
  },
  packageName2: {
    '/dist/index.js': './packageName2_index.patch'
  }
})

🔄 TODO

  • npm patch support

📜 License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Readme
MIT license
Activity
Custom properties

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.