fix: install npm deps in refresh-community-data workflow - #233
Merged
Conversation
`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>
Contributor
|
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>
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.
refresh-leaderboard.mjsimports theyamlpackage, which lives innode_modulesas a devDependency. The workflow never rannpm ci, so the package was unavailable at runtime. Addsnpm ci(with npm cache) aftersetup-nodeso all scripts have their dependencies available.Fixes #232
Type of change
featnew featurefixbug fixrefactorno behavior changedocs/chore/config/perf/style/securityManual checks
npm run build && npm run preview) (UI changes only)discussionUrl(adventure/level changes only)