-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
lib: expose default prepareStackTrace #50827
lib: expose default prepareStackTrace #50827
Conversation
Review requested:
|
Can people call this function as a replacement for |
2a5b908
to
5bbcf91
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks good. can you make the new test file ESM? I believe we are trying to make all net-new tests ESM now
test/fixtures/source-map/output/source_map_prepare_stack_trace.js
Outdated
Show resolved
Hide resolved
The second parameter of `Error.prepareStackTrace` is an array of reversed call site frames.
Expose the default prepareStackTrace implementation as `Error.prepareStackTrace` so that userland can chain up formatting of stack traces with built-in source maps support.
5bbcf91
to
f281bc4
Compare
@joyeecheung would you mind taking a look at this PR again? Thank you very much! |
Updated the PR to expose the default implementation as |
@GeoffreyBooth would you mind taking a look again? Thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks! 👍
Landed in fe918f5...147abb9 |
The second parameter of `Error.prepareStackTrace` is an array of reversed call site frames. PR-URL: #50827 Fixes: #50733 Reviewed-By: Ethan Arrowood <ethan@arrowood.dev> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Expose the default prepareStackTrace implementation as `Error.prepareStackTrace` so that userland can chain up formatting of stack traces with built-in source maps support. PR-URL: #50827 Fixes: #50733 Reviewed-By: Ethan Arrowood <ethan@arrowood.dev> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
The second parameter of `Error.prepareStackTrace` is an array of reversed call site frames. PR-URL: #50827 Fixes: #50733 Reviewed-By: Ethan Arrowood <ethan@arrowood.dev> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Expose the default prepareStackTrace implementation as `Error.prepareStackTrace` so that userland can chain up formatting of stack traces with built-in source maps support. PR-URL: #50827 Fixes: #50733 Reviewed-By: Ethan Arrowood <ethan@arrowood.dev> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
The second parameter of `Error.prepareStackTrace` is an array of reversed call site frames. PR-URL: #50827 Fixes: #50733 Reviewed-By: Ethan Arrowood <ethan@arrowood.dev> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Expose the default prepareStackTrace implementation as `Error.prepareStackTrace` so that userland can chain up formatting of stack traces with built-in source maps support. PR-URL: #50827 Fixes: #50733 Reviewed-By: Ethan Arrowood <ethan@arrowood.dev> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
repl: fix prepareStackTrace frames array order
The second parameter of
Error.prepareStackTrace
is an array ofreversed call site frames.
lib: expose default prepareStackTrace
Expose the default prepareStackTrace implementation as
Error.prepareStackTrace
so that userland can chain up formatting ofstack traces with built-in source maps support.
Fixes: #50733