diff --git a/common/changes/@microsoft/rush/main_2026-01-04-02-58.json b/common/changes/@microsoft/rush/main_2026-01-04-02-58.json new file mode 100644 index 0000000000..bd7ff97cb3 --- /dev/null +++ b/common/changes/@microsoft/rush/main_2026-01-04-02-58.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@microsoft/rush", + "comment": "", + "type": "none" + } + ], + "packageName": "@microsoft/rush" +} \ No newline at end of file diff --git a/common/changes/@rushstack/heft-config-file/main_2026-01-04-02-58.json b/common/changes/@rushstack/heft-config-file/main_2026-01-04-02-58.json new file mode 100644 index 0000000000..9b24a4fdcc --- /dev/null +++ b/common/changes/@rushstack/heft-config-file/main_2026-01-04-02-58.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@rushstack/heft-config-file", + "comment": "", + "type": "none" + } + ], + "packageName": "@rushstack/heft-config-file" +} \ No newline at end of file diff --git a/common/changes/@rushstack/localization-utilities/main_2026-01-04-02-58.json b/common/changes/@rushstack/localization-utilities/main_2026-01-04-02-58.json new file mode 100644 index 0000000000..3830d7f42e --- /dev/null +++ b/common/changes/@rushstack/localization-utilities/main_2026-01-04-02-58.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@rushstack/localization-utilities", + "comment": "", + "type": "none" + } + ], + "packageName": "@rushstack/localization-utilities" +} \ No newline at end of file diff --git a/common/changes/@rushstack/operation-graph/main_2026-01-04-02-58.json b/common/changes/@rushstack/operation-graph/main_2026-01-04-02-58.json new file mode 100644 index 0000000000..eabefe94ed --- /dev/null +++ b/common/changes/@rushstack/operation-graph/main_2026-01-04-02-58.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@rushstack/operation-graph", + "comment": "", + "type": "none" + } + ], + "packageName": "@rushstack/operation-graph" +} \ No newline at end of file diff --git a/common/changes/@rushstack/terminal/main_2026-01-04-00-39.json b/common/changes/@rushstack/terminal/main_2026-01-04-00-39.json new file mode 100644 index 0000000000..2483ca2509 --- /dev/null +++ b/common/changes/@rushstack/terminal/main_2026-01-04-00-39.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@rushstack/terminal", + "comment": "Add a `getAllOutputAsChunks` function to `StringBufferTerminalProvider` that returns an array of chunks that were written to the terminal provider.", + "type": "minor" + } + ], + "packageName": "@rushstack/terminal" +} \ No newline at end of file diff --git a/common/reviews/api/terminal.api.md b/common/reviews/api/terminal.api.md index 419a4c1c2f..97c5691622 100644 --- a/common/reviews/api/terminal.api.md +++ b/common/reviews/api/terminal.api.md @@ -151,6 +151,14 @@ export interface INormalizeNewlinesTextRewriterOptions { newlineKind: NewlineKind; } +// @beta (undocumented) +export interface IOutputChunk { + // (undocumented) + severity: TerminalProviderSeverityName; + // (undocumented) + text: string; +} + // @beta (undocumented) export type IPrefixProxyTerminalProviderOptions = IStaticPrefixProxyTerminalProviderOptions | IDynamicPrefixProxyTerminalProviderOptions; @@ -192,9 +200,14 @@ export interface IStdioSummarizerOptions extends ITerminalWritableOptions { trailingLines?: number; } +// @beta (undocumented) +export interface IStringBufferOutputChunksOptions extends IStringBufferOutputOptions { + asLines?: boolean; +} + // @beta (undocumented) export interface IStringBufferOutputOptions { - normalizeSpecialCharacters: boolean; + normalizeSpecialCharacters?: boolean; } // @beta (undocumented) @@ -381,6 +394,13 @@ export class StringBufferTerminalProvider implements ITerminalProvider { getAllOutput(sparse?: false, options?: IStringBufferOutputOptions): IAllStringBufferOutput; // (undocumented) getAllOutput(sparse: true, options?: IStringBufferOutputOptions): Partial; + getAllOutputAsChunks(options?: IStringBufferOutputChunksOptions & { + asLines?: false; + }): IOutputChunk[]; + // (undocumented) + getAllOutputAsChunks(options: IStringBufferOutputChunksOptions & { + asLines: true; + }): `[${string}] ${string}`[]; getDebugOutput(options?: IStringBufferOutputOptions): string; getErrorOutput(options?: IStringBufferOutputOptions): string; getOutput(options?: IStringBufferOutputOptions): string; @@ -389,7 +409,7 @@ export class StringBufferTerminalProvider implements ITerminalProvider { getVerboseOutput(options?: IStringBufferOutputOptions): string; getWarningOutput(options?: IStringBufferOutputOptions): string; readonly supportsColor: boolean; - write(data: string, severity: TerminalProviderSeverity): void; + write(text: string, severity: TerminalProviderSeverity): void; } // @beta @@ -429,6 +449,9 @@ export enum TerminalProviderSeverity { warning = 1 } +// @beta (undocumented) +export type TerminalProviderSeverityName = keyof typeof TerminalProviderSeverity; + // @beta export class TerminalStreamWritable extends Writable { constructor(options: ITerminalStreamWritableOptions); diff --git a/libraries/heft-config-file/src/test/ConfigurationFile.test.ts b/libraries/heft-config-file/src/test/ConfigurationFile.test.ts index 27bb1965dc..1d4b4b33f5 100644 --- a/libraries/heft-config-file/src/test/ConfigurationFile.test.ts +++ b/libraries/heft-config-file/src/test/ConfigurationFile.test.ts @@ -26,7 +26,7 @@ describe('ConfigurationFile', () => { }); afterEach(() => { - expect(terminalProvider.getAllOutput(true)).toMatchSnapshot(); + expect(terminalProvider.getAllOutputAsChunks({ asLines: true })).toMatchSnapshot(); }); describe('A simple config file', () => { diff --git a/libraries/heft-config-file/src/test/__snapshots__/ConfigurationFile.test.ts.snap b/libraries/heft-config-file/src/test/__snapshots__/ConfigurationFile.test.ts.snap index a9fe0cb92b..5c90062d35 100644 --- a/libraries/heft-config-file/src/test/__snapshots__/ConfigurationFile.test.ts.snap +++ b/libraries/heft-config-file/src/test/__snapshots__/ConfigurationFile.test.ts.snap @@ -1,128 +1,128 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`ConfigurationFile A complex config file Can get the original $schema property value 1`] = `Object {}`; +exports[`ConfigurationFile A complex config file Can get the original $schema property value 1`] = `Array []`; -exports[`ConfigurationFile A complex config file Correctly loads a complex config file (Deprecated PathResolutionMethod.NodeResolve) 1`] = `Object {}`; +exports[`ConfigurationFile A complex config file Correctly loads a complex config file (Deprecated PathResolutionMethod.NodeResolve) 1`] = `Array []`; -exports[`ConfigurationFile A complex config file Correctly loads a complex config file 1`] = `Object {}`; +exports[`ConfigurationFile A complex config file Correctly loads a complex config file 1`] = `Array []`; -exports[`ConfigurationFile A complex config file Correctly loads a complex config file async (Deprecated PathResolutionMethod.NodeResolve) 1`] = `Object {}`; +exports[`ConfigurationFile A complex config file Correctly loads a complex config file async (Deprecated PathResolutionMethod.NodeResolve) 1`] = `Array []`; -exports[`ConfigurationFile A complex config file Correctly loads a complex config file async 1`] = `Object {}`; +exports[`ConfigurationFile A complex config file Correctly loads a complex config file async 1`] = `Array []`; -exports[`ConfigurationFile A simple config file containing an array and an object Correctly loads the config file 1`] = `Object {}`; +exports[`ConfigurationFile A simple config file containing an array and an object Correctly loads the config file 1`] = `Array []`; -exports[`ConfigurationFile A simple config file containing an array and an object Correctly loads the config file async 1`] = `Object {}`; +exports[`ConfigurationFile A simple config file containing an array and an object Correctly loads the config file async 1`] = `Array []`; -exports[`ConfigurationFile A simple config file containing an array and an object Correctly resolves paths relative to the config file 1`] = `Object {}`; +exports[`ConfigurationFile A simple config file containing an array and an object Correctly resolves paths relative to the config file 1`] = `Array []`; -exports[`ConfigurationFile A simple config file containing an array and an object Correctly resolves paths relative to the config file async 1`] = `Object {}`; +exports[`ConfigurationFile A simple config file containing an array and an object Correctly resolves paths relative to the config file async 1`] = `Array []`; -exports[`ConfigurationFile A simple config file containing an array and an object Correctly resolves paths relative to the project root 1`] = `Object {}`; +exports[`ConfigurationFile A simple config file containing an array and an object Correctly resolves paths relative to the project root 1`] = `Array []`; -exports[`ConfigurationFile A simple config file containing an array and an object Correctly resolves paths relative to the project root async 1`] = `Object {}`; +exports[`ConfigurationFile A simple config file containing an array and an object Correctly resolves paths relative to the project root async 1`] = `Array []`; -exports[`ConfigurationFile A simple config file with "extends" Correctly loads the config file with "append" and "merge" in config meta 1`] = `Object {}`; +exports[`ConfigurationFile A simple config file with "extends" Correctly loads the config file with "append" and "merge" in config meta 1`] = `Array []`; -exports[`ConfigurationFile A simple config file with "extends" Correctly loads the config file with "append" and "merge" in config meta async 1`] = `Object {}`; +exports[`ConfigurationFile A simple config file with "extends" Correctly loads the config file with "append" and "merge" in config meta async 1`] = `Array []`; -exports[`ConfigurationFile A simple config file with "extends" Correctly loads the config file with "custom" in config meta 1`] = `Object {}`; +exports[`ConfigurationFile A simple config file with "extends" Correctly loads the config file with "custom" in config meta 1`] = `Array []`; -exports[`ConfigurationFile A simple config file with "extends" Correctly loads the config file with "custom" in config meta async 1`] = `Object {}`; +exports[`ConfigurationFile A simple config file with "extends" Correctly loads the config file with "custom" in config meta async 1`] = `Array []`; -exports[`ConfigurationFile A simple config file with "extends" Correctly loads the config file with "replace" in config meta 1`] = `Object {}`; +exports[`ConfigurationFile A simple config file with "extends" Correctly loads the config file with "replace" in config meta 1`] = `Array []`; -exports[`ConfigurationFile A simple config file with "extends" Correctly loads the config file with "replace" in config meta async 1`] = `Object {}`; +exports[`ConfigurationFile A simple config file with "extends" Correctly loads the config file with "replace" in config meta async 1`] = `Array []`; -exports[`ConfigurationFile A simple config file with "extends" Correctly loads the config file with default config meta 1`] = `Object {}`; +exports[`ConfigurationFile A simple config file with "extends" Correctly loads the config file with default config meta 1`] = `Array []`; -exports[`ConfigurationFile A simple config file with "extends" Correctly loads the config file with default config meta async 1`] = `Object {}`; +exports[`ConfigurationFile A simple config file with "extends" Correctly loads the config file with default config meta async 1`] = `Array []`; -exports[`ConfigurationFile A simple config file with "extends" Correctly loads the config file with modified merge behaviors for arrays and objects 1`] = `Object {}`; +exports[`ConfigurationFile A simple config file with "extends" Correctly loads the config file with modified merge behaviors for arrays and objects 1`] = `Array []`; -exports[`ConfigurationFile A simple config file with "extends" Correctly loads the config file with modified merge behaviors for arrays and objects async 1`] = `Object {}`; +exports[`ConfigurationFile A simple config file with "extends" Correctly loads the config file with modified merge behaviors for arrays and objects async 1`] = `Array []`; -exports[`ConfigurationFile A simple config file with "extends" Correctly resolves paths relative to the config file 1`] = `Object {}`; +exports[`ConfigurationFile A simple config file with "extends" Correctly resolves paths relative to the config file 1`] = `Array []`; -exports[`ConfigurationFile A simple config file with "extends" Correctly resolves paths relative to the config file async 1`] = `Object {}`; +exports[`ConfigurationFile A simple config file with "extends" Correctly resolves paths relative to the config file async 1`] = `Array []`; -exports[`ConfigurationFile A simple config file with a JSON schema object Correctly loads the config file 1`] = `Object {}`; +exports[`ConfigurationFile A simple config file with a JSON schema object Correctly loads the config file 1`] = `Array []`; -exports[`ConfigurationFile A simple config file with a JSON schema object Correctly loads the config file async 1`] = `Object {}`; +exports[`ConfigurationFile A simple config file with a JSON schema object Correctly loads the config file async 1`] = `Array []`; -exports[`ConfigurationFile A simple config file with a JSON schema object Correctly resolves paths relative to the config file 1`] = `Object {}`; +exports[`ConfigurationFile A simple config file with a JSON schema object Correctly resolves paths relative to the config file 1`] = `Array []`; -exports[`ConfigurationFile A simple config file with a JSON schema object Correctly resolves paths relative to the config file async 1`] = `Object {}`; +exports[`ConfigurationFile A simple config file with a JSON schema object Correctly resolves paths relative to the config file async 1`] = `Array []`; -exports[`ConfigurationFile A simple config file with a JSON schema object Correctly resolves paths relative to the project root 1`] = `Object {}`; +exports[`ConfigurationFile A simple config file with a JSON schema object Correctly resolves paths relative to the project root 1`] = `Array []`; -exports[`ConfigurationFile A simple config file with a JSON schema object Correctly resolves paths relative to the project root async 1`] = `Object {}`; +exports[`ConfigurationFile A simple config file with a JSON schema object Correctly resolves paths relative to the project root async 1`] = `Array []`; -exports[`ConfigurationFile A simple config file with a JSON schema object The NonProjectConfigurationFile version works correctly 1`] = `Object {}`; +exports[`ConfigurationFile A simple config file with a JSON schema object The NonProjectConfigurationFile version works correctly 1`] = `Array []`; -exports[`ConfigurationFile A simple config file with a JSON schema object The NonProjectConfigurationFile version works correctly async 1`] = `Object {}`; +exports[`ConfigurationFile A simple config file with a JSON schema object The NonProjectConfigurationFile version works correctly async 1`] = `Array []`; -exports[`ConfigurationFile A simple config file with a JSON schema path Correctly loads the config file 1`] = `Object {}`; +exports[`ConfigurationFile A simple config file with a JSON schema path Correctly loads the config file 1`] = `Array []`; -exports[`ConfigurationFile A simple config file with a JSON schema path Correctly loads the config file async 1`] = `Object {}`; +exports[`ConfigurationFile A simple config file with a JSON schema path Correctly loads the config file async 1`] = `Array []`; -exports[`ConfigurationFile A simple config file with a JSON schema path Correctly resolves paths relative to the config file 1`] = `Object {}`; +exports[`ConfigurationFile A simple config file with a JSON schema path Correctly resolves paths relative to the config file 1`] = `Array []`; -exports[`ConfigurationFile A simple config file with a JSON schema path Correctly resolves paths relative to the config file async 1`] = `Object {}`; +exports[`ConfigurationFile A simple config file with a JSON schema path Correctly resolves paths relative to the config file async 1`] = `Array []`; -exports[`ConfigurationFile A simple config file with a JSON schema path Correctly resolves paths relative to the project root 1`] = `Object {}`; +exports[`ConfigurationFile A simple config file with a JSON schema path Correctly resolves paths relative to the project root 1`] = `Array []`; -exports[`ConfigurationFile A simple config file with a JSON schema path Correctly resolves paths relative to the project root async 1`] = `Object {}`; +exports[`ConfigurationFile A simple config file with a JSON schema path Correctly resolves paths relative to the project root async 1`] = `Array []`; -exports[`ConfigurationFile A simple config file with a JSON schema path The NonProjectConfigurationFile version works correctly 1`] = `Object {}`; +exports[`ConfigurationFile A simple config file with a JSON schema path The NonProjectConfigurationFile version works correctly 1`] = `Array []`; -exports[`ConfigurationFile A simple config file with a JSON schema path The NonProjectConfigurationFile version works correctly async 1`] = `Object {}`; +exports[`ConfigurationFile A simple config file with a JSON schema path The NonProjectConfigurationFile version works correctly async 1`] = `Array []`; -exports[`ConfigurationFile a complex file with inheritance type annotations Correctly loads a complex config file with a single inheritance type annotation 1`] = `Object {}`; +exports[`ConfigurationFile a complex file with inheritance type annotations Correctly loads a complex config file with a single inheritance type annotation 1`] = `Array []`; -exports[`ConfigurationFile a complex file with inheritance type annotations Correctly loads a complex config file with inheritance type annotations 1`] = `Object {}`; +exports[`ConfigurationFile a complex file with inheritance type annotations Correctly loads a complex config file with inheritance type annotations 1`] = `Array []`; -exports[`ConfigurationFile a complex file with inheritance type annotations Correctly loads a complex config file with inheritance type annotations async 1`] = `Object {}`; +exports[`ConfigurationFile a complex file with inheritance type annotations Correctly loads a complex config file with inheritance type annotations async 1`] = `Array []`; exports[`ConfigurationFile a complex file with inheritance type annotations throws an error when a keyed object uses the 'append' inheritance type 1`] = `"Issue in processing configuration file property \\"c\\". Property is not an array, but the inheritance type is set as \\"append\\""`; -exports[`ConfigurationFile a complex file with inheritance type annotations throws an error when a keyed object uses the 'append' inheritance type 2`] = `Object {}`; +exports[`ConfigurationFile a complex file with inheritance type annotations throws an error when a keyed object uses the 'append' inheritance type 2`] = `Array []`; exports[`ConfigurationFile a complex file with inheritance type annotations throws an error when a keyed object uses the 'append' inheritance type async 1`] = `"Issue in processing configuration file property \\"c\\". Property is not an array, but the inheritance type is set as \\"append\\""`; -exports[`ConfigurationFile a complex file with inheritance type annotations throws an error when a keyed object uses the 'append' inheritance type async 2`] = `Object {}`; +exports[`ConfigurationFile a complex file with inheritance type annotations throws an error when a keyed object uses the 'append' inheritance type async 2`] = `Array []`; exports[`ConfigurationFile a complex file with inheritance type annotations throws an error when a non-object property uses an inheritance type 1`] = `"Issue in processing configuration file property \\"$l.inheritanceType\\". An inheritance type was provided for a property that is not a keyed object or array."`; -exports[`ConfigurationFile a complex file with inheritance type annotations throws an error when a non-object property uses an inheritance type 2`] = `Object {}`; +exports[`ConfigurationFile a complex file with inheritance type annotations throws an error when a non-object property uses an inheritance type 2`] = `Array []`; exports[`ConfigurationFile a complex file with inheritance type annotations throws an error when a non-object property uses an inheritance type async 1`] = `"Issue in processing configuration file property \\"$l.inheritanceType\\". An inheritance type was provided for a property that is not a keyed object or array."`; -exports[`ConfigurationFile a complex file with inheritance type annotations throws an error when a non-object property uses an inheritance type async 2`] = `Object {}`; +exports[`ConfigurationFile a complex file with inheritance type annotations throws an error when a non-object property uses an inheritance type async 2`] = `Array []`; exports[`ConfigurationFile a complex file with inheritance type annotations throws an error when an array uses the 'merge' inheritance type 1`] = `"Issue in processing configuration file property \\"a\\". Property is not a keyed object, but the inheritance type is set as \\"merge\\""`; -exports[`ConfigurationFile a complex file with inheritance type annotations throws an error when an array uses the 'merge' inheritance type 2`] = `Object {}`; +exports[`ConfigurationFile a complex file with inheritance type annotations throws an error when an array uses the 'merge' inheritance type 2`] = `Array []`; exports[`ConfigurationFile a complex file with inheritance type annotations throws an error when an array uses the 'merge' inheritance type async 1`] = `"Issue in processing configuration file property \\"a\\". Property is not a keyed object, but the inheritance type is set as \\"merge\\""`; -exports[`ConfigurationFile a complex file with inheritance type annotations throws an error when an array uses the 'merge' inheritance type async 2`] = `Object {}`; +exports[`ConfigurationFile a complex file with inheritance type annotations throws an error when an array uses the 'merge' inheritance type async 2`] = `Array []`; exports[`ConfigurationFile a complex file with inheritance type annotations throws an error when an inheritance type is specified for an unspecified property 1`] = `"Issue in processing configuration file property \\"$c.inheritanceType\\". An inheritance type was provided but no matching property was found in the parent."`; -exports[`ConfigurationFile a complex file with inheritance type annotations throws an error when an inheritance type is specified for an unspecified property 2`] = `Object {}`; +exports[`ConfigurationFile a complex file with inheritance type annotations throws an error when an inheritance type is specified for an unspecified property 2`] = `Array []`; exports[`ConfigurationFile a complex file with inheritance type annotations throws an error when an inheritance type is specified for an unspecified property async 1`] = `"Issue in processing configuration file property \\"$c.inheritanceType\\". An inheritance type was provided but no matching property was found in the parent."`; -exports[`ConfigurationFile a complex file with inheritance type annotations throws an error when an inheritance type is specified for an unspecified property async 2`] = `Object {}`; +exports[`ConfigurationFile a complex file with inheritance type annotations throws an error when an inheritance type is specified for an unspecified property async 2`] = `Array []`; exports[`ConfigurationFile a complex file with inheritance type annotations throws an error when an unsupported inheritance type is specified 1`] = `"Issue in processing configuration file property \\"$a.inheritanceType\\". An unsupported inheritance type was provided: \\"custom\\""`; -exports[`ConfigurationFile a complex file with inheritance type annotations throws an error when an unsupported inheritance type is specified 2`] = `Object {}`; +exports[`ConfigurationFile a complex file with inheritance type annotations throws an error when an unsupported inheritance type is specified 2`] = `Array []`; exports[`ConfigurationFile a complex file with inheritance type annotations throws an error when an unsupported inheritance type is specified async 1`] = `"Issue in processing configuration file property \\"$a.inheritanceType\\". An unsupported inheritance type was provided: \\"custom\\""`; -exports[`ConfigurationFile a complex file with inheritance type annotations throws an error when an unsupported inheritance type is specified async 2`] = `Object {}`; +exports[`ConfigurationFile a complex file with inheritance type annotations throws an error when an unsupported inheritance type is specified async 2`] = `Array []`; exports[`ConfigurationFile error cases Throws an error for a file that doesn't match its schema 1`] = ` "Resolved configuration object does not match schema: Error: JSON validation failed: @@ -132,7 +132,7 @@ Error: #/filePaths must be array" `; -exports[`ConfigurationFile error cases Throws an error for a file that doesn't match its schema 2`] = `Object {}`; +exports[`ConfigurationFile error cases Throws an error for a file that doesn't match its schema 2`] = `Array []`; exports[`ConfigurationFile error cases Throws an error for a file that doesn't match its schema async 1`] = ` "Resolved configuration object does not match schema: Error: JSON validation failed: @@ -142,7 +142,7 @@ Error: #/filePaths must be array" `; -exports[`ConfigurationFile error cases Throws an error for a file that doesn't match its schema async 2`] = `Object {}`; +exports[`ConfigurationFile error cases Throws an error for a file that doesn't match its schema async 2`] = `Array []`; exports[`ConfigurationFile error cases Throws an error when a combined config file doesn't match the schema 1`] = ` "Resolved configuration object does not match schema: Error: JSON validation failed: @@ -156,7 +156,7 @@ Error: # must match exactly one schema in oneOf" `; -exports[`ConfigurationFile error cases Throws an error when a combined config file doesn't match the schema 2`] = `Object {}`; +exports[`ConfigurationFile error cases Throws an error when a combined config file doesn't match the schema 2`] = `Array []`; exports[`ConfigurationFile error cases Throws an error when a combined config file doesn't match the schema async 1`] = ` "Resolved configuration object does not match schema: Error: JSON validation failed: @@ -170,116 +170,120 @@ Error: # must match exactly one schema in oneOf" `; -exports[`ConfigurationFile error cases Throws an error when a combined config file doesn't match the schema async 2`] = `Object {}`; +exports[`ConfigurationFile error cases Throws an error when a combined config file doesn't match the schema async 2`] = `Array []`; exports[`ConfigurationFile error cases Throws an error when a requested file doesn't exist 1`] = `"File does not exist: /lib/test/errorCases/folderThatDoesntExist/config.json"`; exports[`ConfigurationFile error cases Throws an error when a requested file doesn't exist 2`] = ` -Object { - "debug": "Configuration file \\"/lib/test/errorCases/folderThatDoesntExist/config.json\\" not found.[n]", -} +Array [ + "[ debug] Configuration file \\"/lib/test/errorCases/folderThatDoesntExist/config.json\\" not found.[n]", +] `; exports[`ConfigurationFile error cases Throws an error when a requested file doesn't exist async 1`] = `"File does not exist: /lib/test/errorCases/folderThatDoesntExist/config.json"`; exports[`ConfigurationFile error cases Throws an error when a requested file doesn't exist async 2`] = ` -Object { - "debug": "Configuration file \\"/lib/test/errorCases/folderThatDoesntExist/config.json\\" not found.[n]", -} +Array [ + "[ debug] Configuration file \\"/lib/test/errorCases/folderThatDoesntExist/config.json\\" not found.[n]", +] `; exports[`ConfigurationFile error cases Throws an error when an "extends" property points to a file that cannot be resolved 1`] = `"In file \\"/lib/test/errorCases/extendsNotExist/config.json\\", file referenced in \\"extends\\" property (\\"./config2.json\\") cannot be resolved."`; exports[`ConfigurationFile error cases Throws an error when an "extends" property points to a file that cannot be resolved 2`] = ` -Object { - "debug": "Configuration file \\"/lib/test/errorCases/extendsNotExist/config2.json\\" not found.[n]", -} +Array [ + "[ debug] Configuration file \\"/lib/test/errorCases/extendsNotExist/config2.json\\" not found.[n]", +] `; exports[`ConfigurationFile error cases Throws an error when an "extends" property points to a file that cannot be resolved async 1`] = `"In file \\"/lib/test/errorCases/extendsNotExist/config.json\\", file referenced in \\"extends\\" property (\\"./config2.json\\") cannot be resolved."`; exports[`ConfigurationFile error cases Throws an error when an "extends" property points to a file that cannot be resolved async 2`] = ` -Object { - "debug": "Configuration file \\"/lib/test/errorCases/extendsNotExist/config2.json\\" not found.[n]", -} +Array [ + "[ debug] Configuration file \\"/lib/test/errorCases/extendsNotExist/config2.json\\" not found.[n]", +] `; -exports[`ConfigurationFile error cases Throws an error when the file isn't valid JSON 1`] = `Object {}`; +exports[`ConfigurationFile error cases Throws an error when the file isn't valid JSON 1`] = `Array []`; -exports[`ConfigurationFile error cases Throws an error when the file isn't valid JSON async 1`] = `Object {}`; +exports[`ConfigurationFile error cases Throws an error when the file isn't valid JSON async 1`] = `Array []`; exports[`ConfigurationFile error cases Throws an error when there is a circular reference in "extends" properties 1`] = `"A loop has been detected in the \\"extends\\" properties of configuration file at \\"/lib/test/errorCases/circularReference/config1.json\\"."`; -exports[`ConfigurationFile error cases Throws an error when there is a circular reference in "extends" properties 2`] = `Object {}`; +exports[`ConfigurationFile error cases Throws an error when there is a circular reference in "extends" properties 2`] = `Array []`; exports[`ConfigurationFile error cases Throws an error when there is a circular reference in "extends" properties async 1`] = `"A loop has been detected in the \\"extends\\" properties of configuration file at \\"/lib/test/errorCases/circularReference/config1.json\\"."`; -exports[`ConfigurationFile error cases Throws an error when there is a circular reference in "extends" properties async 2`] = `Object {}`; +exports[`ConfigurationFile error cases Throws an error when there is a circular reference in "extends" properties async 2`] = `Array []`; exports[`ConfigurationFile error cases returns undefined when the file doesn't exist for tryLoadConfigurationFileForProject 1`] = ` -Object { - "debug": "Configuration file \\"/lib/test/errorCases/invalidType/notExist.json\\" not found.[n]", -} +Array [ + "[ debug] Configuration file \\"/lib/test/errorCases/invalidType/notExist.json\\" not found.[n]", +] `; exports[`ConfigurationFile error cases returns undefined when the file doesn't exist for tryLoadConfigurationFileForProjectAsync 1`] = ` -Object { - "debug": "Configuration file \\"/lib/test/errorCases/invalidType/notExist.json\\" not found.[n]", -} +Array [ + "[ debug] Configuration file \\"/lib/test/errorCases/invalidType/notExist.json\\" not found.[n]", +] `; exports[`ConfigurationFile error cases throws an error when the file doesn't exist 1`] = `"File does not exist: /lib/test/errorCases/invalidType/notExist.json"`; exports[`ConfigurationFile error cases throws an error when the file doesn't exist 2`] = ` -Object { - "debug": "Configuration file \\"/lib/test/errorCases/invalidType/notExist.json\\" not found.[n]", -} +Array [ + "[ debug] Configuration file \\"/lib/test/errorCases/invalidType/notExist.json\\" not found.[n]", +] `; exports[`ConfigurationFile error cases throws an error when the file doesn't exist async 1`] = `"File does not exist: /lib/test/errorCases/invalidType/notExist.json"`; exports[`ConfigurationFile error cases throws an error when the file doesn't exist async 2`] = ` -Object { - "debug": "Configuration file \\"/lib/test/errorCases/invalidType/notExist.json\\" not found.[n]", -} +Array [ + "[ debug] Configuration file \\"/lib/test/errorCases/invalidType/notExist.json\\" not found.[n]", +] `; exports[`ConfigurationFile loading a rig correctly loads a config file inside a rig 1`] = ` -Object { - "debug": "Configuration file \\"/lib/test/project-referencing-rig/config/simplestConfigFile.json\\" does not exist. Attempting to load via rig (\\"/lib/test/project-referencing-rig/node_modules/test-rig/profiles/default\\").[n]", -} +Array [ + "[ debug] Configuration file \\"/lib/test/project-referencing-rig/config/simplestConfigFile.json\\" does not exist. Attempting to load via rig (\\"/lib/test/project-referencing-rig/node_modules/test-rig/profiles/default\\").[n]", +] `; exports[`ConfigurationFile loading a rig correctly loads a config file inside a rig async 1`] = ` -Object { - "debug": "Configuration file \\"/lib/test/project-referencing-rig/config/simplestConfigFile.json\\" does not exist. Attempting to load via rig (\\"/lib/test/project-referencing-rig/node_modules/test-rig/profiles/default\\").[n]", -} +Array [ + "[ debug] Configuration file \\"/lib/test/project-referencing-rig/config/simplestConfigFile.json\\" does not exist. Attempting to load via rig (\\"/lib/test/project-referencing-rig/node_modules/test-rig/profiles/default\\").[n]", +] `; exports[`ConfigurationFile loading a rig correctly loads a config file inside a rig via tryLoadConfigurationFileForProject 1`] = ` -Object { - "debug": "Configuration file \\"/lib/test/project-referencing-rig/config/simplestConfigFile.json\\" does not exist. Attempting to load via rig (\\"/lib/test/project-referencing-rig/node_modules/test-rig/profiles/default\\").[n]", -} +Array [ + "[ debug] Configuration file \\"/lib/test/project-referencing-rig/config/simplestConfigFile.json\\" does not exist. Attempting to load via rig (\\"/lib/test/project-referencing-rig/node_modules/test-rig/profiles/default\\").[n]", +] `; exports[`ConfigurationFile loading a rig correctly loads a config file inside a rig via tryLoadConfigurationFileForProjectAsync 1`] = ` -Object { - "debug": "Configuration file \\"/lib/test/project-referencing-rig/config/simplestConfigFile.json\\" does not exist. Attempting to load via rig (\\"/lib/test/project-referencing-rig/node_modules/test-rig/profiles/default\\").[n]", -} +Array [ + "[ debug] Configuration file \\"/lib/test/project-referencing-rig/config/simplestConfigFile.json\\" does not exist. Attempting to load via rig (\\"/lib/test/project-referencing-rig/node_modules/test-rig/profiles/default\\").[n]", +] `; exports[`ConfigurationFile loading a rig throws an error when a config file doesn't exist in a project referencing a rig, which also doesn't have the file 1`] = `"File does not exist: /lib/test/project-referencing-rig/config/notExist.json"`; exports[`ConfigurationFile loading a rig throws an error when a config file doesn't exist in a project referencing a rig, which also doesn't have the file 2`] = ` -Object { - "debug": "Configuration file \\"/lib/test/project-referencing-rig/config/notExist.json\\" does not exist. Attempting to load via rig (\\"/lib/test/project-referencing-rig/node_modules/test-rig/profiles/default\\").[n]Configuration file \\"/lib/test/project-referencing-rig/node_modules/test-rig/profiles/default/config/notExist.json\\" not found.[n]Configuration file \\"/lib/test/project-referencing-rig/config/notExist.json\\" not found.[n]", -} +Array [ + "[ debug] Configuration file \\"/lib/test/project-referencing-rig/config/notExist.json\\" does not exist. Attempting to load via rig (\\"/lib/test/project-referencing-rig/node_modules/test-rig/profiles/default\\").[n]", + "[ debug] Configuration file \\"/lib/test/project-referencing-rig/node_modules/test-rig/profiles/default/config/notExist.json\\" not found.[n]", + "[ debug] Configuration file \\"/lib/test/project-referencing-rig/config/notExist.json\\" not found.[n]", +] `; exports[`ConfigurationFile loading a rig throws an error when a config file doesn't exist in a project referencing a rig, which also doesn't have the file async 1`] = `"File does not exist: /lib/test/project-referencing-rig/config/notExist.json"`; exports[`ConfigurationFile loading a rig throws an error when a config file doesn't exist in a project referencing a rig, which also doesn't have the file async 2`] = ` -Object { - "debug": "Configuration file \\"/lib/test/project-referencing-rig/config/notExist.json\\" does not exist. Attempting to load via rig (\\"/lib/test/project-referencing-rig/node_modules/test-rig/profiles/default\\").[n]Configuration file \\"/lib/test/project-referencing-rig/node_modules/test-rig/profiles/default/config/notExist.json\\" not found.[n]Configuration file \\"/lib/test/project-referencing-rig/config/notExist.json\\" not found.[n]", -} +Array [ + "[ debug] Configuration file \\"/lib/test/project-referencing-rig/config/notExist.json\\" does not exist. Attempting to load via rig (\\"/lib/test/project-referencing-rig/node_modules/test-rig/profiles/default\\").[n]", + "[ debug] Configuration file \\"/lib/test/project-referencing-rig/node_modules/test-rig/profiles/default/config/notExist.json\\" not found.[n]", + "[ debug] Configuration file \\"/lib/test/project-referencing-rig/config/notExist.json\\" not found.[n]", +] `; diff --git a/libraries/localization-utilities/src/parsers/test/__snapshots__/parseResx.test.ts.snap b/libraries/localization-utilities/src/parsers/test/__snapshots__/parseResx.test.ts.snap index aa6e30030b..8eabd6e39c 100644 --- a/libraries/localization-utilities/src/parsers/test/__snapshots__/parseResx.test.ts.snap +++ b/libraries/localization-utilities/src/parsers/test/__snapshots__/parseResx.test.ts.snap @@ -22,7 +22,7 @@ Array [ ] `; -exports[`parseResx correctly ignores a string: terminal output 1`] = `Object {}`; +exports[`parseResx correctly ignores a string: terminal output 1`] = `Array []`; exports[`parseResx fails to parse a RESX file with a duplicate string: Loc file 1`] = ` Object { @@ -34,9 +34,9 @@ Object { `; exports[`parseResx fails to parse a RESX file with a duplicate string: terminal output 1`] = ` -Object { - "error": "test.resx(6,45): Duplicate string value \\"stringA\\"[n]", -} +Array [ + "[ error] test.resx(6,45): Duplicate string value \\"stringA\\"[n]", +] `; exports[`parseResx ignoreMissingResxComments when set to false, warns on a missing comment: Loc file 1`] = ` @@ -49,9 +49,9 @@ Object { `; exports[`parseResx ignoreMissingResxComments when set to false, warns on a missing comment: terminal output 1`] = ` -Object { - "warning": "test.resx(3,59): Missing string comment in element[n]", -} +Array [ + "[warning] test.resx(3,59): Missing string comment in element[n]", +] `; exports[`parseResx ignoreMissingResxComments when set to true, ignores a missing comment: Loc file 1`] = ` @@ -63,7 +63,7 @@ Object { } `; -exports[`parseResx ignoreMissingResxComments when set to true, ignores a missing comment: terminal output 1`] = `Object {}`; +exports[`parseResx ignoreMissingResxComments when set to true, ignores a missing comment: terminal output 1`] = `Array []`; exports[`parseResx ignoreMissingResxComments when set to undefined, warns on a missing comment: Loc file 1`] = ` Object { @@ -74,7 +74,7 @@ Object { } `; -exports[`parseResx ignoreMissingResxComments when set to undefined, warns on a missing comment: terminal output 1`] = `Object {}`; +exports[`parseResx ignoreMissingResxComments when set to undefined, warns on a missing comment: terminal output 1`] = `Array []`; exports[`parseResx parses a valid file with a schema: Loc file 1`] = ` Object { @@ -89,7 +89,7 @@ Object { } `; -exports[`parseResx parses a valid file with a schema: terminal output 1`] = `Object {}`; +exports[`parseResx parses a valid file with a schema: terminal output 1`] = `Array []`; exports[`parseResx parses a valid file with quotemarks: Loc file 1`] = ` Object { @@ -100,7 +100,7 @@ Object { } `; -exports[`parseResx parses a valid file with quotemarks: terminal output 1`] = `Object {}`; +exports[`parseResx parses a valid file with quotemarks: terminal output 1`] = `Array []`; exports[`parseResx prints an error on invalid XML: Loc file 1`] = ` Object { @@ -112,9 +112,9 @@ Object { `; exports[`parseResx prints an error on invalid XML: terminal output 1`] = ` -Object { - "error": "test.resx(3,41): Found unexpected non-empty text node in RESX element[n]", -} +Array [ + "[ error] test.resx(3,41): Found unexpected non-empty text node in RESX element[n]", +] `; exports[`parseResx resxNewlineNormalization when set to CrLf, normalizes to CrLf: Loc file 1`] = ` @@ -128,7 +128,7 @@ Object { } `; -exports[`parseResx resxNewlineNormalization when set to CrLf, normalizes to CrLf: terminal output 1`] = `Object {}`; +exports[`parseResx resxNewlineNormalization when set to CrLf, normalizes to CrLf: terminal output 1`] = `Array []`; exports[`parseResx resxNewlineNormalization when set to Lf, normalizes to Lf: Loc file 1`] = ` Object { @@ -141,4 +141,4 @@ Object { } `; -exports[`parseResx resxNewlineNormalization when set to Lf, normalizes to Lf: terminal output 1`] = `Object {}`; +exports[`parseResx resxNewlineNormalization when set to Lf, normalizes to Lf: terminal output 1`] = `Array []`; diff --git a/libraries/localization-utilities/src/parsers/test/parseResx.test.ts b/libraries/localization-utilities/src/parsers/test/parseResx.test.ts index 2fdb440398..7a241d54cc 100644 --- a/libraries/localization-utilities/src/parsers/test/parseResx.test.ts +++ b/libraries/localization-utilities/src/parsers/test/parseResx.test.ts @@ -16,7 +16,7 @@ describe(parseResx.name, () => { }); afterEach(() => { - expect(terminalProvider.getAllOutput(true)).toMatchSnapshot('terminal output'); + expect(terminalProvider.getAllOutputAsChunks({ asLines: true })).toMatchSnapshot('terminal output'); }); async function testResxAsync( diff --git a/libraries/operation-graph/src/test/OperationExecutionManager.test.ts b/libraries/operation-graph/src/test/OperationExecutionManager.test.ts index f0233cbe01..bdd635afde 100644 --- a/libraries/operation-graph/src/test/OperationExecutionManager.test.ts +++ b/libraries/operation-graph/src/test/OperationExecutionManager.test.ts @@ -68,7 +68,7 @@ describe(OperationExecutionManager.name, () => { }); expect(result).toBe(OperationStatus.NoOp); - expect(terminalProvider.getAllOutput(true)).toMatchSnapshot(); + expect(terminalProvider.getAllOutputAsChunks({ asLines: true })).toMatchSnapshot(); }); it('handles trivial input', async () => { @@ -87,7 +87,7 @@ describe(OperationExecutionManager.name, () => { }); expect(result).toBe(OperationStatus.Success); - expect(terminalProvider.getAllOutput(true)).toMatchSnapshot(); + expect(terminalProvider.getAllOutputAsChunks({ asLines: true })).toMatchSnapshot(); expect(operation.state?.status).toBe(OperationStatus.NoOp); }); @@ -135,7 +135,7 @@ describe(OperationExecutionManager.name, () => { }); expect(result).toBe(OperationStatus.Success); - expect(terminalProvider.getAllOutput(true)).toMatchSnapshot(); + expect(terminalProvider.getAllOutputAsChunks({ asLines: true })).toMatchSnapshot(); expect(runAlpha).toHaveBeenCalledTimes(1); expect(runBeta).toHaveBeenCalledTimes(1); @@ -187,7 +187,7 @@ describe(OperationExecutionManager.name, () => { }); expect(result).toBe(OperationStatus.Failure); - expect(terminalProvider.getAllOutput(true)).toMatchSnapshot(); + expect(terminalProvider.getAllOutputAsChunks({ asLines: true })).toMatchSnapshot(); expect(runAlpha).toHaveBeenCalledTimes(1); expect(runBeta).toHaveBeenCalledTimes(0); @@ -218,7 +218,7 @@ describe(OperationExecutionManager.name, () => { }); expect(result).toBe(OperationStatus.NoOp); - expect(terminalProvider.getAllOutput(true)).toMatchSnapshot(); + expect(terminalProvider.getAllOutputAsChunks({ asLines: true })).toMatchSnapshot(); }); it('respects priority order', async () => { @@ -271,7 +271,7 @@ describe(OperationExecutionManager.name, () => { expect(executed).toEqual([beta, alpha]); expect(result).toBe(OperationStatus.Success); - expect(terminalProvider.getAllOutput(true)).toMatchSnapshot(); + expect(terminalProvider.getAllOutputAsChunks({ asLines: true })).toMatchSnapshot(); expect(runAlpha).toHaveBeenCalledTimes(1); expect(runBeta).toHaveBeenCalledTimes(1); @@ -324,7 +324,7 @@ describe(OperationExecutionManager.name, () => { }); expect(result).toBe(OperationStatus.Success); - expect(terminalProvider.getAllOutput(true)).toMatchSnapshot(); + expect(terminalProvider.getAllOutputAsChunks({ asLines: true })).toMatchSnapshot(); expect(run).toHaveBeenCalledTimes(2); @@ -391,7 +391,7 @@ describe(OperationExecutionManager.name, () => { expect(betaRequestRun).toBeDefined(); expect(result1).toBe(OperationStatus.Success); - expect(terminalProvider1.getAllOutput(true)).toMatchSnapshot('first'); + expect(terminalProvider1.getAllOutputAsChunks({ asLines: true })).toMatchSnapshot('first'); expect(runAlpha).toHaveBeenCalledTimes(1); expect(runBeta).toHaveBeenCalledTimes(1); @@ -423,7 +423,7 @@ describe(OperationExecutionManager.name, () => { }); expect(result2).toBe(OperationStatus.Success); - expect(terminalProvider2.getAllOutput(true)).toMatchSnapshot('second'); + expect(terminalProvider2.getAllOutputAsChunks({ asLines: true })).toMatchSnapshot('second'); expect(runAlpha).toHaveBeenCalledTimes(2); expect(runBeta).toHaveBeenCalledTimes(2); diff --git a/libraries/operation-graph/src/test/__snapshots__/OperationExecutionManager.test.ts.snap b/libraries/operation-graph/src/test/__snapshots__/OperationExecutionManager.test.ts.snap index 0de048fa27..34db93d6c8 100644 --- a/libraries/operation-graph/src/test/__snapshots__/OperationExecutionManager.test.ts.snap +++ b/libraries/operation-graph/src/test/__snapshots__/OperationExecutionManager.test.ts.snap @@ -3,55 +3,55 @@ exports[`OperationExecutionManager constructor throws if a dependency is not in the set 1`] = `"Operation \\"alpha\\" declares a dependency on operation \\"beta\\" that is not in the set of operations to execute."`; exports[`OperationExecutionManager executeAsync single pass blocks on failure 1`] = ` -Object { - "verbose": "Executing a maximum of 1 simultaneous tasks...[n]", -} +Array [ + "[verbose] Executing a maximum of 1 simultaneous tasks...[n]", +] `; exports[`OperationExecutionManager executeAsync single pass does not track noops 1`] = ` -Object { - "verbose": "Executing a maximum of 1 simultaneous tasks...[n]", -} +Array [ + "[verbose] Executing a maximum of 1 simultaneous tasks...[n]", +] `; exports[`OperationExecutionManager executeAsync single pass executes in order 1`] = ` -Object { - "verbose": "Executing a maximum of 1 simultaneous tasks...[n]", -} +Array [ + "[verbose] Executing a maximum of 1 simultaneous tasks...[n]", +] `; exports[`OperationExecutionManager executeAsync single pass handles empty input 1`] = ` -Object { - "verbose": "Executing a maximum of 0 simultaneous tasks...[n]", -} +Array [ + "[verbose] Executing a maximum of 0 simultaneous tasks...[n]", +] `; exports[`OperationExecutionManager executeAsync single pass handles trivial input 1`] = ` -Object { - "verbose": "Executing a maximum of 1 simultaneous tasks...[n]", -} +Array [ + "[verbose] Executing a maximum of 1 simultaneous tasks...[n]", +] `; exports[`OperationExecutionManager executeAsync single pass respects concurrency 1`] = ` -Object { - "verbose": "Executing a maximum of 2 simultaneous tasks...[n]", -} +Array [ + "[verbose] Executing a maximum of 2 simultaneous tasks...[n]", +] `; exports[`OperationExecutionManager executeAsync single pass respects priority order 1`] = ` -Object { - "verbose": "Executing a maximum of 1 simultaneous tasks...[n]", -} +Array [ + "[verbose] Executing a maximum of 1 simultaneous tasks...[n]", +] `; exports[`OperationExecutionManager executeAsync watch mode executes in order: first 1`] = ` -Object { - "verbose": "Executing a maximum of 1 simultaneous tasks...[n]", -} +Array [ + "[verbose] Executing a maximum of 1 simultaneous tasks...[n]", +] `; exports[`OperationExecutionManager executeAsync watch mode executes in order: second 1`] = ` -Object { - "verbose": "Executing a maximum of 1 simultaneous tasks...[n]", -} +Array [ + "[verbose] Executing a maximum of 1 simultaneous tasks...[n]", +] `; diff --git a/libraries/rush-lib/src/api/test/CustomTipsConfiguration.test.ts b/libraries/rush-lib/src/api/test/CustomTipsConfiguration.test.ts index 1a38ebaea0..284106bbf3 100644 --- a/libraries/rush-lib/src/api/test/CustomTipsConfiguration.test.ts +++ b/libraries/rush-lib/src/api/test/CustomTipsConfiguration.test.ts @@ -3,7 +3,7 @@ import { JsonFile } from '@rushstack/node-core-library'; import { - type IAllStringBufferOutput, + type IOutputChunk, PrintUtilities, StringBufferTerminalProvider, Terminal @@ -57,10 +57,13 @@ describe(CustomTipsConfiguration.name, () => { afterEach(() => { jest.restoreAllMocks(); - const terminalProviderOutput: Partial = terminalProvider.getAllOutput(true); - const lineSplitTerminalProviderOutput: Partial> = {}; - for (const [key, output] of Object.entries(terminalProviderOutput)) { - lineSplitTerminalProviderOutput[key as keyof IAllStringBufferOutput] = output.split('[n]'); + const terminalProviderOutput: IOutputChunk[] = terminalProvider.getAllOutputAsChunks(); + const lineSplitTerminalProviderOutput: string[] = []; + for (const { text, severity } of terminalProviderOutput) { + const lines: string[] = text.split('[n]'); + for (const line of lines) { + lineSplitTerminalProviderOutput.push(`[${severity}] ${line}`); + } } expect(lineSplitTerminalProviderOutput).toMatchSnapshot(); diff --git a/libraries/rush-lib/src/api/test/RushProjectConfiguration.test.ts b/libraries/rush-lib/src/api/test/RushProjectConfiguration.test.ts index 914b9ecb18..e3f676c508 100644 --- a/libraries/rush-lib/src/api/test/RushProjectConfiguration.test.ts +++ b/libraries/rush-lib/src/api/test/RushProjectConfiguration.test.ts @@ -63,7 +63,7 @@ function validateConfiguration(rushProjectConfiguration: RushProjectConfiguratio terminal ); } finally { - expect(terminalProvider.getAllOutput(true)).toMatchSnapshot(); + expect(terminalProvider.getAllOutputAsChunks({ asLines: true })).toMatchSnapshot(); } } } @@ -90,7 +90,7 @@ function validateConfigurationWithParameters( terminal ); } finally { - expect(terminalProvider.getAllOutput(true)).toMatchSnapshot(); + expect(terminalProvider.getAllOutputAsChunks({ asLines: true })).toMatchSnapshot(); } } } diff --git a/libraries/rush-lib/src/api/test/__snapshots__/CustomTipsConfiguration.test.ts.snap b/libraries/rush-lib/src/api/test/__snapshots__/CustomTipsConfiguration.test.ts.snap index bc7d7e5a79..c89bc2b9c4 100644 --- a/libraries/rush-lib/src/api/test/__snapshots__/CustomTipsConfiguration.test.ts.snap +++ b/libraries/rush-lib/src/api/test/__snapshots__/CustomTipsConfiguration.test.ts.snap @@ -1,402 +1,332 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`CustomTipsConfiguration formatting (a long message with an indented line) _showErrorTip prints an expected message 1`] = ` -Object { - "error": Array [ - "[red]| Custom Tip (TIP_PNPM_INVALID_NODE_VERSION)[default]", - "[red]|[default]", - "[red]| [default]Lorem ipsum dolor sit amet, consectetur", - "[red]| [default]adipiscing elit, sed do eiusmod tempor", - "[red]| [default]incididunt ut labore et dolore magna aliqua. Ut", - "[red]| [default]enim ad minim veniam, quis nostrud exercitation", - "[red]| [default]ullamco laboris nisi ut aliquip ex ea commodo", - "[red]| [default]consequat. Duis aute irure dolor in", - "[red]| [default]reprehenderit in voluptate velit esse cillum", - "[red]| [default]dolore eu fugiat nulla pariatur. Excepteur sint", - "[red]| [default]occaecat cupidatat non proident, sunt in culpa", - "[red]| [default]qui officia deserunt mollit anim id est laborum.", - "[red]| [default] Lorem ipsum dolor sit amet, consectetur", - "[red]| [default] adipiscing elit, sed do eiusmod tempor", - "[red]| [default] incididunt ut labore et dolore magna aliqua. Ut", - "[red]| [default] enim ad minim veniam, quis nostrud exercitation", - "[red]| [default] ullamco laboris nisi ut aliquip ex ea commodo", - "[red]| [default] consequat. Duis aute irure dolor in", - "[red]| [default] reprehenderit in voluptate velit esse cillum", - "[red]| [default] dolore eu fugiat nulla pariatur. Excepteur sint", - "[red]| [default] occaecat cupidatat non proident, sunt in culpa", - "[red]| [default] qui officia deserunt mollit anim id est laborum.", - "", - ], - "log": Array [ - "", - "", - ], -} +Array [ + "[error] [red]| Custom Tip (TIP_PNPM_INVALID_NODE_VERSION)[default]", + "[error] [red]|[default]", + "[error] [red]| [default]Lorem ipsum dolor sit amet, consectetur", + "[error] [red]| [default]adipiscing elit, sed do eiusmod tempor", + "[error] [red]| [default]incididunt ut labore et dolore magna aliqua. Ut", + "[error] [red]| [default]enim ad minim veniam, quis nostrud exercitation", + "[error] [red]| [default]ullamco laboris nisi ut aliquip ex ea commodo", + "[error] [red]| [default]consequat. Duis aute irure dolor in", + "[error] [red]| [default]reprehenderit in voluptate velit esse cillum", + "[error] [red]| [default]dolore eu fugiat nulla pariatur. Excepteur sint", + "[error] [red]| [default]occaecat cupidatat non proident, sunt in culpa", + "[error] [red]| [default]qui officia deserunt mollit anim id est laborum.", + "[error] [red]| [default] Lorem ipsum dolor sit amet, consectetur", + "[error] [red]| [default] adipiscing elit, sed do eiusmod tempor", + "[error] [red]| [default] incididunt ut labore et dolore magna aliqua. Ut", + "[error] [red]| [default] enim ad minim veniam, quis nostrud exercitation", + "[error] [red]| [default] ullamco laboris nisi ut aliquip ex ea commodo", + "[error] [red]| [default] consequat. Duis aute irure dolor in", + "[error] [red]| [default] reprehenderit in voluptate velit esse cillum", + "[error] [red]| [default] dolore eu fugiat nulla pariatur. Excepteur sint", + "[error] [red]| [default] occaecat cupidatat non proident, sunt in culpa", + "[error] [red]| [default] qui officia deserunt mollit anim id est laborum.", + "[error] ", + "[log] ", + "[log] ", +] `; exports[`CustomTipsConfiguration formatting (a long message with an indented line) _showInfoTip prints an expected message 1`] = ` -Object { - "log": Array [ - "| Custom Tip (TIP_PNPM_INVALID_NODE_VERSION)", - "|", - "| Lorem ipsum dolor sit amet, consectetur adipiscing elit,", - "| sed do eiusmod tempor incididunt ut labore et dolore magna", - "| aliqua. Ut enim ad minim veniam, quis nostrud exercitation", - "| ullamco laboris nisi ut aliquip ex ea commodo consequat.", - "| Duis aute irure dolor in reprehenderit in voluptate velit", - "| esse cillum dolore eu fugiat nulla pariatur. Excepteur", - "| sint occaecat cupidatat non proident, sunt in culpa qui", - "| officia deserunt mollit anim id est laborum.", - "| Lorem ipsum dolor sit amet, consectetur adipiscing elit,", - "| sed do eiusmod tempor incididunt ut labore et dolore magna", - "| aliqua. Ut enim ad minim veniam, quis nostrud exercitation", - "| ullamco laboris nisi ut aliquip ex ea commodo consequat.", - "| Duis aute irure dolor in reprehenderit in voluptate velit", - "| esse cillum dolore eu fugiat nulla pariatur. Excepteur", - "| sint occaecat cupidatat non proident, sunt in culpa qui", - "| officia deserunt mollit anim id est laborum.", - "", - "", - ], -} +Array [ + "[log] | Custom Tip (TIP_PNPM_INVALID_NODE_VERSION)", + "[log] |", + "[log] | Lorem ipsum dolor sit amet, consectetur adipiscing elit,", + "[log] | sed do eiusmod tempor incididunt ut labore et dolore magna", + "[log] | aliqua. Ut enim ad minim veniam, quis nostrud exercitation", + "[log] | ullamco laboris nisi ut aliquip ex ea commodo consequat.", + "[log] | Duis aute irure dolor in reprehenderit in voluptate velit", + "[log] | esse cillum dolore eu fugiat nulla pariatur. Excepteur", + "[log] | sint occaecat cupidatat non proident, sunt in culpa qui", + "[log] | officia deserunt mollit anim id est laborum.", + "[log] | Lorem ipsum dolor sit amet, consectetur adipiscing elit,", + "[log] | sed do eiusmod tempor incididunt ut labore et dolore magna", + "[log] | aliqua. Ut enim ad minim veniam, quis nostrud exercitation", + "[log] | ullamco laboris nisi ut aliquip ex ea commodo consequat.", + "[log] | Duis aute irure dolor in reprehenderit in voluptate velit", + "[log] | esse cillum dolore eu fugiat nulla pariatur. Excepteur", + "[log] | sint occaecat cupidatat non proident, sunt in culpa qui", + "[log] | officia deserunt mollit anim id est laborum.", + "[log] ", + "[log] ", +] `; exports[`CustomTipsConfiguration formatting (a long message with an indented line) _showTip prints an expected message 1`] = ` -Object { - "error": Array [ - "[red]| Custom Tip (TIP_PNPM_INVALID_NODE_VERSION)[default]", - "[red]|[default]", - "[red]| [default]Lorem ipsum dolor sit amet, consectetur", - "[red]| [default]adipiscing elit, sed do eiusmod tempor", - "[red]| [default]incididunt ut labore et dolore magna aliqua. Ut", - "[red]| [default]enim ad minim veniam, quis nostrud exercitation", - "[red]| [default]ullamco laboris nisi ut aliquip ex ea commodo", - "[red]| [default]consequat. Duis aute irure dolor in", - "[red]| [default]reprehenderit in voluptate velit esse cillum", - "[red]| [default]dolore eu fugiat nulla pariatur. Excepteur sint", - "[red]| [default]occaecat cupidatat non proident, sunt in culpa", - "[red]| [default]qui officia deserunt mollit anim id est laborum.", - "[red]| [default] Lorem ipsum dolor sit amet, consectetur", - "[red]| [default] adipiscing elit, sed do eiusmod tempor", - "[red]| [default] incididunt ut labore et dolore magna aliqua. Ut", - "[red]| [default] enim ad minim veniam, quis nostrud exercitation", - "[red]| [default] ullamco laboris nisi ut aliquip ex ea commodo", - "[red]| [default] consequat. Duis aute irure dolor in", - "[red]| [default] reprehenderit in voluptate velit esse cillum", - "[red]| [default] dolore eu fugiat nulla pariatur. Excepteur sint", - "[red]| [default] occaecat cupidatat non proident, sunt in culpa", - "[red]| [default] qui officia deserunt mollit anim id est laborum.", - "", - ], - "log": Array [ - "", - "", - ], -} +Array [ + "[error] [red]| Custom Tip (TIP_PNPM_INVALID_NODE_VERSION)[default]", + "[error] [red]|[default]", + "[error] [red]| [default]Lorem ipsum dolor sit amet, consectetur", + "[error] [red]| [default]adipiscing elit, sed do eiusmod tempor", + "[error] [red]| [default]incididunt ut labore et dolore magna aliqua. Ut", + "[error] [red]| [default]enim ad minim veniam, quis nostrud exercitation", + "[error] [red]| [default]ullamco laboris nisi ut aliquip ex ea commodo", + "[error] [red]| [default]consequat. Duis aute irure dolor in", + "[error] [red]| [default]reprehenderit in voluptate velit esse cillum", + "[error] [red]| [default]dolore eu fugiat nulla pariatur. Excepteur sint", + "[error] [red]| [default]occaecat cupidatat non proident, sunt in culpa", + "[error] [red]| [default]qui officia deserunt mollit anim id est laborum.", + "[error] [red]| [default] Lorem ipsum dolor sit amet, consectetur", + "[error] [red]| [default] adipiscing elit, sed do eiusmod tempor", + "[error] [red]| [default] incididunt ut labore et dolore magna aliqua. Ut", + "[error] [red]| [default] enim ad minim veniam, quis nostrud exercitation", + "[error] [red]| [default] ullamco laboris nisi ut aliquip ex ea commodo", + "[error] [red]| [default] consequat. Duis aute irure dolor in", + "[error] [red]| [default] reprehenderit in voluptate velit esse cillum", + "[error] [red]| [default] dolore eu fugiat nulla pariatur. Excepteur sint", + "[error] [red]| [default] occaecat cupidatat non proident, sunt in culpa", + "[error] [red]| [default] qui officia deserunt mollit anim id est laborum.", + "[error] ", + "[log] ", + "[log] ", +] `; exports[`CustomTipsConfiguration formatting (a long message with an indented line) _showWarningTip prints an expected message 1`] = ` -Object { - "log": Array [ - "", - "", - ], - "warning": Array [ - "[yellow]| Custom Tip (TIP_PNPM_INVALID_NODE_VERSION)[default]", - "[yellow]|[default]", - "[yellow]| [default]Lorem ipsum dolor sit amet, consectetur", - "[yellow]| [default]adipiscing elit, sed do eiusmod tempor", - "[yellow]| [default]incididunt ut labore et dolore magna aliqua. Ut", - "[yellow]| [default]enim ad minim veniam, quis nostrud exercitation", - "[yellow]| [default]ullamco laboris nisi ut aliquip ex ea commodo", - "[yellow]| [default]consequat. Duis aute irure dolor in", - "[yellow]| [default]reprehenderit in voluptate velit esse cillum", - "[yellow]| [default]dolore eu fugiat nulla pariatur. Excepteur sint", - "[yellow]| [default]occaecat cupidatat non proident, sunt in culpa", - "[yellow]| [default]qui officia deserunt mollit anim id est laborum.", - "[yellow]| [default] Lorem ipsum dolor sit amet, consectetur", - "[yellow]| [default] adipiscing elit, sed do eiusmod tempor", - "[yellow]| [default] incididunt ut labore et dolore magna aliqua. Ut", - "[yellow]| [default] enim ad minim veniam, quis nostrud exercitation", - "[yellow]| [default] ullamco laboris nisi ut aliquip ex ea commodo", - "[yellow]| [default] consequat. Duis aute irure dolor in", - "[yellow]| [default] reprehenderit in voluptate velit esse cillum", - "[yellow]| [default] dolore eu fugiat nulla pariatur. Excepteur sint", - "[yellow]| [default] occaecat cupidatat non proident, sunt in culpa", - "[yellow]| [default] qui officia deserunt mollit anim id est laborum.", - "", - ], -} +Array [ + "[warning] [yellow]| Custom Tip (TIP_PNPM_INVALID_NODE_VERSION)[default]", + "[warning] [yellow]|[default]", + "[warning] [yellow]| [default]Lorem ipsum dolor sit amet, consectetur", + "[warning] [yellow]| [default]adipiscing elit, sed do eiusmod tempor", + "[warning] [yellow]| [default]incididunt ut labore et dolore magna aliqua. Ut", + "[warning] [yellow]| [default]enim ad minim veniam, quis nostrud exercitation", + "[warning] [yellow]| [default]ullamco laboris nisi ut aliquip ex ea commodo", + "[warning] [yellow]| [default]consequat. Duis aute irure dolor in", + "[warning] [yellow]| [default]reprehenderit in voluptate velit esse cillum", + "[warning] [yellow]| [default]dolore eu fugiat nulla pariatur. Excepteur sint", + "[warning] [yellow]| [default]occaecat cupidatat non proident, sunt in culpa", + "[warning] [yellow]| [default]qui officia deserunt mollit anim id est laborum.", + "[warning] [yellow]| [default] Lorem ipsum dolor sit amet, consectetur", + "[warning] [yellow]| [default] adipiscing elit, sed do eiusmod tempor", + "[warning] [yellow]| [default] incididunt ut labore et dolore magna aliqua. Ut", + "[warning] [yellow]| [default] enim ad minim veniam, quis nostrud exercitation", + "[warning] [yellow]| [default] ullamco laboris nisi ut aliquip ex ea commodo", + "[warning] [yellow]| [default] consequat. Duis aute irure dolor in", + "[warning] [yellow]| [default] reprehenderit in voluptate velit esse cillum", + "[warning] [yellow]| [default] dolore eu fugiat nulla pariatur. Excepteur sint", + "[warning] [yellow]| [default] occaecat cupidatat non proident, sunt in culpa", + "[warning] [yellow]| [default] qui officia deserunt mollit anim id est laborum.", + "[warning] ", + "[log] ", + "[log] ", +] `; exports[`CustomTipsConfiguration formatting (a long message) _showErrorTip prints an expected message 1`] = ` -Object { - "error": Array [ - "[red]| Custom Tip (TIP_PNPM_INVALID_NODE_VERSION)[default]", - "[red]|[default]", - "[red]| [default]Lorem ipsum dolor sit amet, consectetur", - "[red]| [default]adipiscing elit, sed do eiusmod tempor", - "[red]| [default]incididunt ut labore et dolore magna aliqua. Ut", - "[red]| [default]enim ad minim veniam, quis nostrud exercitation", - "[red]| [default]ullamco laboris nisi ut aliquip ex ea commodo", - "[red]| [default]consequat. Duis aute irure dolor in", - "[red]| [default]reprehenderit in voluptate velit esse cillum", - "[red]| [default]dolore eu fugiat nulla pariatur. Excepteur sint", - "[red]| [default]occaecat cupidatat non proident, sunt in culpa", - "[red]| [default]qui officia deserunt mollit anim id est laborum.", - "", - ], - "log": Array [ - "", - "", - ], -} +Array [ + "[error] [red]| Custom Tip (TIP_PNPM_INVALID_NODE_VERSION)[default]", + "[error] [red]|[default]", + "[error] [red]| [default]Lorem ipsum dolor sit amet, consectetur", + "[error] [red]| [default]adipiscing elit, sed do eiusmod tempor", + "[error] [red]| [default]incididunt ut labore et dolore magna aliqua. Ut", + "[error] [red]| [default]enim ad minim veniam, quis nostrud exercitation", + "[error] [red]| [default]ullamco laboris nisi ut aliquip ex ea commodo", + "[error] [red]| [default]consequat. Duis aute irure dolor in", + "[error] [red]| [default]reprehenderit in voluptate velit esse cillum", + "[error] [red]| [default]dolore eu fugiat nulla pariatur. Excepteur sint", + "[error] [red]| [default]occaecat cupidatat non proident, sunt in culpa", + "[error] [red]| [default]qui officia deserunt mollit anim id est laborum.", + "[error] ", + "[log] ", + "[log] ", +] `; exports[`CustomTipsConfiguration formatting (a long message) _showInfoTip prints an expected message 1`] = ` -Object { - "log": Array [ - "| Custom Tip (TIP_PNPM_INVALID_NODE_VERSION)", - "|", - "| Lorem ipsum dolor sit amet, consectetur adipiscing elit,", - "| sed do eiusmod tempor incididunt ut labore et dolore magna", - "| aliqua. Ut enim ad minim veniam, quis nostrud exercitation", - "| ullamco laboris nisi ut aliquip ex ea commodo consequat.", - "| Duis aute irure dolor in reprehenderit in voluptate velit", - "| esse cillum dolore eu fugiat nulla pariatur. Excepteur", - "| sint occaecat cupidatat non proident, sunt in culpa qui", - "| officia deserunt mollit anim id est laborum.", - "", - "", - ], -} +Array [ + "[log] | Custom Tip (TIP_PNPM_INVALID_NODE_VERSION)", + "[log] |", + "[log] | Lorem ipsum dolor sit amet, consectetur adipiscing elit,", + "[log] | sed do eiusmod tempor incididunt ut labore et dolore magna", + "[log] | aliqua. Ut enim ad minim veniam, quis nostrud exercitation", + "[log] | ullamco laboris nisi ut aliquip ex ea commodo consequat.", + "[log] | Duis aute irure dolor in reprehenderit in voluptate velit", + "[log] | esse cillum dolore eu fugiat nulla pariatur. Excepteur", + "[log] | sint occaecat cupidatat non proident, sunt in culpa qui", + "[log] | officia deserunt mollit anim id est laborum.", + "[log] ", + "[log] ", +] `; exports[`CustomTipsConfiguration formatting (a long message) _showTip prints an expected message 1`] = ` -Object { - "error": Array [ - "[red]| Custom Tip (TIP_PNPM_INVALID_NODE_VERSION)[default]", - "[red]|[default]", - "[red]| [default]Lorem ipsum dolor sit amet, consectetur", - "[red]| [default]adipiscing elit, sed do eiusmod tempor", - "[red]| [default]incididunt ut labore et dolore magna aliqua. Ut", - "[red]| [default]enim ad minim veniam, quis nostrud exercitation", - "[red]| [default]ullamco laboris nisi ut aliquip ex ea commodo", - "[red]| [default]consequat. Duis aute irure dolor in", - "[red]| [default]reprehenderit in voluptate velit esse cillum", - "[red]| [default]dolore eu fugiat nulla pariatur. Excepteur sint", - "[red]| [default]occaecat cupidatat non proident, sunt in culpa", - "[red]| [default]qui officia deserunt mollit anim id est laborum.", - "", - ], - "log": Array [ - "", - "", - ], -} +Array [ + "[error] [red]| Custom Tip (TIP_PNPM_INVALID_NODE_VERSION)[default]", + "[error] [red]|[default]", + "[error] [red]| [default]Lorem ipsum dolor sit amet, consectetur", + "[error] [red]| [default]adipiscing elit, sed do eiusmod tempor", + "[error] [red]| [default]incididunt ut labore et dolore magna aliqua. Ut", + "[error] [red]| [default]enim ad minim veniam, quis nostrud exercitation", + "[error] [red]| [default]ullamco laboris nisi ut aliquip ex ea commodo", + "[error] [red]| [default]consequat. Duis aute irure dolor in", + "[error] [red]| [default]reprehenderit in voluptate velit esse cillum", + "[error] [red]| [default]dolore eu fugiat nulla pariatur. Excepteur sint", + "[error] [red]| [default]occaecat cupidatat non proident, sunt in culpa", + "[error] [red]| [default]qui officia deserunt mollit anim id est laborum.", + "[error] ", + "[log] ", + "[log] ", +] `; exports[`CustomTipsConfiguration formatting (a long message) _showWarningTip prints an expected message 1`] = ` -Object { - "log": Array [ - "", - "", - ], - "warning": Array [ - "[yellow]| Custom Tip (TIP_PNPM_INVALID_NODE_VERSION)[default]", - "[yellow]|[default]", - "[yellow]| [default]Lorem ipsum dolor sit amet, consectetur", - "[yellow]| [default]adipiscing elit, sed do eiusmod tempor", - "[yellow]| [default]incididunt ut labore et dolore magna aliqua. Ut", - "[yellow]| [default]enim ad minim veniam, quis nostrud exercitation", - "[yellow]| [default]ullamco laboris nisi ut aliquip ex ea commodo", - "[yellow]| [default]consequat. Duis aute irure dolor in", - "[yellow]| [default]reprehenderit in voluptate velit esse cillum", - "[yellow]| [default]dolore eu fugiat nulla pariatur. Excepteur sint", - "[yellow]| [default]occaecat cupidatat non proident, sunt in culpa", - "[yellow]| [default]qui officia deserunt mollit anim id est laborum.", - "", - ], -} +Array [ + "[warning] [yellow]| Custom Tip (TIP_PNPM_INVALID_NODE_VERSION)[default]", + "[warning] [yellow]|[default]", + "[warning] [yellow]| [default]Lorem ipsum dolor sit amet, consectetur", + "[warning] [yellow]| [default]adipiscing elit, sed do eiusmod tempor", + "[warning] [yellow]| [default]incididunt ut labore et dolore magna aliqua. Ut", + "[warning] [yellow]| [default]enim ad minim veniam, quis nostrud exercitation", + "[warning] [yellow]| [default]ullamco laboris nisi ut aliquip ex ea commodo", + "[warning] [yellow]| [default]consequat. Duis aute irure dolor in", + "[warning] [yellow]| [default]reprehenderit in voluptate velit esse cillum", + "[warning] [yellow]| [default]dolore eu fugiat nulla pariatur. Excepteur sint", + "[warning] [yellow]| [default]occaecat cupidatat non proident, sunt in culpa", + "[warning] [yellow]| [default]qui officia deserunt mollit anim id est laborum.", + "[warning] ", + "[log] ", + "[log] ", +] `; exports[`CustomTipsConfiguration formatting (a message with an indented line) _showErrorTip prints an expected message 1`] = ` -Object { - "error": Array [ - "[red]| Custom Tip (TIP_PNPM_INVALID_NODE_VERSION)[default]", - "[red]|[default]", - "[red]| [default]This is a test", - "[red]| [default] This is a test", - "", - ], - "log": Array [ - "", - "", - ], -} +Array [ + "[error] [red]| Custom Tip (TIP_PNPM_INVALID_NODE_VERSION)[default]", + "[error] [red]|[default]", + "[error] [red]| [default]This is a test", + "[error] [red]| [default] This is a test", + "[error] ", + "[log] ", + "[log] ", +] `; exports[`CustomTipsConfiguration formatting (a message with an indented line) _showInfoTip prints an expected message 1`] = ` -Object { - "log": Array [ - "| Custom Tip (TIP_PNPM_INVALID_NODE_VERSION)", - "|", - "| This is a test", - "| This is a test", - "", - "", - ], -} +Array [ + "[log] | Custom Tip (TIP_PNPM_INVALID_NODE_VERSION)", + "[log] |", + "[log] | This is a test", + "[log] | This is a test", + "[log] ", + "[log] ", +] `; exports[`CustomTipsConfiguration formatting (a message with an indented line) _showTip prints an expected message 1`] = ` -Object { - "error": Array [ - "[red]| Custom Tip (TIP_PNPM_INVALID_NODE_VERSION)[default]", - "[red]|[default]", - "[red]| [default]This is a test", - "[red]| [default] This is a test", - "", - ], - "log": Array [ - "", - "", - ], -} +Array [ + "[error] [red]| Custom Tip (TIP_PNPM_INVALID_NODE_VERSION)[default]", + "[error] [red]|[default]", + "[error] [red]| [default]This is a test", + "[error] [red]| [default] This is a test", + "[error] ", + "[log] ", + "[log] ", +] `; exports[`CustomTipsConfiguration formatting (a message with an indented line) _showWarningTip prints an expected message 1`] = ` -Object { - "log": Array [ - "", - "", - ], - "warning": Array [ - "[yellow]| Custom Tip (TIP_PNPM_INVALID_NODE_VERSION)[default]", - "[yellow]|[default]", - "[yellow]| [default]This is a test", - "[yellow]| [default] This is a test", - "", - ], -} +Array [ + "[warning] [yellow]| Custom Tip (TIP_PNPM_INVALID_NODE_VERSION)[default]", + "[warning] [yellow]|[default]", + "[warning] [yellow]| [default]This is a test", + "[warning] [yellow]| [default] This is a test", + "[warning] ", + "[log] ", + "[log] ", +] `; exports[`CustomTipsConfiguration formatting (a message with newlines) _showErrorTip prints an expected message 1`] = ` -Object { - "error": Array [ - "[red]| Custom Tip (TIP_PNPM_INVALID_NODE_VERSION)[default]", - "[red]|[default]", - "[red]| [default]This is a test", - "[red]| [default]This is a test", - "", - ], - "log": Array [ - "", - "", - ], -} +Array [ + "[error] [red]| Custom Tip (TIP_PNPM_INVALID_NODE_VERSION)[default]", + "[error] [red]|[default]", + "[error] [red]| [default]This is a test", + "[error] [red]| [default]This is a test", + "[error] ", + "[log] ", + "[log] ", +] `; exports[`CustomTipsConfiguration formatting (a message with newlines) _showInfoTip prints an expected message 1`] = ` -Object { - "log": Array [ - "| Custom Tip (TIP_PNPM_INVALID_NODE_VERSION)", - "|", - "| This is a test", - "| This is a test", - "", - "", - ], -} +Array [ + "[log] | Custom Tip (TIP_PNPM_INVALID_NODE_VERSION)", + "[log] |", + "[log] | This is a test", + "[log] | This is a test", + "[log] ", + "[log] ", +] `; exports[`CustomTipsConfiguration formatting (a message with newlines) _showTip prints an expected message 1`] = ` -Object { - "error": Array [ - "[red]| Custom Tip (TIP_PNPM_INVALID_NODE_VERSION)[default]", - "[red]|[default]", - "[red]| [default]This is a test", - "[red]| [default]This is a test", - "", - ], - "log": Array [ - "", - "", - ], -} +Array [ + "[error] [red]| Custom Tip (TIP_PNPM_INVALID_NODE_VERSION)[default]", + "[error] [red]|[default]", + "[error] [red]| [default]This is a test", + "[error] [red]| [default]This is a test", + "[error] ", + "[log] ", + "[log] ", +] `; exports[`CustomTipsConfiguration formatting (a message with newlines) _showWarningTip prints an expected message 1`] = ` -Object { - "log": Array [ - "", - "", - ], - "warning": Array [ - "[yellow]| Custom Tip (TIP_PNPM_INVALID_NODE_VERSION)[default]", - "[yellow]|[default]", - "[yellow]| [default]This is a test", - "[yellow]| [default]This is a test", - "", - ], -} +Array [ + "[warning] [yellow]| Custom Tip (TIP_PNPM_INVALID_NODE_VERSION)[default]", + "[warning] [yellow]|[default]", + "[warning] [yellow]| [default]This is a test", + "[warning] [yellow]| [default]This is a test", + "[warning] ", + "[log] ", + "[log] ", +] `; exports[`CustomTipsConfiguration formatting (a short message) _showErrorTip prints an expected message 1`] = ` -Object { - "error": Array [ - "[red]| Custom Tip (TIP_PNPM_INVALID_NODE_VERSION)[default]", - "[red]|[default]", - "[red]| [default]This is a test", - "", - ], - "log": Array [ - "", - "", - ], -} +Array [ + "[error] [red]| Custom Tip (TIP_PNPM_INVALID_NODE_VERSION)[default]", + "[error] [red]|[default]", + "[error] [red]| [default]This is a test", + "[error] ", + "[log] ", + "[log] ", +] `; exports[`CustomTipsConfiguration formatting (a short message) _showInfoTip prints an expected message 1`] = ` -Object { - "log": Array [ - "| Custom Tip (TIP_PNPM_INVALID_NODE_VERSION)", - "|", - "| This is a test", - "", - "", - ], -} +Array [ + "[log] | Custom Tip (TIP_PNPM_INVALID_NODE_VERSION)", + "[log] |", + "[log] | This is a test", + "[log] ", + "[log] ", +] `; exports[`CustomTipsConfiguration formatting (a short message) _showTip prints an expected message 1`] = ` -Object { - "error": Array [ - "[red]| Custom Tip (TIP_PNPM_INVALID_NODE_VERSION)[default]", - "[red]|[default]", - "[red]| [default]This is a test", - "", - ], - "log": Array [ - "", - "", - ], -} +Array [ + "[error] [red]| Custom Tip (TIP_PNPM_INVALID_NODE_VERSION)[default]", + "[error] [red]|[default]", + "[error] [red]| [default]This is a test", + "[error] ", + "[log] ", + "[log] ", +] `; exports[`CustomTipsConfiguration formatting (a short message) _showWarningTip prints an expected message 1`] = ` -Object { - "log": Array [ - "", - "", - ], - "warning": Array [ - "[yellow]| Custom Tip (TIP_PNPM_INVALID_NODE_VERSION)[default]", - "[yellow]|[default]", - "[yellow]| [default]This is a test", - "", - ], -} +Array [ + "[warning] [yellow]| Custom Tip (TIP_PNPM_INVALID_NODE_VERSION)[default]", + "[warning] [yellow]|[default]", + "[warning] [yellow]| [default]This is a test", + "[warning] ", + "[log] ", + "[log] ", +] `; exports[`CustomTipsConfiguration loads the config file (custom-tips.json) 1`] = ` diff --git a/libraries/rush-lib/src/api/test/__snapshots__/RushProjectConfiguration.test.ts.snap b/libraries/rush-lib/src/api/test/__snapshots__/RushProjectConfiguration.test.ts.snap index 77b7f7c2bb..987a503a40 100644 --- a/libraries/rush-lib/src/api/test/__snapshots__/RushProjectConfiguration.test.ts.snap +++ b/libraries/rush-lib/src/api/test/__snapshots__/RushProjectConfiguration.test.ts.snap @@ -10,7 +10,7 @@ exports[`RushProjectConfiguration getCacheDisabledReason Indicates if tracked fi exports[`RushProjectConfiguration getCacheDisabledReason returns reason if the operation is runnable 1`] = `"Caching has been disabled for this project's \\"_phase:a\\" command."`; -exports[`RushProjectConfiguration operationSettingsByOperationName allows outputFolderNames to be inside subfolders 1`] = `Object {}`; +exports[`RushProjectConfiguration operationSettingsByOperationName allows outputFolderNames to be inside subfolders 1`] = `Array []`; exports[`RushProjectConfiguration operationSettingsByOperationName allows outputFolderNames to be inside subfolders 2`] = ` Map { @@ -31,12 +31,12 @@ Map { `; exports[`RushProjectConfiguration operationSettingsByOperationName does not allow one outputFolderName to be under another 1`] = ` -Object { - "error": "The project \\"test-project-d\\" has a \\"config/rush-project.json\\" configuration that defines two operations in the same command whose \\"outputFolderNames\\" would overlap. Operations outputs in the same command must be disjoint so that they can be independently cached. The \\"a/b\\" path overlaps between these operations: \\"_phase:b\\", \\"_phase:a\\"[n]", -} +Array [ + "[ error] The project \\"test-project-d\\" has a \\"config/rush-project.json\\" configuration that defines two operations in the same command whose \\"outputFolderNames\\" would overlap. Operations outputs in the same command must be disjoint so that they can be independently cached. The \\"a/b\\" path overlaps between these operations: \\"_phase:b\\", \\"_phase:a\\"[n]", +] `; -exports[`RushProjectConfiguration operationSettingsByOperationName loads a rush-project.json config that extends another config file 1`] = `Object {}`; +exports[`RushProjectConfiguration operationSettingsByOperationName loads a rush-project.json config that extends another config file 1`] = `Array []`; exports[`RushProjectConfiguration operationSettingsByOperationName loads a rush-project.json config that extends another config file 2`] = ` Map { @@ -59,19 +59,19 @@ Map { exports[`RushProjectConfiguration operationSettingsByOperationName throws an error when loading a rush-project.json config that lists an operation twice 1`] = `"The operation \\"_phase:a\\" occurs multiple times in the \\"operationSettings\\" array in \\"/config/rush-project.json\\"."`; exports[`RushProjectConfiguration operationSettingsByOperationName validates mix of existent and nonexistent parameters 1`] = ` -Object { - "error": "The project \\"test-project-g\\" has a \\"config/rush-project.json\\" configuration that specifies invalid parameter(s) in \\"parameterNamesToIgnore\\" for operation \\"_phase:build\\": --nonexistent-param. Valid parameters for this operation are: --production, --verbose.[n]", -} +Array [ + "[ error] The project \\"test-project-g\\" has a \\"config/rush-project.json\\" configuration that specifies invalid parameter(s) in \\"parameterNamesToIgnore\\" for operation \\"_phase:build\\": --nonexistent-param. Valid parameters for this operation are: --production, --verbose.[n]", +] `; exports[`RushProjectConfiguration operationSettingsByOperationName validates nonexistent parameters when operation has valid parameters 1`] = ` -Object { - "error": "The project \\"test-project-f\\" has a \\"config/rush-project.json\\" configuration that specifies invalid parameter(s) in \\"parameterNamesToIgnore\\" for operation \\"_phase:build\\": --nonexistent-param, --another-nonexistent. Valid parameters for this operation are: --production, --verbose.[n]", -} +Array [ + "[ error] The project \\"test-project-f\\" has a \\"config/rush-project.json\\" configuration that specifies invalid parameter(s) in \\"parameterNamesToIgnore\\" for operation \\"_phase:build\\": --nonexistent-param, --another-nonexistent. Valid parameters for this operation are: --production, --verbose.[n]", +] `; exports[`RushProjectConfiguration operationSettingsByOperationName validates that parameters in parameterNamesToIgnore exist for the operation 1`] = ` -Object { - "error": "The project \\"test-project-e\\" has a \\"config/rush-project.json\\" configuration that specifies invalid parameter(s) in \\"parameterNamesToIgnore\\" for operation \\"_phase:build\\": --invalid-parameter, --another-invalid, -malformed-parameter. Valid parameters for this operation are: (none).[n]", -} +Array [ + "[ error] The project \\"test-project-e\\" has a \\"config/rush-project.json\\" configuration that specifies invalid parameter(s) in \\"parameterNamesToIgnore\\" for operation \\"_phase:build\\": --invalid-parameter, --another-invalid, -malformed-parameter. Valid parameters for this operation are: (none).[n]", +] `; diff --git a/libraries/rush-lib/src/logic/operations/test/BuildPlanPlugin.test.ts b/libraries/rush-lib/src/logic/operations/test/BuildPlanPlugin.test.ts index b619d0a017..c5ce91c6fd 100644 --- a/libraries/rush-lib/src/logic/operations/test/BuildPlanPlugin.test.ts +++ b/libraries/rush-lib/src/logic/operations/test/BuildPlanPlugin.test.ts @@ -139,7 +139,10 @@ describe(BuildPlanPlugin.name, () => { await hooks.beforeExecuteOperations.promise(operationMap, context as IExecuteOperationsContext); expect( - stringBufferTerminalProvider.getAllOutput(true, { normalizeSpecialCharacters: false }) + stringBufferTerminalProvider.getAllOutputAsChunks({ + normalizeSpecialCharacters: false, + asLines: true + }) ).toMatchSnapshot(); }); }); diff --git a/libraries/rush-lib/src/logic/operations/test/OperationMetadataManager.test.ts b/libraries/rush-lib/src/logic/operations/test/OperationMetadataManager.test.ts index 13efc4415e..6443e873d6 100644 --- a/libraries/rush-lib/src/logic/operations/test/OperationMetadataManager.test.ts +++ b/libraries/rush-lib/src/logic/operations/test/OperationMetadataManager.test.ts @@ -63,7 +63,7 @@ describe(OperationMetadataManager.name, () => { errorLogPath: '/path/to/errorLog' }); - expect(mockTerminalProvider.getAllOutput(true)).toMatchSnapshot(); + expect(mockTerminalProvider.getAllOutputAsChunks({ asLines: true })).toMatchSnapshot(); expect(mockTerminalProvider.getWarningOutput()).toBeFalsy(); }); @@ -87,7 +87,7 @@ describe(OperationMetadataManager.name, () => { errorLogPath: '/path/to/errorLog' }); - expect(mockTerminalProvider.getAllOutput(true)).toMatchSnapshot(); + expect(mockTerminalProvider.getAllOutputAsChunks({ asLines: true })).toMatchSnapshot(); }); it('should restore mixed chunked output', async () => { @@ -109,7 +109,7 @@ describe(OperationMetadataManager.name, () => { terminalProvider: mockTerminalProvider, errorLogPath: '/path/to/errorLog' }); - expect(mockTerminalProvider.getAllOutput(true)).toMatchSnapshot(); + expect(mockTerminalProvider.getAllOutputAsChunks({ asLines: true })).toMatchSnapshot(); }); it("should fallback to the log file when chunked output isn't available", async () => { diff --git a/libraries/rush-lib/src/logic/operations/test/__snapshots__/BuildPlanPlugin.test.ts.snap b/libraries/rush-lib/src/logic/operations/test/__snapshots__/BuildPlanPlugin.test.ts.snap index dcc4321458..619360abed 100644 --- a/libraries/rush-lib/src/logic/operations/test/__snapshots__/BuildPlanPlugin.test.ts.snap +++ b/libraries/rush-lib/src/logic/operations/test/__snapshots__/BuildPlanPlugin.test.ts.snap @@ -1,327 +1,326 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`BuildPlanPlugin build plan debugging should generate a build plan 1`] = ` -Object { - "log": "Build Plan Depth (deepest dependency tree): 5 -Build Plan Width (maximum parallelism): 38 -Number of Nodes per Depth: 22, 38, 33, 11, 1 -Plan @ Depth 0 has 22 nodes and 0 dependents: -- a (no-deps) -- b (no-deps) -- c (no-deps) -- d (no-deps) -- e (no-deps) -- f (no-deps) -- g (no-deps) -- h (no-deps) -- a (upstream-1) -- a (upstream-2) -- a (upstream-1-self-upstream) -- i (no-deps) -- j (no-deps) -- i (upstream-1) -- j (upstream-1) -- i (upstream-2) -- j (upstream-2) -- a (upstream-3) -- i (upstream-3) -- j (upstream-3) -- i (upstream-1-self-upstream) -- j (upstream-1-self-upstream) -Plan @ Depth 1 has 38 nodes and 22 dependents: -- a (upstream-self) -- b (upstream-1) -- f (upstream-1) -- g (upstream-1) -- h (upstream-1) -- b (upstream-self) -- c (upstream-1) -- d (upstream-1) -- c (upstream-self) -- e (upstream-1) -- d (upstream-self) -- e (upstream-self) -- f (upstream-self) -- g (upstream-self) -- h (upstream-self) -- b (upstream-2) -- f (upstream-2) -- g (upstream-2) -- h (upstream-2) -- a (upstream-1-self) -- b (upstream-3) -- f (upstream-3) -- g (upstream-3) -- h (upstream-3) -- a (upstream-2-self) -- b (complex) -- f (complex) -- g (complex) -- h (complex) -- i (upstream-self) -- j (upstream-self) -- i (upstream-1-self) -- j (upstream-1-self) -- i (upstream-2-self) -- j (upstream-2-self) -- a (complex) -- i (complex) -- j (complex) -Plan @ Depth 2 has 33 nodes and 60 dependents: -- b (upstream-self) -- f (upstream-self) -- h (upstream-self) -- g (upstream-self) -- c (upstream-2) -- d (upstream-2) -- b (upstream-1-self) -- f (upstream-1-self) -- g (upstream-1-self) -- f (upstream-2) -- h (upstream-1-self) -- c (upstream-self) -- d (upstream-self) -- e (upstream-2) -- c (upstream-1-self) -- d (upstream-1-self) -- e (upstream-self) -- e (upstream-1-self) -- c (upstream-3) -- d (upstream-3) -- b (upstream-2-self) -- f (upstream-2-self) -- g (upstream-2-self) -- f (upstream-3) -- h (upstream-2-self) -- b (upstream-1-self-upstream) -- f (upstream-1-self-upstream) -- g (upstream-1-self-upstream) -- h (upstream-1-self-upstream) -- b (complex) -- f (complex) -- g (complex) -- h (complex) -Plan @ Depth 3 has 11 nodes and 93 dependents: -- e (upstream-3) -- c (upstream-2-self) -- d (upstream-2-self) -- c (upstream-1-self-upstream) -- d (upstream-1-self-upstream) -- f (upstream-1-self-upstream) -- e (upstream-2-self) -- e (upstream-1-self-upstream) -- c (complex) -- d (complex) -- f (complex) -Plan @ Depth 4 has 1 nodes and 104 dependents: -- e (complex) -################################################## - a (no-deps): (0) - b (no-deps): (0) - c (no-deps): (0) - d (no-deps): (0) - e (no-deps): (0) - f (no-deps): (0) - g (no-deps): (0) - h (no-deps): (0) - a (upstream-1): (0) - a (upstream-2): (0) - a (upstream-1-self-upstream): (0) - i (no-deps): (1) - j (no-deps): (2) - i (upstream-1): (3) - j (upstream-1): (4) - i (upstream-2): (5) - j (upstream-2): (6) - a (upstream-3): (7) - i (upstream-3): (8) - j (upstream-3): (9) - i (upstream-1-self-upstream): (10) - j (upstream-1-self-upstream): (11) - a (upstream-self): -(0) - b (upstream-1): -(0) - c (upstream-1): -(0) - d (upstream-1): -(0) - e (upstream-1): -(0) - f (upstream-1): -(0) - g (upstream-1): -(0) - h (upstream-1): -(0) - b (upstream-2): -(0) - g (upstream-2): -(0) - h (upstream-2): -(0) - b (upstream-3): -(0) - g (upstream-3): -(0) - h (upstream-3): -(0) - a (upstream-1-self): -(0) - a (upstream-2-self): -(0) - i (upstream-self): -(1) - j (upstream-self): -(2) - i (upstream-1-self): -(3) - j (upstream-1-self): -(4) - i (upstream-2-self): -(5) - j (upstream-2-self): -(6) - a (complex): -(7) - i (complex): -(8) - j (complex): -(9) - b (upstream-self): --(0) - f (upstream-self): --(0) - h (upstream-self): --(0) - g (upstream-self): --(0) - c (upstream-2): --(0) - d (upstream-2): --(0) - e (upstream-2): --(0) - f (upstream-2): --(0) - c (upstream-3): --(0) - d (upstream-3): --(0) - f (upstream-3): --(0) - b (upstream-1-self): --(0) - c (upstream-1-self): --(0) - d (upstream-1-self): --(0) - e (upstream-1-self): --(0) - f (upstream-1-self): --(0) - g (upstream-1-self): --(0) - h (upstream-1-self): --(0) - b (upstream-2-self): --(0) - g (upstream-2-self): --(0) - h (upstream-2-self): --(0) - b (upstream-1-self-upstream): --(0) - g (upstream-1-self-upstream): --(0) - h (upstream-1-self-upstream): --(0) - b (complex): --(0) - g (complex): --(0) - h (complex): --(0) - c (upstream-self): ---(0) - d (upstream-self): ---(0) - e (upstream-3): ---(0) - c (upstream-2-self): ---(0) - d (upstream-2-self): ---(0) - e (upstream-2-self): ---(0) - f (upstream-2-self): ---(0) - c (upstream-1-self-upstream): ---(0) - d (upstream-1-self-upstream): ---(0) - e (upstream-1-self-upstream): ---(0) - f (upstream-1-self-upstream): ---(0) - c (complex): ---(0) - d (complex): ---(0) - f (complex): ---(0) - e (upstream-self): ----(0) - e (complex): ----(0) -################################################## -Cluster 0: -- Dependencies: none -- Clustered by: - - (a (no-deps)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" - - (b (no-deps)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" - - (a (upstream-self)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" - - (c (no-deps)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" - - (b (upstream-self)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" - - (d (no-deps)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" - - (e (no-deps)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" - - (c (upstream-self)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" - - (f (no-deps)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" - - (h (upstream-self)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" - - (h (no-deps)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" - - (g (no-deps)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" - - (a (upstream-1)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" - - (b (upstream-1)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" - - (c (upstream-1)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" - - (h (upstream-1)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" - - (a (upstream-2)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" - - (b (upstream-2)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" - - (c (upstream-2)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" - - (h (upstream-2)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" - - (d (upstream-1)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" - - (e (upstream-1)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" - - (f (upstream-1)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" - - (g (upstream-1)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" - - (d (upstream-2)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" - - (e (upstream-2)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" - - (f (upstream-2)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" - - (g (upstream-2)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" - - (a (upstream-1-self)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" - - (b (upstream-1-self)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" - - (c (upstream-1-self)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" - - (h (upstream-1-self)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" - - (b (upstream-3)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" - - (a (upstream-1-self-upstream)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" - - (a (upstream-2-self)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" - - (c (upstream-3)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" - - (b (upstream-1-self-upstream)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" - - (b (upstream-2-self)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" - - (d (upstream-3)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" - - (e (upstream-3)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" - - (c (upstream-1-self-upstream)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" - - (c (upstream-2-self)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" - - (f (upstream-3)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" - - (h (upstream-1-self-upstream)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" - - (h (upstream-2-self)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" - - (g (upstream-3)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" - - (h (upstream-3)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" -- Operations: a (no-deps), b (no-deps), c (no-deps), d (no-deps), e (no-deps), f (no-deps), g (no-deps), h (no-deps), a (upstream-self), b (upstream-self), c (upstream-self), d (upstream-self), e (upstream-self), f (upstream-self), h (upstream-self), g (upstream-self), a (upstream-1), b (upstream-1), c (upstream-1), d (upstream-1), e (upstream-1), f (upstream-1), g (upstream-1), h (upstream-1), a (upstream-2), b (upstream-2), c (upstream-2), d (upstream-2), e (upstream-2), f (upstream-2), g (upstream-2), h (upstream-2), b (upstream-3), c (upstream-3), d (upstream-3), e (upstream-3), f (upstream-3), g (upstream-3), h (upstream-3), a (upstream-1-self), b (upstream-1-self), c (upstream-1-self), d (upstream-1-self), e (upstream-1-self), f (upstream-1-self), g (upstream-1-self), h (upstream-1-self), a (upstream-2-self), b (upstream-2-self), c (upstream-2-self), d (upstream-2-self), e (upstream-2-self), f (upstream-2-self), g (upstream-2-self), h (upstream-2-self), a (upstream-1-self-upstream), b (upstream-1-self-upstream), c (upstream-1-self-upstream), d (upstream-1-self-upstream), e (upstream-1-self-upstream), f (upstream-1-self-upstream), g (upstream-1-self-upstream), h (upstream-1-self-upstream), b (complex), c (complex), d (complex), e (complex), f (complex), g (complex), h (complex) --------------------------------------------------- -Cluster 1: -- Dependencies: none -- Clustered by: - - (i (no-deps)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" -- Operations: i (no-deps), i (upstream-self) --------------------------------------------------- -Cluster 2: -- Dependencies: none -- Clustered by: - - (j (no-deps)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" -- Operations: j (no-deps), j (upstream-self) --------------------------------------------------- -Cluster 3: -- Dependencies: none -- Clustered by: - - (i (upstream-1)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" -- Operations: i (upstream-1), i (upstream-1-self) --------------------------------------------------- -Cluster 4: -- Dependencies: none -- Clustered by: - - (j (upstream-1)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" -- Operations: j (upstream-1), j (upstream-1-self) --------------------------------------------------- -Cluster 5: -- Dependencies: none -- Clustered by: - - (i (upstream-2)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" -- Operations: i (upstream-2), i (upstream-2-self) --------------------------------------------------- -Cluster 6: -- Dependencies: none -- Clustered by: - - (j (upstream-2)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" -- Operations: j (upstream-2), j (upstream-2-self) --------------------------------------------------- -Cluster 7: -- Dependencies: none -- Clustered by: - - (a (upstream-3)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" -- Operations: a (upstream-3), a (complex) --------------------------------------------------- -Cluster 8: -- Dependencies: none -- Clustered by: - - (i (upstream-3)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" -- Operations: i (upstream-3), i (complex) --------------------------------------------------- -Cluster 9: -- Dependencies: none -- Clustered by: - - (j (upstream-3)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\" -- Operations: j (upstream-3), j (complex) --------------------------------------------------- -Cluster 10: -- Dependencies: none -- Operations: i (upstream-1-self-upstream) --------------------------------------------------- -Cluster 11: -- Dependencies: none -- Operations: j (upstream-1-self-upstream) --------------------------------------------------- -################################################## -", -} +Array [ + "[ log] Build Plan Depth (deepest dependency tree): 5", + "[ log] Build Plan Width (maximum parallelism): 38", + "[ log] Number of Nodes per Depth: 22, 38, 33, 11, 1", + "[ log] Plan @ Depth 0 has 22 nodes and 0 dependents:", + "[ log] - a (no-deps)", + "[ log] - b (no-deps)", + "[ log] - c (no-deps)", + "[ log] - d (no-deps)", + "[ log] - e (no-deps)", + "[ log] - f (no-deps)", + "[ log] - g (no-deps)", + "[ log] - h (no-deps)", + "[ log] - a (upstream-1)", + "[ log] - a (upstream-2)", + "[ log] - a (upstream-1-self-upstream)", + "[ log] - i (no-deps)", + "[ log] - j (no-deps)", + "[ log] - i (upstream-1)", + "[ log] - j (upstream-1)", + "[ log] - i (upstream-2)", + "[ log] - j (upstream-2)", + "[ log] - a (upstream-3)", + "[ log] - i (upstream-3)", + "[ log] - j (upstream-3)", + "[ log] - i (upstream-1-self-upstream)", + "[ log] - j (upstream-1-self-upstream)", + "[ log] Plan @ Depth 1 has 38 nodes and 22 dependents:", + "[ log] - a (upstream-self)", + "[ log] - b (upstream-1)", + "[ log] - f (upstream-1)", + "[ log] - g (upstream-1)", + "[ log] - h (upstream-1)", + "[ log] - b (upstream-self)", + "[ log] - c (upstream-1)", + "[ log] - d (upstream-1)", + "[ log] - c (upstream-self)", + "[ log] - e (upstream-1)", + "[ log] - d (upstream-self)", + "[ log] - e (upstream-self)", + "[ log] - f (upstream-self)", + "[ log] - g (upstream-self)", + "[ log] - h (upstream-self)", + "[ log] - b (upstream-2)", + "[ log] - f (upstream-2)", + "[ log] - g (upstream-2)", + "[ log] - h (upstream-2)", + "[ log] - a (upstream-1-self)", + "[ log] - b (upstream-3)", + "[ log] - f (upstream-3)", + "[ log] - g (upstream-3)", + "[ log] - h (upstream-3)", + "[ log] - a (upstream-2-self)", + "[ log] - b (complex)", + "[ log] - f (complex)", + "[ log] - g (complex)", + "[ log] - h (complex)", + "[ log] - i (upstream-self)", + "[ log] - j (upstream-self)", + "[ log] - i (upstream-1-self)", + "[ log] - j (upstream-1-self)", + "[ log] - i (upstream-2-self)", + "[ log] - j (upstream-2-self)", + "[ log] - a (complex)", + "[ log] - i (complex)", + "[ log] - j (complex)", + "[ log] Plan @ Depth 2 has 33 nodes and 60 dependents:", + "[ log] - b (upstream-self)", + "[ log] - f (upstream-self)", + "[ log] - h (upstream-self)", + "[ log] - g (upstream-self)", + "[ log] - c (upstream-2)", + "[ log] - d (upstream-2)", + "[ log] - b (upstream-1-self)", + "[ log] - f (upstream-1-self)", + "[ log] - g (upstream-1-self)", + "[ log] - f (upstream-2)", + "[ log] - h (upstream-1-self)", + "[ log] - c (upstream-self)", + "[ log] - d (upstream-self)", + "[ log] - e (upstream-2)", + "[ log] - c (upstream-1-self)", + "[ log] - d (upstream-1-self)", + "[ log] - e (upstream-self)", + "[ log] - e (upstream-1-self)", + "[ log] - c (upstream-3)", + "[ log] - d (upstream-3)", + "[ log] - b (upstream-2-self)", + "[ log] - f (upstream-2-self)", + "[ log] - g (upstream-2-self)", + "[ log] - f (upstream-3)", + "[ log] - h (upstream-2-self)", + "[ log] - b (upstream-1-self-upstream)", + "[ log] - f (upstream-1-self-upstream)", + "[ log] - g (upstream-1-self-upstream)", + "[ log] - h (upstream-1-self-upstream)", + "[ log] - b (complex)", + "[ log] - f (complex)", + "[ log] - g (complex)", + "[ log] - h (complex)", + "[ log] Plan @ Depth 3 has 11 nodes and 93 dependents:", + "[ log] - e (upstream-3)", + "[ log] - c (upstream-2-self)", + "[ log] - d (upstream-2-self)", + "[ log] - c (upstream-1-self-upstream)", + "[ log] - d (upstream-1-self-upstream)", + "[ log] - f (upstream-1-self-upstream)", + "[ log] - e (upstream-2-self)", + "[ log] - e (upstream-1-self-upstream)", + "[ log] - c (complex)", + "[ log] - d (complex)", + "[ log] - f (complex)", + "[ log] Plan @ Depth 4 has 1 nodes and 104 dependents:", + "[ log] - e (complex)", + "[ log] ##################################################", + "[ log] a (no-deps): (0)", + "[ log] b (no-deps): (0)", + "[ log] c (no-deps): (0)", + "[ log] d (no-deps): (0)", + "[ log] e (no-deps): (0)", + "[ log] f (no-deps): (0)", + "[ log] g (no-deps): (0)", + "[ log] h (no-deps): (0)", + "[ log] a (upstream-1): (0)", + "[ log] a (upstream-2): (0)", + "[ log] a (upstream-1-self-upstream): (0)", + "[ log] i (no-deps): (1)", + "[ log] j (no-deps): (2)", + "[ log] i (upstream-1): (3)", + "[ log] j (upstream-1): (4)", + "[ log] i (upstream-2): (5)", + "[ log] j (upstream-2): (6)", + "[ log] a (upstream-3): (7)", + "[ log] i (upstream-3): (8)", + "[ log] j (upstream-3): (9)", + "[ log] i (upstream-1-self-upstream): (10)", + "[ log] j (upstream-1-self-upstream): (11)", + "[ log] a (upstream-self): -(0)", + "[ log] b (upstream-1): -(0)", + "[ log] c (upstream-1): -(0)", + "[ log] d (upstream-1): -(0)", + "[ log] e (upstream-1): -(0)", + "[ log] f (upstream-1): -(0)", + "[ log] g (upstream-1): -(0)", + "[ log] h (upstream-1): -(0)", + "[ log] b (upstream-2): -(0)", + "[ log] g (upstream-2): -(0)", + "[ log] h (upstream-2): -(0)", + "[ log] b (upstream-3): -(0)", + "[ log] g (upstream-3): -(0)", + "[ log] h (upstream-3): -(0)", + "[ log] a (upstream-1-self): -(0)", + "[ log] a (upstream-2-self): -(0)", + "[ log] i (upstream-self): -(1)", + "[ log] j (upstream-self): -(2)", + "[ log] i (upstream-1-self): -(3)", + "[ log] j (upstream-1-self): -(4)", + "[ log] i (upstream-2-self): -(5)", + "[ log] j (upstream-2-self): -(6)", + "[ log] a (complex): -(7)", + "[ log] i (complex): -(8)", + "[ log] j (complex): -(9)", + "[ log] b (upstream-self): --(0)", + "[ log] f (upstream-self): --(0)", + "[ log] h (upstream-self): --(0)", + "[ log] g (upstream-self): --(0)", + "[ log] c (upstream-2): --(0)", + "[ log] d (upstream-2): --(0)", + "[ log] e (upstream-2): --(0)", + "[ log] f (upstream-2): --(0)", + "[ log] c (upstream-3): --(0)", + "[ log] d (upstream-3): --(0)", + "[ log] f (upstream-3): --(0)", + "[ log] b (upstream-1-self): --(0)", + "[ log] c (upstream-1-self): --(0)", + "[ log] d (upstream-1-self): --(0)", + "[ log] e (upstream-1-self): --(0)", + "[ log] f (upstream-1-self): --(0)", + "[ log] g (upstream-1-self): --(0)", + "[ log] h (upstream-1-self): --(0)", + "[ log] b (upstream-2-self): --(0)", + "[ log] g (upstream-2-self): --(0)", + "[ log] h (upstream-2-self): --(0)", + "[ log] b (upstream-1-self-upstream): --(0)", + "[ log] g (upstream-1-self-upstream): --(0)", + "[ log] h (upstream-1-self-upstream): --(0)", + "[ log] b (complex): --(0)", + "[ log] g (complex): --(0)", + "[ log] h (complex): --(0)", + "[ log] c (upstream-self): ---(0)", + "[ log] d (upstream-self): ---(0)", + "[ log] e (upstream-3): ---(0)", + "[ log] c (upstream-2-self): ---(0)", + "[ log] d (upstream-2-self): ---(0)", + "[ log] e (upstream-2-self): ---(0)", + "[ log] f (upstream-2-self): ---(0)", + "[ log] c (upstream-1-self-upstream): ---(0)", + "[ log] d (upstream-1-self-upstream): ---(0)", + "[ log] e (upstream-1-self-upstream): ---(0)", + "[ log] f (upstream-1-self-upstream): ---(0)", + "[ log] c (complex): ---(0)", + "[ log] d (complex): ---(0)", + "[ log] f (complex): ---(0)", + "[ log] e (upstream-self): ----(0)", + "[ log] e (complex): ----(0)", + "[ log] ##################################################", + "[ log] Cluster 0:", + "[ log] - Dependencies: none", + "[ log] - Clustered by: ", + "[ log] - (a (no-deps)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - (b (no-deps)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - (a (upstream-self)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - (c (no-deps)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - (b (upstream-self)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - (d (no-deps)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - (e (no-deps)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - (c (upstream-self)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - (f (no-deps)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - (h (upstream-self)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - (h (no-deps)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - (g (no-deps)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - (a (upstream-1)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - (b (upstream-1)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - (c (upstream-1)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - (h (upstream-1)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - (a (upstream-2)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - (b (upstream-2)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - (c (upstream-2)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - (h (upstream-2)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - (d (upstream-1)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - (e (upstream-1)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - (f (upstream-1)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - (g (upstream-1)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - (d (upstream-2)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - (e (upstream-2)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - (f (upstream-2)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - (g (upstream-2)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - (a (upstream-1-self)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - (b (upstream-1-self)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - (c (upstream-1-self)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - (h (upstream-1-self)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - (b (upstream-3)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - (a (upstream-1-self-upstream)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - (a (upstream-2-self)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - (c (upstream-3)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - (b (upstream-1-self-upstream)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - (b (upstream-2-self)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - (d (upstream-3)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - (e (upstream-3)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - (c (upstream-1-self-upstream)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - (c (upstream-2-self)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - (f (upstream-3)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - (h (upstream-1-self-upstream)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - (h (upstream-2-self)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - (g (upstream-3)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - (h (upstream-3)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - Operations: a (no-deps), b (no-deps), c (no-deps), d (no-deps), e (no-deps), f (no-deps), g (no-deps), h (no-deps), a (upstream-self), b (upstream-self), c (upstream-self), d (upstream-self), e (upstream-self), f (upstream-self), h (upstream-self), g (upstream-self), a (upstream-1), b (upstream-1), c (upstream-1), d (upstream-1), e (upstream-1), f (upstream-1), g (upstream-1), h (upstream-1), a (upstream-2), b (upstream-2), c (upstream-2), d (upstream-2), e (upstream-2), f (upstream-2), g (upstream-2), h (upstream-2), b (upstream-3), c (upstream-3), d (upstream-3), e (upstream-3), f (upstream-3), g (upstream-3), h (upstream-3), a (upstream-1-self), b (upstream-1-self), c (upstream-1-self), d (upstream-1-self), e (upstream-1-self), f (upstream-1-self), g (upstream-1-self), h (upstream-1-self), a (upstream-2-self), b (upstream-2-self), c (upstream-2-self), d (upstream-2-self), e (upstream-2-self), f (upstream-2-self), g (upstream-2-self), h (upstream-2-self), a (upstream-1-self-upstream), b (upstream-1-self-upstream), c (upstream-1-self-upstream), d (upstream-1-self-upstream), e (upstream-1-self-upstream), f (upstream-1-self-upstream), g (upstream-1-self-upstream), h (upstream-1-self-upstream), b (complex), c (complex), d (complex), e (complex), f (complex), g (complex), h (complex)", + "[ log] --------------------------------------------------", + "[ log] Cluster 1:", + "[ log] - Dependencies: none", + "[ log] - Clustered by: ", + "[ log] - (i (no-deps)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - Operations: i (no-deps), i (upstream-self)", + "[ log] --------------------------------------------------", + "[ log] Cluster 2:", + "[ log] - Dependencies: none", + "[ log] - Clustered by: ", + "[ log] - (j (no-deps)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - Operations: j (no-deps), j (upstream-self)", + "[ log] --------------------------------------------------", + "[ log] Cluster 3:", + "[ log] - Dependencies: none", + "[ log] - Clustered by: ", + "[ log] - (i (upstream-1)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - Operations: i (upstream-1), i (upstream-1-self)", + "[ log] --------------------------------------------------", + "[ log] Cluster 4:", + "[ log] - Dependencies: none", + "[ log] - Clustered by: ", + "[ log] - (j (upstream-1)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - Operations: j (upstream-1), j (upstream-1-self)", + "[ log] --------------------------------------------------", + "[ log] Cluster 5:", + "[ log] - Dependencies: none", + "[ log] - Clustered by: ", + "[ log] - (i (upstream-2)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - Operations: i (upstream-2), i (upstream-2-self)", + "[ log] --------------------------------------------------", + "[ log] Cluster 6:", + "[ log] - Dependencies: none", + "[ log] - Clustered by: ", + "[ log] - (j (upstream-2)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - Operations: j (upstream-2), j (upstream-2-self)", + "[ log] --------------------------------------------------", + "[ log] Cluster 7:", + "[ log] - Dependencies: none", + "[ log] - Clustered by: ", + "[ log] - (a (upstream-3)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - Operations: a (upstream-3), a (complex)", + "[ log] --------------------------------------------------", + "[ log] Cluster 8:", + "[ log] - Dependencies: none", + "[ log] - Clustered by: ", + "[ log] - (i (upstream-3)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - Operations: i (upstream-3), i (complex)", + "[ log] --------------------------------------------------", + "[ log] Cluster 9:", + "[ log] - Dependencies: none", + "[ log] - Clustered by: ", + "[ log] - (j (upstream-3)) \\"Project does not have a rush-project.json configuration file, or one provided by a rig, so it does not support caching.\\"", + "[ log] - Operations: j (upstream-3), j (complex)", + "[ log] --------------------------------------------------", + "[ log] Cluster 10:", + "[ log] - Dependencies: none", + "[ log] - Operations: i (upstream-1-self-upstream)", + "[ log] --------------------------------------------------", + "[ log] Cluster 11:", + "[ log] - Dependencies: none", + "[ log] - Operations: j (upstream-1-self-upstream)", + "[ log] --------------------------------------------------", + "[ log] ##################################################", +] `; diff --git a/libraries/rush-lib/src/logic/operations/test/__snapshots__/OperationMetadataManager.test.ts.snap b/libraries/rush-lib/src/logic/operations/test/__snapshots__/OperationMetadataManager.test.ts.snap index 3c855cf2b6..01ae0ceb12 100644 --- a/libraries/rush-lib/src/logic/operations/test/__snapshots__/OperationMetadataManager.test.ts.snap +++ b/libraries/rush-lib/src/logic/operations/test/__snapshots__/OperationMetadataManager.test.ts.snap @@ -10,20 +10,22 @@ Array [ `; exports[`OperationMetadataManager should restore chunked stderr 1`] = ` -Object { - "error": "chunk1[n]chunk2[n]", -} +Array [ + "[ error] chunk1[n]", + "[ error] chunk2[n]", +] `; exports[`OperationMetadataManager should restore chunked stdout 1`] = ` -Object { - "log": "chunk1[n]chunk2[n]", -} +Array [ + "[ log] chunk1[n]", + "[ log] chunk2[n]", +] `; exports[`OperationMetadataManager should restore mixed chunked output 1`] = ` -Object { - "error": "logged to stderr[n]", - "log": "logged to stdout[n]", -} +Array [ + "[ log] logged to stdout[n]", + "[ error] logged to stderr[n]", +] `; diff --git a/libraries/rush-lib/src/logic/pnpm/test/PnpmShrinkwrapFile.test.ts b/libraries/rush-lib/src/logic/pnpm/test/PnpmShrinkwrapFile.test.ts index 4e2ea90ab6..b0a090ed9f 100644 --- a/libraries/rush-lib/src/logic/pnpm/test/PnpmShrinkwrapFile.test.ts +++ b/libraries/rush-lib/src/logic/pnpm/test/PnpmShrinkwrapFile.test.ts @@ -546,7 +546,7 @@ snapshots: terminal ) ).toThrowError(AlreadyReportedError); - expect(terminalProvider.getAllOutput(true)).toMatchSnapshot(); + expect(terminalProvider.getAllOutputAsChunks({ asLines: true })).toMatchSnapshot(); }); }); }); diff --git a/libraries/rush-lib/src/logic/pnpm/test/__snapshots__/PnpmShrinkwrapFile.test.ts.snap b/libraries/rush-lib/src/logic/pnpm/test/__snapshots__/PnpmShrinkwrapFile.test.ts.snap index 490c95cfc4..c46bed8ff9 100644 --- a/libraries/rush-lib/src/logic/pnpm/test/__snapshots__/PnpmShrinkwrapFile.test.ts.snap +++ b/libraries/rush-lib/src/logic/pnpm/test/__snapshots__/PnpmShrinkwrapFile.test.ts.snap @@ -1,7 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`PnpmShrinkwrapFile Check is workspace project modified pnpm lockfile major version 9 sha1 integrity can be handled when disallowInsecureSha1 1`] = ` -Object { - "error": "Error: An integrity field with \\"sha1\\" was detected in the pnpm-lock.yaml file located in subspace default; this conflicts with the \\"disallowInsecureSha1\\" policy from pnpm-config.json.[n][n]", -} +Array [ + "[ error] Error: An integrity field with \\"sha1\\" was detected in the pnpm-lock.yaml file located in subspace default; this conflicts with the \\"disallowInsecureSha1\\" policy from pnpm-config.json.[n]", + "[ error] [n]", +] `; diff --git a/libraries/rush-lib/src/logic/test/InstallHelpers.test.ts b/libraries/rush-lib/src/logic/test/InstallHelpers.test.ts index e299e9ca84..c6441d7484 100644 --- a/libraries/rush-lib/src/logic/test/InstallHelpers.test.ts +++ b/libraries/rush-lib/src/logic/test/InstallHelpers.test.ts @@ -25,9 +25,12 @@ describe('InstallHelpers', () => { }); afterEach(() => { - expect(terminalProvider.getAllOutput(true, { normalizeSpecialCharacters: true })).toMatchSnapshot( - 'Terminal Output' - ); + expect( + terminalProvider.getAllOutputAsChunks({ + normalizeSpecialCharacters: true, + asLines: true + }) + ).toMatchSnapshot('Terminal Output'); mockJsonFileSave.mockClear(); }); diff --git a/libraries/rush-lib/src/logic/test/ProjectImpactGraphGenerator.test.ts b/libraries/rush-lib/src/logic/test/ProjectImpactGraphGenerator.test.ts index c5ff1d2c73..583afbca64 100644 --- a/libraries/rush-lib/src/logic/test/ProjectImpactGraphGenerator.test.ts +++ b/libraries/rush-lib/src/logic/test/ProjectImpactGraphGenerator.test.ts @@ -22,9 +22,12 @@ async function runTestForExampleRepoAsync( const generator: ProjectImpactGraphGenerator = new ProjectImpactGraphGenerator(terminal, rushConfiguration); await testFn(generator); - expect(terminalProvider.getAllOutput(true, { normalizeSpecialCharacters: true })).toMatchSnapshot( - 'Terminal Output' - ); + expect( + terminalProvider.getAllOutputAsChunks({ + normalizeSpecialCharacters: true, + asLines: true + }) + ).toMatchSnapshot('Terminal Output'); } describe(ProjectImpactGraphGenerator.name, () => { diff --git a/libraries/rush-lib/src/logic/test/__snapshots__/InstallHelpers.test.ts.snap b/libraries/rush-lib/src/logic/test/__snapshots__/InstallHelpers.test.ts.snap index 12d290aeb6..99720df132 100644 --- a/libraries/rush-lib/src/logic/test/__snapshots__/InstallHelpers.test.ts.snap +++ b/libraries/rush-lib/src/logic/test/__snapshots__/InstallHelpers.test.ts.snap @@ -1,3 +1,3 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`InstallHelpers generateCommonPackageJson generates correct package json with pnpm configurations: Terminal Output 1`] = `Object {}`; +exports[`InstallHelpers generateCommonPackageJson generates correct package json with pnpm configurations: Terminal Output 1`] = `Array []`; diff --git a/libraries/rush-lib/src/logic/test/__snapshots__/ProjectImpactGraphGenerator.test.ts.snap b/libraries/rush-lib/src/logic/test/__snapshots__/ProjectImpactGraphGenerator.test.ts.snap index 73d78358b5..3aaa6fe9db 100644 --- a/libraries/rush-lib/src/logic/test/__snapshots__/ProjectImpactGraphGenerator.test.ts.snap +++ b/libraries/rush-lib/src/logic/test/__snapshots__/ProjectImpactGraphGenerator.test.ts.snap @@ -92,9 +92,10 @@ projects: exports[`ProjectImpactGraphGenerator generateAsync Correctly generates a project impact graph (repo: ""packages""): Output file path 1`] = `"/project-impact-graph.yaml"`; exports[`ProjectImpactGraphGenerator generateAsync Correctly generates a project impact graph (repo: ""packages""): Terminal Output 1`] = ` -Object { - "log": "[n][green]Generate project impact graph successfully. (1.50 seconds)[default][n]", -} +Array [ + "[ log] [n]", + "[ log] [green]Generate project impact graph successfully. (1.50 seconds)[default][n]", +] `; exports[`ProjectImpactGraphGenerator generateAsync Correctly generates a project impact graph (repo: ""repo""): Output file data 1`] = ` @@ -165,9 +166,10 @@ projects: exports[`ProjectImpactGraphGenerator generateAsync Correctly generates a project impact graph (repo: ""repo""): Output file path 1`] = `"/project-impact-graph.yaml"`; exports[`ProjectImpactGraphGenerator generateAsync Correctly generates a project impact graph (repo: ""repo""): Terminal Output 1`] = ` -Object { - "log": "[n][green]Generate project impact graph successfully. (1.50 seconds)[default][n]", -} +Array [ + "[ log] [n]", + "[ log] [green]Generate project impact graph successfully. (1.50 seconds)[default][n]", +] `; exports[`ProjectImpactGraphGenerator generateAsync Correctly generates a project impact graph (repo: ""workspacePackages""): Output file data 1`] = ` @@ -264,9 +266,10 @@ projects: exports[`ProjectImpactGraphGenerator generateAsync Correctly generates a project impact graph (repo: ""workspacePackages""): Output file path 1`] = `"/project-impact-graph.yaml"`; exports[`ProjectImpactGraphGenerator generateAsync Correctly generates a project impact graph (repo: ""workspacePackages""): Terminal Output 1`] = ` -Object { - "log": "[n][green]Generate project impact graph successfully. (1.50 seconds)[default][n]", -} +Array [ + "[ log] [n]", + "[ log] [green]Generate project impact graph successfully. (1.50 seconds)[default][n]", +] `; -exports[`ProjectImpactGraphGenerator validateAsync Reports if the project-impact-graph.yaml file is missing (repo: ""workspacePackages""): Terminal Output 1`] = `Object {}`; +exports[`ProjectImpactGraphGenerator validateAsync Reports if the project-impact-graph.yaml file is missing (repo: ""workspacePackages""): Terminal Output 1`] = `Array []`; diff --git a/libraries/terminal/src/StringBufferTerminalProvider.ts b/libraries/terminal/src/StringBufferTerminalProvider.ts index 9f6d83bb0c..34eb4d50ca 100644 --- a/libraries/terminal/src/StringBufferTerminalProvider.ts +++ b/libraries/terminal/src/StringBufferTerminalProvider.ts @@ -16,7 +16,17 @@ export interface IStringBufferOutputOptions { * * This option defaults to `true` */ - normalizeSpecialCharacters: boolean; + normalizeSpecialCharacters?: boolean; +} + +/** + * @beta + */ +export interface IStringBufferOutputChunksOptions extends IStringBufferOutputOptions { + /** + * If true, the output will be returned as an array of lines prefixed with severity tokens. + */ + asLines?: boolean; } /** @@ -30,22 +40,48 @@ export interface IAllStringBufferOutput { debug: string; } -function _normalizeOutput(s: string, options: IStringBufferOutputOptions | undefined): string { - options = { - normalizeSpecialCharacters: true, +/** + * @beta + */ +export type TerminalProviderSeverityName = keyof typeof TerminalProviderSeverity; + +/** + * @beta + */ +export interface IOutputChunk { + text: string; + severity: TerminalProviderSeverityName; +} - ...(options || {}) +function _normalizeOptions( + options: TOptions +): TOptions & Required { + return { + normalizeSpecialCharacters: true, + ...options }; +} + +function _normalizeOutput(s: string, options: IStringBufferOutputOptions | undefined): string { + const { normalizeSpecialCharacters } = _normalizeOptions(options ?? {}); + return _normalizeOutputInner(s, normalizeSpecialCharacters); +} +function _normalizeOutputInner(s: string, normalizeSpecialCharacters: boolean): string { s = Text.convertToLf(s); - if (options.normalizeSpecialCharacters) { + if (normalizeSpecialCharacters) { return AnsiEscape.formatForTests(s, { encodeNewlines: true }); } else { return s; } } +const LONGEST_SEVERITY_NAME_LENGTH: number = Object.keys(TerminalProviderSeverity).reduce( + (max: number, k: string) => Math.max(max, k.length), + 0 +); + /** * Terminal provider that stores written data in buffers separated by severity. * This terminal provider is designed to be used when code that prints to a terminal @@ -59,6 +95,7 @@ export class StringBufferTerminalProvider implements ITerminalProvider { private _debugBuffer: StringBuilder = new StringBuilder(); private _warningBuffer: StringBuilder = new StringBuilder(); private _errorBuffer: StringBuilder = new StringBuilder(); + private _allOutputChunks: IOutputChunk[] = []; /** * {@inheritDoc ITerminalProvider.supportsColor} @@ -72,31 +109,45 @@ export class StringBufferTerminalProvider implements ITerminalProvider { /** * {@inheritDoc ITerminalProvider.write} */ - public write(data: string, severity: TerminalProviderSeverity): void { + public write(text: string, severity: TerminalProviderSeverity): void { + const severityName: TerminalProviderSeverityName = TerminalProviderSeverity[ + severity + ] as TerminalProviderSeverityName; + + const lastChunk: IOutputChunk | undefined = this._allOutputChunks[this._allOutputChunks.length - 1]; + if (lastChunk && lastChunk.severity === severityName) { + lastChunk.text += text; + } else { + this._allOutputChunks.push({ + text, + severity: severityName + }); + } + switch (severity) { case TerminalProviderSeverity.warning: { - this._warningBuffer.append(data); + this._warningBuffer.append(text); break; } case TerminalProviderSeverity.error: { - this._errorBuffer.append(data); + this._errorBuffer.append(text); break; } case TerminalProviderSeverity.verbose: { - this._verboseBuffer.append(data); + this._verboseBuffer.append(text); break; } case TerminalProviderSeverity.debug: { - this._debugBuffer.append(data); + this._debugBuffer.append(text); break; } case TerminalProviderSeverity.log: default: { - this._standardBuffer.append(data); + this._standardBuffer.append(text); break; } } @@ -189,4 +240,60 @@ export class StringBufferTerminalProvider implements ITerminalProvider { return result; } + + /** + * Get everything that has been written as an array of output chunks, preserving order. + */ + public getAllOutputAsChunks( + options?: IStringBufferOutputChunksOptions & { asLines?: false } + ): IOutputChunk[]; + public getAllOutputAsChunks( + options: IStringBufferOutputChunksOptions & { asLines: true } + ): `[${string}] ${string}`[]; + public getAllOutputAsChunks(options: IStringBufferOutputChunksOptions = {}): IOutputChunk[] | string[] { + const { asLines, normalizeSpecialCharacters } = _normalizeOptions(options); + if (asLines) { + const lines: `[${string}] ${string}`[] = []; + + for (const { text: rawText, severity: rawSeverity } of this._allOutputChunks) { + const severity: string = (rawSeverity as TerminalProviderSeverityName).padStart( + LONGEST_SEVERITY_NAME_LENGTH, + ' ' + ); + + const lfText: string = Text.convertToLf(rawText); + const rawLines: string[] = lfText.split('\n'); + + // Emit one entry per logical line. + for (let i: number = 0; i < rawLines.length; i++) { + const isLast: boolean = i === rawLines.length - 1; + const isFinalTrailingEmpty: boolean = isLast && rawLines[i] === ''; + + if (isFinalTrailingEmpty) { + continue; + } + + const hasNewlineAfter: boolean = i < rawLines.length - 1; + + // If the original output had a newline after this line, preserve it as the special token + // (e.g. "[n]") when normalization is enabled. + const shouldIncludeNewlineToken: boolean = normalizeSpecialCharacters && hasNewlineAfter; + const lineText: string = shouldIncludeNewlineToken ? `${rawLines[i]}\n` : rawLines[i]; + + const text: string = _normalizeOutputInner(lineText, normalizeSpecialCharacters); + lines.push(`[${severity}] ${text}`); + } + } + + return lines; + } else { + return this._allOutputChunks.map(({ text: rawText, severity }) => { + const text: string = _normalizeOutputInner(rawText, normalizeSpecialCharacters); + return { + text, + severity + }; + }); + } + } } diff --git a/libraries/terminal/src/index.ts b/libraries/terminal/src/index.ts index 2254e40b9f..cbea552b49 100644 --- a/libraries/terminal/src/index.ts +++ b/libraries/terminal/src/index.ts @@ -40,7 +40,10 @@ export { ConsoleTerminalProvider, type IConsoleTerminalProviderOptions } from '. export { StringBufferTerminalProvider, type IStringBufferOutputOptions, - type IAllStringBufferOutput + type IAllStringBufferOutput, + type IOutputChunk, + type IStringBufferOutputChunksOptions, + type TerminalProviderSeverityName } from './StringBufferTerminalProvider'; export { PrefixProxyTerminalProvider, diff --git a/libraries/terminal/src/test/PrefixProxyTerminalProvider.test.ts b/libraries/terminal/src/test/PrefixProxyTerminalProvider.test.ts index e42c7da62c..fc22319940 100644 --- a/libraries/terminal/src/test/PrefixProxyTerminalProvider.test.ts +++ b/libraries/terminal/src/test/PrefixProxyTerminalProvider.test.ts @@ -13,7 +13,8 @@ function runTestsForTerminalProvider( let baseProvider: StringBufferTerminalProvider; function verifyProvider(): void { - expect(baseProvider.getAllOutput(true)).toMatchSnapshot(); + expect(baseProvider.getAllOutput(true)).toMatchSnapshot('output'); + expect(baseProvider.getAllOutputAsChunks({ asLines: true })).toMatchSnapshot('output as chunks'); } beforeEach(() => { diff --git a/libraries/terminal/src/test/Terminal.test.ts b/libraries/terminal/src/test/Terminal.test.ts index a76fb2e1ef..ec211da3ef 100644 --- a/libraries/terminal/src/test/Terminal.test.ts +++ b/libraries/terminal/src/test/Terminal.test.ts @@ -10,7 +10,8 @@ describe(Terminal.name, () => { let provider: StringBufferTerminalProvider; function verifyProvider(): void { - expect(provider.getAllOutput()).toMatchSnapshot(); + expect(provider.getAllOutput()).toMatchSnapshot('output'); + expect(provider.getAllOutputAsChunks({ asLines: true })).toMatchSnapshot('output as chunks'); } describe('01 color enabled', () => { diff --git a/libraries/terminal/src/test/TerminalStreamWritable.test.ts b/libraries/terminal/src/test/TerminalStreamWritable.test.ts index ef3fac1808..e6b639dd95 100644 --- a/libraries/terminal/src/test/TerminalStreamWritable.test.ts +++ b/libraries/terminal/src/test/TerminalStreamWritable.test.ts @@ -11,7 +11,8 @@ let terminal: Terminal; let provider: StringBufferTerminalProvider; function verifyProvider(): void { - expect(provider.getAllOutput()).toMatchSnapshot(); + expect(provider.getAllOutput()).toMatchSnapshot('output'); + expect(provider.getAllOutputAsChunks()).toMatchSnapshot('output as chunks'); } async function writeAsync(writable: Writable, data: string): Promise { diff --git a/libraries/terminal/src/test/__snapshots__/PrefixProxyTerminalProvider.test.ts.snap b/libraries/terminal/src/test/__snapshots__/PrefixProxyTerminalProvider.test.ts.snap index 003d1fc8b0..6e4d059b57 100644 --- a/libraries/terminal/src/test/__snapshots__/PrefixProxyTerminalProvider.test.ts.snap +++ b/libraries/terminal/src/test/__snapshots__/PrefixProxyTerminalProvider.test.ts.snap @@ -1,109 +1,251 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`PrefixProxyTerminalProvider With a dynamic prefix write writes a message 1`] = ` +exports[`PrefixProxyTerminalProvider With a dynamic prefix write writes a message with newlines: output 1`] = ` Object { - "log": "[prefix (0)] test message", + "log": "[prefix (0)] message 1[n][prefix (1)] message 2[n][prefix (2)] message 3", } `; -exports[`PrefixProxyTerminalProvider With a dynamic prefix write writes a message with newlines 1`] = ` +exports[`PrefixProxyTerminalProvider With a dynamic prefix write writes a message with newlines: output as chunks 1`] = ` +Array [ + "[ log] [prefix (0)] message 1[n]", + "[ log] [prefix (1)] message 2[n]", + "[ log] [prefix (2)] message 3", +] +`; + +exports[`PrefixProxyTerminalProvider With a dynamic prefix write writes a message with provider newlines: output 1`] = ` Object { "log": "[prefix (0)] message 1[n][prefix (1)] message 2[n][prefix (2)] message 3", } `; -exports[`PrefixProxyTerminalProvider With a dynamic prefix write writes a message with provider newlines 1`] = ` +exports[`PrefixProxyTerminalProvider With a dynamic prefix write writes a message with provider newlines: output as chunks 1`] = ` +Array [ + "[ log] [prefix (0)] message 1[n]", + "[ log] [prefix (1)] message 2[n]", + "[ log] [prefix (2)] message 3", +] +`; + +exports[`PrefixProxyTerminalProvider With a dynamic prefix write writes a message: output 1`] = ` Object { - "log": "[prefix (0)] message 1[n][prefix (1)] message 2[n][prefix (2)] message 3", + "log": "[prefix (0)] test message", } `; -exports[`PrefixProxyTerminalProvider With a dynamic prefix write writes a mix of messages with and without newlines 1`] = ` +exports[`PrefixProxyTerminalProvider With a dynamic prefix write writes a message: output as chunks 1`] = ` +Array [ + "[ log] [prefix (0)] test message", +] +`; + +exports[`PrefixProxyTerminalProvider With a dynamic prefix write writes a mix of messages with and without newlines: output 1`] = ` Object { "log": "[prefix (0)] message 1message 2[n][prefix (1)] message 3[n][prefix (2)] message 4message 5[n][prefix (3)] message 6", } `; -exports[`PrefixProxyTerminalProvider With a dynamic prefix write writes messages without newlines 1`] = ` +exports[`PrefixProxyTerminalProvider With a dynamic prefix write writes a mix of messages with and without newlines: output as chunks 1`] = ` +Array [ + "[ log] [prefix (0)] message 1message 2[n]", + "[ log] [prefix (1)] message 3[n]", + "[ log] [prefix (2)] message 4message 5[n]", + "[ log] [prefix (3)] message 6", +] +`; + +exports[`PrefixProxyTerminalProvider With a dynamic prefix write writes messages without newlines: output 1`] = ` Object { "log": "[prefix (0)] message 1message 2message 3", } `; -exports[`PrefixProxyTerminalProvider With a dynamic prefix writeLine writes a message line 1`] = ` +exports[`PrefixProxyTerminalProvider With a dynamic prefix write writes messages without newlines: output as chunks 1`] = ` +Array [ + "[ log] [prefix (0)] message 1message 2message 3", +] +`; + +exports[`PrefixProxyTerminalProvider With a dynamic prefix writeLine writes a message line with newlines: output 1`] = ` Object { - "log": "[prefix (0)] test message[n]", + "log": "[prefix (0)] message 1[n][prefix (1)] message 2[n][prefix (2)] message 3[n]", } `; -exports[`PrefixProxyTerminalProvider With a dynamic prefix writeLine writes a message line with newlines 1`] = ` +exports[`PrefixProxyTerminalProvider With a dynamic prefix writeLine writes a message line with newlines: output as chunks 1`] = ` +Array [ + "[ log] [prefix (0)] message 1[n]", + "[ log] [prefix (1)] message 2[n]", + "[ log] [prefix (2)] message 3[n]", +] +`; + +exports[`PrefixProxyTerminalProvider With a dynamic prefix writeLine writes a message line with provider newlines: output 1`] = ` Object { "log": "[prefix (0)] message 1[n][prefix (1)] message 2[n][prefix (2)] message 3[n]", } `; -exports[`PrefixProxyTerminalProvider With a dynamic prefix writeLine writes a message line with provider newlines 1`] = ` +exports[`PrefixProxyTerminalProvider With a dynamic prefix writeLine writes a message line with provider newlines: output as chunks 1`] = ` +Array [ + "[ log] [prefix (0)] message 1[n]", + "[ log] [prefix (1)] message 2[n]", + "[ log] [prefix (2)] message 3[n]", +] +`; + +exports[`PrefixProxyTerminalProvider With a dynamic prefix writeLine writes a message line: output 1`] = ` Object { - "log": "[prefix (0)] message 1[n][prefix (1)] message 2[n][prefix (2)] message 3[n]", + "log": "[prefix (0)] test message[n]", } `; -exports[`PrefixProxyTerminalProvider With a dynamic prefix writeLine writes a mix of message lines with and without newlines 1`] = ` +exports[`PrefixProxyTerminalProvider With a dynamic prefix writeLine writes a message line: output as chunks 1`] = ` +Array [ + "[ log] [prefix (0)] test message[n]", +] +`; + +exports[`PrefixProxyTerminalProvider With a dynamic prefix writeLine writes a mix of message lines with and without newlines: output 1`] = ` Object { "log": "[prefix (0)] message 1[n][prefix (1)] message 2[n][prefix (2)] message 3[n][prefix (3)] [n][prefix (4)] message 4[n][prefix (5)] message 5[n][prefix (6)] message 6[n]", } `; -exports[`PrefixProxyTerminalProvider With a static prefix write writes a message 1`] = ` +exports[`PrefixProxyTerminalProvider With a dynamic prefix writeLine writes a mix of message lines with and without newlines: output as chunks 1`] = ` +Array [ + "[ log] [prefix (0)] message 1[n]", + "[ log] [prefix (1)] message 2[n]", + "[ log] [prefix (2)] message 3[n]", + "[ log] [prefix (3)] [n]", + "[ log] [prefix (4)] message 4[n]", + "[ log] [prefix (5)] message 5[n]", + "[ log] [prefix (6)] message 6[n]", +] +`; + +exports[`PrefixProxyTerminalProvider With a static prefix write writes a message with newlines: output 1`] = ` Object { - "log": "[prefix] test message", + "log": "[prefix] message 1[n][prefix] message 2[n][prefix] message 3", } `; -exports[`PrefixProxyTerminalProvider With a static prefix write writes a message with newlines 1`] = ` +exports[`PrefixProxyTerminalProvider With a static prefix write writes a message with newlines: output as chunks 1`] = ` +Array [ + "[ log] [prefix] message 1[n]", + "[ log] [prefix] message 2[n]", + "[ log] [prefix] message 3", +] +`; + +exports[`PrefixProxyTerminalProvider With a static prefix write writes a message with provider newlines: output 1`] = ` Object { "log": "[prefix] message 1[n][prefix] message 2[n][prefix] message 3", } `; -exports[`PrefixProxyTerminalProvider With a static prefix write writes a message with provider newlines 1`] = ` +exports[`PrefixProxyTerminalProvider With a static prefix write writes a message with provider newlines: output as chunks 1`] = ` +Array [ + "[ log] [prefix] message 1[n]", + "[ log] [prefix] message 2[n]", + "[ log] [prefix] message 3", +] +`; + +exports[`PrefixProxyTerminalProvider With a static prefix write writes a message: output 1`] = ` Object { - "log": "[prefix] message 1[n][prefix] message 2[n][prefix] message 3", + "log": "[prefix] test message", } `; -exports[`PrefixProxyTerminalProvider With a static prefix write writes a mix of messages with and without newlines 1`] = ` +exports[`PrefixProxyTerminalProvider With a static prefix write writes a message: output as chunks 1`] = ` +Array [ + "[ log] [prefix] test message", +] +`; + +exports[`PrefixProxyTerminalProvider With a static prefix write writes a mix of messages with and without newlines: output 1`] = ` Object { "log": "[prefix] message 1message 2[n][prefix] message 3[n][prefix] message 4message 5[n][prefix] message 6", } `; -exports[`PrefixProxyTerminalProvider With a static prefix write writes messages without newlines 1`] = ` +exports[`PrefixProxyTerminalProvider With a static prefix write writes a mix of messages with and without newlines: output as chunks 1`] = ` +Array [ + "[ log] [prefix] message 1message 2[n]", + "[ log] [prefix] message 3[n]", + "[ log] [prefix] message 4message 5[n]", + "[ log] [prefix] message 6", +] +`; + +exports[`PrefixProxyTerminalProvider With a static prefix write writes messages without newlines: output 1`] = ` Object { "log": "[prefix] message 1message 2message 3", } `; -exports[`PrefixProxyTerminalProvider With a static prefix writeLine writes a message line 1`] = ` +exports[`PrefixProxyTerminalProvider With a static prefix write writes messages without newlines: output as chunks 1`] = ` +Array [ + "[ log] [prefix] message 1message 2message 3", +] +`; + +exports[`PrefixProxyTerminalProvider With a static prefix writeLine writes a message line with newlines: output 1`] = ` Object { - "log": "[prefix] test message[n]", + "log": "[prefix] message 1[n][prefix] message 2[n][prefix] message 3[n]", } `; -exports[`PrefixProxyTerminalProvider With a static prefix writeLine writes a message line with newlines 1`] = ` +exports[`PrefixProxyTerminalProvider With a static prefix writeLine writes a message line with newlines: output as chunks 1`] = ` +Array [ + "[ log] [prefix] message 1[n]", + "[ log] [prefix] message 2[n]", + "[ log] [prefix] message 3[n]", +] +`; + +exports[`PrefixProxyTerminalProvider With a static prefix writeLine writes a message line with provider newlines: output 1`] = ` Object { "log": "[prefix] message 1[n][prefix] message 2[n][prefix] message 3[n]", } `; -exports[`PrefixProxyTerminalProvider With a static prefix writeLine writes a message line with provider newlines 1`] = ` +exports[`PrefixProxyTerminalProvider With a static prefix writeLine writes a message line with provider newlines: output as chunks 1`] = ` +Array [ + "[ log] [prefix] message 1[n]", + "[ log] [prefix] message 2[n]", + "[ log] [prefix] message 3[n]", +] +`; + +exports[`PrefixProxyTerminalProvider With a static prefix writeLine writes a message line: output 1`] = ` Object { - "log": "[prefix] message 1[n][prefix] message 2[n][prefix] message 3[n]", + "log": "[prefix] test message[n]", } `; -exports[`PrefixProxyTerminalProvider With a static prefix writeLine writes a mix of message lines with and without newlines 1`] = ` +exports[`PrefixProxyTerminalProvider With a static prefix writeLine writes a message line: output as chunks 1`] = ` +Array [ + "[ log] [prefix] test message[n]", +] +`; + +exports[`PrefixProxyTerminalProvider With a static prefix writeLine writes a mix of message lines with and without newlines: output 1`] = ` Object { "log": "[prefix] message 1[n][prefix] message 2[n][prefix] message 3[n][prefix] [n][prefix] message 4[n][prefix] message 5[n][prefix] message 6[n]", } `; + +exports[`PrefixProxyTerminalProvider With a static prefix writeLine writes a mix of message lines with and without newlines: output as chunks 1`] = ` +Array [ + "[ log] [prefix] message 1[n]", + "[ log] [prefix] message 2[n]", + "[ log] [prefix] message 3[n]", + "[ log] [prefix] [n]", + "[ log] [prefix] message 4[n]", + "[ log] [prefix] message 5[n]", + "[ log] [prefix] message 6[n]", +] +`; diff --git a/libraries/terminal/src/test/__snapshots__/Terminal.test.ts.snap b/libraries/terminal/src/test/__snapshots__/Terminal.test.ts.snap index 6ba14641d2..39ecc7bbbf 100644 --- a/libraries/terminal/src/test/__snapshots__/Terminal.test.ts.snap +++ b/libraries/terminal/src/test/__snapshots__/Terminal.test.ts.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Terminal 01 color enabled 01 basic terminal functions 01 write 01 writes a single message 1`] = ` +exports[`Terminal 01 color enabled 01 basic terminal functions 01 write 01 writes a single message: output 1`] = ` Object { "debug": "", "error": "", @@ -10,7 +10,13 @@ Object { } `; -exports[`Terminal 01 color enabled 01 basic terminal functions 01 write 02 writes multiple messages 1`] = ` +exports[`Terminal 01 color enabled 01 basic terminal functions 01 write 01 writes a single message: output as chunks 1`] = ` +Array [ + "[ log] test message", +] +`; + +exports[`Terminal 01 color enabled 01 basic terminal functions 01 write 02 writes multiple messages: output 1`] = ` Object { "debug": "", "error": "", @@ -20,7 +26,13 @@ Object { } `; -exports[`Terminal 01 color enabled 01 basic terminal functions 01 write 03 writes a message with colors 1`] = ` +exports[`Terminal 01 color enabled 01 basic terminal functions 01 write 02 writes multiple messages: output as chunks 1`] = ` +Array [ + "[ log] message 1message 2", +] +`; + +exports[`Terminal 01 color enabled 01 basic terminal functions 01 write 03 writes a message with colors: output 1`] = ` Object { "debug": "", "error": "", @@ -30,7 +42,13 @@ Object { } `; -exports[`Terminal 01 color enabled 01 basic terminal functions 01 write 04 writes a multiple messages with colors 1`] = ` +exports[`Terminal 01 color enabled 01 basic terminal functions 01 write 03 writes a message with colors: output as chunks 1`] = ` +Array [ + "[ log] [green]message 1[default]", +] +`; + +exports[`Terminal 01 color enabled 01 basic terminal functions 01 write 04 writes a multiple messages with colors: output 1`] = ` Object { "debug": "", "error": "", @@ -40,7 +58,13 @@ Object { } `; -exports[`Terminal 01 color enabled 01 basic terminal functions 01 write 05 writes a messages with colors interspersed with non-colored messages 1`] = ` +exports[`Terminal 01 color enabled 01 basic terminal functions 01 write 04 writes a multiple messages with colors: output as chunks 1`] = ` +Array [ + "[ log] [green]message 1[default][red]message 2[default]", +] +`; + +exports[`Terminal 01 color enabled 01 basic terminal functions 01 write 05 writes a messages with colors interspersed with non-colored messages: output 1`] = ` Object { "debug": "", "error": "", @@ -50,7 +74,13 @@ Object { } `; -exports[`Terminal 01 color enabled 01 basic terminal functions 01 write 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled 1`] = ` +exports[`Terminal 01 color enabled 01 basic terminal functions 01 write 05 writes a messages with colors interspersed with non-colored messages: output as chunks 1`] = ` +Array [ + "[ log] message 1[green]message 2[default]message 3[red]message 4[default]", +] +`; + +exports[`Terminal 01 color enabled 01 basic terminal functions 01 write 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled: output 1`] = ` Object { "debug": "", "error": "", @@ -60,7 +90,13 @@ Object { } `; -exports[`Terminal 01 color enabled 01 basic terminal functions 02 writeLine 01 writes a single message 1`] = ` +exports[`Terminal 01 color enabled 01 basic terminal functions 01 write 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled: output as chunks 1`] = ` +Array [ + "[ log] message 1[green]message 2[default]message 3[red]message 4[default]", +] +`; + +exports[`Terminal 01 color enabled 01 basic terminal functions 02 writeLine 01 writes a single message: output 1`] = ` Object { "debug": "", "error": "", @@ -70,7 +106,13 @@ Object { } `; -exports[`Terminal 01 color enabled 01 basic terminal functions 02 writeLine 02 writes multiple messages 1`] = ` +exports[`Terminal 01 color enabled 01 basic terminal functions 02 writeLine 01 writes a single message: output as chunks 1`] = ` +Array [ + "[ log] test message[n]", +] +`; + +exports[`Terminal 01 color enabled 01 basic terminal functions 02 writeLine 02 writes multiple messages: output 1`] = ` Object { "debug": "", "error": "", @@ -80,7 +122,13 @@ Object { } `; -exports[`Terminal 01 color enabled 01 basic terminal functions 02 writeLine 03 writes a message with colors 1`] = ` +exports[`Terminal 01 color enabled 01 basic terminal functions 02 writeLine 02 writes multiple messages: output as chunks 1`] = ` +Array [ + "[ log] message 1message 2[n]", +] +`; + +exports[`Terminal 01 color enabled 01 basic terminal functions 02 writeLine 03 writes a message with colors: output 1`] = ` Object { "debug": "", "error": "", @@ -90,7 +138,13 @@ Object { } `; -exports[`Terminal 01 color enabled 01 basic terminal functions 02 writeLine 04 writes a multiple messages with colors 1`] = ` +exports[`Terminal 01 color enabled 01 basic terminal functions 02 writeLine 03 writes a message with colors: output as chunks 1`] = ` +Array [ + "[ log] [green]message 1[default][n]", +] +`; + +exports[`Terminal 01 color enabled 01 basic terminal functions 02 writeLine 04 writes a multiple messages with colors: output 1`] = ` Object { "debug": "", "error": "", @@ -100,7 +154,13 @@ Object { } `; -exports[`Terminal 01 color enabled 01 basic terminal functions 02 writeLine 05 writes a messages with colors interspersed with non-colored messages 1`] = ` +exports[`Terminal 01 color enabled 01 basic terminal functions 02 writeLine 04 writes a multiple messages with colors: output as chunks 1`] = ` +Array [ + "[ log] [green]message 1[default][red]message 2[default][n]", +] +`; + +exports[`Terminal 01 color enabled 01 basic terminal functions 02 writeLine 05 writes a messages with colors interspersed with non-colored messages: output 1`] = ` Object { "debug": "", "error": "", @@ -110,7 +170,13 @@ Object { } `; -exports[`Terminal 01 color enabled 01 basic terminal functions 02 writeLine 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled 1`] = ` +exports[`Terminal 01 color enabled 01 basic terminal functions 02 writeLine 05 writes a messages with colors interspersed with non-colored messages: output as chunks 1`] = ` +Array [ + "[ log] message 1[green]message 2[default]message 3[red]message 4[default][n]", +] +`; + +exports[`Terminal 01 color enabled 01 basic terminal functions 02 writeLine 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled: output 1`] = ` Object { "debug": "", "error": "", @@ -120,7 +186,13 @@ Object { } `; -exports[`Terminal 01 color enabled 01 basic terminal functions 03 writeWarning 01 writes a single message 1`] = ` +exports[`Terminal 01 color enabled 01 basic terminal functions 02 writeLine 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled: output as chunks 1`] = ` +Array [ + "[ log] message 1[green]message 2[default]message 3[red]message 4[default][n]", +] +`; + +exports[`Terminal 01 color enabled 01 basic terminal functions 03 writeWarning 01 writes a single message: output 1`] = ` Object { "debug": "", "error": "", @@ -130,7 +202,13 @@ Object { } `; -exports[`Terminal 01 color enabled 01 basic terminal functions 03 writeWarning 02 writes multiple messages 1`] = ` +exports[`Terminal 01 color enabled 01 basic terminal functions 03 writeWarning 01 writes a single message: output as chunks 1`] = ` +Array [ + "[warning] [yellow]test message[default]", +] +`; + +exports[`Terminal 01 color enabled 01 basic terminal functions 03 writeWarning 02 writes multiple messages: output 1`] = ` Object { "debug": "", "error": "", @@ -140,7 +218,13 @@ Object { } `; -exports[`Terminal 01 color enabled 01 basic terminal functions 03 writeWarning 03 writes a message with colors 1`] = ` +exports[`Terminal 01 color enabled 01 basic terminal functions 03 writeWarning 02 writes multiple messages: output as chunks 1`] = ` +Array [ + "[warning] [yellow]message 1[default][yellow]message 2[default]", +] +`; + +exports[`Terminal 01 color enabled 01 basic terminal functions 03 writeWarning 03 writes a message with colors: output 1`] = ` Object { "debug": "", "error": "", @@ -150,7 +234,13 @@ Object { } `; -exports[`Terminal 01 color enabled 01 basic terminal functions 03 writeWarning 04 writes a multiple messages with colors 1`] = ` +exports[`Terminal 01 color enabled 01 basic terminal functions 03 writeWarning 03 writes a message with colors: output as chunks 1`] = ` +Array [ + "[warning] [yellow]message 1[default]", +] +`; + +exports[`Terminal 01 color enabled 01 basic terminal functions 03 writeWarning 04 writes a multiple messages with colors: output 1`] = ` Object { "debug": "", "error": "", @@ -160,7 +250,13 @@ Object { } `; -exports[`Terminal 01 color enabled 01 basic terminal functions 03 writeWarning 05 writes a messages with colors interspersed with non-colored messages 1`] = ` +exports[`Terminal 01 color enabled 01 basic terminal functions 03 writeWarning 04 writes a multiple messages with colors: output as chunks 1`] = ` +Array [ + "[warning] [yellow]message 1[default][yellow]message 2[default]", +] +`; + +exports[`Terminal 01 color enabled 01 basic terminal functions 03 writeWarning 05 writes a messages with colors interspersed with non-colored messages: output 1`] = ` Object { "debug": "", "error": "", @@ -170,7 +266,13 @@ Object { } `; -exports[`Terminal 01 color enabled 01 basic terminal functions 03 writeWarning 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled 1`] = ` +exports[`Terminal 01 color enabled 01 basic terminal functions 03 writeWarning 05 writes a messages with colors interspersed with non-colored messages: output as chunks 1`] = ` +Array [ + "[warning] [yellow]message 1[default][yellow]message 2[default][yellow]message 3[default][yellow]message 4[default]", +] +`; + +exports[`Terminal 01 color enabled 01 basic terminal functions 03 writeWarning 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled: output 1`] = ` Object { "debug": "", "error": "", @@ -180,7 +282,13 @@ Object { } `; -exports[`Terminal 01 color enabled 01 basic terminal functions 04 writeWarningLine 01 writes a single message 1`] = ` +exports[`Terminal 01 color enabled 01 basic terminal functions 03 writeWarning 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled: output as chunks 1`] = ` +Array [ + "[warning] message 1[green]message 2[default]message 3[red]message 4[default]", +] +`; + +exports[`Terminal 01 color enabled 01 basic terminal functions 04 writeWarningLine 01 writes a single message: output 1`] = ` Object { "debug": "", "error": "", @@ -190,7 +298,13 @@ Object { } `; -exports[`Terminal 01 color enabled 01 basic terminal functions 04 writeWarningLine 02 writes multiple messages 1`] = ` +exports[`Terminal 01 color enabled 01 basic terminal functions 04 writeWarningLine 01 writes a single message: output as chunks 1`] = ` +Array [ + "[warning] [yellow]test message[default][n]", +] +`; + +exports[`Terminal 01 color enabled 01 basic terminal functions 04 writeWarningLine 02 writes multiple messages: output 1`] = ` Object { "debug": "", "error": "", @@ -200,7 +314,13 @@ Object { } `; -exports[`Terminal 01 color enabled 01 basic terminal functions 04 writeWarningLine 03 writes a message with colors 1`] = ` +exports[`Terminal 01 color enabled 01 basic terminal functions 04 writeWarningLine 02 writes multiple messages: output as chunks 1`] = ` +Array [ + "[warning] [yellow]message 1[default][yellow]message 2[default][n]", +] +`; + +exports[`Terminal 01 color enabled 01 basic terminal functions 04 writeWarningLine 03 writes a message with colors: output 1`] = ` Object { "debug": "", "error": "", @@ -210,7 +330,13 @@ Object { } `; -exports[`Terminal 01 color enabled 01 basic terminal functions 04 writeWarningLine 04 writes a multiple messages with colors 1`] = ` +exports[`Terminal 01 color enabled 01 basic terminal functions 04 writeWarningLine 03 writes a message with colors: output as chunks 1`] = ` +Array [ + "[warning] [yellow]message 1[default][n]", +] +`; + +exports[`Terminal 01 color enabled 01 basic terminal functions 04 writeWarningLine 04 writes a multiple messages with colors: output 1`] = ` Object { "debug": "", "error": "", @@ -220,7 +346,13 @@ Object { } `; -exports[`Terminal 01 color enabled 01 basic terminal functions 04 writeWarningLine 05 writes a messages with colors interspersed with non-colored messages 1`] = ` +exports[`Terminal 01 color enabled 01 basic terminal functions 04 writeWarningLine 04 writes a multiple messages with colors: output as chunks 1`] = ` +Array [ + "[warning] [yellow]message 1[default][yellow]message 2[default][n]", +] +`; + +exports[`Terminal 01 color enabled 01 basic terminal functions 04 writeWarningLine 05 writes a messages with colors interspersed with non-colored messages: output 1`] = ` Object { "debug": "", "error": "", @@ -230,7 +362,13 @@ Object { } `; -exports[`Terminal 01 color enabled 01 basic terminal functions 04 writeWarningLine 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled 1`] = ` +exports[`Terminal 01 color enabled 01 basic terminal functions 04 writeWarningLine 05 writes a messages with colors interspersed with non-colored messages: output as chunks 1`] = ` +Array [ + "[warning] [yellow]message 1[default][yellow]message 2[default][yellow]message 3[default][yellow]message 4[default][n]", +] +`; + +exports[`Terminal 01 color enabled 01 basic terminal functions 04 writeWarningLine 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled: output 1`] = ` Object { "debug": "", "error": "", @@ -240,7 +378,13 @@ Object { } `; -exports[`Terminal 01 color enabled 01 basic terminal functions 05 writeError 01 writes a single message 1`] = ` +exports[`Terminal 01 color enabled 01 basic terminal functions 04 writeWarningLine 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled: output as chunks 1`] = ` +Array [ + "[warning] message 1[green]message 2[default]message 3[red]message 4[default][n]", +] +`; + +exports[`Terminal 01 color enabled 01 basic terminal functions 05 writeError 01 writes a single message: output 1`] = ` Object { "debug": "", "error": "[red]test message[default]", @@ -250,7 +394,13 @@ Object { } `; -exports[`Terminal 01 color enabled 01 basic terminal functions 05 writeError 02 writes multiple messages 1`] = ` +exports[`Terminal 01 color enabled 01 basic terminal functions 05 writeError 01 writes a single message: output as chunks 1`] = ` +Array [ + "[ error] [red]test message[default]", +] +`; + +exports[`Terminal 01 color enabled 01 basic terminal functions 05 writeError 02 writes multiple messages: output 1`] = ` Object { "debug": "", "error": "[red]message 1[default][red]message 2[default]", @@ -260,7 +410,13 @@ Object { } `; -exports[`Terminal 01 color enabled 01 basic terminal functions 05 writeError 03 writes a message with colors 1`] = ` +exports[`Terminal 01 color enabled 01 basic terminal functions 05 writeError 02 writes multiple messages: output as chunks 1`] = ` +Array [ + "[ error] [red]message 1[default][red]message 2[default]", +] +`; + +exports[`Terminal 01 color enabled 01 basic terminal functions 05 writeError 03 writes a message with colors: output 1`] = ` Object { "debug": "", "error": "[red]message 1[default]", @@ -270,7 +426,13 @@ Object { } `; -exports[`Terminal 01 color enabled 01 basic terminal functions 05 writeError 04 writes a multiple messages with colors 1`] = ` +exports[`Terminal 01 color enabled 01 basic terminal functions 05 writeError 03 writes a message with colors: output as chunks 1`] = ` +Array [ + "[ error] [red]message 1[default]", +] +`; + +exports[`Terminal 01 color enabled 01 basic terminal functions 05 writeError 04 writes a multiple messages with colors: output 1`] = ` Object { "debug": "", "error": "[red]message 1[default][red]message 2[default]", @@ -280,7 +442,13 @@ Object { } `; -exports[`Terminal 01 color enabled 01 basic terminal functions 05 writeError 05 writes a messages with colors interspersed with non-colored messages 1`] = ` +exports[`Terminal 01 color enabled 01 basic terminal functions 05 writeError 04 writes a multiple messages with colors: output as chunks 1`] = ` +Array [ + "[ error] [red]message 1[default][red]message 2[default]", +] +`; + +exports[`Terminal 01 color enabled 01 basic terminal functions 05 writeError 05 writes a messages with colors interspersed with non-colored messages: output 1`] = ` Object { "debug": "", "error": "[red]message 1[default][red]message 2[default][red]message 3[default][red]message 4[default]", @@ -290,7 +458,13 @@ Object { } `; -exports[`Terminal 01 color enabled 01 basic terminal functions 05 writeError 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled 1`] = ` +exports[`Terminal 01 color enabled 01 basic terminal functions 05 writeError 05 writes a messages with colors interspersed with non-colored messages: output as chunks 1`] = ` +Array [ + "[ error] [red]message 1[default][red]message 2[default][red]message 3[default][red]message 4[default]", +] +`; + +exports[`Terminal 01 color enabled 01 basic terminal functions 05 writeError 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled: output 1`] = ` Object { "debug": "", "error": "message 1[green]message 2[default]message 3[red]message 4[default]", @@ -300,7 +474,13 @@ Object { } `; -exports[`Terminal 01 color enabled 01 basic terminal functions 06 writeErrorLine 01 writes a single message 1`] = ` +exports[`Terminal 01 color enabled 01 basic terminal functions 05 writeError 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled: output as chunks 1`] = ` +Array [ + "[ error] message 1[green]message 2[default]message 3[red]message 4[default]", +] +`; + +exports[`Terminal 01 color enabled 01 basic terminal functions 06 writeErrorLine 01 writes a single message: output 1`] = ` Object { "debug": "", "error": "[red]test message[default][n]", @@ -310,7 +490,13 @@ Object { } `; -exports[`Terminal 01 color enabled 01 basic terminal functions 06 writeErrorLine 02 writes multiple messages 1`] = ` +exports[`Terminal 01 color enabled 01 basic terminal functions 06 writeErrorLine 01 writes a single message: output as chunks 1`] = ` +Array [ + "[ error] [red]test message[default][n]", +] +`; + +exports[`Terminal 01 color enabled 01 basic terminal functions 06 writeErrorLine 02 writes multiple messages: output 1`] = ` Object { "debug": "", "error": "[red]message 1[default][red]message 2[default][n]", @@ -320,7 +506,13 @@ Object { } `; -exports[`Terminal 01 color enabled 01 basic terminal functions 06 writeErrorLine 03 writes a message with colors 1`] = ` +exports[`Terminal 01 color enabled 01 basic terminal functions 06 writeErrorLine 02 writes multiple messages: output as chunks 1`] = ` +Array [ + "[ error] [red]message 1[default][red]message 2[default][n]", +] +`; + +exports[`Terminal 01 color enabled 01 basic terminal functions 06 writeErrorLine 03 writes a message with colors: output 1`] = ` Object { "debug": "", "error": "[red]message 1[default][n]", @@ -330,7 +522,13 @@ Object { } `; -exports[`Terminal 01 color enabled 01 basic terminal functions 06 writeErrorLine 04 writes a multiple messages with colors 1`] = ` +exports[`Terminal 01 color enabled 01 basic terminal functions 06 writeErrorLine 03 writes a message with colors: output as chunks 1`] = ` +Array [ + "[ error] [red]message 1[default][n]", +] +`; + +exports[`Terminal 01 color enabled 01 basic terminal functions 06 writeErrorLine 04 writes a multiple messages with colors: output 1`] = ` Object { "debug": "", "error": "[red]message 1[default][red]message 2[default][n]", @@ -340,7 +538,13 @@ Object { } `; -exports[`Terminal 01 color enabled 01 basic terminal functions 06 writeErrorLine 05 writes a messages with colors interspersed with non-colored messages 1`] = ` +exports[`Terminal 01 color enabled 01 basic terminal functions 06 writeErrorLine 04 writes a multiple messages with colors: output as chunks 1`] = ` +Array [ + "[ error] [red]message 1[default][red]message 2[default][n]", +] +`; + +exports[`Terminal 01 color enabled 01 basic terminal functions 06 writeErrorLine 05 writes a messages with colors interspersed with non-colored messages: output 1`] = ` Object { "debug": "", "error": "[red]message 1[default][red]message 2[default][red]message 3[default][red]message 4[default][n]", @@ -350,7 +554,13 @@ Object { } `; -exports[`Terminal 01 color enabled 01 basic terminal functions 06 writeErrorLine 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled 1`] = ` +exports[`Terminal 01 color enabled 01 basic terminal functions 06 writeErrorLine 05 writes a messages with colors interspersed with non-colored messages: output as chunks 1`] = ` +Array [ + "[ error] [red]message 1[default][red]message 2[default][red]message 3[default][red]message 4[default][n]", +] +`; + +exports[`Terminal 01 color enabled 01 basic terminal functions 06 writeErrorLine 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled: output 1`] = ` Object { "debug": "", "error": "message 1[green]message 2[default]message 3[red]message 4[default][n]", @@ -360,7 +570,13 @@ Object { } `; -exports[`Terminal 01 color enabled 01 basic terminal functions 07 writeVerbose 01 writes a single message 1`] = ` +exports[`Terminal 01 color enabled 01 basic terminal functions 06 writeErrorLine 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled: output as chunks 1`] = ` +Array [ + "[ error] message 1[green]message 2[default]message 3[red]message 4[default][n]", +] +`; + +exports[`Terminal 01 color enabled 01 basic terminal functions 07 writeVerbose 01 writes a single message: output 1`] = ` Object { "debug": "", "error": "", @@ -370,7 +586,13 @@ Object { } `; -exports[`Terminal 01 color enabled 01 basic terminal functions 07 writeVerbose 02 writes multiple messages 1`] = ` +exports[`Terminal 01 color enabled 01 basic terminal functions 07 writeVerbose 01 writes a single message: output as chunks 1`] = ` +Array [ + "[verbose] test message", +] +`; + +exports[`Terminal 01 color enabled 01 basic terminal functions 07 writeVerbose 02 writes multiple messages: output 1`] = ` Object { "debug": "", "error": "", @@ -380,7 +602,13 @@ Object { } `; -exports[`Terminal 01 color enabled 01 basic terminal functions 07 writeVerbose 03 writes a message with colors 1`] = ` +exports[`Terminal 01 color enabled 01 basic terminal functions 07 writeVerbose 02 writes multiple messages: output as chunks 1`] = ` +Array [ + "[verbose] message 1message 2", +] +`; + +exports[`Terminal 01 color enabled 01 basic terminal functions 07 writeVerbose 03 writes a message with colors: output 1`] = ` Object { "debug": "", "error": "", @@ -390,7 +618,13 @@ Object { } `; -exports[`Terminal 01 color enabled 01 basic terminal functions 07 writeVerbose 04 writes a multiple messages with colors 1`] = ` +exports[`Terminal 01 color enabled 01 basic terminal functions 07 writeVerbose 03 writes a message with colors: output as chunks 1`] = ` +Array [ + "[verbose] [green]message 1[default]", +] +`; + +exports[`Terminal 01 color enabled 01 basic terminal functions 07 writeVerbose 04 writes a multiple messages with colors: output 1`] = ` Object { "debug": "", "error": "", @@ -400,7 +634,13 @@ Object { } `; -exports[`Terminal 01 color enabled 01 basic terminal functions 07 writeVerbose 05 writes a messages with colors interspersed with non-colored messages 1`] = ` +exports[`Terminal 01 color enabled 01 basic terminal functions 07 writeVerbose 04 writes a multiple messages with colors: output as chunks 1`] = ` +Array [ + "[verbose] [green]message 1[default][red]message 2[default]", +] +`; + +exports[`Terminal 01 color enabled 01 basic terminal functions 07 writeVerbose 05 writes a messages with colors interspersed with non-colored messages: output 1`] = ` Object { "debug": "", "error": "", @@ -410,7 +650,13 @@ Object { } `; -exports[`Terminal 01 color enabled 01 basic terminal functions 07 writeVerbose 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled 1`] = ` +exports[`Terminal 01 color enabled 01 basic terminal functions 07 writeVerbose 05 writes a messages with colors interspersed with non-colored messages: output as chunks 1`] = ` +Array [ + "[verbose] message 1[green]message 2[default]message 3[red]message 4[default]", +] +`; + +exports[`Terminal 01 color enabled 01 basic terminal functions 07 writeVerbose 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled: output 1`] = ` Object { "debug": "", "error": "", @@ -420,7 +666,13 @@ Object { } `; -exports[`Terminal 01 color enabled 01 basic terminal functions 08 writeVerboseLine 01 writes a single message 1`] = ` +exports[`Terminal 01 color enabled 01 basic terminal functions 07 writeVerbose 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled: output as chunks 1`] = ` +Array [ + "[verbose] message 1[green]message 2[default]message 3[red]message 4[default]", +] +`; + +exports[`Terminal 01 color enabled 01 basic terminal functions 08 writeVerboseLine 01 writes a single message: output 1`] = ` Object { "debug": "", "error": "", @@ -430,7 +682,13 @@ Object { } `; -exports[`Terminal 01 color enabled 01 basic terminal functions 08 writeVerboseLine 02 writes multiple messages 1`] = ` +exports[`Terminal 01 color enabled 01 basic terminal functions 08 writeVerboseLine 01 writes a single message: output as chunks 1`] = ` +Array [ + "[verbose] test message[n]", +] +`; + +exports[`Terminal 01 color enabled 01 basic terminal functions 08 writeVerboseLine 02 writes multiple messages: output 1`] = ` Object { "debug": "", "error": "", @@ -440,7 +698,13 @@ Object { } `; -exports[`Terminal 01 color enabled 01 basic terminal functions 08 writeVerboseLine 03 writes a message with colors 1`] = ` +exports[`Terminal 01 color enabled 01 basic terminal functions 08 writeVerboseLine 02 writes multiple messages: output as chunks 1`] = ` +Array [ + "[verbose] message 1message 2[n]", +] +`; + +exports[`Terminal 01 color enabled 01 basic terminal functions 08 writeVerboseLine 03 writes a message with colors: output 1`] = ` Object { "debug": "", "error": "", @@ -450,7 +714,13 @@ Object { } `; -exports[`Terminal 01 color enabled 01 basic terminal functions 08 writeVerboseLine 04 writes a multiple messages with colors 1`] = ` +exports[`Terminal 01 color enabled 01 basic terminal functions 08 writeVerboseLine 03 writes a message with colors: output as chunks 1`] = ` +Array [ + "[verbose] [green]message 1[default][n]", +] +`; + +exports[`Terminal 01 color enabled 01 basic terminal functions 08 writeVerboseLine 04 writes a multiple messages with colors: output 1`] = ` Object { "debug": "", "error": "", @@ -460,7 +730,13 @@ Object { } `; -exports[`Terminal 01 color enabled 01 basic terminal functions 08 writeVerboseLine 05 writes a messages with colors interspersed with non-colored messages 1`] = ` +exports[`Terminal 01 color enabled 01 basic terminal functions 08 writeVerboseLine 04 writes a multiple messages with colors: output as chunks 1`] = ` +Array [ + "[verbose] [green]message 1[default][red]message 2[default][n]", +] +`; + +exports[`Terminal 01 color enabled 01 basic terminal functions 08 writeVerboseLine 05 writes a messages with colors interspersed with non-colored messages: output 1`] = ` Object { "debug": "", "error": "", @@ -470,7 +746,13 @@ Object { } `; -exports[`Terminal 01 color enabled 01 basic terminal functions 08 writeVerboseLine 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled 1`] = ` +exports[`Terminal 01 color enabled 01 basic terminal functions 08 writeVerboseLine 05 writes a messages with colors interspersed with non-colored messages: output as chunks 1`] = ` +Array [ + "[verbose] message 1[green]message 2[default]message 3[red]message 4[default][n]", +] +`; + +exports[`Terminal 01 color enabled 01 basic terminal functions 08 writeVerboseLine 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled: output 1`] = ` Object { "debug": "", "error": "", @@ -480,7 +762,13 @@ Object { } `; -exports[`Terminal 01 color enabled 05 writes to multiple streams 1`] = ` +exports[`Terminal 01 color enabled 01 basic terminal functions 08 writeVerboseLine 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled: output as chunks 1`] = ` +Array [ + "[verbose] message 1[green]message 2[default]message 3[red]message 4[default][n]", +] +`; + +exports[`Terminal 01 color enabled 05 writes to multiple streams: output 1`] = ` Object { "debug": "", "error": "[red]message 1[default][red]message 2[default][red]message 3[default][red]message 4[default][red]test message[default][n][red]message 1[default][red]message 2[default][red]message 1[default][red]message 2[default][n][red]message 1[default][red]message 1[default][red]message 2[default][red]message 3[default][red]message 4[default][n][red]message 1[default][n][red]test message[default][red]message 1[default][red]message 2[default][n][red]message 1[default][red]message 2[default]", @@ -490,7 +778,47 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 01 write 01 writes a single message 1`] = ` +exports[`Terminal 01 color enabled 05 writes to multiple streams: output as chunks 1`] = ` +Array [ + "[ log] message 1[green]message 2[default]message 3[red]message 4[default]", + "[warning] [yellow]message 1[default][yellow]message 2[default][n]", + "[verbose] test message[green]message 1[default]", + "[ log] [green]message 1[default][n]", + "[ error] [red]message 1[default][red]message 2[default][red]message 3[default][red]message 4[default][red]test message[default][n]", + "[verbose] message 1[green]message 2[default]message 3[red]message 4[default][n]", + "[verbose] test message[n]", + "[warning] [yellow]message 1[default][yellow]message 2[default][yellow]message 1[default][yellow]message 2[default][yellow]message 3[default][yellow]message 4[default]", + "[ error] [red]message 1[default][red]message 2[default]", + "[ log] [green]message 1[default]", + "[verbose] message 1[green]message 2[default]message 3[red]message 4[default]", + "[ error] [red]message 1[default][red]message 2[default][n]", + "[ log] [green]message 1[default][red]message 2[default]", + "[verbose] message 1message 2[green]message 1[default][n]", + "[ log] [green]message 1[default][red]message 2[default][n]", + "[ error] [red]message 1[default]", + "[warning] [yellow]message 1[default][yellow]message 2[default][yellow]message 3[default][yellow]message 4[default][n]", + "[ log] test message", + "[warning] [yellow]test message[default][n]", + "[verbose] [green]message 1[default][red]message 2[default][n]", + "[verbose] message 1message 2[n]", + "[ error] [red]message 1[default][red]message 2[default][red]message 3[default][red]message 4[default][n]", + "[ log] message 1[green]message 2[default]message 3[red]message 4[default][n]", + "[warning] [yellow]message 1[default][yellow]message 2[default]", + "[ error] [red]message 1[default][n]", + "[ log] message 1message 2", + "[verbose] [green]message 1[default][red]message 2[default]", + "[warning] [yellow]message 1[default]", + "[ log] test message[n]", + "[ error] [red]test message[default]", + "[ log] message 1message 2[n]", + "[ error] [red]message 1[default][red]message 2[default][n]", + "[ error] [red]message 1[default][red]message 2[default]", + "[warning] [yellow]message 1[default][yellow]message 2[default][n]", + "[warning] [yellow]message 1[default][n]", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 01 write 01 writes a single message: output 1`] = ` Object { "debug": "", "error": "", @@ -500,7 +828,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 01 write 02 writes multiple messages 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 01 write 01 writes a single message: output as chunks 1`] = ` +Array [ + "[ log] test message", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 01 write 02 writes multiple messages: output 1`] = ` Object { "debug": "", "error": "", @@ -510,7 +844,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 01 write 03 writes a message with colors 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 01 write 02 writes multiple messages: output as chunks 1`] = ` +Array [ + "[ log] message 1message 2", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 01 write 03 writes a message with colors: output 1`] = ` Object { "debug": "", "error": "", @@ -520,7 +860,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 01 write 04 writes a multiple messages with colors 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 01 write 03 writes a message with colors: output as chunks 1`] = ` +Array [ + "[ log] message 1", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 01 write 04 writes a multiple messages with colors: output 1`] = ` Object { "debug": "", "error": "", @@ -530,7 +876,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 01 write 05 writes a messages with colors interspersed with non-colored messages 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 01 write 04 writes a multiple messages with colors: output as chunks 1`] = ` +Array [ + "[ log] message 1message 2", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 01 write 05 writes a messages with colors interspersed with non-colored messages: output 1`] = ` Object { "debug": "", "error": "", @@ -540,7 +892,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 01 write 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 01 write 05 writes a messages with colors interspersed with non-colored messages: output as chunks 1`] = ` +Array [ + "[ log] message 1message 2message 3message 4", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 01 write 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled: output 1`] = ` Object { "debug": "", "error": "", @@ -550,7 +908,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 02 writeLine 01 writes a single message 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 01 write 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled: output as chunks 1`] = ` +Array [ + "[ log] message 1message 2message 3message 4", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 02 writeLine 01 writes a single message: output 1`] = ` Object { "debug": "", "error": "", @@ -560,7 +924,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 02 writeLine 02 writes multiple messages 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 02 writeLine 01 writes a single message: output as chunks 1`] = ` +Array [ + "[ log] test message[n]", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 02 writeLine 02 writes multiple messages: output 1`] = ` Object { "debug": "", "error": "", @@ -570,7 +940,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 02 writeLine 03 writes a message with colors 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 02 writeLine 02 writes multiple messages: output as chunks 1`] = ` +Array [ + "[ log] message 1message 2[n]", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 02 writeLine 03 writes a message with colors: output 1`] = ` Object { "debug": "", "error": "", @@ -580,7 +956,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 02 writeLine 04 writes a multiple messages with colors 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 02 writeLine 03 writes a message with colors: output as chunks 1`] = ` +Array [ + "[ log] message 1[n]", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 02 writeLine 04 writes a multiple messages with colors: output 1`] = ` Object { "debug": "", "error": "", @@ -590,7 +972,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 02 writeLine 05 writes a messages with colors interspersed with non-colored messages 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 02 writeLine 04 writes a multiple messages with colors: output as chunks 1`] = ` +Array [ + "[ log] message 1message 2[n]", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 02 writeLine 05 writes a messages with colors interspersed with non-colored messages: output 1`] = ` Object { "debug": "", "error": "", @@ -600,7 +988,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 02 writeLine 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 02 writeLine 05 writes a messages with colors interspersed with non-colored messages: output as chunks 1`] = ` +Array [ + "[ log] message 1message 2message 3message 4[n]", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 02 writeLine 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled: output 1`] = ` Object { "debug": "", "error": "", @@ -610,7 +1004,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 03 writeWarning 01 writes a single message 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 02 writeLine 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled: output as chunks 1`] = ` +Array [ + "[ log] message 1message 2message 3message 4[n]", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 03 writeWarning 01 writes a single message: output 1`] = ` Object { "debug": "", "error": "", @@ -620,7 +1020,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 03 writeWarning 02 writes multiple messages 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 03 writeWarning 01 writes a single message: output as chunks 1`] = ` +Array [ + "[warning] test message", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 03 writeWarning 02 writes multiple messages: output 1`] = ` Object { "debug": "", "error": "", @@ -630,7 +1036,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 03 writeWarning 03 writes a message with colors 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 03 writeWarning 02 writes multiple messages: output as chunks 1`] = ` +Array [ + "[warning] message 1message 2", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 03 writeWarning 03 writes a message with colors: output 1`] = ` Object { "debug": "", "error": "", @@ -640,7 +1052,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 03 writeWarning 04 writes a multiple messages with colors 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 03 writeWarning 03 writes a message with colors: output as chunks 1`] = ` +Array [ + "[warning] message 1", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 03 writeWarning 04 writes a multiple messages with colors: output 1`] = ` Object { "debug": "", "error": "", @@ -650,7 +1068,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 03 writeWarning 05 writes a messages with colors interspersed with non-colored messages 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 03 writeWarning 04 writes a multiple messages with colors: output as chunks 1`] = ` +Array [ + "[warning] message 1message 2", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 03 writeWarning 05 writes a messages with colors interspersed with non-colored messages: output 1`] = ` Object { "debug": "", "error": "", @@ -660,7 +1084,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 03 writeWarning 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 03 writeWarning 05 writes a messages with colors interspersed with non-colored messages: output as chunks 1`] = ` +Array [ + "[warning] message 1message 2message 3message 4", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 03 writeWarning 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled: output 1`] = ` Object { "debug": "", "error": "", @@ -670,7 +1100,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 04 writeWarningLine 01 writes a single message 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 03 writeWarning 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled: output as chunks 1`] = ` +Array [ + "[warning] message 1message 2message 3message 4", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 04 writeWarningLine 01 writes a single message: output 1`] = ` Object { "debug": "", "error": "", @@ -680,7 +1116,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 04 writeWarningLine 02 writes multiple messages 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 04 writeWarningLine 01 writes a single message: output as chunks 1`] = ` +Array [ + "[warning] test message[n]", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 04 writeWarningLine 02 writes multiple messages: output 1`] = ` Object { "debug": "", "error": "", @@ -690,7 +1132,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 04 writeWarningLine 03 writes a message with colors 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 04 writeWarningLine 02 writes multiple messages: output as chunks 1`] = ` +Array [ + "[warning] message 1message 2[n]", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 04 writeWarningLine 03 writes a message with colors: output 1`] = ` Object { "debug": "", "error": "", @@ -700,7 +1148,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 04 writeWarningLine 04 writes a multiple messages with colors 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 04 writeWarningLine 03 writes a message with colors: output as chunks 1`] = ` +Array [ + "[warning] message 1[n]", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 04 writeWarningLine 04 writes a multiple messages with colors: output 1`] = ` Object { "debug": "", "error": "", @@ -710,7 +1164,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 04 writeWarningLine 05 writes a messages with colors interspersed with non-colored messages 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 04 writeWarningLine 04 writes a multiple messages with colors: output as chunks 1`] = ` +Array [ + "[warning] message 1message 2[n]", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 04 writeWarningLine 05 writes a messages with colors interspersed with non-colored messages: output 1`] = ` Object { "debug": "", "error": "", @@ -720,7 +1180,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 04 writeWarningLine 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 04 writeWarningLine 05 writes a messages with colors interspersed with non-colored messages: output as chunks 1`] = ` +Array [ + "[warning] message 1message 2message 3message 4[n]", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 04 writeWarningLine 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled: output 1`] = ` Object { "debug": "", "error": "", @@ -730,7 +1196,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 05 writeError 01 writes a single message 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 04 writeWarningLine 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled: output as chunks 1`] = ` +Array [ + "[warning] message 1message 2message 3message 4[n]", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 05 writeError 01 writes a single message: output 1`] = ` Object { "debug": "", "error": "test message", @@ -740,7 +1212,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 05 writeError 02 writes multiple messages 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 05 writeError 01 writes a single message: output as chunks 1`] = ` +Array [ + "[ error] test message", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 05 writeError 02 writes multiple messages: output 1`] = ` Object { "debug": "", "error": "message 1message 2", @@ -750,7 +1228,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 05 writeError 03 writes a message with colors 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 05 writeError 02 writes multiple messages: output as chunks 1`] = ` +Array [ + "[ error] message 1message 2", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 05 writeError 03 writes a message with colors: output 1`] = ` Object { "debug": "", "error": "message 1", @@ -760,7 +1244,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 05 writeError 04 writes a multiple messages with colors 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 05 writeError 03 writes a message with colors: output as chunks 1`] = ` +Array [ + "[ error] message 1", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 05 writeError 04 writes a multiple messages with colors: output 1`] = ` Object { "debug": "", "error": "message 1message 2", @@ -770,7 +1260,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 05 writeError 05 writes a messages with colors interspersed with non-colored messages 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 05 writeError 04 writes a multiple messages with colors: output as chunks 1`] = ` +Array [ + "[ error] message 1message 2", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 05 writeError 05 writes a messages with colors interspersed with non-colored messages: output 1`] = ` Object { "debug": "", "error": "message 1message 2message 3message 4", @@ -780,7 +1276,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 05 writeError 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 05 writeError 05 writes a messages with colors interspersed with non-colored messages: output as chunks 1`] = ` +Array [ + "[ error] message 1message 2message 3message 4", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 05 writeError 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled: output 1`] = ` Object { "debug": "", "error": "message 1message 2message 3message 4", @@ -790,7 +1292,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 06 writeErrorLine 01 writes a single message 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 05 writeError 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled: output as chunks 1`] = ` +Array [ + "[ error] message 1message 2message 3message 4", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 06 writeErrorLine 01 writes a single message: output 1`] = ` Object { "debug": "", "error": "test message[n]", @@ -800,7 +1308,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 06 writeErrorLine 02 writes multiple messages 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 06 writeErrorLine 01 writes a single message: output as chunks 1`] = ` +Array [ + "[ error] test message[n]", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 06 writeErrorLine 02 writes multiple messages: output 1`] = ` Object { "debug": "", "error": "message 1message 2[n]", @@ -810,7 +1324,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 06 writeErrorLine 03 writes a message with colors 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 06 writeErrorLine 02 writes multiple messages: output as chunks 1`] = ` +Array [ + "[ error] message 1message 2[n]", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 06 writeErrorLine 03 writes a message with colors: output 1`] = ` Object { "debug": "", "error": "message 1[n]", @@ -820,7 +1340,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 06 writeErrorLine 04 writes a multiple messages with colors 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 06 writeErrorLine 03 writes a message with colors: output as chunks 1`] = ` +Array [ + "[ error] message 1[n]", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 06 writeErrorLine 04 writes a multiple messages with colors: output 1`] = ` Object { "debug": "", "error": "message 1message 2[n]", @@ -830,7 +1356,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 06 writeErrorLine 05 writes a messages with colors interspersed with non-colored messages 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 06 writeErrorLine 04 writes a multiple messages with colors: output as chunks 1`] = ` +Array [ + "[ error] message 1message 2[n]", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 06 writeErrorLine 05 writes a messages with colors interspersed with non-colored messages: output 1`] = ` Object { "debug": "", "error": "message 1message 2message 3message 4[n]", @@ -840,7 +1372,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 06 writeErrorLine 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 06 writeErrorLine 05 writes a messages with colors interspersed with non-colored messages: output as chunks 1`] = ` +Array [ + "[ error] message 1message 2message 3message 4[n]", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 06 writeErrorLine 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled: output 1`] = ` Object { "debug": "", "error": "message 1message 2message 3message 4[n]", @@ -850,7 +1388,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 07 writeVerbose 01 writes a single message 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 06 writeErrorLine 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled: output as chunks 1`] = ` +Array [ + "[ error] message 1message 2message 3message 4[n]", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 07 writeVerbose 01 writes a single message: output 1`] = ` Object { "debug": "", "error": "", @@ -860,7 +1404,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 07 writeVerbose 02 writes multiple messages 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 07 writeVerbose 01 writes a single message: output as chunks 1`] = ` +Array [ + "[verbose] test message", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 07 writeVerbose 02 writes multiple messages: output 1`] = ` Object { "debug": "", "error": "", @@ -870,7 +1420,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 07 writeVerbose 03 writes a message with colors 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 07 writeVerbose 02 writes multiple messages: output as chunks 1`] = ` +Array [ + "[verbose] message 1message 2", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 07 writeVerbose 03 writes a message with colors: output 1`] = ` Object { "debug": "", "error": "", @@ -880,7 +1436,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 07 writeVerbose 04 writes a multiple messages with colors 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 07 writeVerbose 03 writes a message with colors: output as chunks 1`] = ` +Array [ + "[verbose] message 1", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 07 writeVerbose 04 writes a multiple messages with colors: output 1`] = ` Object { "debug": "", "error": "", @@ -890,7 +1452,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 07 writeVerbose 05 writes a messages with colors interspersed with non-colored messages 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 07 writeVerbose 04 writes a multiple messages with colors: output as chunks 1`] = ` +Array [ + "[verbose] message 1message 2", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 07 writeVerbose 05 writes a messages with colors interspersed with non-colored messages: output 1`] = ` Object { "debug": "", "error": "", @@ -900,7 +1468,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 07 writeVerbose 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 07 writeVerbose 05 writes a messages with colors interspersed with non-colored messages: output as chunks 1`] = ` +Array [ + "[verbose] message 1message 2message 3message 4", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 07 writeVerbose 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled: output 1`] = ` Object { "debug": "", "error": "", @@ -910,7 +1484,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 08 writeVerboseLine 01 writes a single message 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 07 writeVerbose 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled: output as chunks 1`] = ` +Array [ + "[verbose] message 1message 2message 3message 4", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 08 writeVerboseLine 01 writes a single message: output 1`] = ` Object { "debug": "", "error": "", @@ -920,7 +1500,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 08 writeVerboseLine 02 writes multiple messages 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 08 writeVerboseLine 01 writes a single message: output as chunks 1`] = ` +Array [ + "[verbose] test message[n]", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 08 writeVerboseLine 02 writes multiple messages: output 1`] = ` Object { "debug": "", "error": "", @@ -930,7 +1516,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 08 writeVerboseLine 03 writes a message with colors 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 08 writeVerboseLine 02 writes multiple messages: output as chunks 1`] = ` +Array [ + "[verbose] message 1message 2[n]", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 08 writeVerboseLine 03 writes a message with colors: output 1`] = ` Object { "debug": "", "error": "", @@ -940,7 +1532,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 08 writeVerboseLine 04 writes a multiple messages with colors 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 08 writeVerboseLine 03 writes a message with colors: output as chunks 1`] = ` +Array [ + "[verbose] message 1[n]", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 08 writeVerboseLine 04 writes a multiple messages with colors: output 1`] = ` Object { "debug": "", "error": "", @@ -950,7 +1548,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 08 writeVerboseLine 05 writes a messages with colors interspersed with non-colored messages 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 08 writeVerboseLine 04 writes a multiple messages with colors: output as chunks 1`] = ` +Array [ + "[verbose] message 1message 2[n]", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 08 writeVerboseLine 05 writes a messages with colors interspersed with non-colored messages: output 1`] = ` Object { "debug": "", "error": "", @@ -960,7 +1564,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 08 writeVerboseLine 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 08 writeVerboseLine 05 writes a messages with colors interspersed with non-colored messages: output as chunks 1`] = ` +Array [ + "[verbose] message 1message 2message 3message 4[n]", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 08 writeVerboseLine 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled: output 1`] = ` Object { "debug": "", "error": "", @@ -970,7 +1580,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 09 writeDebug 01 writes a single message 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 08 writeVerboseLine 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled: output as chunks 1`] = ` +Array [ + "[verbose] message 1message 2message 3message 4[n]", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 09 writeDebug 01 writes a single message: output 1`] = ` Object { "debug": "test message", "error": "", @@ -980,7 +1596,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 09 writeDebug 02 writes multiple messages 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 09 writeDebug 01 writes a single message: output as chunks 1`] = ` +Array [ + "[ debug] test message", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 09 writeDebug 02 writes multiple messages: output 1`] = ` Object { "debug": "message 1message 2", "error": "", @@ -990,7 +1612,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 09 writeDebug 03 writes a message with colors 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 09 writeDebug 02 writes multiple messages: output as chunks 1`] = ` +Array [ + "[ debug] message 1message 2", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 09 writeDebug 03 writes a message with colors: output 1`] = ` Object { "debug": "message 1", "error": "", @@ -1000,7 +1628,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 09 writeDebug 04 writes a multiple messages with colors 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 09 writeDebug 03 writes a message with colors: output as chunks 1`] = ` +Array [ + "[ debug] message 1", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 09 writeDebug 04 writes a multiple messages with colors: output 1`] = ` Object { "debug": "message 1message 2", "error": "", @@ -1010,7 +1644,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 09 writeDebug 05 writes a messages with colors interspersed with non-colored messages 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 09 writeDebug 04 writes a multiple messages with colors: output as chunks 1`] = ` +Array [ + "[ debug] message 1message 2", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 09 writeDebug 05 writes a messages with colors interspersed with non-colored messages: output 1`] = ` Object { "debug": "message 1message 2message 3message 4", "error": "", @@ -1020,7 +1660,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 09 writeDebug 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 09 writeDebug 05 writes a messages with colors interspersed with non-colored messages: output as chunks 1`] = ` +Array [ + "[ debug] message 1message 2message 3message 4", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 09 writeDebug 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled: output 1`] = ` Object { "debug": "message 1message 2message 3message 4", "error": "", @@ -1030,7 +1676,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 10 writeDebugLine 01 writes a single message 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 09 writeDebug 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled: output as chunks 1`] = ` +Array [ + "[ debug] message 1message 2message 3message 4", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 10 writeDebugLine 01 writes a single message: output 1`] = ` Object { "debug": "test message[n]", "error": "", @@ -1040,7 +1692,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 10 writeDebugLine 02 writes multiple messages 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 10 writeDebugLine 01 writes a single message: output as chunks 1`] = ` +Array [ + "[ debug] test message[n]", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 10 writeDebugLine 02 writes multiple messages: output 1`] = ` Object { "debug": "message 1message 2[n]", "error": "", @@ -1050,7 +1708,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 10 writeDebugLine 03 writes a message with colors 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 10 writeDebugLine 02 writes multiple messages: output as chunks 1`] = ` +Array [ + "[ debug] message 1message 2[n]", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 10 writeDebugLine 03 writes a message with colors: output 1`] = ` Object { "debug": "message 1[n]", "error": "", @@ -1060,7 +1724,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 10 writeDebugLine 04 writes a multiple messages with colors 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 10 writeDebugLine 03 writes a message with colors: output as chunks 1`] = ` +Array [ + "[ debug] message 1[n]", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 10 writeDebugLine 04 writes a multiple messages with colors: output 1`] = ` Object { "debug": "message 1message 2[n]", "error": "", @@ -1070,7 +1740,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 10 writeDebugLine 05 writes a messages with colors interspersed with non-colored messages 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 10 writeDebugLine 04 writes a multiple messages with colors: output as chunks 1`] = ` +Array [ + "[ debug] message 1message 2[n]", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 10 writeDebugLine 05 writes a messages with colors interspersed with non-colored messages: output 1`] = ` Object { "debug": "message 1message 2message 3message 4[n]", "error": "", @@ -1080,7 +1756,13 @@ Object { } `; -exports[`Terminal 02 color disabled 01 basic terminal functions 10 writeDebugLine 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 10 writeDebugLine 05 writes a messages with colors interspersed with non-colored messages: output as chunks 1`] = ` +Array [ + "[ debug] message 1message 2message 3message 4[n]", +] +`; + +exports[`Terminal 02 color disabled 01 basic terminal functions 10 writeDebugLine 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled: output 1`] = ` Object { "debug": "message 1message 2message 3message 4[n]", "error": "", @@ -1090,7 +1772,13 @@ Object { } `; -exports[`Terminal 02 color disabled 05 writes to multiple streams 1`] = ` +exports[`Terminal 02 color disabled 01 basic terminal functions 10 writeDebugLine 06 writes a messages with colors interspersed with non-colored messages with color overriding disabled: output as chunks 1`] = ` +Array [ + "[ debug] message 1message 2message 3message 4[n]", +] +`; + +exports[`Terminal 02 color disabled 05 writes to multiple streams: output 1`] = ` Object { "debug": "", "error": "message 1message 2message 3message 4test message[n]message 1message 2message 1message 2[n]message 1message 1message 2message 3message 4[n]message 1[n]test messagemessage 1message 2[n]message 1message 2", @@ -1099,3 +1787,43 @@ Object { "warning": "message 1message 2[n]message 1message 2message 1message 2message 3message 4message 1message 2message 3message 4[n]test message[n]message 1message 2message 1message 1message 2[n]message 1[n]", } `; + +exports[`Terminal 02 color disabled 05 writes to multiple streams: output as chunks 1`] = ` +Array [ + "[ log] message 1message 2message 3message 4", + "[warning] message 1message 2[n]", + "[verbose] test messagemessage 1", + "[ log] message 1[n]", + "[ error] message 1message 2message 3message 4test message[n]", + "[verbose] message 1message 2message 3message 4[n]", + "[verbose] test message[n]", + "[warning] message 1message 2message 1message 2message 3message 4", + "[ error] message 1message 2", + "[ log] message 1", + "[verbose] message 1message 2message 3message 4", + "[ error] message 1message 2[n]", + "[ log] message 1message 2", + "[verbose] message 1message 2message 1[n]", + "[ log] message 1message 2[n]", + "[ error] message 1", + "[warning] message 1message 2message 3message 4[n]", + "[ log] test message", + "[warning] test message[n]", + "[verbose] message 1message 2[n]", + "[verbose] message 1message 2[n]", + "[ error] message 1message 2message 3message 4[n]", + "[ log] message 1message 2message 3message 4[n]", + "[warning] message 1message 2", + "[ error] message 1[n]", + "[ log] message 1message 2", + "[verbose] message 1message 2", + "[warning] message 1", + "[ log] test message[n]", + "[ error] test message", + "[ log] message 1message 2[n]", + "[ error] message 1message 2[n]", + "[ error] message 1message 2", + "[warning] message 1message 2[n]", + "[warning] message 1[n]", +] +`; diff --git a/libraries/terminal/src/test/__snapshots__/TerminalStreamWritable.test.ts.snap b/libraries/terminal/src/test/__snapshots__/TerminalStreamWritable.test.ts.snap index 7682242fb6..fd24916c81 100644 --- a/libraries/terminal/src/test/__snapshots__/TerminalStreamWritable.test.ts.snap +++ b/libraries/terminal/src/test/__snapshots__/TerminalStreamWritable.test.ts.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`TerminalStreamWritable writes a debug message 1`] = ` +exports[`TerminalStreamWritable writes a debug message: output 1`] = ` Object { "debug": "test message", "error": "", @@ -10,7 +10,16 @@ Object { } `; -exports[`TerminalStreamWritable writes a message 1`] = ` +exports[`TerminalStreamWritable writes a debug message: output as chunks 1`] = ` +Array [ + Object { + "severity": "debug", + "text": "test message", + }, +] +`; + +exports[`TerminalStreamWritable writes a message: output 1`] = ` Object { "debug": "", "error": "", @@ -20,7 +29,16 @@ Object { } `; -exports[`TerminalStreamWritable writes a verbose message 1`] = ` +exports[`TerminalStreamWritable writes a message: output as chunks 1`] = ` +Array [ + Object { + "severity": "log", + "text": "test message", + }, +] +`; + +exports[`TerminalStreamWritable writes a verbose message: output 1`] = ` Object { "debug": "", "error": "", @@ -30,7 +48,16 @@ Object { } `; -exports[`TerminalStreamWritable writes a warning message 1`] = ` +exports[`TerminalStreamWritable writes a verbose message: output as chunks 1`] = ` +Array [ + Object { + "severity": "verbose", + "text": "test message", + }, +] +`; + +exports[`TerminalStreamWritable writes a warning message: output 1`] = ` Object { "debug": "", "error": "", @@ -40,7 +67,16 @@ Object { } `; -exports[`TerminalStreamWritable writes an error message 1`] = ` +exports[`TerminalStreamWritable writes a warning message: output as chunks 1`] = ` +Array [ + Object { + "severity": "warning", + "text": "[yellow]test message[default]", + }, +] +`; + +exports[`TerminalStreamWritable writes an error message: output 1`] = ` Object { "debug": "", "error": "[red]test message[default]", @@ -49,3 +85,12 @@ Object { "warning": "", } `; + +exports[`TerminalStreamWritable writes an error message: output as chunks 1`] = ` +Array [ + Object { + "severity": "error", + "text": "[red]test message[default]", + }, +] +`; diff --git a/rush-plugins/rush-http-build-cache-plugin/src/test/HttpBuildCacheProvider.test.ts b/rush-plugins/rush-http-build-cache-plugin/src/test/HttpBuildCacheProvider.test.ts index 053ee007dd..a86ddb342d 100644 --- a/rush-plugins/rush-http-build-cache-plugin/src/test/HttpBuildCacheProvider.test.ts +++ b/rush-plugins/rush-http-build-cache-plugin/src/test/HttpBuildCacheProvider.test.ts @@ -66,11 +66,17 @@ describe('HttpBuildCacheProvider', () => { redirect: 'follow' }) ); - expect(terminalBuffer.getAllOutput(true)).toMatchInlineSnapshot(` -Object { - "debug": "[http-build-cache] request: GET https://buildcache.example.acme.com/some-key unknown bytes[n]", - "warning": "Error getting cache entry: Error: Credentials for https://buildcache.example.acme.com/ have not been provided.[n]In CI, verify that RUSH_BUILD_CACHE_CREDENTIAL contains a valid Authorization header value.[n][n]For local developers, run:[n][n] rush update-cloud-credentials --interactive[n][n]", -} + expect(terminalBuffer.getAllOutputAsChunks({ asLines: true })).toMatchInlineSnapshot(` +Array [ + "[ debug] [http-build-cache] request: GET https://buildcache.example.acme.com/some-key unknown bytes[n]", + "[warning] Error getting cache entry: Error: Credentials for https://buildcache.example.acme.com/ have not been provided.[n]", + "[warning] In CI, verify that RUSH_BUILD_CACHE_CREDENTIAL contains a valid Authorization header value.[n]", + "[warning] [n]", + "[warning] For local developers, run:[n]", + "[warning] [n]", + "[warning] rush update-cloud-credentials --interactive[n]", + "[warning] [n]", +] `); }); @@ -123,11 +129,13 @@ Object { redirect: 'follow' }) ); - expect(terminalBuffer.getAllOutput(true)).toMatchInlineSnapshot(` -Object { - "debug": "[http-build-cache] request: GET https://buildcache.example.acme.com/some-key unknown bytes[n][http-build-cache] request: GET https://buildcache.example.acme.com/some-key unknown bytes[n][http-build-cache] request: GET https://buildcache.example.acme.com/some-key unknown bytes[n]", - "warning": "Could not get cache entry: HTTP 504: BadGateway[n]", -} + expect(terminalBuffer.getAllOutputAsChunks({ asLines: true })).toMatchInlineSnapshot(` +Array [ + "[ debug] [http-build-cache] request: GET https://buildcache.example.acme.com/some-key unknown bytes[n]", + "[ debug] [http-build-cache] request: GET https://buildcache.example.acme.com/some-key unknown bytes[n]", + "[ debug] [http-build-cache] request: GET https://buildcache.example.acme.com/some-key unknown bytes[n]", + "[warning] Could not get cache entry: HTTP 504: BadGateway[n]", +] `); }); });