Skip to content

Point the CDN URL at @latest instead of a moving @v1 tag - #10

Merged
river0825 merged 1 commit into
mainfrom
docs/use-latest-cdn
Jun 18, 2026
Merged

river0825 merged 1 commit into
mainfrom
docs/use-latest-cdn

Conversation

@river0825

Copy link
Copy Markdown
Contributor

Why

The landing page kept serving the old build even after v1 was released.

Root cause: a literal v1 git tag makes jsDelivr treat @v1 as an immutable pin (Cache-Control: immutable, cached ~1 year). Promoting a release by force-moving the v1 tag therefore silently froze the CDN on stale content — purging @v1 couldn't fix it because jsDelivr kept re-serving the immutable object.

What

  • Switch every production loader and install snippet to the floating @latest tag (README.md, docs/index.html, docs/rc.html, CLAUDE.md). jsDelivr revalidates @latest (~12h) and floats it to the newest stable tag automatically — no purge, no waiting.
  • Landing page version switcher now defaults to latest instead of v1.
  • Keep the explicit @v1.1.0-rc.1 pins on the RC page (intended).
  • Document the pitfall + new release process in CLAUDE.md: cut a new, higher version number each release; never force-move a version tag and never maintain a literal v1 tag.

Context

The literal v1 git tag has been deleted and v1.2.0 (→ b043ab5, includes the issue-4 modal fix) tagged, so @latest already serves the current build.

🤖 Generated with Claude Code

A literal `v1` git tag makes jsDelivr serve `@v1` as an immutable pin
(Cache-Control: immutable, cached ~1 year), so promoting a release by
force-moving `v1` silently froze the CDN on stale content — which is why
the landing page kept showing the old build after v1 was released.

Switch every production loader and install snippet (README, docs landing,
RC page, CLAUDE.md) to the floating `@latest` tag, which jsDelivr
revalidates and floats to the newest stable tag automatically. Keep the
explicit `@v1.1.0-rc.1` pins on the RC page. Document the pitfall and the
new release process (cut a new version number; never move a version tag)
in CLAUDE.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request transitions the project's CDN distribution from a moving @v1 tag to jsDelivr's floating @latest tag to avoid immutable caching issues. It updates documentation across CLAUDE.md and README.md, and adjusts the version selection logic in the demo pages. Feedback suggests mapping legacy ?ver=v1 query parameters to latest in docs/index.html to maintain backward compatibility for existing bookmarks.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread docs/index.html
Comment on lines +166 to 167
var DEFAULT = "latest";
var ver = new URLSearchParams(location.search).get("ver") || DEFAULT;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Since the literal v1 git tag has been deleted from the repository, any existing bookmarks or links that still contain ?ver=v1 will fail to load the script from jsDelivr. To ensure backward compatibility and a smooth transition, we should explicitly map v1 to latest (the default) when parsing the query parameter.

Suggested change
var DEFAULT = "latest";
var ver = new URLSearchParams(location.search).get("ver") || DEFAULT;
var DEFAULT = "latest";
var ver = new URLSearchParams(location.search).get("ver") || DEFAULT;
if (ver === "v1") ver = DEFAULT;

@river0825
river0825 merged commit 52c4599 into main Jun 18, 2026
1 check passed
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.

2 participants