jsdelivr / jsdelivr

A free, fast, and reliable Open Source CDN for npm, GitHub, Javascript, and ESM

Home Page:https://www.jsdelivr.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question: Purging v-tags does not work

L3P3 opened this issue · comments

commented

Description

In my GitHub repo, I use v1.x and v1.4.x to reference the latest matching build.
When there is a new build, the tags are updated/moved.
But the below links still give me old versions.

Affected jsDelivr links

https://cdn.jsdelivr.net/gh/L3P3/lui@1.x/lui.js
https://cdn.jsdelivr.net/gh/L3P3/lui@1.4.x/lui.js

Response headers

Accept-Ranges: bytes
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: *
Age: 169
Alt-Svc: h3=":443";ma=86400,h3-29=":443";ma=86400,h3-27=":443";ma=86400
Cache-Control: public, max-age=31536000, s-maxage=31536000, immutable
Content-Encoding: br
Content-Length: 2826
Content-Type: application/javascript; charset=utf-8
Cross-Origin-Resource-Policy: cross-origin
Date: Wed, 29 May 2024 11:04:44 GMT
Etag: W/"13d2-mq1ytwMYG2oXLZQB5Jwx+p/RDcY"
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
Timing-Allow-Origin: *
Vary: Accept-Encoding
X-Cache: HIT
X-Content-Type-Options: nosniff
X-Jsd-Version: 1.x
X-Jsd-Version-Type: version
X-Served-By: cache-fra-etou8220156-FRA

Information

  • Device OS: any
  • Browser: any
  • Location: Germany

Requisites

  • I performed a cursory search of the issue tracker to avoid opening a duplicate issue.
  • I checked the documentation to understand that the issue I am reporting is not normal behavior.
  • I understand that not filling out this template correctly will lead to the issue being closed.

Additional content

https://github.com/L3P3/lui/tags shows that both v1.x and v1.4.x point to the latest build commit, which is version 1.4.4.
But even though I ran purge (even tried your purge tool), the tags in jsdelivr still give me old versions (1.4.1 and 1.4.2).

Watch out, the exact version tags like "v1.4.4" point to the source code, so they should be ignored!
I don't know if this issue has to do with the tags being in the default pattern of version tags, somehow colliding with jsdeliver's own versioning system. Or if jsdelivr does not support updating existing tags.

Tags are considered immutable. You should make a new tag for every change and use a link like @1.4 to have jsDelivr automatically load the latest 1.4.x tag (but don't have v1.4.x in the repo - we will resolve it and load the actual number, right now it would be 1.4.4). Then, you can also purge the @1.4 link if you want to refresh it immediately.

commented

Sorry for confusion, so ...

  1. Should I tag the release commit v1.4.4 or 1.4.4?
  2. And the link for latest 1.x is then .../gh/L3P3/lui@1/lui.js?
  3. Should I purge then .../gh/L3P3/lui@1/lui.js and .../gh/L3P3/lui@1.4/lui.js?
  4. Is there wildcard purge like .../gh/L3P3/lui@1/* or do I need to do it for all files individually?
  1. either works
  2. yes
  3. yes
  4. each file separately