Skip to content

fix: install npm deps in refresh-community-data workflow - #233

Merged
sinduri-g merged 4 commits into
mainfrom
fix/refresh-leaderboard-npm-ci
Sep 2, 2026
Merged

fix: install npm deps in refresh-community-data workflow#233
sinduri-g merged 4 commits into
mainfrom
fix/refresh-leaderboard-npm-ci

Conversation

@sinduri-g

Copy link
Copy Markdown
Contributor

refresh-leaderboard.mjs imports the yaml package, which lives in node_modules as a devDependency. The workflow never ran npm ci, so the package was unavailable at runtime. Adds npm ci (with npm cache) after setup-node so all scripts have their dependencies available.

Fixes #232

Type of change

  • feat new feature
  • fix bug fix
  • refactor no behavior change
  • docs / chore / config / perf / style / security

Manual checks

  • Screen reader tested (UI changes only)
  • New routes added to e2e/a11y.spec.ts, e2e/smoke.spec.ts, sitemap.xml.ts, and README (routes only; sitemap is auto-generated from getStaticPaths, so only static pages need manual entries)
  • UI verified at 375px, 768px, and 1280px against the production build (npm run build && npm run preview) (UI changes only)
  • Re-read every changed file; checked all call sites of any modified exports (all changes)
  • Per-level discussion JSON exists with correct discussionUrl (adventure/level changes only)

`refresh-leaderboard.mjs` imports the `yaml` package, which lives in
`node_modules` as a devDependency. The workflow never ran `npm ci`, so
the package was unavailable at runtime. Adds `npm ci` (with npm cache)
after `setup-node` so all scripts have their dependencies available.

Fixes #232

Signed-off-by: Sinduri Guntupalli <sinduri.guntupalli@dynatrace.com>
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-09-02 08:24 UTC

Same structural gap as refresh-community-data: setup-node without
npm ci. generate-community-sitemap.mjs is currently clean (only
node: built-ins), but any future package import would break silently
on the next scheduled run.

Signed-off-by: Sinduri Guntupalli <sinduri.guntupalli@dynatrace.com>
Any workflow job that invokes a script under scripts/ must run npm ci
(with cache: "npm") immediately after setup-node, unconditionally.
Documents the class of bug fixed in refresh-community-data and
refresh-community-sitemap: a script with no node_modules imports
today can silently acquire one later.

Signed-off-by: Sinduri Guntupalli <sinduri.guntupalli@dynatrace.com>
Node 26 CLDR returns "Sept" (4 letters) for September in en-GB short
format. After toUpperCase() this produced "SEPT 2026", which fails the
adventure schema regex /^[A-Z]{3} \d{4}$/ and broke sync-adventure on
the first September run.

- Replace toLocaleString with a hardcoded 3-letter ABBR array + UTC
  methods; output is now locale- and environment-independent
- Add execution guard (process.argv[1] check) so the script is safely
  importable by the test suite without running main()
- Add unit tests covering all 12 months via fake timers, plus an
  inlined old-implementation assertion so a revert fails regardless of
  when the suite runs

Signed-off-by: Sinduri Guntupalli <sinduri.guntupalli@dynatrace.com>
@sinduri-g
sinduri-g merged commit becc688 into main Sep 2, 2026
9 checks passed
@sinduri-g
sinduri-g deleted the fix/refresh-leaderboard-npm-ci branch September 2, 2026 08:24
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.

Refresh community data: JSON validation failed

1 participant