Socket
Socket
Sign inDemoInstall

@speedy-js/speedy-plugin-progress

Package Overview
Dependencies
Maintainers
9
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@speedy-js/speedy-plugin-progress - npm Package Compare versions

Comparing version 0.12.1-alpha.4 to 0.12.1-alpha.5

4

.rush/temp/package-deps_build.json

@@ -10,5 +10,5 @@ {

"packages/speedy-plugin-progress/config/rig.json": "4aa0384cd05c15106d3bf196aa45d599c05c71e8",
"packages/speedy-plugin-progress/package.json": "c9a732ebdaaff5c732ecb9ba582bcb2364c7cbba",
"packages/speedy-plugin-progress/package.json": "7abca93be25bb9782099983cae827f404926d345",
"packages/speedy-plugin-progress/scripts/build.ts": "fd2266ed9fcaa0cbf458eff88c5e1b3942094178",
"packages/speedy-plugin-progress/src/index.tsx": "ade35aced5cca467cf9798261a7af35f6f4d9871",
"packages/speedy-plugin-progress/src/index.tsx": "7021ea94584af2ca44d6f21cd82db10fbb899558",
"packages/speedy-plugin-progress/src/progress/bar.ts": "e6130670662e74f030e677099ec9966f5453fc24",

@@ -15,0 +15,0 @@ "packages/speedy-plugin-progress/src/progress/bus.ts": "d455f091566f0dad85ce596127697f804e1a587d",

@@ -16,20 +16,10 @@ "use strict";

const utils_1 = require("./utils");
const crypto_1 = __importDefault(require("crypto"));
const PLUGIN_NAME = 'speedy:progress';
const hash = (s) => {
return crypto_1.default.createHash('md5').update(s).digest('hex');
};
const progressPlugin = (options = {}) => {
let total = 0;
const { id = 'Speedy', quiet = false, quietOnDev = true, clearOnDone = false, ...rest } = options;
/**
* Cache tool files
*/
const totalFilePath = (0, path_1.resolve)(os_1.default.tmpdir(), `./speedy-plugin-progress__${id}`);
try {
total = Number(fs_1.default.readFileSync(totalFilePath));
}
catch (e) {
fs_1.default.writeFileSync(totalFilePath, '0');
}
const progress = {
total,
loaded: 0,
};
return {

@@ -42,2 +32,16 @@ name: PLUGIN_NAME,

return;
/**
* Cache tool files
*/
const totalFilePath = (0, path_1.resolve)(os_1.default.tmpdir(), `./speedy-plugin-progress_${hash(id + '_' + compiler.config.root)}`);
try {
total = Number(fs_1.default.readFileSync(totalFilePath));
}
catch (e) {
fs_1.default.writeFileSync(totalFilePath, '0');
}
const progress = {
total,
loaded: 0,
};
let done = false;

@@ -44,0 +48,0 @@ compiler.hooks.startCompilation.tap(PLUGIN_NAME, () => {

{
"name": "@speedy-js/speedy-plugin-progress",
"version": "0.12.1-alpha.4",
"version": "0.12.1-alpha.5",
"description": "",

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

"@speedy-js/prebundle": "1.0.0",
"@speedy-js/speedy-types": "0.12.1-alpha.4",
"@speedy-js/speedy-types": "0.12.1-alpha.5",
"@speedy-js/eslint-config": "0.0.1",

@@ -25,0 +25,0 @@ "eslint": "7.32.0",

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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