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

rollup-plugin-visualizer

Package Overview
Dependencies
Maintainers
1
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rollup-plugin-visualizer - npm Package Compare versions

Comparing version 3.3.0 to 3.3.1

CHANGELOG.md

2

package.json
{
"name": "rollup-plugin-visualizer",
"version": "3.3.0",
"version": "3.3.1",
"main": "plugin/index.js",

@@ -5,0 +5,0 @@ "author": "Denis Bardadym <bardadymchik@gmail.com>",

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

if (mod.renderedLength === 0) {
continue;
}
const nodeData = { uid };

@@ -117,3 +113,3 @@

const mod = mapper.getValue(moduleUid, { size: 0 });
const mod = mapper.getValue(moduleUid, { renderedLength: 0 });

@@ -120,0 +116,0 @@ const info = getModuleInfo(moduleId);

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

const warn = require("./warn");
const { createGzipSizeGetter } = require("./compress");

@@ -56,5 +57,20 @@ const WARN_SOURCEMAP_DISABLED =

const gzipSize = !!opts.gzipSize;
const additionalFilesInfo = new Map();
const gzipSizeGetter = gzipSize
? createGzipSizeGetter(typeof opts.gzipSize === "object" ? gzipSize : {})
: null;
return {
name: "visualizer",
async transform(code, id) {
const info = {};
if (gzipSize) {
info.gzipLength = await gzipSizeGetter(code);
}
additionalFilesInfo.set(id, info);
return null;
},
async generateBundle(outputOptions, outputBundle) {

@@ -106,5 +122,14 @@ if (opts.sourcemap && !outputOptions.sourcemap) {

const tree = mergeTrees(roots);
const { nodes, nodeIds } = mapper;
for (const [id, uid] of Object.entries(nodeIds)) {
if (nodes[uid]) {
nodes[uid] = {
...nodes[uid],
...(additionalFilesInfo.get(id) || {})
};
} else {
this.warn(`Could not find mapping for node ${id} ${uid}`);
}
}
const { nodes, nodeIds } = mapper;
removeCommonPrefix(nodes, nodeIds);

@@ -120,2 +145,4 @@

const tree = mergeTrees(roots);
const data = { version: JSON_VERSION, tree, nodes, links };

@@ -122,0 +149,0 @@

@@ -84,8 +84,6 @@ # Rollup Plugin Visualizer

v1 -> v2: For v2 was a lot of internal changes, but external interface has not changed.
See CHANGELOG.md.
V2 -> V3: `template` now by default `treemap`, `bundlesRelative` was removed as it is always default behaviour.
## Acknowledgements
Initially this plugin was based on `webpack-visualizer`, but in the end used only styles and layout. Thanks to the tons of people around internet for great examples of d3 usage. Also i would like to thank you Mike Bostock for awesome D3, and tons of examples.
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