Skip to content

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

Merged
pi0 merged 5 commits into
mainfrom
feat/debug
Mar 10, 2023
Merged

feat: add function name to hook for better dx in stacktraces#68
pi0 merged 5 commits into
mainfrom
feat/debug

Conversation

@danielroe

@danielroe danielroe commented Mar 9, 2023

Copy link
Copy Markdown
Member

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

codecov Bot commented Mar 9, 2023

Copy link
Copy Markdown

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.

@bmeurer bmeurer left a comment

Copy link
Copy Markdown

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 馃憤

Comment thread src/hookable.ts Outdated
Comment thread src/hookable.ts Outdated
@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.

3 participants