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.

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.