jsr icon indicating copy to clipboard operation
jsr copied to clipboard

Align JSR NPM package tarball paths with registry.npmjs.org

Open lucacasonato opened this issue 1 year ago • 2 comments

Some private registries require that upstreams have an identical tarball path layout as the upstream NPM registry. JSR does not currently do this, which means JSR is unable to be used as an upstream for these private registries.

This is known to affect Google Artifact Registry and JFrog Artifactory.

lucacasonato avatar Apr 18 '24 09:04 lucacasonato

Is this something that is supported with deno 2.0?

I'd love to try it out but I need to be able to use artifactory as the registry to proxy/cache dependencies so we don't get rate limited.

icecreammatt avatar Oct 18 '24 20:10 icecreammatt

I have found this Feature Request in the Artifactory Jira.

https://jfrog.atlassian.net/browse/RTFACT-31268

Additionally I debugged this. Artifactory does currently not send any "Accept:" Header. Not even accept: */* This is the main issue, as jsr.io requires an accept header. Otherwise jsr will respond with the html. https://jsr.io/docs/api#jsr-registry-api

If artifactory would start sending this accept header - even if its only the default one accept: */* - it would be possible to use jsr.io via artifactory by using a generic type repository. I tested this by temporarily adding this header with a proxy. It works.

Non-Existent Tarball support is untouched by this, but using a generic repository to fetch the files will work too, if this is "fixed" on jfrogs end.

peterlustig78 avatar Aug 04 '25 09:08 peterlustig78