Closed uorbe001 closed 5 years ago
Could you add test please
@TrySound how do you suggest I write a test for it? The only change here is that this.worker.transform
doesn't receive the offending params, and that object is instantiated by the index itself. The only way I can think of to test that properly would be to refactor the minifiedOptions
out of the index and test that independently.
In terms of the params being sent to uglify being correct, the pre-existing tests should ensure that. I would even argue that "allow to disable source maps" covers this change, as it was failing before it.
serialize-javascript upgrade in master gave me failing test. Please upgrade to get this change covered.
Extracted the normalize in order to add a test for it, and upgraded serialize-javascript to 1.9.0.
Great! Thank you
Published 6.0.3
Also I recommend to use rollup-plugin-terser instead.
At some point today, our builds started failing with a sourcemap error from this lib. Running the tests here makes it replicable:
This fixes the error by rejecting the option uglify is now rejecting before the whole thing crashes. I have no idea what's changed today, as the option rejection has been in uglify for ages: https://github.com/mishoo/UglifyJS2/blob/v3.6.0/lib/utils.js#L93