I do wish I could pay some money for a package manager intermediary that "magically" handles things (for example defaulting to not promoting things until 2 weeks have passed), has better perf, and generally just does the right things.
Of course I wouldn't pay _that_ much money for it.
I don't get it, this is exactly how I have been mostly working since around 2010.
Nothing that lands on CI/CD pipelines is able to download anything directly from Internet, rather internal repos based on Nexus, Artfactory and similar.
Additionally everything that gets uploaded into them needs to have an approval process for the most part.
So, not only already exists, it is an intermediate process, and you can even pay depending on the features.
I mean, sure for hobby project you don't want to setup/pay some intermediate repos.
But for anything else you just want control, if new version of an app is released, someone needs to actively bring it to the intermediate repository.
This is tangential, but that's also why being able to import a package from a git url in some language is extremely risky (your github repo could change owners at any time).
At least the code should only know about the package id, and whatever "package manager" is install should link it to a repository.
Such solutions exist. Some people are building it on their own. Some people just commit all their dependencies in their repository.
If you want it enforced for a whole team, with caching on top, that's
where registry proxies come in (Artifactory, Nexus, and similar). The big
ones take real effort to set up, while lighter ones may be all you need.
Vendoring your dependencies into the repo is the low-tech option that survives an upstream repo vanishing.
Disclosure: I work at a company which sells such solutions.
I’ve been using StableBuild for this sort of thing. It’s not exactly what you’re describing, but might be relevant.
You basically point your builds at it instead of the upstream repos. Once you’ve pulled something, it keeps that version around, even if it gets deleted or changed upstream.
Not sure if that covers what you need, but it’s worked well for me.
No that’s forking, vendoring usually means keeping a local copy of a library in /vendor that is automatically committed - rust and golang have first class support for this
Of course I wouldn't pay _that_ much money for it.