Replace the deprecated produceCachedData option used in vm module with script.createCachedData()#13741
Conversation
|
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/48632/ |
|
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 063e1ba:
|
|
I'm investigating why the test is failing.
|
|
Babel still supports Node.js 6, but You could do something like this: if (process.env.BABEL_8_BREAKING) {
// Use script.createCachedData()
} else {
// Use produceCachedData
}So that |
nicolo-ribaudo
left a comment
There was a problem hiding this comment.
Thanks! The CI failure is not related.

https://nodejs.org/api/vm.html#vm_class_vm_script
The
produceCachedDatais deprecated in favour ofscript.createCachedData()from 10.6.0