This repository has been archived by the owner on May 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 35
fix: set customErrorInfo
on zisi/esbuild errors
#700
Merged
Merged
Changes from 4 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
b87c1fc
fix: set `customErrorInfo` on zisi/esbuild errors
eduardoboucas dde2043
chore: fix test
eduardoboucas b1d722a
chore: add test
eduardoboucas 71cb015
chore: remove .only
eduardoboucas 94c3248
refactor: pass functionName to customErrorInfo
eduardoboucas d94447f
Merge branch 'main' into fix/bundling-errors
eduardoboucas cb5466f
chore: update test
eduardoboucas 3216578
Merge branch 'main' into fix/bundling-errors
eduardoboucas File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
const immutable = 1 | ||
|
||
immutable = 3 | ||
|
||
module.exports = { immutable } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Do we want to show the bundler and/or the runtime in the error message title?
https://github.com/netlify/build/blob/a6ab7b9dbfebd21bcedcb5dbada4d1620cd6192a/packages/build/src/error/type.js#L86
Please note we do show the
location
fields in the error details, which is printed in the build logs. Also, thelocation
fields are always sent to Bugsnag. Just wondering what you think about the error message title itself (which is shown in the error header and in the deploy summary).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.
I personally don't think we need to show the runtime in the message because it probably offers less clarity than the noise it introduces. I think that field is useful mostly for Bugsnag.
However, on that link I do see that we show
functionName
, which means that the field is mandatory. We don't have the function name when using esbuild from the ZISI flow. Adding it will mean passing that parameter around in a lot of functions, which I'm not super excited about, but it'll have to be done.I'll add to this PR.
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.
Makes sense! 👍
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.
Done in 94c3248. Some of these functions are called recursively, and without types it's a bit difficult to ensure all cases are covered, but I think I've done it!
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 good!
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.
Thanks for your help! 🙌🏻