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):
libman install --provider unpkg jquery@latest
Wait until a new version of jquery ships
libman clean
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.
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):
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 https://github.com/aspnet/LibraryManager/issues/640#issuecomment-2088113617