Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vite-plugin-progress

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-plugin-progress - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

19

dist/index.js

@@ -51,5 +51,6 @@ var __create = Object.create;

var filePath = import_path.default.join(dirPath, "index.json");
var isExists = import_fs.default.existsSync(filePath) || false;
var isFileExists = import_fs.default.existsSync(filePath) || false;
var isDirExists = import_fs.default.existsSync(dirPath) || false;
var getCacheData = () => {
if (!isExists)
if (!isFileExists)
return {

@@ -62,3 +63,3 @@ cacheTransformCount: 0,

var setCacheData = (data) => {
!isExists && import_fs.default.mkdirSync(dirPath);
!isDirExists && import_fs.default.mkdirSync(dirPath);
import_fs.default.writeFileSync(filePath, JSON.stringify(data));

@@ -95,4 +96,4 @@ };

options.total = (options == null ? void 0 : options.total) || 100;
const transforming = isExists ? `${import_picocolors.default.magenta("Transforms:")} :transformCur/:transformTotal | ` : "";
const chunks = isExists ? `${import_picocolors.default.magenta("Chunks:")} :chunkCur/:chunkTotal | ` : "";
const transforming = isFileExists ? `${import_picocolors.default.magenta("Transforms:")} :transformCur/:transformTotal | ` : "";
const chunks = isFileExists ? `${import_picocolors.default.magenta("Chunks:")} :chunkCur/:chunkTotal | ` : "";
const barText = `${import_picocolors.default.cyan(`[:bar]`)}`;

@@ -102,3 +103,3 @@ const barFormat = options.format || `${import_picocolors.default.green("Building")} ${barText} :percent | ${transforming}${chunks}Time: :elapseds`;

bar = new import_progress.default(barFormat, options);
if (!isExists) {
if (!isFileExists) {
const readDir = import_rd.default.readSync(options.srcDir || "src");

@@ -112,3 +113,3 @@ const reg = /\.(vue|ts|js|jsx|tsx|css|scss||sass|styl|less)$/gi;

transformCount++;
if (!isExists) {
if (!isFileExists) {
const reg = /node_modules/gi;

@@ -124,3 +125,3 @@ if (!reg.test(id) && percent < 0.25) {

}
if (isExists)
if (isFileExists)
runCachedData();

@@ -141,3 +142,3 @@ bar.update(lastPercent, {

if (lastPercent <= 0.95)
isExists ? runCachedData() : lastPercent = +(lastPercent + 5e-3).toFixed(4);
isFileExists ? runCachedData() : lastPercent = +(lastPercent + 5e-3).toFixed(4);
bar.update(lastPercent, {

@@ -144,0 +145,0 @@ transformTotal: cacheTransformCount,

{
"name": "vite-plugin-progress",
"version": "0.0.6",
"version": "0.0.7",
"description": "A progress bar plugin for Vite.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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