cosmjs icon indicating copy to clipboard operation
cosmjs copied to clipboard

add files generated by yarn install to .gitignore

Open dynst opened this issue 5 months ago • 1 comments

Fix on #788

https://yarnpkg.com/features/pnp

.pnp.loader.mjs never changes, and .pnp.cjs (pnp's replacement for a node_modules/ directory) is just a 22k+ 23k line file derived from from the 8k line yarn.lock, except it's much more prone to git merge conflicts.

The best way to solve merge conflicts is to delete it and regenerate it (in cases where there were no conflicts in yarn.lock), so best practice is to just delete it ahead of time.

dynst avatar Jun 20 '25 04:06 dynst

Merge conflict on the PR to prevent future merge conflicts. Ironic.

dynst avatar Jun 27 '25 16:06 dynst

Thank you for bringing this up. Turns our that this depends on Zero-Installs vs. non-Zero-Installs. See https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored and https://yarnpkg.com/features/caching#zero-installs.

I'm not necessarily convinced we need Zero-Installs but for now we use it. This is also why the whole cache is checked-in. If we give up Zero-Installs this should be discussed in a separate issue.

So I did #1696 instead. Hope it helps.

webmaster128 avatar Jul 08 '25 18:07 webmaster128