Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

404 for NPM scoped packages #77

Open
daniel-shuy opened this issue Oct 17, 2020 · 1 comment
Open

404 for NPM scoped packages #77

daniel-shuy opened this issue Oct 17, 2020 · 1 comment

Comments

@daniel-shuy
Copy link

diligent doesn't work with NPM scoped packages (eg. @angular/cli).

This is because 44419b8 changed the NPM registry URL from https://registry.npmjs.org/{package}/{version} to https://registry.npmjs.org/{package}?version={version}, which for some weird reason doesn't support scoped packages, even if the slash (/) is URL encoded as %2F.

I've sent an email to NPM support about this behavior, but its unlikely that they will address it anytime soon.

To revert back to using https://registry.npmjs.org/{package}/{version}, we need to strip any symbols before the version, as https://registry.npmjs.org/{package}/{version} only supports exact versions, unlike https://registry.npmjs.org/{package}?version={version}.

@daniel-shuy
Copy link
Author

daniel-shuy commented Oct 23, 2020

Reply from NPM support:

As you may have found out already, the version query string parameter is no longer supported in our package APIs.
Even your https://registry.npmjs.org/base-64?version=%5E0.1.0 example just returns a list of all versions (same as https://registry.npmjs.org/base-64).

Therefore we shouldn't use https://registry.npmjs.org/{package}?version={version} anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants