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
[helpers] Add a private function name within createSuper
#11514
Conversation
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/21772/ |
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 5d89be3:
|
@cpojer: Can you update the tests? Run |
Somehow I can't locally run the tests on my Facebook company laptop, possibly related to some watchman and Jest setup issue. Any chance you could update the test? 😬 |
@cpojer Can you allow edits from maintainers? |
@nicolo-ribaudo should have already been enabled: |
@nicolo-ribaudo @cpojer pushed updated fixtures |
CI failure related to |
The
createSuper
helper was changed sometime between 7.4 and 7.9 to add a new private function withincreateSuper
. We noticed in a large codebase that when a custom error instance gets thrown (likethrow new class CustomError extends Error {}
), the top of the stack frame blames to this internal function instead of the callsite. In this diff I propose adding a function name so that it isn't anonymous and can be filtered out by error reporting systems (when using source maps correctly). This diff should only add one byte in minified output for users of the ES2015 class transform.