Skip to content

fix(evlog): support primitive values in defineEnricher#320

Merged
HugoRCD merged 1 commit intoHugoRCD:mainfrom
payton-burr:fix/enricher-primitive-values
May 5, 2026
Merged

fix(evlog): support primitive values in defineEnricher#320
HugoRCD merged 1 commit intoHugoRCD:mainfrom
payton-burr:fix/enricher-primitive-values

Conversation

@payton-burr
Copy link
Copy Markdown
Contributor

🔗 Linked issue

📚 Description

The docs show defineEnricher<string> as a supported pattern for custom enrichers, but the current implementation only accepts object types:

  • EnricherDefinition<T extends object> and defineEnricher<T extends object> prevent primitive type parameters at the type level.
  • mergeEventField<T extends object> was written around object spreading and didn't cleanly handle primitive computed values.

This change aligns the implementation with the documented behavior:

  • Remove the T extends object constraint on EnricherDefinition, defineEnricher, and mergeEventField.
  • Rework mergeEventField to handle primitives; object-merge semantics are unchanged.
  • Add tests covering primitive merge paths and primitive enrichers.

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 5, 2026

@payton-burr is attempting to deploy a commit to the HRCD Projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added the bug Something isn't working label May 5, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

Thank you for following the naming conventions! 🙏

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 5, 2026

npm i https://pkg.pr.new/evlog@320
npm i https://pkg.pr.new/@evlog/nuxthub@320

commit: 96ff13c

@HugoRCD HugoRCD merged commit 808a695 into HugoRCD:main May 5, 2026
12 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants