Details
Description
When proxying NPM packages, the metadata max-age does not work, resulting in new versions of a package not to be downloaded.
To reproduce:
1. Create an NPM proxy repo, proxying to a hosted NPM repo on another NXRM 3 instance (this can be any NPM registry, a remote Nexus 3 is only for the sake of convenience).
2. Create an NPM group repo and the add the NPM proxy repo to it.
3. Upload v1.0.0 of NPM package to the remote hosted NPM repo.
4. run npm i <package>@1.0.0 against group repo - install works (expected).
5. run npm i <package>@2.0.0 against group repo - install fails (expected).
6. Upload v2.0.0 of NPM package to the remote hosted NPM repo.
7. Invalidate the proxy repo cache or wait for 'metadata max-age' time to pass.
8 run npm i <package>@2.0.0 against group repo - install fails (unexpected).
9. Invalidate the group repo cache.
10. run npm i <package>@2.0.0 against group repo - this time install works.