Comparing version 3.12.2 to 3.13.0
@@ -0,1 +1,12 @@ | ||
# [3.13.0](https://github.com/cenk1cenk2/listr2/compare/v3.12.2...v3.13.0) (2021-10-23) | ||
### Bug Fixes | ||
- ditch api-extractor update colorrette ([7ae6752](https://github.com/cenk1cenk2/listr2/commit/7ae6752d7da59e54c28caeb7b3297f1792b0c7c8)) | ||
- pass options to custom logger ([3004640](https://github.com/cenk1cenk2/listr2/commit/30046409eddba749b460d34cd9ef089bfcf300a4)) | ||
### Features | ||
- pass options to the custom logger, implement it with types ([4cecba8](https://github.com/cenk1cenk2/listr2/commit/4cecba8a0b1f3efae5d89d982c67edcc82969218)) | ||
## [3.12.2](https://github.com/cenk1cenk2/listr2/compare/v3.12.1...v3.12.2) (2021-09-23) | ||
@@ -2,0 +13,0 @@ |
@@ -10,27 +10,32 @@ import { ListrRenderer } from '../interfaces/renderer.interface'; | ||
/** renderer options for the verbose renderer */ | ||
static rendererOptions: { | ||
static rendererOptions: ({ | ||
/** | ||
* useIcons instead of text for log level | ||
* @default false | ||
*/ | ||
* useIcons instead of text for log level | ||
* @default false | ||
*/ | ||
useIcons?: boolean; | ||
/** | ||
* inject a custom loger | ||
*/ | ||
logger?: new (...args: any) => Logger; | ||
/** | ||
* log tasks with empty titles | ||
* @default true | ||
*/ | ||
* log tasks with empty titles | ||
* @default true | ||
*/ | ||
logEmptyTitle?: boolean; | ||
/** | ||
* log title changes | ||
* @default true | ||
*/ | ||
* log title changes | ||
* @default true | ||
*/ | ||
logTitleChange?: boolean; | ||
/** | ||
* show duration for all tasks | ||
*/ | ||
* show duration for all tasks | ||
*/ | ||
showTimer?: boolean; | ||
}; | ||
} & { | ||
/** | ||
* inject a custom logger | ||
*/ | ||
logger?: new (...args: any) => Logger; | ||
/** | ||
* inject options to custom logger | ||
*/ | ||
options?: any; | ||
}); | ||
/** per task options for the verbose renderer */ | ||
@@ -37,0 +42,0 @@ static rendererTaskOptions: never; |
@@ -9,11 +9,14 @@ "use strict"; | ||
constructor(tasks, options) { | ||
var _a, _b; | ||
var _a, _b, _c, _d; | ||
this.tasks = tasks; | ||
this.options = options; | ||
if (!((_a = this.options) === null || _a === void 0 ? void 0 : _a.logger)) { | ||
this.logger = new logger_1.Logger({ useIcons: (_b = this.options) === null || _b === void 0 ? void 0 : _b.useIcons }); | ||
} /* istanbul ignore next */ | ||
else { | ||
if (((_a = this.options) === null || _a === void 0 ? void 0 : _a.logger) && ((_b = this.options) === null || _b === void 0 ? void 0 : _b.options)) { | ||
this.logger = new this.options.logger(this.options.options); | ||
} | ||
else if ((_c = this.options) === null || _c === void 0 ? void 0 : _c.logger) { | ||
this.logger = new this.options.logger(); | ||
} | ||
else { | ||
this.logger = new logger_1.Logger({ useIcons: (_d = this.options) === null || _d === void 0 ? void 0 : _d.useIcons }); | ||
} | ||
this.options = { ...VerboseRenderer.rendererOptions, ...this.options }; | ||
@@ -20,0 +23,0 @@ } |
@@ -1,2 +0,3 @@ | ||
import * as colorette from 'colorette'; | ||
export default colorette; | ||
/// <reference types="colorette" /> | ||
declare const _default: import("colorette").Colorette; | ||
export default _default; |
"use strict"; | ||
var _a; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const colorette = require("colorette"); | ||
/* istanbul ignore if */ | ||
if (((_a = process.env) === null || _a === void 0 ? void 0 : _a.LISTR_DISABLE_COLOR) === '1') { | ||
// disable coloring completely | ||
colorette.options.enabled = false; | ||
} | ||
exports.default = colorette; | ||
const colorette_1 = require("colorette"); | ||
exports.default = (0, colorette_1.createColors)({ useColor: ((_a = process.env) === null || _a === void 0 ? void 0 : _a.LISTR_DISABLE_COLOR) !== '1' }); |
{ | ||
"name": "listr2", | ||
"version": "3.12.2", | ||
"version": "3.13.0", | ||
"description": "Terminal task list reborn! Create beautiful CLI interfaces via easy and logical to implement task lists that feel alive and interactive.", | ||
@@ -36,3 +36,3 @@ "license": "MIT", | ||
"prepare-commit-msg": "[ -t 1 ] && exec < /dev/tty && git cz --hook || true", | ||
"pre-push": "yarn test && yarn api-extractor" | ||
"pre-push": "yarn test" | ||
}, | ||
@@ -68,3 +68,3 @@ "lint-staged": { | ||
"cli-truncate": "^2.1.0", | ||
"colorette": "^1.4.0", | ||
"colorette": "^2.0.16", | ||
"log-update": "^4.0.0", | ||
@@ -77,6 +77,5 @@ "p-map": "^4.0.0", | ||
"devDependencies": { | ||
"@cenk1cenk2/cz-cc": "^1.4.6", | ||
"@cenk1cenk2/eslint-config": "^0.4.48", | ||
"@microsoft/api-extractor": "^7.18.10", | ||
"@types/jest": "^27.0.1", | ||
"@cenk1cenk2/cz-cc": "^1.4.7", | ||
"@cenk1cenk2/eslint-config": "^0.4.50", | ||
"@types/jest": "^27.0.2", | ||
"@types/node": "^16.7.8", | ||
@@ -88,7 +87,7 @@ "@types/rewire": "^2.5.28", | ||
"enquirer": "^2.3.6", | ||
"eslint": "^7.32.0", | ||
"jest": "^27.1.0", | ||
"eslint": "^7", | ||
"jest": "^27.2.5", | ||
"jest-mock-process": "^1.4.1", | ||
"lint-staged": "^11.1.2", | ||
"prettier": "^2.3.2", | ||
"lint-staged": "^11.2.4", | ||
"prettier": "^2.4.1", | ||
"rewire": "^5.0.0", | ||
@@ -98,9 +97,9 @@ "rimraf": "^3.0.2", | ||
"ts-jest": "^27.0.5", | ||
"ts-node": "^10.2.1", | ||
"ts-node": "^10.3.0", | ||
"tsc-watch": "^4.5.0", | ||
"tsconfig-paths": "^3.11.0", | ||
"tscpaths": "^0.0.9", | ||
"typedoc": "^0.22.4", | ||
"typedoc-plugin-markdown": "^3.11.0", | ||
"typescript": "^4.4.3" | ||
"typedoc": "^0.22.5", | ||
"typedoc-plugin-markdown": "^3.11.3", | ||
"typescript": "^4.4.4" | ||
}, | ||
@@ -107,0 +106,0 @@ "peerDependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
165447
25
2745
+ Addedcolorette@2.0.20(transitive)
- Removedcolorette@1.4.0(transitive)
Updatedcolorette@^2.0.16