-
Notifications
You must be signed in to change notification settings - Fork 63
fix(#833): filter graves, umlaut-o #836
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
📝 WalkthroughWalkthroughThis PR fixes item name formatting issues by correcting title casing logic to preserve lowercase after special characters (ö, apostrophes), updating data entries with proper punctuation, enhancing item lookup with fallback mechanisms, and adding test coverage for the title transformation functionality. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
build/parser.mjs (1)
30-32: LGTM: Title casing fixes address the reported issues.The negative lookbehind
(?<!ö)prevents capitalizing letters immediately following ö, fixing "HöLlvanian" → "Höllvanian". The apostrophe normalization replaces typographic apostrophes (') with ASCII apostrophes ('), fixing "Albrecht'S" → "Albrecht's".💡 Optional: Consider handling other umlauts
While the PR scope only mentions ö, you might want to consider whether other umlauts (ä, ü, ë, ï) could appear in the dataset and need similar treatment:
-.replace(/(?<!ö)\b\w/g, (l) => l.toUpperCase()) +.replace(/(?<!ö|ä|ü|ë|ï)\b\w/g, (l) => l.toUpperCase())This is purely optional since no issues with other umlauts are reported.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (17)
build/parser.mjsdata/json/All.jsondata/json/Fish.jsondata/json/Gear.jsondata/json/Melee.jsondata/json/Misc.jsondata/json/Mods.jsondata/json/Node.jsondata/json/Primary.jsondata/json/Resources.jsondata/json/Secondary.jsondata/json/Skins.jsondata/json/Warframes.jsondata/json/i18n.jsondata/warnings.jsontest/lookup.mjstest/utilities/title.spec.mjs
🧰 Additional context used
🧠 Learnings (4)
📚 Learning: 2024-12-03T23:47:24.677Z
Learnt from: SlayerOrnstein
Repo: WFCD/warframe-items PR: 663
File: config/masterableCategories.json:1-2
Timestamp: 2024-12-03T23:47:24.677Z
Learning: In the 'warframe-items' repository, when suggesting changes to regex patterns in 'config/masterableCategories.json', ensure that added patterns only include items relevant to the current PR context, and avoid adding items not present in the context.
Applied to files:
test/lookup.mjs
📚 Learning: 2025-11-28T01:41:19.914Z
Learnt from: SlayerOrnstein
Repo: WFCD/warframe-items PR: 778
File: build/parser.mjs:568-574
Timestamp: 2025-11-28T01:41:19.914Z
Learning: In the WFCD/warframe-items repository, for Nightwave Act processing, the regex difference between `build/parser.mjs` (using `/[0-9]{1,3}$/` with anchor) and `build/build.mjs` (using `/[0-9]{1,3}/` without anchor) is intentional and serves different purposes in each file.
Applied to files:
test/lookup.mjs
📚 Learning: 2025-03-29T18:52:41.800Z
Learnt from: TobiTenno
Repo: WFCD/warframe-items PR: 714
File: build/parser.mjs:451-469
Timestamp: 2025-03-29T18:52:41.800Z
Learning: Wiki data in the warframe-items builder should not have null checks as it's critical for the build process - if wiki fetch fails, the build should fail to prevent propagating incorrect data downstream.
Applied to files:
data/warnings.json
📚 Learning: 2025-12-22T12:16:24.709Z
Learnt from: TobiTenno
Repo: WFCD/warframe-items PR: 805
File: build/tradable.mjs:1-1
Timestamp: 2025-12-22T12:16:24.709Z
Learning: In Warframe, Prime variants of Bow, Launcher, and Sniper weapon types are not tradable, just like Prime variants of Rifle, Shotgun, Pistol, and other built weapon types. These types should be included in the builtUntradable array in build/tradable.mjs.
Applied to files:
data/warnings.json
🧬 Code graph analysis (2)
test/utilities/title.spec.mjs (1)
test/utilities/find.spec.mjs (1)
find(7-7)
test/lookup.mjs (4)
index.mjs (2)
res(136-136)items(103-103)index.js (1)
items(104-104)test/utilities/find.spec.mjs (1)
items(10-10)test/index.spec.mjs (13)
items(29-29)items(68-68)items(72-72)items(81-81)items(100-100)items(108-108)items(113-113)items(117-117)items(122-122)items(131-131)items(138-138)items(152-152)items(166-166)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Build
🔇 Additional comments (4)
data/warnings.json (2)
7-7: LGTM: Apostrophe normalization applied correctly.The correction from "Devil'S Cap" to "Devil's Cap" aligns with the PR objectives to fix incorrect capitalization after apostrophes.
9-9: LGTM: Missing wiki thumbnail tracking added.The new
missingWikiThumbfield tracks items without wiki thumbnails, which is consistent with the data regeneration mentioned in the PR description.test/lookup.mjs (1)
10-17: LGTM: Improved lookup flexibility with cascading fallbacks.The changes enhance the lookup utility by:
- Switching to the more general
/items/endpoint (instead of/warframes/)- Adding fallback strategies: exact name match → uniqueName match → case-insensitive substring match
This makes the test utility more robust and flexible for various item types.
test/utilities/title.spec.mjs (1)
1-14: LGTM: Excellent test coverage for title transformations.The new tests validate both fixes from the PR:
- Umlaut handling: Verifies "Höllvanian" maintains lowercase after ö
- Apostrophe handling: Verifies typographic apostrophes are normalized to ASCII
The tests use real item data via uniqueNames, ensuring the transformations work correctly in production scenarios.
|
🎉 This PR is included in version 1.1272.97 🎉 The release is available on: Your semantic-release bot 📦🚀 |
What did you fix?
closes #833
Reproduction steps
See tests
Evidence/screenshot/link to line
Considerations
Summary by CodeRabbit
Bug Fixes
New Features
✏️ Tip: You can customize this high-level summary in your review settings.