Socket
Socket
Sign inDemoInstall

webpack-bundle-size-analyzer

Package Overview
Dependencies
3
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.1 to 2.0.2

14

build/size_tree.js

@@ -34,2 +34,6 @@ /// <reference path="typings/typings.d.ts" />

var child = childrenBySize[_i];
++includedCount;
var percentage = ((child.size / totalSize) * 100).toPrecision(3);
outputFn("" + prefix + child.packageName + ": " + filesize(child.size) + " (" + percentage + "%)");
printDependencySizeTree(child, depth + 1, outputFn);
remainder -= child.size;

@@ -39,9 +43,7 @@ if (remainder < 0.01 * totalSize) {

}
++includedCount;
var percentage_1 = ((child.size / totalSize) * 100).toPrecision(3);
outputFn("" + prefix + child.packageName + ": " + filesize(child.size) + " (" + percentage_1 + "%)");
printDependencySizeTree(child, depth + 1, outputFn);
}
var percentage = ((remainder / totalSize) * 100).toPrecision(3);
outputFn(prefix + "<self>: " + filesize(remainder) + " (" + percentage + "%)");
if (depth === 0 || remainder !== totalSize) {
var percentage = ((remainder / totalSize) * 100).toPrecision(3);
outputFn(prefix + "<self>: " + filesize(remainder) + " (" + percentage + "%)");
}
}

@@ -48,0 +50,0 @@ exports.printDependencySizeTree = printDependencySizeTree;

@@ -20,3 +20,3 @@ /// <reference path="../typings/typings.d.ts" />

size_tree.printDependencySizeTree(depsTree[0], 0, function (line) { return output += '\n' + line; });
chai_1.expect(output).to.equal("\nmarked: 27.53 kB (14.9%)\n <self>: 27.53 kB (100%)\nlru-cache: 6.29 kB (3.40%)\n <self>: 6.29 kB (100%)\nstyle-loader: 717 B (0.379%)\n <self>: 717 B (100%)\n<self>: 150.33 kB (81.3%)");
chai_1.expect(output).to.equal("\nmarked: 27.53 KB (14.9%)\nlru-cache: 6.29 KB (3.40%)\nstyle-loader: 717 B (0.379%)\n<self>: 150.33 KB (81.3%)");
});

@@ -23,0 +23,0 @@ it('should print the bundle name', function () {

@@ -0,1 +1,6 @@

## 2.0.2
- Fixed issue with package sizes not being output if a bundle had
very small dependencies (#15).
## 2.0.0

@@ -2,0 +7,0 @@

{
"name": "webpack-bundle-size-analyzer",
"version": "2.0.1",
"version": "2.0.2",
"description": "A utility to find how your dependencies are contributing to the size of your Webpack bundles",

@@ -5,0 +5,0 @@ "main": "build/size_tree.js",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc