Repository navigation
Node 24 CI, repo URL fixes, and bump to v0.2.1 - #7
Merged
Merged
Conversation
- Pin the Node version in a single source (.nvmrc = 24) and have every CI job read it via setup-node's node-version-file, instead of hardcoding '20' in four places. Bumping Node later is now a one-line change. - Add an engines floor of node >=22 to package.json. esbuild 0.24 and @playwright/test 1.58 both support Node 22/24; the full build and the 51-test E2E suite pass on Node 22 locally.
The homepage, repository, bugs, CI badge and clone URLs pointed at the non-existent "opencoachingformat/editor" repo. Correct them to "ocf-editor" and fix the matching `cd editor` → `cd ocf-editor` in the setup steps.
Update package.json, the in-app version badge, the version E2E assertion, and the arc42 version note.
The version previously had to be bumped by hand in package.json, the index.html badge, and the E2E test. Now it lives only in package.json: - scripts/build.js (new) replaces the inline esbuild command and injects the version at build time via esbuild `define` (__APP_VERSION__), read from $npm_package_version (falling back to the package.json in cwd). An optional APP_VERSION env var overrides the display string. - index.html ships an empty .app-version badge; main.js fills it from the injected constant on init. - The version E2E assertion derives the expected value from package.json. - build-pages.sh builds every variant through build.js instead of a raw esbuild call + sed stamp. The /preview build is labelled via APP_VERSION; release builds derive "v<version>" from the tag's package.json. Older release refs (whose main.js predates injection) keep their static badge, which for a tag already equals the tag version — so the fallback stays correct. Bumping the version is now a one-line change to package.json. Verified: build injects the badge, all 51 E2E tests pass, and build-pages produces correct badges for new (injected) and old (static fallback) refs.
A transient stall in `playwright install chromium --with-deps` left the E2E job hanging with no timeout, and the workflow-level `concurrency: pages` group meant that one hung run blocked every other run (PRs and deploys) from even starting. - Add `timeout-minutes` to every job so a hang fails fast instead of running to GitHub's 6-hour default. - Move the single-slot `pages` concurrency from the workflow level onto the `deploy` job only, so a slow/stuck test run no longer blocks the pipeline. - Cache the Playwright browser by version; only re-download Chromium on a cache miss (the download/apt step is the slowest, most stall-prone part).
…ource refactor: single source of truth for the app version (package.json)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up housekeeping after the v0.2.0 release:
.nvmrc= 24)and have every CI job read it via
setup-node'snode-version-file, insteadof hardcoding
'20'in four places. Adds anenginesfloor ofnode >=22to
package.json. (esbuild 0.24 and @playwright/test 1.58 both support Node22/24.)
pointed at the non-existent
opencoachingformat/editorrepo — corrected toocf-editor(also fixes the broken CI badge) and the matchingcd editor→cd ocf-editor.package.json, the in-app version badge, theversion E2E assertion, and the arc42 version note.
Testing
npm run buildgreen.npm ciraises no engine warnings;.nvmrcresolved bynode-version-file.Note
The CI Node-20 deprecation warnings are about the actions' own runtime
(
checkout@v4/setup-node@v4), not ournode-version; those clear when theactions ship
@v5. Separate concern, not addressed here.https://claude.ai/code/session_01H8rjA9L8mXvBm5FREpaPfD
Generated by Claude Code