Socket
Socket
Sign inDemoInstall

rollup-plugin-visualizer

Package Overview
Dependencies
23
Maintainers
1
Versions
105
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.2.2 to 5.0.2

dist/package.json

8

CHANGELOG.md
# Changelog
## 5.0.0
* **Breaking change** Remove support node < 10.16
* **Breaking change** Remove support rollup 1.x (actually some of 1.x will still work, but i officially stop checking)
* **Breaking change** Remove support for `gzipLength` and `brotliLength` for rollup < 2.44. Since 2.44 rollup report renderered module code, which is used to get correct sizes.
* **Breaking change** Change default export
* Migrate plugin to TS, types now included
## 4.2.2

@@ -4,0 +12,0 @@

73

package.json
{
"name": "rollup-plugin-visualizer",
"version": "4.2.2",
"main": "plugin/index.js",
"version": "5.0.2",
"main": "./dist/plugin/index.js",
"author": "Denis Bardadym <bardadymchik@gmail.com>",
"license": "MIT",
"bin": "./bin/cli.js",
"bin": "./dist/bin/cli.js",
"files": [
"bin/*",
"lib/*",
"plugin/*"
"dist"
],

@@ -22,7 +20,15 @@ "repository": {

"scripts": {
"lint": "eslint .",
"build": "node build.js",
"clean": "del-cli lib",
"prepare": "npm run build",
"test": "node build.js --all --e2e && node build.js --all --test"
"lint": "eslint 'plugin/**/*.ts' 'src/**/*.{ts,tsx}'",
"build": "run-p build:*",
"build:plugin": "tsc",
"build:frontend": "node build.js",
"clean": "del-cli dist",
"test": "run-s test:*",
"test:e2e": "node build.js --all --e2e",
"test:test": "node build.js --all --test",
"test:e2e-json": "node build.js --all --e2e --json",
"test:test-json": "node build.js --all --test --json",
"test:e2e-json-sourcemap": "node build.js --all --e2e --json --sourcemap",
"test:test-json-sourcemap": "node build.js --all --test --json --sourcemap",
"test:cli": "node dist/bin/cli.js stats.e2e.json"
},

@@ -36,16 +42,32 @@ "dependencies": {

"peerDependencies": {
"rollup": ">=1.20.0"
"rollup": "^2.0.0"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^17.1.0",
"@rollup/plugin-node-resolve": "^11.2.0",
"@rollup/plugin-commonjs": "^18.0.0",
"@rollup/plugin-node-resolve": "^11.2.1",
"@rollup/plugin-typescript": "^8.2.1",
"@types/bytes": "^3.1.0",
"@types/d3-array": "^2.9.0",
"@types/d3-color": "^2.0.1",
"@types/d3-hierarchy": "^2.0.0",
"@types/d3-scale": "^3.2.2",
"@types/d3-shape": "^2.0.0",
"@types/nanoid": "^2.1.0",
"@types/yargs": "^16.0.1",
"@typescript-eslint/eslint-plugin": "^4.20.0",
"@typescript-eslint/parser": "^4.20.0",
"bytes": "^3.1.0",
"d3-array": "^2.12.0",
"d3-array": "^2.12.1",
"d3-color": "^2.0.0",
"d3-hierarchy": "^2.0.0",
"d3-scale": "^3.2.3",
"d3-scale": "^3.2.4",
"d3-shape": "^2.1.0",
"del-cli": "^3.0.1",
"eslint": "^7.22.0",
"htm": "^3.0.4",
"eslint": "^7.23.0",
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-react": "^7.23.1",
"eslint-plugin-react-hooks": "^4.2.0",
"npm-run-all": "^4.1.5",
"postcss": "^8.2.8",

@@ -55,11 +77,20 @@ "postcss-url": "^10.1.3",

"prettier": "^2.2.1",
"rollup": "^2.42.3",
"rollup": "^2.44.0",
"rollup-plugin-postcss": "^4.0.0",
"rollup-plugin-terser": "^7.0.2",
"sass": "^1.32.8",
"typescript": "^4.2.3",
"webcola": "^3.4.0"
},
"engines": {
"node": ">=10"
}
"node": ">=10.16"
},
"keywords": [
"rollup-plugin",
"visualizer",
"network",
"treemap",
"sunburst",
"diagram"
]
}
# Rollup Plugin Visualizer
[![NPM Version](https://img.shields.io/npm/v/rollup-plugin-visualizer.svg)](https://npmjs.org/package/rollup-plugin-visualizer) [![Travis CI build status](https://img.shields.io/travis/com/btd/rollup-plugin-visualizer.svg)](https://travis-ci.com/btd/rollup-plugin-visualizer)
[![NPM Version](https://img.shields.io/npm/v/rollup-plugin-visualizer.svg)](https://npmjs.org/package/rollup-plugin-visualizer) [![Node.js CI](https://github.com/btd/rollup-plugin-visualizer/actions/workflows/node.js.yml/badge.svg)](https://github.com/btd/rollup-plugin-visualizer/actions/workflows/node.js.yml)

@@ -23,4 +23,16 @@ Visualize and analyze your Rollup bundle to see which modules are taking up space.

## V5 Upgrade
Version V5 contains seveal minor breaking changes, depending your current installation takes such steps for upgrade:
* If you are using rollup v1.x, then you'd better to stay on v4 of plugin. I officially stopped support v1 of rolloup myself. Some versions of 1.x will work without issues, but i stop testing myself or add any changes in this direction. If somebody wants to contibute in this direction - welcome.
* If you use rollup v2.x and use `gzipLength` or `brotliLength`upgrade to rollup 2.44 at least. In V5 i use provided by rollup api to get rendered module code for size estimations, instead of original sources as it was before.
* In all other case just update the plugin.
To upgrade plugin change import/require statement like it is shown in installation section.
## Usage
Es imports:
```javascript

@@ -36,2 +48,14 @@ import visualizer from 'rollup-plugin-visualizer';

Cjs require:
```javascript
const { visulizer } = require('rollup-plugin-visualizer');
//...
plugins: [
visualizer()
],
//...
```
## Options

@@ -47,9 +71,9 @@

`template` (string, default `treemap`) - Which digram type to use: `sunburst`, `treemap`, `network` (very early stage, feedback welcomed)
`template` (string, default `treemap`) - Which diagram type to use: `sunburst`, `treemap`, `network`.
`json` (boolean, default `false`) - Product portable json file that can be used with plugin CLI util to generate graph from several json files. Every UI property ignored in this case.
`json` (boolean, default `false`) - Produce portable json file that can be used with plugin CLI util to generate graph from several json files. Every UI property ignored in this case.
`gzipSize` (boolean, default `false`) - Collect gzip size from source code and display it at chart
`gzipSize` (boolean, default `false`) - Collect gzip size from source code and display it at chart.
`brotliSize` (boolean, default `false`) - Collect brolti size from source code and display it at chart. Only if current node version supports it
`brotliSize` (boolean, default `false`) - Collect brotli size from source code and display it at chart.

@@ -71,3 +95,3 @@ ## CLI

```js
yarn run build
npm run build
```

@@ -83,3 +107,3 @@

- size of files included in source map
- file's path
- file's paths
- files hierarchy (fs tree for your files)

@@ -86,0 +110,0 @@

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