Ever wanted to change something in third-party dependency of your Node project but forking it would be too much hassle โ or you were rather bending something which wouldn't make sense to contribute back at all?
๐งถ Yarn 2+ has "patch" command to help you do exactly that.
And as you guessed correctly, in that case, you need to make sure those patches are versioned with the rest of your code so it gets correctly patched in every environment you ran the code, similarly to "yarn.lock". yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
Also a little small tip โ if you don't want yarn binary (which should be versioned in ".yarn/releases" โ jukben.codes/one-yarn-to-rule-them-all) to skew your Github stats you can override it in ".gitattributes" like this. ๐
Btw does this all sound familiar? In the past I used npmjs.com/package/patch-package but it's nice to have it built-in, isn't it. ๐ค
Happy hacking!