[Pkg-javascript-devel] Bug#977962: Bug#977962: webpack: mkdirp > 1 patch seems broken
Xavier
yadd at debian.org
Wed Dec 23 13:02:29 GMT 2020
Control: severity -1 important
Control: retitle -1 node-compression-webpack-plugin: enable test
Le 23/12/2020 à 13:27, Pirate Praveen a écrit :
> Package: webpack,node-compression-webpack-plugin
> Version: 4.43.0-6
> Severity: serious
>
> To reproduce this issue,
>
> run
> jest --ci test/CompressionPlugin.test.js
>
> in node-compression-webpack-plugin
>
> ● CompressionPlugin › should work and show compress assets in stats
>
> TypeError: callback must be a function
>
> 491 | if (err) return callback(err);
> 492 | outputPath = compilation.getPath(this.outputPath);
> > 493 | this.outputFileSystem.mkdirp(outputPath).then(() =>
> {emitFiles()}).catch(er => {throw er});
> | ^
> 494 | });
> 495 | }
> 496 |
>
> at validateCallback (node_modules/memfs/lib/volume.js:199:15)
> at Volume.mkdirp (node_modules/memfs/lib/volume.js:1579:24)
> at ../../../../../usr/share/nodejs/webpack/lib/Compiler.js:493:26
> at eval (eval at create
> (../../../../../usr/share/nodejs/tapable/lib/HookCodeFactory.js:24:12),
> <anonymous>:8:1)
>
> It is also possible a bug in node-compression-webpack-plugin/memfs
> module (this should be added as a test only component, I have not
> committed this to repo as the tests are failing still). memfs does not
> have any dependency on mkdirp hence I think the bug is in webpack.
The bug is that memfs adds hooks to simulate a filesystem and overrides
webpack/mkdirp calls, simulating mkdirp 0.53.
You can fix this in memfs to return a promise instead of waiting for a
callback
Cheers,
Xavier
More information about the Pkg-javascript-devel
mailing list