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 - ChatLunaLab/patchbay: Cordis 4 patches for Koishi, Satori, Satori adapters and Cordis plugins, wired into yarn, pnpm or npm

BranchesTags
Open more actions menu

Latest commit

 

History

30 Commits
30 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
.yarn/releases
.yarn/releases
 
 
patches
patches
 
 
scripts
scripts
 
 
src
src
 
 
tests
tests
 
 
.gitignore
.gitignore
 
 
.yarnrc.yml
.yarnrc.yml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
package.json
package.json
 
 
patchbay.json
patchbay.json
 
 
tsconfig.build.json
tsconfig.build.json
 
 
tsconfig.json
tsconfig.json
 
 
yarn.lock
yarn.lock
 
 

Repository files navigation

patchbay

Patches that run Koishi, Satori, the Satori adapters and a few Cordis plugins on Cordis 4, kept in one place and wired into yarn, pnpm or npm by one command.

Each patch targets one exact upstream version listed in patchbay.json. Nothing is republished: your package manager installs the upstream tarball and applies the patch from this package.

Use

npm i -D @chatluna/patchbay      # or yarn add -D / pnpm add -D
npx patchbay sync                # writes .patchbay/ and the package-manager config
npm install                      # or yarn install / pnpm install

Commit .patchbay/ together with the config sync writes. Run patchbay sync again after upgrading patchbay. It replaces every pin the previous version wrote.

Package manager What sync writes When patches apply
Yarn 2+ resolutions → patch:<pkg>@npm:<version>#~/.patchbay/<pkg>@<version>.patch on install
pnpm 10+ pnpm-workspace.yaml: overrides, patchedDependencies, allowUnusedPatches on install
npm overrides, direct dependencies pinned to the same spec, postinstall: patchbay apply after install, in place

sync reads the package manager from packageManager, then the lockfile, then the one running it. Pass --pm yarn|pnpm|npm to choose it yourself. Yarn 1 has no patch support and is rejected.

Every patched package is pinned to its patched version, along with these aliases:

  • koishi → @koishijs/core
  • minato → @cordisjs/plugin-database

A plugin that later installs one of them gets the patched build.

On npm, patchbay apply keeps a copy of the patch it applied in each package (.patchbay.patch). It skips packages that are already current and undoes an older patch before applying a newer one.

From code

import { apply, sync } from '@chatluna/patchbay'

const pm = sync(projectDir) // 'yarn' | 'pnpm' | 'npm'
// ...run the install...
if (pm === 'npm') apply(projectDir)

Maintain

yarn refresh edit <name>     # unpack upstream to .work/<pkg>/{a,b}, current patch applied to b
# edit .work/<pkg>/b
yarn refresh commit <name>   # diff a → b into patches/<pkg>@<version>.patch
yarn verify                  # every patch applies to its upstream tarball
yarn test                    # unit tests plus real yarn, pnpm and npm installs

To patch a new package or version, add its entry to patchbay.json, run yarn refresh edit <name>, make the change, then commit it.

License

MIT

About

Cordis 4 patches for Koishi, Satori, Satori adapters and Cordis plugins, wired into yarn, pnpm or npm

Resources

Readme
MIT license
Activity
Custom properties

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

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.