NPM proxy repo: what happens when upstream packages/projects are deleted?

Hello,

I have set up an NPM proxy with npmjs dot org (new user so I can’t put domains in posts) as the upstream repo. It has been working great.

What I would like to know is, what is the behavior of proxy repo when cached artifacts are suddenly no longer available upstream? Here are two scenarios:

  1. We have package ‘xyz-1.0’ cached in Nexus. The author of package ‘xyz’ has released version 2.0 and decides they don’t want to support version 1.0 anymore, so they delete it from npmjs dot org. Will Nexus still continue to serve package ‘xyz-1.0’ even though it’s no longer available upstream?

  2. We have package ‘leftpad-1.0’ (to pick a complete random example, I assure you) and a few other versions cached in Nexus. The author decides to remove the project altogether from npmjs dot org. Will Nexus still continue to serve ‘leftpad-1.0’ (and any other versions cached in Nexus), even though the project no longer exists upstream?

I did quite a bit of searching but could not find this addressed in the docs or in fact anywhere. If someone could point me in the right direction, I would greatly appreciate it. Note that I’m not a JS developer so it’s completely possible I might have some fundamental misunderstandings about how NPM packages/repos work.

  1. Yes.
  2. Yes.

This is the very basic promise of Nexus Repository Manager proxy repositories - once it’s cached it stays there forever. There is a mentioned of your concern in one of our guides: Nexus Repository Manager - Proxying Maven and npm Quick Start - Sonatype Guides

Fantastic, that’s exactly what I was hoping to hear. Thank you!