rollup-plugin-visualizer
Advanced tools
Comparing version
# Changelog | ||
## 5.5.3 | ||
* Update dependencies | ||
* Reduce saturation for colors of treemap | ||
## 5.5.2 | ||
@@ -4,0 +9,0 @@ |
@@ -15,3 +15,3 @@ #!/usr/bin/env node | ||
const version_1 = require("../plugin/version"); | ||
const argv = yargs_1.default(helpers_1.hideBin(process.argv)) | ||
const argv = (0, yargs_1.default)((0, helpers_1.hideBin)(process.argv)) | ||
.option("filename", { | ||
@@ -38,3 +38,4 @@ describe: "Output file name", | ||
}) | ||
.help().argv; | ||
.help() | ||
.parseSync(); | ||
const listOfFiles = argv._; | ||
@@ -58,3 +59,3 @@ const runForPluginJson = async ({ title, template, filename }, files) => { | ||
if (data.version !== version_1.version) { | ||
warn_1.warn(`Version in ${file} is not supported (${data.version}). Current version ${version_1.version}. Skipping...`); | ||
(0, warn_1.warn)(`Version in ${file} is not supported (${data.version}). Current version ${version_1.version}. Skipping...`); | ||
continue; | ||
@@ -79,3 +80,3 @@ } | ||
}; | ||
const fileContent = await build_stats_1.buildHtml({ | ||
const fileContent = await (0, build_stats_1.buildHtml)({ | ||
title, | ||
@@ -95,4 +96,4 @@ data, | ||
runForPluginJson(argv, listOfFiles).catch((err) => { | ||
warn_1.warn(err.message); | ||
(0, warn_1.warn)(err.message); | ||
process.exit(1); | ||
}); |
@@ -25,4 +25,4 @@ "use strict"; | ||
const util_1 = require("util"); | ||
const gzip = util_1.promisify(zlib.gzip); | ||
const brotliCompress = util_1.promisify(zlib.brotliCompress); | ||
const gzip = (0, util_1.promisify)(zlib.gzip); | ||
const brotliCompress = (0, util_1.promisify)(zlib.brotliCompress); | ||
const gzipOptions = (options) => ({ | ||
@@ -29,0 +29,0 @@ level: 9, |
@@ -15,3 +15,3 @@ "use strict"; | ||
else { | ||
let newTree = tree.children.find((folder) => folder.name === head && types_1.isModuleTree(folder)); | ||
let newTree = tree.children.find((folder) => folder.name === head && (0, types_1.isModuleTree)(folder)); | ||
if (!newTree) { | ||
@@ -30,3 +30,3 @@ newTree = { name: head, children: [] }; | ||
const name = `${tree.name}/${child.name}`; | ||
if (types_1.isModuleTree(child)) { | ||
if ((0, types_1.isModuleTree)(child)) { | ||
tree.name = name; | ||
@@ -45,3 +45,3 @@ tree.children = child.children; | ||
tree.children = tree.children.map((node) => { | ||
if (types_1.isModuleTree(node)) { | ||
if ((0, types_1.isModuleTree)(node)) { | ||
return mergeSingleChildTrees(node); | ||
@@ -68,3 +68,3 @@ } | ||
tree.children = tree.children.map((node) => { | ||
if (types_1.isModuleTree(node)) { | ||
if ((0, types_1.isModuleTree)(node)) { | ||
return mergeSingleChildTrees(node); | ||
@@ -71,0 +71,0 @@ } |
@@ -31,6 +31,6 @@ "use strict"; | ||
const gzipSizeGetter = gzipSize | ||
? compress_1.createGzipSizeGetter(typeof opts.gzipSize === "object" ? opts.gzipSize : {}) | ||
? (0, compress_1.createGzipSizeGetter)(typeof opts.gzipSize === "object" ? opts.gzipSize : {}) | ||
: defaultSizeGetter; | ||
const brotliSizeGetter = brotliSize | ||
? compress_1.createBrotliSizeGetter(typeof opts.brotliSize === "object" ? opts.brotliSize : {}) | ||
? (0, compress_1.createBrotliSizeGetter)(typeof opts.brotliSize === "object" ? opts.brotliSize : {}) | ||
: defaultSizeGetter; | ||
@@ -64,3 +64,3 @@ const ModuleLengths = async ({ id, renderedLength, code, }) => { | ||
} | ||
const modules = await sourcemap_1.getSourcemapModules(bundleId, bundle, (_b = (_a = outputOptions.dir) !== null && _a !== void 0 ? _a : (outputOptions.file && path_1.default.dirname(outputOptions.file))) !== null && _b !== void 0 ? _b : process.cwd()); | ||
const modules = await (0, sourcemap_1.getSourcemapModules)(bundleId, bundle, (_b = (_a = outputOptions.dir) !== null && _a !== void 0 ? _a : (outputOptions.file && path_1.default.dirname(outputOptions.file))) !== null && _b !== void 0 ? _b : process.cwd()); | ||
const moduleRenderInfo = await Promise.all(Object.values(modules).map(({ id, renderedLength }) => { | ||
@@ -71,7 +71,7 @@ var _a; | ||
})); | ||
tree = data_1.buildTree(bundleId, moduleRenderInfo, mapper); | ||
tree = (0, data_1.buildTree)(bundleId, moduleRenderInfo, mapper); | ||
} | ||
else { | ||
const modules = await Promise.all(Object.entries(bundle.modules).map(([id, { renderedLength, code }]) => ModuleLengths({ id, renderedLength, code }))); | ||
tree = data_1.buildTree(bundleId, modules, mapper); | ||
tree = (0, data_1.buildTree)(bundleId, modules, mapper); | ||
} | ||
@@ -98,5 +98,5 @@ if (tree.children.length === 0) { | ||
continue; //only chunks | ||
data_1.addLinks(bundle.facadeModuleId, this.getModuleInfo.bind(this), mapper); | ||
(0, data_1.addLinks)(bundle.facadeModuleId, this.getModuleInfo.bind(this), mapper); | ||
} | ||
const tree = data_1.mergeTrees(roots); | ||
const tree = (0, data_1.mergeTrees)(roots); | ||
const data = { | ||
@@ -118,3 +118,3 @@ version: version_1.version, | ||
? JSON.stringify(data, null, 2) | ||
: await build_stats_1.buildHtml({ | ||
: await (0, build_stats_1.buildHtml)({ | ||
title, | ||
@@ -127,3 +127,3 @@ data, | ||
if (open) { | ||
await open_1.default(filename, openOptions); | ||
await (0, open_1.default)(filename, openOptions); | ||
} | ||
@@ -130,0 +130,0 @@ }, |
@@ -5,3 +5,3 @@ "use strict"; | ||
const non_secure_1 = require("nanoid/non-secure"); | ||
const nanoid = non_secure_1.customAlphabet("1234567890abcdef", 4); | ||
const nanoid = (0, non_secure_1.customAlphabet)("1234567890abcdef", 4); | ||
const UNIQUE_PREFIX = nanoid(); | ||
@@ -8,0 +8,0 @@ let COUNTER = 0; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.warn = void 0; | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument | ||
const warn = (...args) => console.warn("[rollup-plugin-visualizer]", ...args); | ||
exports.warn = warn; |
{ | ||
"name": "rollup-plugin-visualizer", | ||
"version": "5.5.2", | ||
"version": "5.5.4", | ||
"main": "./dist/plugin/index.js", | ||
@@ -35,6 +35,6 @@ "author": "Denis Bardadym <bardadymchik@gmail.com>", | ||
"dependencies": { | ||
"nanoid": "^3.1.22", | ||
"open": "^7.4.2", | ||
"nanoid": "^3.1.32", | ||
"open": "^8.4.0", | ||
"source-map": "^0.7.3", | ||
"yargs": "^16.2.0" | ||
"yargs": "^17.3.1" | ||
}, | ||
@@ -45,42 +45,41 @@ "peerDependencies": { | ||
"devDependencies": { | ||
"@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.22.0", | ||
"@typescript-eslint/parser": "^4.22.0", | ||
"bytes": "^3.1.0", | ||
"d3-array": "^2.12.1", | ||
"d3-color": "^2.0.0", | ||
"d3-hierarchy": "^2.0.0", | ||
"d3-scale": "^3.3.0", | ||
"d3-shape": "^2.1.0", | ||
"del-cli": "^3.0.1", | ||
"eslint": "^7.25.0", | ||
"@rollup/plugin-commonjs": "^21.0.1", | ||
"@rollup/plugin-node-resolve": "^13.1.3", | ||
"@rollup/plugin-typescript": "^8.3.0", | ||
"@types/bytes": "^3.1.1", | ||
"@types/d3-array": "^3.0.2", | ||
"@types/d3-color": "^3.0.2", | ||
"@types/d3-hierarchy": "^3.0.2", | ||
"@types/d3-scale": "^4.0.2", | ||
"@types/d3-shape": "^3.0.2", | ||
"@types/yargs": "^17.0.8", | ||
"@typescript-eslint/eslint-plugin": "^5.9.1", | ||
"@typescript-eslint/parser": "^5.9.1", | ||
"bytes": "^3.1.1", | ||
"d3-array": "^3.1.1", | ||
"d3-color": "^3.0.1", | ||
"d3-hierarchy": "^3.1.1", | ||
"d3-scale": "^4.0.2", | ||
"d3-shape": "^3.1.0", | ||
"del-cli": "^4.0.1", | ||
"eslint": "^8.6.0", | ||
"eslint-config-prettier": "^8.3.0", | ||
"eslint-plugin-import": "^2.22.1", | ||
"eslint-plugin-prettier": "^3.4.0", | ||
"eslint-plugin-react": "^7.23.2", | ||
"eslint-plugin-react-hooks": "^4.2.0", | ||
"eslint-plugin-import": "^2.25.4", | ||
"eslint-plugin-prettier": "^4.0.0", | ||
"eslint-plugin-react": "^7.28.0", | ||
"eslint-plugin-react-hooks": "^4.3.0", | ||
"npm-run-all": "^4.1.5", | ||
"postcss": "^8.2.13", | ||
"postcss": "^8.4.5", | ||
"postcss-url": "^10.1.3", | ||
"preact": "^10.5.13", | ||
"prettier": "^2.2.1", | ||
"rollup": "^2.46.0", | ||
"rollup-plugin-postcss": "^4.0.0", | ||
"preact": "^10.6.4", | ||
"prettier": "^2.5.1", | ||
"rollup": "^2.64.0", | ||
"rollup-plugin-postcss": "^4.0.2", | ||
"rollup-plugin-terser": "^7.0.2", | ||
"sass": "^1.32.12", | ||
"typescript": "^4.2.4", | ||
"sass": "^1.48.0", | ||
"typescript": "^4.5.4", | ||
"webcola": "^3.4.0" | ||
}, | ||
"engines": { | ||
"node": ">=10.16" | ||
"node": ">=12" | ||
}, | ||
@@ -87,0 +86,0 @@ "keywords": [ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
36
-2.7%1803222
-10.46%11654
-12.44%+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
Updated
Updated
Updated