Socket
Socket
Sign inDemoInstall

webpack-bundle-analyzer

Package Overview
Dependencies
Maintainers
4
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webpack-bundle-analyzer - npm Package Compare versions

Comparing version 4.10.1 to 4.10.2

4

lib/analyzer.js

@@ -26,3 +26,3 @@ "use strict";

const FILENAME_QUERY_REGEXP = /\?.*$/u;
const FILENAME_EXTENSIONS = /\.(js|mjs)$/iu;
const FILENAME_EXTENSIONS = /\.(js|mjs|cjs)$/iu;
module.exports = {

@@ -61,3 +61,3 @@ getViewerData,

});
} // Picking only `*.js or *.mjs` assets from bundle that has non-empty `chunks` array
} // Picking only `*.js, *.cjs or *.mjs` assets from bundle that has non-empty `chunks` array

@@ -64,0 +64,0 @@

@@ -14,6 +14,2 @@ "use strict";

const {
isPlainObject
} = require('is-plain-object');
const {
bold

@@ -207,5 +203,7 @@ } = require('picocolors');

chartData = null;
}
} // chartData can either be an array (bundleInfo[]) or null. It can't be an plain object anyway
if (isPlainObject(chartData) && Object.keys(chartData).length === 0) {
if ( // analyzer.getViewerData() doesn't failed in the previous step
chartData && !Array.isArray(chartData)) {
logger.error("Could't find any javascript bundles in provided stats file");

@@ -219,7 +217,7 @@ chartData = null;

function getEntrypoints(bundleStats) {
if (bundleStats === null || bundleStats === undefined) {
if (bundleStats === null || bundleStats === undefined || !bundleStats.entrypoints) {
return [];
}
return Object.values(bundleStats.entrypoints || {}).map(entrypoint => entrypoint.name);
return Object.values(bundleStats.entrypoints).map(entrypoint => entrypoint.name);
}
{
"name": "webpack-bundle-analyzer",
"version": "4.10.1",
"version": "4.10.2",
"description": "Webpack plugin and CLI utility that represents bundle content as convenient interactive zoomable treemap",

@@ -44,3 +44,2 @@ "author": "Yury Grunin <grunin.ya@ya.ru>",

"html-escaper": "^2.0.2",
"is-plain-object": "^5.0.0",
"opener": "^1.5.2",

@@ -47,0 +46,0 @@ "picocolors": "^1.0.0",

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