-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Make error message prefixes more descriptive #11612
Conversation
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/52812/ |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit dc8471d:
|
Related - #11554 |
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 like this, I'll take care of rebasing once #11554 is merged.
dc8471d
to
88b9c2c
Compare
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
88b9c2c
to
7b28457
Compare
Sorry for the drive-by contribution. Didn't want to forget about it. I'll look at possible CI failures later.Updated testsI noticed when testing errors for babel macro with
babel-plugin-tester
that the error messages would be prefixed withunknown:
. It wasn't clear to me whether this was an issue on my side with custom errors or babel-plugin-tester.Turns out this is expected if the code does not come from an actual file. Hopefully this is less confusing for future users if we prefix it with "unknown file" instead of "unknown". It's not obvious to me that "unknown" refers to a file in the error context.
It might even make more sense to not prefix the filename and instead append the filename e.g.
unknown error