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 4.1.1 to 4.1.2

4

CHANGELOG.md
# Changelog
## 4.1.2
* Updat deps, drop pupa because it has not stated breaking change
## 4.1.1

@@ -4,0 +8,0 @@

19

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

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

"open": "^7.0.3",
"pupa": "^2.0.0",
"source-map": "^0.7.3",
"yargs": "^15.0.0"
"yargs": "^16.0.3"
},

@@ -40,9 +39,9 @@ "peerDependencies": {

"devDependencies": {
"@rollup/plugin-commonjs": "^15.0.0",
"@rollup/plugin-commonjs": "^15.1.0",
"@rollup/plugin-node-resolve": "^9.0.0",
"bytes": "^3.1.0",
"d3-array": "^2.2.0",
"d3-array": "^2.8.0",
"d3-color": "^2.0.0",
"d3-hierarchy": "^2.0.0",
"d3-scale": "^3.0.0",
"d3-scale": "^3.2.3",
"d3-shape": "^2.0.0",

@@ -53,8 +52,8 @@ "del-cli": "^3.0.0",

"postcss-url": "^8.0.0",
"preact": "^10.3.3",
"preact": "^10.5.3",
"prettier": "^2.0.1",
"rollup": "^2.0.6",
"rollup-plugin-postcss": "^3.1.1",
"rollup-plugin-terser": "^7.0.0",
"sass": "^1.22.7",
"rollup-plugin-postcss": "^3.1.8",
"rollup-plugin-terser": "^7.0.2",
"sass": "^1.22.11",
"webcola": "^3.4.0"

@@ -61,0 +60,0 @@ },

@@ -5,7 +5,51 @@ "use strict";

const path = require("path");
const pupa = require("pupa");
const htmlEscape = (string) =>
string
.replace(/&/g, "&amp;")
.replace(/"/g, "&quot;")
.replace(/'/g, "&#39;")
.replace(/</g, "&lt;")
.replace(/>/g, "&gt;");
const buildHtmlTemplate = ({ title, script, nodesData, style }) =>
`
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>${htmlEscape(title)}</title>
<style>
${style}
</style>
</head>
<body>
<main></main>
<script>
/*<!--*/
${script}
/*-->*/
</script>
<script>
/*<!--*/
const data = ${nodesData};
document.addEventListener('DOMContentLoaded', () => {
const width = window.innerWidth;
const height = window.innerHeight;
const chartNode = document.querySelector("main");
drawChart(chartNode, data, width, height);
});
/*-->*/
</script>
</body>
</html>
`;
module.exports = async function buildHtml({ title, data, template }) {
const [templateString, script, style] = await Promise.all([
fs.readFile(path.join(__dirname, "stats.template"), "utf-8"),
const [script, style] = await Promise.all([
fs.readFile(path.join(__dirname, "..", "lib", `${template}.js`), "utf8"),

@@ -15,3 +59,3 @@ fs.readFile(path.join(__dirname, "..", "lib", `${template}.css`), "utf8"),

return pupa(templateString, {
return buildHtmlTemplate({
title,

@@ -18,0 +62,0 @@ style,

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

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

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