@jimdo/webpack-stats-diff
Advanced tools
Comparing version 1.0.2 to 1.0.3
{ | ||
"name": "@jimdo/webpack-stats-diff", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Diffs two webpack stats outputs (e.g. via [stats-webpack-plugin](https://www.npmjs.com/package/stats-webpack-plugin)) and gives back an object with file size changes in a human readable format", | ||
@@ -5,0 +5,0 @@ "bin": { |
@@ -6,3 +6,2 @@ const path = require('path'); | ||
const isSourcemap = /\.map$/; | ||
const threshold = 4000; | ||
@@ -45,12 +44,2 @@ function mapStatsToEntriesWithSize(assets) { | ||
function filterIrrelevant(diff) { | ||
return Object.keys(diff).reduce((mem, asset) => { | ||
if (Math.abs(diff[asset]) < threshold) { | ||
return mem; | ||
} | ||
mem[asset] = diff[asset]; | ||
return mem; | ||
}, {}); | ||
} | ||
module.exports = function (base, changed) { | ||
@@ -66,5 +55,3 @@ const resultBase = mapStatsToEntriesWithSize(base.assets); | ||
return filterIrrelevant( | ||
diffToFileSizeChange(diff) | ||
); | ||
return diffToFileSizeChange(diff); | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3728
67