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: use console.createTask to improve traces where supported #69

Merged
merged 9 commits into from Mar 10, 2023

Conversation

danielroe
Copy link
Member

@danielroe danielroe commented Mar 9, 2023

More info: https://developer.chrome.com/blog/devtools-modern-web-debugging/#linked-stack-traces

This has relatively low support at the moment outside of Chromium browsers. Node support is available in Node 19+: nodejs/node#44792.

However, it is a very nice DX improvement where supported.

Before After
CleanShot 2023-03-09 at 15 04 42 CleanShot 2023-03-09 at 15 03 44

Note that the remaining anonymous functions in the stack trace will be named if/when #68 merges.

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

codecov bot commented Mar 9, 2023

Codecov Report

Merging #69 (1120f72) into main (aad43d7) will decrease coverage by 1.40%.
The diff coverage is 100.00%.

❗ Current head 1120f72 differs from pull request most recent head 6a075e3. Consider uploading reports for the commit 6a075e3 to get more accurate results

@@            Coverage Diff             @@
##             main      #69      +/-   ##
==========================================
- Coverage   97.63%   96.24%   -1.40%     
==========================================
  Files           5        5              
  Lines         466      506      +40     
  Branches       98      106       +8     
==========================================
+ Hits          455      487      +32     
- Misses         11       19       +8     
Impacted Files Coverage Δ
src/hookable.ts 99.60% <100.00%> (+0.02%) ⬆️
src/index.ts 100.00% <100.00%> (ø)
src/utils.ts 82.17% <100.00%> (-5.01%) ⬇️

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

shims.d.ts Show resolved Hide resolved
src/utils.ts Outdated Show resolved Hide resolved
src/utils.ts Outdated Show resolved Hide resolved
@danielroe danielroe requested a review from pi0 March 10, 2023 11:50
Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

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

🚀

@pi0 pi0 merged commit 0987104 into main Mar 10, 2023
@pi0 pi0 deleted the feat/create-task branch March 10, 2023 13:36
This was referenced Mar 10, 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