Skip to content

Conversation

@TobiTenno
Copy link
Member

@TobiTenno TobiTenno commented Dec 20, 2025

What did you fix?

aura stuff


Reproduction steps


Evidence/screenshot/link to line

Considerations

  • Does this contain a new dependency? [No]
  • Does this introduce opinionated data formatting or manual data entry? [No]
  • Does this pr include updated data files in a separate commit that can be reverted for a clean code-only pr? [Yes]
  • Have I run the linter? [Yes]
  • Is is a bug fix, feature request, or enhancement? [Maintenance]

Summary by CodeRabbit

  • New Features

    • Warframes can now support multiple aura polarities instead of a single value.
  • Bug Fixes

    • Corrected item counts for Moonlight Dragonlily (10 → 6) and Sunlight Dragonlily (10 → 4).
  • Improvements

    • Enhanced polarity data validation and error handling for better data integrity.

✏️ Tip: You can customize this high-level summary in your review settings.

@TobiTenno TobiTenno requested a review from a team as a code owner December 20, 2025 03:25
@TobiTenno TobiTenno closed this Dec 20, 2025
@TobiTenno TobiTenno reopened this Dec 20, 2025
@TobiTenno TobiTenno enabled auto-merge (squash) December 20, 2025 03:25
@coderabbitai
Copy link

coderabbitai bot commented Dec 20, 2025

Walkthrough

The pull request extends polarity support to handle both single values and arrays. The transformer logic is updated to recursively process polarity arrays, type definitions expand to permit Polarity | Polarity[], and data structures transition from comma-separated strings to array format. Test endpoints are updated to reference warframe data sources.

Changes

Cohort / File(s) Summary
Transformer Logic
build/wikia/transformers/transformPolarity.mjs
Added recursive array handling for polarity values; replaced direct string coercion with safer lookup; normalized edge-case handling (falsy values, 'none' strings); improved error logging with field context.
Type Definition
index.d.ts
Extended Warframe.aura type signature from Polarity to Polarity | Polarity[] to accommodate single or multiple polarity values.
Data Updates
data/json/All.json
Updated aura field from string "aura,vazarin" to array ["aura", "vazarin"]; adjusted item counts for Moonlight Dragonlily (10 → 6) and Sunlight Dragonlily (10 → 4).
Test Updates
test/lookup.mjs
Changed test endpoint from /item/${lookup} to /warframes/${lookup} for diff comparison source.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Focus areas:
    • Array handling logic in transformPolarity.mjs to verify recursive application correctness and edge-case coverage
    • Type compatibility verification for existing code consuming the aura field
    • Data migration impact assessment—ensure consumers handle both string and array formats gracefully
    • Test endpoint change rationale and coverage impact

Possibly related PRs

Suggested reviewers

  • SlayerOrnstein
  • Soundofdarkness

Poem

🐰 Arrays of auras now we handle,
No longer strings that flicker and scramble,
A safer lookup, with types declared true,
Polarity transforms—both one and two!
Moonlight and Sunlight, rebalanced with care,
The codeborne shall flourish, beyond compare!

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: multi-aura polarity support' directly and concisely describes the main change: enabling support for multiple polarity values in the aura field.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch handle-multiple-polarities

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

♻️ Duplicate comments (1)
data/json/All.json (1)

966850-966850: Verify that the itemCount change is intentional.

Similar to the Moonlight Dragonlily change, this itemCount modification for Sunlight Dragonlily appears unrelated to the multi-aura polarity support objective. Please confirm this is an intentional data correction and verify the commit structure.

🧹 Nitpick comments (2)
build/wikia/transformers/transformPolarity.mjs (2)

7-9: Array handling logic looks solid.

The recursive approach correctly transforms arrays of polarity values, enabling multi-aura polarity support as intended.

Optional: Simplify redundant type check

The typeof field !== 'string' check is redundant since Array.isArray() never returns true for strings. You can simplify:

-      if (typeof field !== 'string' && Array.isArray(field)) {
+      if (Array.isArray(field)) {
         return field.map((f) => transform(f));
       }

21-29: Update JSDoc to reflect array support.

The JSDoc describes AuraPolarity, StancePolarity, and Polarity as strings, but the code now handles arrays for these fields (lines 7-9). Consider updating the documentation to reflect that these parameters accept string | string[].

Suggested JSDoc update
 /**
  * Transform polarity
- * @param {string} [AuraPolarity] string designating the polarity for the aura compatibility of a Warframe
+ * @param {string|string[]} [AuraPolarity] string or array of strings designating the polarity for the aura compatibility of a Warframe
  * @param {module:warframe-items.Item} target item for which to standardize polarities
- * @param {string} [StancePolarity] string designating the polarity for the stance compatibility of a melee weapon
- * @param {string} [Polarity] string designating the polarity for the aura compatibility of a mod slot or Mod
+ * @param {string|string[]} [StancePolarity] string or array of strings designating the polarity for the stance compatibility of a melee weapon
+ * @param {string|string[]} [Polarity] string or array of strings designating the polarity for the aura compatibility of a mod slot or Mod
  * @param {Array<string>} [Polarities] list of strings designating polarities on a weapon or warframe
  * @returns {*}
  */
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 49e6203 and e71c126.

📒 Files selected for processing (4)
  • build/wikia/transformers/transformPolarity.mjs (1 hunks)
  • data/json/All.json (3 hunks)
  • index.d.ts (1 hunks)
  • test/lookup.mjs (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 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
⏰ 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)
index.d.ts (1)

354-354: Type change correctly supports multi-aura polarity.

Jade is the first Warframe to possess two mod aura slots, making the union type Polarity | Polarity[] necessary and appropriate. This change maintains type safety while supporting both single aura values (backward compatibility) and arrays of polarities (new feature). The type correctly enables the PR objective of multi-aura polarity support.

test/lookup.mjs (1)

10-10: File is newly created, not a modification of an existing endpoint.

The test/lookup.mjs script was introduced with the /warframes/${lookup} endpoint in its initial implementation. There is no prior version showing a change from any other endpoint. The API endpoint is functional and suitable for the warframe-specific lookup functionality.

Likely an incorrect or invalid review comment.

data/json/All.json (1)

416748-416748: LGTM! Multi-aura array format implemented correctly.

The change from a comma-separated string to an array format correctly enables multi-aura polarity support as intended by this PR.

build/wikia/transformers/transformPolarity.mjs (1)

15-15: Improved error logging.

The enhanced error message with field context and error details will aid debugging.

@TobiTenno TobiTenno merged commit 1c92128 into master Dec 20, 2025
11 of 16 checks passed
@TobiTenno TobiTenno deleted the handle-multiple-polarities branch December 20, 2025 03:43
@wfcd-bot-boi
Copy link
Collaborator

🎉 This PR is included in version 1.1272.85 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants