3 ms·
As always: vendor your dependencies.
by dgellow 7y ago
As always: vendor your dependencies.
- ojr 7y agovendoring my dependencies wouldn't save me from a rare issue I had dealing with npm packages, for example I had a package that relied on an underlying api call to a machine learning cloud api, the api call became deprecated. Not writing code is the only sure way to have no bugs.
- lpghatguy 7y agoUsing package-lock.json gives you the same effect.
- turnipla 7y agoGood luck vendoring node_modules. Why are these threads filled with people who know nothing about node? npm and yarn both have lockfiles for this purpose. Vendoring only bloats your repos.
- dgellow 7y ago> Why are these threads filled with people who know nothing about node? That’s a quite bad assumption from your part based on almost no information. I don’t know about the rest of the thread but I’m personally quite familiar with node. A lock file doesn’t fix the same issues vendoring does. The lock file gives you an explicit list of version used, vendoring save the exact copies of the dependency with the rest of your code. By vendoring anyone who is working on the project is using the exact same version of a dependency, AND you don’t have to care about an external provider (the registry being up, etc, that’s way easier for you CI too), AND you can review dependencies upgrade via git as if it was your code. Of course that’s a mess when the JavaScript ecosystem has an infinite amount of dependencies for a hello world.