Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@jimdo/webpack-stats-diff

Package Overview
Dependencies
Maintainers
4
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jimdo/webpack-stats-diff - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

2

package.json
{
"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);
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc