But this got me thinking, we are running several dependencies in production, what if one of them where to be removed, how will we maintain the project in the future? Yes, the build will be on npm, but what if needed to fix bugs or make changes. It could set us back months to replace a dependency such as antd.
Is this something we need to worry about? If so, will it be best to clone the source? What's best practice for this, should we fork or clone? And can we automatically pull future commits?
Your code then should resolve all its dependencies through that cache. If the cache doesn’t have it yet it goes to the real repo to resolve it. Then, it gives you its copy.
You typically can also use these products to store/archive any binaries you produce.
I don’t know how well these work if, as you say, you want to automatically pull future commits. That feels like a dangerous practice to me.
But we never took a dependency on any external code repository. Imagine that external service goes down. Would you be able to afford having blocked builds?
> automatically pull future commits
You are very trustful. Those two are a big no-no. Dependencies should be curated.