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

Do not delete cached downloads when version changes #2

Merged
merged 1 commit into from
Sep 15, 2023

Conversation

aldenquimby
Copy link
Owner

@aldenquimby aldenquimby commented Sep 15, 2023

Copied from sgraham785#17

Going to publish a fork b/c that repo appears dead

Problem context

This is an enhancement on sgraham785#16

Steps

  • project A uses flyway 7.x and project B uses flyway 8.x
  • npm ci project A, then npm ci project B, then npm ci project A again

Expected

  • ideally the 2nd install for project A doesn't re-download the 7.x binary, because it's already been cached

Actual

  • 2nd install re-downloads 7.x because the entire cache download folder is deleted whenever version changes

How does this address the problem?

  • don't delete the entire download folder if there's no cached binary
  • semi-related problem I hit testing this locally - if lib exists from a previously failed extraction, we don't want to return after rimrafing, we need to run the extraction

Verification

  • npm run test passes

@aldenquimby aldenquimby merged commit 8fa1edf into master Sep 15, 2023
@aldenquimby aldenquimby deleted the aldenquimby/cache-multiple-versions branch September 15, 2023 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant