Skip to main content

yarn patch-commit

Generate a patch out of a directory.

Usage

$ yarn patch-commit <patchFolder>

Details

By default, this will print a patchfile on stdout based on the diff between the folder passed in and the original version of the package. Such file is suitable for consumption with the patch: protocol.

With the -s,--save option set, the patchfile won't be printed on stdout anymore and will instead be stored within a local file (by default kept within .yarn/patches, but configurable via the patchFolder setting). A resolutions entry will also be added to your top-level manifest, referencing the patched package via the patch: protocol.

Note that only folders generated by yarn patch are accepted as valid input for yarn patch-commit.

Options

DefinitionDescription

-s,--save

Add the patch to your resolution entries