@rushstack/node-core-library
Advanced tools
Comparing version 3.39.1 to 3.40.0
@@ -5,2 +5,14 @@ { | ||
{ | ||
"version": "3.40.0", | ||
"tag": "@rushstack/node-core-library_v3.40.0", | ||
"date": "Wed, 11 Aug 2021 00:07:21 GMT", | ||
"comments": { | ||
"minor": [ | ||
{ | ||
"comment": "Add new Terminal message severity \"debug\", below verbose." | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"version": "3.39.1", | ||
@@ -7,0 +19,0 @@ "tag": "@rushstack/node-core-library_v3.39.1", |
# Change Log - @rushstack/node-core-library | ||
This log was last generated on Mon, 12 Jul 2021 23:08:26 GMT and should not be manually modified. | ||
This log was last generated on Wed, 11 Aug 2021 00:07:21 GMT and should not be manually modified. | ||
## 3.40.0 | ||
Wed, 11 Aug 2021 00:07:21 GMT | ||
### Minor changes | ||
- Add new Terminal message severity "debug", below verbose. | ||
## 3.39.1 | ||
@@ -6,0 +13,0 @@ Mon, 12 Jul 2021 23:08:26 GMT |
@@ -8,5 +8,5 @@ // This file is read by tools that parse documentation comments conforming to the TSDoc standard. | ||
"packageName": "@microsoft/api-extractor", | ||
"packageVersion": "7.16.1" | ||
"packageVersion": "7.18.2" | ||
} | ||
] | ||
} |
@@ -9,5 +9,11 @@ import { ITerminalProvider, TerminalProviderSeverity } from './ITerminalProvider'; | ||
/** | ||
* If true, print verbose logging messages | ||
* If true, print verbose logging messages. | ||
*/ | ||
verboseEnabled: boolean; | ||
/** | ||
* If true, print debug logging messages. Note that "verbose" and "debug" are considered | ||
* separate message filters; if you want debug to imply verbose, it is up to your | ||
* application code to enforce that. | ||
*/ | ||
debugEnabled: boolean; | ||
} | ||
@@ -25,2 +31,6 @@ /** | ||
verboseEnabled: boolean; | ||
/** | ||
* If true, debug-level messages should be written to the console. | ||
*/ | ||
debugEnabled: boolean; | ||
constructor(options?: Partial<IConsoleTerminalProviderOptions>); | ||
@@ -27,0 +37,0 @@ /** |
@@ -21,3 +21,8 @@ "use strict"; | ||
this.verboseEnabled = false; | ||
/** | ||
* If true, debug-level messages should be written to the console. | ||
*/ | ||
this.debugEnabled = false; | ||
this.verboseEnabled = !!options.verboseEnabled; | ||
this.debugEnabled = !!options.debugEnabled; | ||
} | ||
@@ -40,2 +45,8 @@ /** | ||
} | ||
case ITerminalProvider_1.TerminalProviderSeverity.debug: { | ||
if (this.debugEnabled) { | ||
process.stdout.write(data); | ||
} | ||
break; | ||
} | ||
case ITerminalProvider_1.TerminalProviderSeverity.log: | ||
@@ -42,0 +53,0 @@ default: { |
/** | ||
* Similar to many popular logging packages, terminal providers support a range of message | ||
* severities. These severities have built-in formatting defaults in the Terminal object | ||
* (warnings are yellow, errors are red, etc.). | ||
* | ||
* Terminal providers may choose to suppress certain messages based on their severity, | ||
* or to route some messages to other providers or not based on severity. | ||
* | ||
* Severity | Purpose | ||
* --------- | ------- | ||
* error | Build errors and fatal issues | ||
* warning | Not necessarily fatal, but indicate a problem the user should fix | ||
* log | Informational messages | ||
* verbose | Additional information that may not always be necessary | ||
* debug | Highest detail level, best used for troubleshooting information | ||
* | ||
* @beta | ||
@@ -8,3 +23,4 @@ */ | ||
error = 2, | ||
verbose = 3 | ||
verbose = 3, | ||
debug = 4 | ||
} | ||
@@ -35,3 +51,3 @@ /** | ||
* route different kinds of messages to different streams and may choose | ||
* to ignore verbose messages. | ||
* to ignore verbose or debug messages. | ||
*/ | ||
@@ -38,0 +54,0 @@ write(data: string, severity: TerminalProviderSeverity): void; |
@@ -7,2 +7,17 @@ "use strict"; | ||
/** | ||
* Similar to many popular logging packages, terminal providers support a range of message | ||
* severities. These severities have built-in formatting defaults in the Terminal object | ||
* (warnings are yellow, errors are red, etc.). | ||
* | ||
* Terminal providers may choose to suppress certain messages based on their severity, | ||
* or to route some messages to other providers or not based on severity. | ||
* | ||
* Severity | Purpose | ||
* --------- | ------- | ||
* error | Build errors and fatal issues | ||
* warning | Not necessarily fatal, but indicate a problem the user should fix | ||
* log | Informational messages | ||
* verbose | Additional information that may not always be necessary | ||
* debug | Highest detail level, best used for troubleshooting information | ||
* | ||
* @beta | ||
@@ -16,3 +31,4 @@ */ | ||
TerminalProviderSeverity[TerminalProviderSeverity["verbose"] = 3] = "verbose"; | ||
TerminalProviderSeverity[TerminalProviderSeverity["debug"] = 4] = "debug"; | ||
})(TerminalProviderSeverity = exports.TerminalProviderSeverity || (exports.TerminalProviderSeverity = {})); | ||
//# sourceMappingURL=ITerminalProvider.js.map |
@@ -24,2 +24,3 @@ import { ITerminalProvider, TerminalProviderSeverity } from './ITerminalProvider'; | ||
private _verboseBuffer; | ||
private _debugBuffer; | ||
private _warningBuffer; | ||
@@ -50,2 +51,6 @@ private _errorBuffer; | ||
/** | ||
* Get everything that has been written at debug-level severity. | ||
*/ | ||
getDebugOutput(options?: IStringBufferOutputOptions): string; | ||
/** | ||
* Get everything that has been written at error-level severity. | ||
@@ -52,0 +57,0 @@ */ |
@@ -21,2 +21,3 @@ "use strict"; | ||
this._verboseBuffer = new StringBuilder_1.StringBuilder(); | ||
this._debugBuffer = new StringBuilder_1.StringBuilder(); | ||
this._warningBuffer = new StringBuilder_1.StringBuilder(); | ||
@@ -43,2 +44,6 @@ this._errorBuffer = new StringBuilder_1.StringBuilder(); | ||
} | ||
case ITerminalProvider_1.TerminalProviderSeverity.debug: { | ||
this._debugBuffer.append(data); | ||
break; | ||
} | ||
case ITerminalProvider_1.TerminalProviderSeverity.log: | ||
@@ -76,2 +81,8 @@ default: { | ||
/** | ||
* Get everything that has been written at debug-level severity. | ||
*/ | ||
getDebugOutput(options) { | ||
return this._normalizeOutput(this._debugBuffer.toString(), options); | ||
} | ||
/** | ||
* Get everything that has been written at error-level severity. | ||
@@ -78,0 +89,0 @@ */ |
@@ -63,2 +63,10 @@ import { ITerminalProvider } from './ITerminalProvider'; | ||
writeVerboseLine(...messageParts: (string | IColorableSequence)[]): void; | ||
/** | ||
* Write a debug-level message. | ||
*/ | ||
writeDebug(...messageParts: (string | IColorableSequence)[]): void; | ||
/** | ||
* Write a debug-level message followed by a newline. | ||
*/ | ||
writeDebugLine(...messageParts: (string | IColorableSequence)[]): void; | ||
private _writeSegmentsToProviders; | ||
@@ -65,0 +73,0 @@ private _serializeFormattableTextSegments; |
@@ -98,2 +98,14 @@ "use strict"; | ||
} | ||
/** | ||
* Write a debug-level message. | ||
*/ | ||
writeDebug(...messageParts) { | ||
this._writeSegmentsToProviders(messageParts, ITerminalProvider_1.TerminalProviderSeverity.debug); | ||
} | ||
/** | ||
* Write a debug-level message followed by a newline. | ||
*/ | ||
writeDebugLine(...messageParts) { | ||
this.writeDebug(...messageParts, Colors_1.eolSequence); | ||
} | ||
_writeSegmentsToProviders(segments, severity) { | ||
@@ -100,0 +112,0 @@ const withColorText = {}; |
@@ -77,4 +77,5 @@ "use strict"; | ||
return os.EOL; | ||
default: | ||
throw new Error('Unsupported newline kind'); | ||
} | ||
throw new Error('Unsupported newline kind'); | ||
} | ||
@@ -81,0 +82,0 @@ /** |
{ | ||
"name": "@rushstack/node-core-library", | ||
"version": "3.39.1", | ||
"version": "3.40.0", | ||
"description": "Core libraries that every NodeJS toolchain project should use", | ||
@@ -24,4 +24,4 @@ "main": "lib/index.js", | ||
"@rushstack/eslint-config": "2.4.0", | ||
"@rushstack/heft": "0.32.0", | ||
"@rushstack/heft-node-rig": "1.0.31", | ||
"@rushstack/heft": "0.34.6", | ||
"@rushstack/heft-node-rig": "1.1.11", | ||
"@types/fs-extra": "7.0.0", | ||
@@ -28,0 +28,0 @@ "@types/heft-jest": "1.0.1", |
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
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
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
966917
13558