-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
Description
Do you want to request a feature or report a bug?
This is a regression in 1.0.0.
Explanation
This regex const SCOPED_PKG_REGEXP = /(?:^|\/)(@[^\/?]+?)(?=%2f)/
:
https://github.com/yarnpkg/yarn/blob/master/src/registries/npm-registry.js#L30
introduced in this commit:
cbb27f4
or this PR:
#4027
completely breaks support for private npm registries.
The request
function is sometimes called with a package name (@my/pkg
) and sometimes with a full URL (https://myregistry.dev/@my/pkg/download/@my/pkg-1.0.0.tgz
).
The old regex /^@|\/@/
matched such URLs, but the new one/(?:^|\/)(@[^\/?]+?)(?=%2f)/
doesn't. This means that authorization token is not sent with any tgz
requests.
cc due to involvement in the original PR @lukeggchapman @BYK
msteward, alexandcote, greglboxer, roderik, AndrewJack and 11 more