Skip to content

Patch files for packages and dependencies. Drop-in fixes for bugs, missing features, and type errors awaiting upstream merges.

License

Notifications You must be signed in to change notification settings

ramonclaudio/patches

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

patches

Fixes for package bugs waiting on upstream merges.

Note

Once an upstream PR lands and you bump the dep, drop the patch.

Active

Package Version Format Fix PR
@expo/ui 56.0.0-canary-20260212-4f61309 Bun Missing capsule + ellipse shapes in clipShape/mask, broken foregroundStyle hierarchical handling expo/expo#43158
@convex-dev/better-auth 0.10.10 patch-package, Bun Cookie expiry string comparison, null session cache, wrong isAuthenticated check get-convex/better-auth#218
@convex-dev/better-auth 0.10.10 Bun, patch-package Pinned better-auth peer dep 1.4.9 blocks newer 1.4.x versions get-convex/better-auth#245
@tobilu/qmd 1.0.6 patch-package, Bun typescript in peerDependencies instead of devDependencies, missing tsc in prepare script tobi/qmd#197
bun 1.3.9 Bun includePrerelease semantics for peer dep semver validation oven-sh/bun#27085
bun 1.3.9 Bun Invalid YAML sequence in update-root-certs workflow labels field oven-sh/bun#27086

Resolved

Kept for reference. Update the dep instead.

Package Was Format Fix Fixed in
convex 1.31.3 patch-package WebSocketManager crashes where window exists but addEventListener doesn't 1.31.4

Usage

Copy the patch into your project's patches/ dir.

Bun (1.2+)

Applied on bun install.

// package.json
{
  "patchedDependencies": {
    "@expo/ui@56.0.0-canary-20260212-4f61309": "patches/@expo%2Fui@56.0.0-canary-20260212-4f61309.patch"
  }
}

npm

No native patching. Uses patch-package via postinstall.

// package.json
{
  "scripts": {
    "postinstall": "patch-package"
  },
  "devDependencies": {
    "patch-package": "^8.0.1"
  }
}

pnpm (10.7+)

pnpm patch. Config goes in pnpm-workspace.yaml.

# pnpm-workspace.yaml
patchedDependencies:
  "@convex-dev/better-auth@0.10.10": "patches/@convex-dev__better-auth@0.10.10.patch"

Important

Patches aren't drop-in across package managers. Two things differ:

Filename — each tool uses a different separator for scoped packages:

Tool Format
Bun @scope%2Fpkg@version.patch
npm (patch-package) @scope+pkg+version.patch
pnpm @scope__pkg@version.patch

Diff paths — Bun and pnpm use paths relative to the package root. patch-package prefixes paths with node_modules/@scope/pkg/. To convert:

# patch-package → Bun/pnpm (strip the node_modules prefix)
sed 's|node_modules/@scope/pkg/||g' old.patch > new.patch

# Bun/pnpm → patch-package (add the node_modules prefix)
sed -e '/^diff --git /s|a/|a/node_modules/@scope/pkg/|' \
    -e '/^diff --git /s|b/|b/node_modules/@scope/pkg/|' \
    -e 's|^--- a/|--- a/node_modules/@scope/pkg/|' \
    -e 's|^+++ b/|+++ b/node_modules/@scope/pkg/|' \
    old.patch > new.patch

Structure

packages/
  @<scope>/
    <package>/
      bun/
        <patch-file>.patch
      npm/
        <patch-file>.patch
      pnpm/
        <patch-file>.patch

Each subdirectory contains the patch in that package manager's format. Not every package has patches for every manager.

Contributing

Include the patch, what it fixes, and the package version.

License

MIT

About

Patch files for packages and dependencies. Drop-in fixes for bugs, missing features, and type errors awaiting upstream merges.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published