Socket
Socket
Sign inDemoInstall

rollup-plugin-filesize

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rollup-plugin-filesize - npm Package Compare versions

Comparing version 9.0.2 to 9.1.0

14

dist/index.js

@@ -74,3 +74,3 @@ 'use strict';

name
} = await new Promise(function (resolve) { resolve(_interopNamespace(require(path.join(process.cwd(), "./package.json")))); });
} = await Promise.resolve().then(function () { return _interopNamespace(require(path.join(process.cwd(), "./package.json"))); });

@@ -104,6 +104,6 @@ try {

info.bundleSize = fileSize(Buffer.byteLength(code), format);
info.brotliSize = showBrotliSize ? fileSize((await brotli(code)), format) : "";
info.brotliSize = showBrotliSize ? fileSize(await brotli(code), format) : "";
if (showMinifiedSize || showGzippedSize) {
const minifiedCode = terser.minify(code).code;
const minifiedCode = (await terser.minify(code)).code;
info.minSize = showMinifiedSize ? fileSize(minifiedCode.length, format) : "";

@@ -115,6 +115,6 @@ info.gzipSize = showGzippedSize ? fileSize(gzip.sync(minifiedCode), format) : "";

info.bundleSizeBefore = fileSize(Buffer.byteLength(codeBefore), format);
info.brotliSizeBefore = showBrotliSize ? fileSize((await brotli(codeBefore)), format) : "";
info.brotliSizeBefore = showBrotliSize ? fileSize(await brotli(codeBefore), format) : "";
if (showMinifiedSize || showGzippedSize) {
const minifiedCode = terser.minify(codeBefore).code;
const minifiedCode = (await terser.minify(codeBefore)).code;
info.minSizeBefore = showMinifiedSize ? fileSize(minifiedCode.length, format) : "";

@@ -146,5 +146,5 @@ info.gzipSizeBefore = showGzippedSize ? fileSize(gzip.sync(minifiedCode), format) : "";

if (reporter === "boxen") {
p = new Promise(function (resolve) { resolve(_interopNamespace(require(path.join(thisDirectory, "/reporters/boxen.js")))); });
p = Promise.resolve().then(function () { return _interopNamespace(require(path.join(thisDirectory, "/reporters/boxen.js"))); });
} else {
p = new Promise(function (resolve) { resolve(_interopNamespace(require(path.resolve(process.cwd(), reporter)))); });
p = Promise.resolve().then(function () { return _interopNamespace(require(path.resolve(process.cwd(), reporter))); });
}

@@ -151,0 +151,0 @@

{
"name": "rollup-plugin-filesize",
"version": "9.0.2",
"version": "9.1.0",
"description": "A rollup plugin to show filesize in the cli",

@@ -48,3 +48,3 @@ "main": "dist/index.js",

"pacote": "^11.1.10",
"terser": "^4.8.0"
"terser": "^5.5.1"
},

@@ -51,0 +51,0 @@ "devDependencies": {

@@ -95,3 +95,3 @@ import { readFile as origReadFile } from "fs";

if (showMinifiedSize || showGzippedSize) {
const minifiedCode = terser.minify(code).code;
const minifiedCode = (await terser.minify(code)).code;
info.minSize = showMinifiedSize

@@ -111,3 +111,3 @@ ? fileSize(minifiedCode.length, format)

if (showMinifiedSize || showGzippedSize) {
const minifiedCode = terser.minify(codeBefore).code;
const minifiedCode = (await terser.minify(codeBefore)).code;
info.minSizeBefore = showMinifiedSize

@@ -114,0 +114,0 @@ ? fileSize(minifiedCode.length, format)

Sorry, the diff of this file is not supported yet

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