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

webpack-bundle-diff

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webpack-bundle-diff - npm Package Compare versions

Comparing version 1.2.0-alpha.2 to 1.2.0-alpha.3

lib/util/getId.d.ts

8

lib/api/deriveBundleData/deriveChunkGroupData.js

@@ -8,3 +8,5 @@ "use strict";

// Process each named chunk group
for (let chunkGroupName of Object.keys(stats.namedChunkGroups)) {
for (let chunkGroupName of stats.namedChunkGroups instanceof Map
? stats.namedChunkGroups.keys()
: Object.keys(stats.namedChunkGroups)) {
const chunkGroup = stats.namedChunkGroups instanceof Map

@@ -17,5 +19,3 @@ ? stats.namedChunkGroups.get(chunkGroupName)

const chunkGroupAssets = 'pushChunk' in chunkGroup
? chunkGroup
.getFiles()
.map((assetName) => ({
? chunkGroup.getFiles().map((assetName) => ({
name: assetName,

@@ -22,0 +22,0 @@ size: stats.getAsset(assetName).info.size,

@@ -38,3 +38,7 @@ "use strict";

// Precalculate named chunk groups since they are the same for all submodules
const moduleChunks = 'hasReasons' in module ? module.getChunks().map(({ id }) => id) : module.chunks;
const moduleChunks = 'hasReasons' in module
? compilation.chunkGraph
.getModuleChunks(module)
.map(chunk => chunk.id)
: module.chunks;
const namedChunkGroups = ncgLookup.getNamedChunkGroups(moduleChunks);

@@ -41,0 +45,0 @@ if (!module.modules) {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const getModuleName_1 = require("../../../util/getModuleName");
const getId_1 = require("../../../util/getId");
// Helper class to map module IDs to module names

@@ -11,4 +12,4 @@ class ModuleIdToNameMap {

// If the module contains multiple hoisted modules, assume the first one is the primary module
let name = (0, getModuleName_1.getModuleName)(module, stats);
this.map.set(module.id, name);
const name = (0, getModuleName_1.getModuleName)(module, stats);
this.map.set((0, getId_1.getId)(module, stats), name);
}

@@ -15,0 +16,0 @@ }

{
"name": "webpack-bundle-diff",
"version": "1.2.0-alpha.2",
"version": "1.2.0-alpha.3",
"description": "Understand changes in webpack bundle size",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

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