4 ms·
There are only two solutions: 1) Trust someone 2) Carefully read through their changes node_modules should be banned from .gitignore npm should stop moving fo
by z3t4 5y ago
There are only two solutions: 1) Trust someone 2) Carefully read through their changes
node_modules should be banned from .gitignore
npm should stop moving folders around. If I have placed a module in node_modules/foo/bar it should stay there! Not get moved to node_modules/foo@1.0.0 etc
- zkldi 5y agoYou aren't meant to put your own files manually inside node_modules. What are you trying to achieve with that?
- silon42 5y agoHave it in git and be part of code review.
- nishs 5y agoIf the code is managed manually and not by package.json, I would consider putting such code in a "vendor" or "third_party" directory instead of putting into "node_modules".
- z3t4 5y agoYou use "npm install" to place modules in node_modules, and "npm update" to conveniently update them. But you have to either 1) trust the maintainers of the modules or 2) review the code changes.