Skip to content
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

feat: add function name to hook for better dx in stacktraces #68

Merged
merged 5 commits into from Mar 10, 2023
Merged

Conversation

danielroe
Copy link
Member

@danielroe danielroe commented Mar 9, 2023

This names anonymous functions after the hook they are called in if they do not already have a name. This is a pure DX improvement, so that we don't have (anonymous) in stack traces.

@danielroe danielroe added the enhancement New feature or request label Mar 9, 2023
@danielroe danielroe requested a review from pi0 March 9, 2023 14:42
@danielroe danielroe self-assigned this Mar 9, 2023
@codecov
Copy link

codecov bot commented Mar 9, 2023

Codecov Report

Merging #68 (d3f9611) into main (aad43d7) will increase coverage by 0.04%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #68      +/-   ##
==========================================
+ Coverage   97.63%   97.68%   +0.04%     
==========================================
  Files           5        5              
  Lines         466      476      +10     
  Branches       98      102       +4     
==========================================
+ Hits          455      465      +10     
  Misses         11       11              
Impacted Files Coverage Δ
src/hookable.ts 99.59% <100.00%> (+0.01%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link

@bmeurer bmeurer left a comment

Choose a reason for hiding this comment

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

Pragmatic and easy, I like it 👍

src/hookable.ts Outdated Show resolved Hide resolved
src/hookable.ts Outdated Show resolved Hide resolved
@pi0 pi0 merged commit a4b0b54 into main Mar 10, 2023
@pi0 pi0 deleted the feat/debug branch March 10, 2023 09:40
@danielroe danielroe mentioned this pull request Mar 14, 2023
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.

None yet

3 participants