Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@microsoft/rush",
"comment": "Fix ProblemCollector wiring in OperationExecutionRecord: add preventAutoclose, strip ANSI colors before matching, and always include problemCollector in the terminal pipeline",
"type": "patch"
Comment thread
dmichon-msft marked this conversation as resolved.
}
],
"packageName": "@microsoft/rush"
}
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ export class OperationExecutionRecord implements IOperationRunnerContext, IOpera
preventAutoclose: true
});
public readonly problemCollector: ProblemCollector = new ProblemCollector({
// Allow writing to this object after transforms have been closed. We clean it up manually in a finally block.
preventAutoclose: true,
matcherJson: [
{
name: 'rushstack-file-error-unix',
Expand Down Expand Up @@ -322,14 +324,21 @@ export class OperationExecutionRecord implements IOperationRunnerContext, IOpera
//
// +--> quietModeTransform? --> collatedWriter
// |
// normalizeNewlineTransform --1--> stderrLineTransform --2--> projectLogWritable
// normalizeNewlineTransform --1--> stderrLineTransform --2--> projectLogWritable?
// |
// +--> stdioSummarizer
const destination: TerminalWritable = projectLogWritable
? new SplitterTransform({
destinations: [projectLogWritable, stdioSummarizer, problemCollector]
})
: stdioSummarizer;
// |
// +--> removeColorsTransform --> problemCollector
const removeColorsTransform: TextRewriterTransform = new TextRewriterTransform({
destination: problemCollector,
removeColors: true
});

const destination: TerminalWritable = new SplitterTransform({
destinations: projectLogWritable
? [projectLogWritable, stdioSummarizer, removeColorsTransform]
: [stdioSummarizer, removeColorsTransform]
});

const stderrLineTransform: StderrLineTransform = new StderrLineTransform({
destination,
Expand Down
Loading