yarn patch-commit — Yarn CLI reference

Generate or save a patch from an edited package

Docs/Reference/CLI/patch-commit

yarn patch-commit

Generate or save a patch from an edited package

yarn patch-commit <SOURCE>

By default, this command prints a patch file to stdout based on the difference between the edited folder and the original package.

With -s,--save, the patch file is written to the folder configured by patchFolder, and the top-level manifest is updated with a patch: resolution that points to it.

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

#--save, -sboolean

Save the patch file and add a top-level resolution entry

Examples#

Print the patch for the changes made in the folder returned by yarn patch

yarn patch-commit /tmp/patch-000000000000000018e840e4fdbbbda1-0/user

Save the patch and register it in the top-level manifest

yarn patch-commit -s /tmp/patch-000000000000000018e840e4fdbbbda1-0/user