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

@latest tag needs to handle fluctuating version #748

Closed
jimmylewis opened this issue May 1, 2024 · 0 comments · Fixed by #752
Closed

@latest tag needs to handle fluctuating version #748

jimmylewis opened this issue May 1, 2024 · 0 comments · Fixed by #752

Comments

@jimmylewis
Copy link
Contributor

jimmylewis commented May 1, 2024

Describe the bug

When using a static version, libman can cache the files locally with a reasonable assumption that they won't change (once published, a package is immutable). However, when using the @latest version in providers that support it (unpkg, jsdelivr), the contents of that "version" do change over time.

Libman needs a way to either convert @latest to a concrete version (i.e. use the same cache folder as the current latest, so that when a new version comes out it uses a different version), or to invalidate the cached files for @latest to avoid reusing outdated assets (this would require some way to know when to invalidate the files and redownload).

To Reproduce

Steps to reproduce the behavior (hypothetical steps):

  1. libman install --provider unpkg jquery@latest
  2. Wait until a new version of jquery ships
  3. libman clean
  4. libman restore

Expected behavior

The new latest version of the library should be installed

Actual behavior

The older version of the library is in the cache, so it gets installed instead.
 

Additional context

Issue forked from discussion #640 (comment)

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 a pull request may close this issue.

1 participant