Socket
Socket
Sign inDemoInstall

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 0.9.2 to 1.0.0

30

package.json
{
"name": "rollup-plugin-visualizer",
"version": "0.9.2",
"version": "1.0.0",
"main": "plugin.js",

@@ -22,3 +22,3 @@ "author": "Denis Bardadym <bardadymchik@gmail.com>",

"mkdirp": "^0.5.1",
"opn": "^5.3.0",
"opn": "^5.4.0",
"source-map": "^0.7.3",

@@ -28,20 +28,20 @@ "typeface-oswald": "0.0.54"

"peerDependencies": {
"rollup": ">=0.60.0 <1"
"rollup": ">=0.60.0"
},
"devDependencies": {
"bytes": "^3.0.0",
"d3-hierarchy": "^1.1.6",
"d3-scale": "^2.1.0",
"d3-selection": "^1.3.0",
"d3-shape": "^1.0.3",
"eslint": "^4.19.1",
"prettier": "^1.14.2",
"rollup": "^0.64.1",
"rollup-plugin-commonjs": "^9.1.5",
"rollup-plugin-node-resolve": "^3.3.0",
"rollup-plugin-uglify": "^4.0.0"
"bytes": "^3.1.0",
"d3-hierarchy": "^1.1.8",
"d3-scale": "^2.2.2",
"d3-selection": "^1.4.0",
"d3-shape": "^1.3.4",
"eslint": "^5.14.1",
"prettier": "^1.16.4",
"rollup": "^1.2.2",
"rollup-plugin-commonjs": "^9.2.0",
"rollup-plugin-node-resolve": "^4.0.0",
"rollup-plugin-uglify": "^6.0.2"
},
"engines": {
"node": ">=8.3.0"
"node": ">=10"
}
}

@@ -13,19 +13,13 @@ "use strict";

const readFont = (type = 'woff', weight = 700) => {
const fonts = path.join(require.resolve('typeface-oswald'), '../files/');
const readFont = (type = "woff", weight = 700) => {
const fonts = path.join(require.resolve("typeface-oswald"), "../files/");
return fs.readFileSync(path.join(fonts, `./oswald-latin-${weight}.${type}`));
};
const cssString = fs.readFileSync(
path.join(__dirname, "lib", "./style.css"),
"utf8"
);
const jsString = fs.readFileSync(
path.join(__dirname, "lib", "./pluginmain.js"),
"utf8"
);
const cssString = fs.readFileSync(path.join(__dirname, "lib", "./style.css"), "utf8");
const jsString = fs.readFileSync(path.join(__dirname, "lib", "./pluginmain.js"), "utf8");
const fontWeight = 500;
const fontface = buildFontface('Oswald', fontWeight, {
woff: readFont('woff', fontWeight).toString('base64'),
woff2: readFont('woff2', fontWeight).toString('base64')
const fontface = buildFontface("Oswald", fontWeight, {
woff: readFont("woff", fontWeight).toString("base64"),
woff2: readFont("woff2", fontWeight).toString("base64")
});

@@ -41,31 +35,23 @@

const open = !!opts.open;
const openOptions = opts.openOptions || {}
const openOptions = opts.openOptions || {};
return {
generateBundle(outputOptions, outputBundle) {
const promises = Object.keys(outputBundle).map(id => {
const bundle = outputBundle[id];
return Promise.resolve()
.then(() => {
if (useSourceMap) {
return addMinifiedSizesToModules(bundle);
}
})
.then(() => {
const root = buildTree(bundle, useSourceMap);
flattenTree(root);
async generateBundle(outputOptions, outputBundle) {
const roots = [];
return { id, root };
});
});
return Promise.all(promises)
.then(roots => {
const html = buildHtml(title, roots, filename);
return writeFile(filename, html);
})
.then(() => {
if (open) {
return opn(filename, openOptions);
}
});
for (const [id, bundle] of Object.entries(outputBundle)) {
if (bundle.isAsset) continue; //only chunks
if (useSourceMap) {
await addMinifiedSizesToModules(bundle);
}
const root = buildTree(bundle, useSourceMap);
flattenTree(root);
roots.push({ id, root });
}
const html = buildHtml(title, roots, filename);
await writeFile(filename, html);
if (open) {
return opn(filename, openOptions);
}
}

@@ -130,6 +116,5 @@ };

function writeFile(filename, contents) {
return mkdirpAsync(path.dirname(filename)).then(() =>
writeFileAsync(filename, contents)
);
async function writeFile(filename, contents) {
await mkdirpAsync(path.dirname(filename));
return await writeFileAsync(filename, contents);
}

@@ -136,0 +121,0 @@

Sorry, the diff of this file is too big to display

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