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

Yarn 1.x: Ensure there are no collisions in the offline mirror #634

Open
taylormadore opened this issue Sep 5, 2024 · 0 comments
Open
Labels
yarn Pull requests/issues related to our yarn handling module

Comments

@taylormadore
Copy link
Contributor

taylormadore commented Sep 5, 2024

When Yarn 1.x fetches a tarball into the offline mirror, the name of the tarball is used as the name of the tarball in the mirror. This potentially opens up the possibility of collisions in the offline mirror, where two different tarballs have the same name and Yarn gets confused about which is being installed.

See: https://github.com/yarnpkg/yarn/blob/7cafa512a777048ce0b666080a24e80aae3d66a9/src/fetchers/tarball-fetcher.js#L65

Practically, it is likely that if integrity keys are being used that Yarn will detect the mismatch and fail, so it is possible this could be remediated by documenting the issue.

Acceptance Criteria

  • Offline mirror collisions are detected and an exception is raised
  • OR this issue is satisfied via documentation
  • Add an integration test for collisions
@taylormadore taylormadore added the yarn Pull requests/issues related to our yarn handling module label Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
yarn Pull requests/issues related to our yarn handling module
Projects
None yet
Development

No branches or pull requests

1 participant