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

@betterer/tasks

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@betterer/tasks - npm Package Compare versions

Comparing version 5.3.4 to 5.3.6

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

## [5.3.6](https://github.com/phenomnomnominal/betterer/compare/v5.3.5...v5.3.6) (2022-05-20)
**Note:** Version bump only for package @betterer/tasks
## [5.3.4](https://github.com/phenomnomnominal/betterer/compare/v5.3.3...v5.3.4) (2022-05-12)

@@ -8,0 +16,0 @@

@@ -30,2 +30,8 @@ /// <reference types="react" />

done?: BettererTasksDone;
/**
* Whether the running time should be rendered.
*
* @defaultValue `true`
*/
timer?: boolean;
}

@@ -32,0 +38,0 @@ /**

7

dist/tasks/TasksLogger.js

@@ -13,5 +13,5 @@ "use strict";

exports.BettererTasksLogger = (0, render_1.memo)(function BettererTasksLogger(props) {
const { children, done = () => void 0, exit = true, name, update = defaultUpdate } = props;
const { children, done = () => void 0, exit = true, name, update = defaultUpdate, timer = true } = props;
const app = (0, render_1.useApp)();
const [time, clear] = (0, useTimer_1.useTimer)();
const [time, clear] = (0, useTimer_1.useTimer)(timer);
const [state, tasks] = (0, useTasksState_1.useTasksState)();

@@ -39,5 +39,6 @@ const { startTime, endTime, errors } = state;

}
const label = timer ? ` (${getTime(startTime, endTime || time)}ms)` : '';
return (render_1.React.createElement(useTasksState_1.BettererTasksContext.Provider, { value: [state, tasks] },
render_1.React.createElement(render_1.Box, { flexDirection: "column" },
render_1.React.createElement(status_1.BettererTaskStatus, { name: `${name} (${getTime(startTime, endTime || time)}ms)`, status: status }),
render_1.React.createElement(status_1.BettererTaskStatus, { name: `${name}${label}`, status: status }),
children)));

@@ -44,0 +45,0 @@ });

export declare type BettererTimerClear = () => void;
export declare function useTimer(): [number, BettererTimerClear];
export declare function useTimer(enable?: boolean): [number, BettererTimerClear];
//# sourceMappingURL=useTimer.d.ts.map

@@ -7,3 +7,3 @@ "use strict";

const DEFAULT_TASK_TIME_INTERVAL = 100;
function useTimer() {
function useTimer(enable = true) {
const timer = (0, render_1.useRef)(null);

@@ -20,3 +20,3 @@ const [time, setTime] = (0, render_1.useState)((0, utils_1.getPreciseTime)());

(0, render_1.useEffect)(() => {
if (process.env.CI) {
if (!enable) {
return;

@@ -23,0 +23,0 @@ }

{
"name": "@betterer/tasks",
"description": "task runner and loggerr for @betterer/betterer",
"version": "5.3.4",
"version": "5.3.6",
"license": "MIT",

@@ -37,3 +37,3 @@ "publishConfig": {

},
"gitHead": "25ae48d13d82cb5212736ce28693b142a5be6666"
"gitHead": "786a4554ba36c016b11d18747daf4bb1a6c6bb63"
}

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