Because registry-url adds trailing slashes to registry URLs, update-notifier (and anything else using registry-auth-token) doesn't currently work with some registry/auth URLs.
Specifically, if the registry URL doesn't contain a trailing slash, like:
@myscope:registry=https://contoso.pkgs.visualstudio.com/_packaging/MyFeed/npm/registry
npm itself requires the following authToken line, due to its nerf-darting:
//contoso.pkgs.visualstudio.com/_packaging/MyFeed/npm/:_authToken=<auth_token>
But because registry-url appends a trailing slash, it makes the following registry url:
@myscope:registry=https://contoso.pkgs.visualstudio.com/_packaging/MyFeed/npm/registry/
which (when using a library like registry-auth-token / matching npm's behavior) doesn't work with:
//contoso.pkgs.visualstudio.com/_packaging/MyFeed/npm/:_authToken=<auth_token>
and instead requires
//contoso.pkgs.visualstudio.com/_packaging/MyFeed/npm/registry/:_authToken=<auth_token>
Note that registry-auth-token had buggy behavior as well, and in 3.1.1 just took the fix rexxars/registry-auth-token#10 to match npm's behavior.
Was there a reason for adding the additional trailing slash? There must have been since I see tests for it, but it seems wrong to do and is causing this failure.
Thanks.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too