Yarn Patch

First-class dependency patching — `yarn patch ` extracts a temporary editable copy of a dependency and `yarn patch-commit` saves the resulting diff as a `patch:` protocol entry in the lockfile. Eliminates the need for patch-package as a separate tool.

Yarn Patch is one of 10 APIs that Yarn publishes on the APIs.io network.

Tagged areas include Patch, Dependency Customization, and JavaScript. The published artifact set on APIs.io includes API documentation.

API entry from apis.yml

apis.yml Raw ↑
aid: yarn-pkg:yarn-patch
name: Yarn Patch
tags:
- Patch
- Dependency Customization
- JavaScript
humanURL: https://yarnpkg.com/cli/patch
properties:
- url: https://yarnpkg.com/cli/patch
  type: Documentation
- url: https://yarnpkg.com/cli/patch-commit
  type: Documentation
description: First-class dependency patching — `yarn patch <package>` extracts a temporary editable copy
  of a dependency and `yarn patch-commit` saves the resulting diff as a `patch:` protocol entry in the
  lockfile. Eliminates the need for patch-package as a separate tool.