Skip to content

feat: field projection and output normalisation#2

Merged
miichom merged 6 commits intomainfrom
feat/field-normalisation
Jan 26, 2026
Merged

feat: field projection and output normalisation#2
miichom merged 6 commits intomainfrom
feat/field-normalisation

Conversation

@miichom
Copy link
Owner

@miichom miichom commented Jan 26, 2026

This update adds field‑level selection and makes output behaviour more consistent. Missing selectors now return undefined, and pages that fail to load return null. Array fields no longer default to empty arrays when their selectors are not present, making it easier to tell the difference between “no data found” and “no selector available”.

Example:

// Before
{ pvpteam: { id: undefined, name: undefined, crest: [] }, ... }

// After
{ pvpteam: { id: undefined, name: undefined, crest: undefined }, ... }

@github-actions
Copy link

github-actions bot commented Jan 26, 2026

Coverage Report

Status Category Percentage Covered / Total
🟠 Lines 86.59% 84 / 97
🟠 Statements 82.72% 91 / 110
🟢 Functions 94.73% 18 / 19
🔴 Branches 67.74% 63 / 93
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/lib/endpoint.ts 81% 67.39% 94.44% 85.05%
src/lib/registry.ts 100% 100% 100% 100%
Generated in workflow #16 for commit b19c31c by the Vitest Coverage Report Action

@miichom miichom self-assigned this Jan 26, 2026
@miichom miichom added the enhancement New feature or request label Jan 26, 2026
@miichom miichom marked this pull request as ready for review January 26, 2026 19:56
@miichom miichom merged commit f4efc69 into main Jan 26, 2026
3 checks passed
@miichom miichom deleted the feat/field-normalisation branch January 26, 2026 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant