@architect/utils
Advanced tools
Comparing version 2.1.0-RC.0 to 2.1.0
@@ -14,3 +14,3 @@ # Architect Utils changelog | ||
- Added `updater.get()`, which returns the captured log buffer | ||
- Added `updater.reset()` to clear the captured log buffer | ||
- Added `updater.reset()` (and `updater.clear()` alias) to clear the captured log buffer | ||
@@ -17,0 +17,0 @@ --- |
{ | ||
"name": "@architect/utils", | ||
"version": "2.1.0-RC.0", | ||
"version": "2.1.0", | ||
"description": "Common utility functions", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
let chalk = require('chalk') | ||
let { printer } = require('./lib') | ||
let methods = require('./methods') | ||
let data = '' | ||
@@ -36,3 +35,2 @@ /** | ||
let params = { | ||
data, | ||
isCI, | ||
@@ -70,3 +68,4 @@ logLevel, | ||
get: methods.get.bind({}, {}, params), | ||
reset: methods.reset.bind({}, params), | ||
reset: methods.reset, | ||
clear: methods.reset, | ||
verbose: updaters.verbose, | ||
@@ -73,0 +72,0 @@ debug: updaters.debug, |
@@ -5,2 +5,3 @@ let chalk = require('chalk') | ||
let { frames, timing } = spinner | ||
let data = [] | ||
@@ -14,5 +15,3 @@ function log (args, params, output, options = {}) { | ||
function append () { | ||
if (!output) return | ||
let moar = params.data.length ? `\n${output}` : output | ||
params.data += moar | ||
if (output) data.push(output) | ||
} | ||
@@ -116,8 +115,8 @@ | ||
function get (args, params) { | ||
return params.data | ||
function get () { | ||
return data.length ? data.join('\n') : '' | ||
} | ||
function reset (params) { | ||
params.data = '' | ||
function reset () { | ||
data = [] | ||
} | ||
@@ -124,0 +123,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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
45400
615