[Pkg-javascript-devel] Bug#978051: node-consolidate depends on babel-core 6
Xavier Guimard
yadd at debian.org
Fri Dec 25 08:55:47 GMT 2020
Package: node-consolidate
Version: 0.15.1+repack-1
Severity: serious
Enabling test proves that node-consolidate depends on node-babel-core 6:
```
function requireReact(module, filename) {
var babel = requires.babel || (requires.babel = require('babel-core'));
var compiled = babel.transformFileSync(filename, { presets: [ 'react' ] }).code;
return module._compile(compiled, filename);
}
exports.requireReact = requireReact;
/**
* Converting a string into a node module.
*/
function requireReactString(src, filename) {
var babel = requires.babel || (requires.babel = require('babel-core'));
if (!filename) filename = '';
var m = new module.constructor();
filename = filename || '';
// Compile Using React
var compiled = babel.transform(src, { presets: [ 'react' ] }).code;
```
More information about the Pkg-javascript-devel
mailing list