Skip to content

build: keep runtime VERSION literal in sync with the release#38

Merged
kennethphough merged 1 commit into
masterfrom
fix/version-literal-sync
Jun 23, 2026
Merged

build: keep runtime VERSION literal in sync with the release#38
kennethphough merged 1 commit into
masterfrom
fix/version-literal-sync

Conversation

@kennethphough

Copy link
Copy Markdown
Member

Problem

v2.1.0 shipped logging Initialized KyteJS v2.0.2 — the static VERSION literal in kyte-source.js was never bumped. release-please updates package.json + the manifest but not the JS literal, and deploy.yml builds straight from source, so the stale literal rode to the CDN.

Fix (three layers, defense in depth)

  1. x-release-please-version annotation on the VERSION line + extra-files in release-please-config.json → release-please now bumps the literal in the release PR, keeping committed source correct.
  2. deploy.yml force-stamps the literal from the git tag at build time (single source of truth = the tag, same as the copyright header already does) and fails the build if the stamp didn't take.
  3. Bumped the current literal to 2.1.0 to match the live release.

Net: the shipped CDN bundle can never again report a version different from its tag.

Note

This does not re-deploy the CDN. The live v2.1.0 file keeps logging "2.0.2" until the next tag push (or a manual re-push of v2.1.0, which would now stamp correctly). Cosmetic only — the code is correct.

🤖 Generated with Claude Code

v2.1.0 shipped logging "Initialized KyteJS v2.0.2" because the
static VERSION literal in kyte-source.js was never bumped — release-please
updated package.json + the manifest but not the JS literal, and the deploy
builds straight from source.

Three layers so it can't drift again:
1. x-release-please-version annotation on the VERSION line + extra-files
   in release-please-config.json -> release-please bumps the literal in the
   release PR, keeping committed source correct.
2. deploy.yml force-stamps the literal from the git tag at build time
   (single source of truth = tag, same as the copyright header) and fails
   the build if the stamp didn't take.
3. Bumped the current literal to 2.1.0 to match the live release.

The shipped CDN bundle now always reports the tag version.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@kennethphough
kennethphough merged commit 29f93f2 into master Jun 23, 2026
4 checks 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.

1 participant