-
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
Cannot extend Console in node 10 rc.0 #20157
Labels
Milestone
Comments
I cannot reproduce with v10.0.0-nightly201804120aab8ff602 but can reproduce with the next v10.0.0-nightly201804132a6ab9b37b. So if I compare properly, the cause should be here: |
I have a reproduction. Working on a fix. |
cc @jasnell Sorry, seems like one more regression blocking v10. |
vsemozhetbyt
added
console
Issues and PRs related to the console subsystem.
regression
Issues related to regressions.
labels
Apr 19, 2018
3 tasks
Fix coming shortly. |
3 tasks
PR in #20158 |
jasnell
pushed a commit
that referenced
this issue
Apr 20, 2018
Due to a return statement with new inside the function, extending Console class does not work when passing in just the stdout arg. PR-URL: #20158 Fixes: #20157 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
10.0.0-rc.0
macOS
console
See the following file:
This will log
[Function: hello]
in node 8 and node 9, butundefined
in the RC.I'm not sure if it's supposed to happen - my only guess from looking at the changelog is #17708, but I'm not sure if it's it?
This completely breaks Jest (which I wanted to test using the RC) as it extends
Console
for its own logging. See https://github.com/facebook/jest/blob/ef8f9ce4e02397dc75bdd510079bbfb36ad06728/packages/jest-util/src/buffered_console.js#L164-L166 which isundefined
, meaning Jest errors out on an internal error here: https://github.com/facebook/jest/blob/ef8f9ce4e02397dc75bdd510079bbfb36ad06728/packages/jest-runner/src/run_test.js#L137The text was updated successfully, but these errors were encountered: