From 08aababa992e131e80ab18123577700431f0a161 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 23 Apr 2026 15:44:14 +0000 Subject: [PATCH 1/2] feat: add changelog tab, version display, and semantic release automation Agent-Logs-Url: https://github.com/nitrocode/token-deathclock/sessions/e520e213-11e3-4dc6-915b-8fbf4c67b3c9 Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com> --- .github/workflows/deploy.yml | 3 + changelog-data.js | 46 ++++++++++++++ index.html | 33 +++++++++- package.json | 3 +- script.js | 58 ++++++++++++++++- scripts/build-changelog.js | 120 +++++++++++++++++++++++++++++++++++ 6 files changed, 260 insertions(+), 3 deletions(-) create mode 100644 changelog-data.js create mode 100644 scripts/build-changelog.js diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 44b30ba..907e8d8 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -35,6 +35,9 @@ jobs: - name: Regenerate milestones-data.js from YAML run: npm run build:milestones + - name: Regenerate changelog-data.js from CHANGELOG.md + run: npm run build:changelog + - name: Deploy to GitHub Pages (gh-pages branch) uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0 with: diff --git a/changelog-data.js b/changelog-data.js new file mode 100644 index 0000000..ae0cf10 --- /dev/null +++ b/changelog-data.js @@ -0,0 +1,46 @@ +'use strict'; +// AUTO-GENERATED from CHANGELOG.md — do not edit directly. +// Run `npm run build:changelog` to regenerate from CHANGELOG.md. + +const SITE_VERSION = "1.0.0"; + +const CHANGELOG_RELEASES = [ + { + version: "Unreleased", + date: null, + sections: [ + { heading: "Added", items: [ + "`.nvmrc` to pin Node.js version to 20 LTS (matching CI)", + "`.editorconfig` for consistent editor formatting across contributors", + "`\"homepage\"` field in `package.json` pointing to the live GitHub Pages site", + "`CHANGELOG.md` to track releases going forward", + ] } + ], + }, + { + version: "1.0.0", + date: "2025-04-14", + sections: [ + { heading: "Added", items: [ + "Live global AI token counter anchored to `BASE_DATE_ISO` (not page-load time)", + "Session counter showing tokens consumed since the page was opened", + "7 environmental milestone cards (trees → bees → water → coral → glaciers → ocean → extinction)", + "Chart.js growth chart with 18-month log-scale projection", + "Predictions table with estimated dates for each milestone", + "Dark / light theme toggle (dark default)", + "Prompt & PR scoring section with collapsible rubric", + "Jest test suite with 75 tests and ≥ 80 % coverage thresholds", + "GitHub Actions CI workflow (`test.yml`) running on every push and PR", + "GitHub Actions deploy workflow (`deploy.yml`) publishing to GitHub Pages on merge to `main`", + "`AGENTS.md` with architecture rules and contributor guidance", + ] } + ], + }, +]; + +/* istanbul ignore next */ +if (typeof module !== 'undefined' && module.exports) { + module.exports = { SITE_VERSION, CHANGELOG_RELEASES }; +} else if (typeof window !== 'undefined') { + window.ChangelogData = { SITE_VERSION, CHANGELOG_RELEASES }; +} diff --git a/index.html b/index.html index 848a1b2..afe2364 100644 --- a/index.html +++ b/index.html @@ -70,6 +70,10 @@
■ Release History
++ All notable changes to this project are documented here. + The format follows Keep a Changelog + and this project adheres to + Semantic Versioning. + View all official releases on + GitHub Releases. +
+