Comparing version 1.1.4 to 1.2.0
@@ -5,2 +5,18 @@ # Change Log | ||
<a name="1.2.0"></a> | ||
# [1.2.0](https://github.com/nuxt/consola/compare/v1.1.4...v1.2.0) (2018-04-02) | ||
### Features | ||
* **basic:** support additional field ([b50cad8](https://github.com/nuxt/consola/commit/b50cad8)) | ||
* improve packaging ([158e8ef](https://github.com/nuxt/consola/commit/158e8ef)) | ||
### Performance Improvements | ||
* require needed lodash methods only ([91065e4](https://github.com/nuxt/consola/commit/91065e4)) | ||
<a name="1.1.4"></a> | ||
@@ -7,0 +23,0 @@ ## [1.1.4](https://github.com/nuxt/consola/compare/v1.1.3...v1.1.4) (2018-03-31) |
@@ -7,3 +7,3 @@ 'use strict'; | ||
var figures = _interopDefault(require('figures')); | ||
var _ = _interopDefault(require('lodash')); | ||
var startCase = _interopDefault(require('lodash/startCase')); | ||
var env = _interopDefault(require('std-env')); | ||
@@ -240,6 +240,2 @@ | ||
var pad = function pad(str) { | ||
return _.padEnd(str, 9); | ||
}; | ||
var FancyReporter = | ||
@@ -259,3 +255,3 @@ /*#__PURE__*/ | ||
var color = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'blue'; | ||
return chalk['bg' + _.startCase(color)].black(" ".concat(type.toUpperCase(), " ")) + ' '; | ||
return chalk['bg' + startCase(color)].black(" ".concat(type.toUpperCase(), " ")) + ' '; | ||
} | ||
@@ -267,3 +263,3 @@ }, { | ||
var icon = ICONS[type] || ICONS.default; | ||
return chalk[color](pad("".concat(icon, " ").concat(type.toLowerCase()))) + ' '; | ||
return chalk[color]("".concat(icon, " ").concat(type.toLowerCase())) + ' '; | ||
} | ||
@@ -331,2 +327,6 @@ }, { | ||
this.stream.write(l.join(' ') + '\n'); | ||
if (logObj.additional) { | ||
this.stream.write(logObj.additional + '\n'); | ||
} | ||
} | ||
@@ -333,0 +333,0 @@ }]); |
{ | ||
"name": "consola", | ||
"version": "1.1.4", | ||
"version": "1.2.0", | ||
"description": "Elegant Console Logger", | ||
"main": "index.js", | ||
"main": "./dist/consola.cjs.js", | ||
"module": "./src/index.js", | ||
"scripts": { | ||
@@ -7,0 +8,0 @@ "build": "bili", |
@@ -20,3 +20,7 @@ export default class BasicReporter { | ||
this.stream.write(l.join(' ') + '\n') | ||
if (logObj.additional) { | ||
this.stream.write(logObj.additional + '\n') | ||
} | ||
} | ||
} |
import chalk from 'chalk' | ||
import figures from 'figures' | ||
import _ from 'lodash' | ||
import startCase from 'lodash/startCase' | ||
@@ -20,4 +20,2 @@ const NS_SEPERATOR = chalk.blue(figures(' › ')) | ||
const pad = str => _.padEnd(str, 9) | ||
export default class FancyReporter { | ||
@@ -29,3 +27,3 @@ constructor (stream, options = {}) { | ||
formatBadge (type, color = 'blue') { | ||
return chalk['bg' + _.startCase(color)].black(` ${type.toUpperCase()} `) + ' ' | ||
return chalk['bg' + startCase(color)].black(` ${type.toUpperCase()} `) + ' ' | ||
} | ||
@@ -35,3 +33,3 @@ | ||
const icon = ICONS[type] || ICONS.default | ||
return chalk[color](pad(`${icon} ${type.toLowerCase()}`)) + ' ' | ||
return chalk[color](`${icon} ${type.toLowerCase()}`) + ' ' | ||
} | ||
@@ -38,0 +36,0 @@ |
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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
21246
0
575