console
See the following file:
const {Console} = require('console');
class MyConsole extends Console {
hello() {}
}
const cons = new MyConsole(process.stdout);
console.log(cons.hello)
This will log [Function: hello] in node 8 and node 9, but undefined 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 is undefined, meaning Jest errors out on an internal error here: https://github.com/facebook/jest/blob/ef8f9ce4e02397dc75bdd510079bbfb36ad06728/packages/jest-runner/src/run_test.js#L137
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.
Fix coming shortly.
Most helpful comment
Fix coming shortly.