-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Fixes offline mirror filename calculation for scoped packages URLs in the taobao npm registry #7533
base: master
Are you sure you want to change the base?
Conversation
Lint seems to have failed on master since #7512 |
@arcanis Please have a look? |
Merge to fix unit test.
I also had this problem:
|
I got same issue with |
@arcanis Please have a look. Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is the most easy way to resolve this issue.
This would fix my problem with |
Is yarn 1 no longer maintained? |
https://dev.to/arcanis/introducing-yarn-2-4eh1#what-will-happen-to-the-legacy-codebase
I doubt if this is still an issue on Yarn 2 because it seems related code has been refactored: https://github.com/yarnpkg/berry/blob/master/packages/plugin-http/sources/constants.ts#L1-L3 |
Plz merge this. |
i have the same problem |
Is yarn 1 no longer maintained? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reviewed
Summary
The taobao registry gives tarball urls for scoped packages in formats like
https://registry.npm.taobao.org/@types/prop-types/download/@types/prop-types-15.7.2.tgz
, which cannot be parsed by the current regex/\/(?:(@[^/]+)(?:\/|%2f))?[^/]+\/(?:-|_attachments)\/(?:@[^/]+\/)?([^/]+)$/
. The result will thus fallback toprop-types-15.7.2.tgz
which conflicts with the cache for the packageprop-types
. This will result in checksum mismatch.Fix #7532.
Test plan
Added a test in
__tests__/fetchers.js
.