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
4 changes: 2 additions & 2 deletions packages/@aws-cdk/cloudformation-diff/lib/format.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export class Formatter {
}

public print(fmt: string, ...args: any[]) {
this.stream.write(chalk.white(format(fmt, ...args)) + '\n');
this.stream.write(chalk.reset(format(fmt, ...args)) + '\n');
}

public warning(fmt: string, ...args: any[]) {
Expand Down Expand Up @@ -204,7 +204,7 @@ export class Formatter {
if (diff.isRemoval) {
return REMOVAL;
}
return chalk.white('[?]');
return chalk.reset('[?]');
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ export class NonInteractiveIoHost implements IIoHost {
const styleMap: Record<IoMessageLevel, (str: string) => string> = {
error: chalk.red,
warn: chalk.yellow,
result: chalk.white,
info: chalk.white,
result: chalk.reset,
info: chalk.reset,
debug: chalk.gray,
trace: chalk.gray,
};
Expand Down
4 changes: 2 additions & 2 deletions packages/aws-cdk/lib/cli/io-host/cli-io-host.ts
Original file line number Diff line number Diff line change
Expand Up @@ -536,8 +536,8 @@ function extractPromptInfo(msg: IoRequest<any, any>): {
const styleMap: Record<IoMessageLevel, (str: string) => string> = {
error: chalk.red,
warn: chalk.yellow,
result: chalk.white,
info: chalk.white,
result: chalk.reset,
info: chalk.reset,
debug: chalk.gray,
trace: chalk.gray,
};
Expand Down
12 changes: 6 additions & 6 deletions packages/aws-cdk/test/cli/io-host/cli-io-host.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ describe('CliIoHost', () => {
message: 'test message',
}));

expect(mockStderr).toHaveBeenCalledWith(chalk.white('test message') + '\n');
expect(mockStderr).toHaveBeenCalledWith(chalk.reset('test message') + '\n');
expect(mockStdout).not.toHaveBeenCalled();
});

Expand Down Expand Up @@ -112,7 +112,7 @@ describe('CliIoHost', () => {
message: 'result message',
}));

expect(mockStdout).toHaveBeenCalledWith(chalk.white('result message') + '\n');
expect(mockStdout).toHaveBeenCalledWith(chalk.reset('result message') + '\n');
expect(mockStderr).not.toHaveBeenCalled();
});
});
Expand Down Expand Up @@ -184,7 +184,7 @@ describe('CliIoHost', () => {
test.each([
['error', 'red', false],
['warn', 'yellow', false],
['info', 'white', false],
['info', 'reset', false],
['debug', 'gray', true],
['trace', 'gray', true],
] as Array<[IoMessageLevel, typeof chalk.ForegroundColor, boolean]>)('outputs %ss in %s color ', async (level, color, shouldAddTime) => {
Expand Down Expand Up @@ -229,7 +229,7 @@ describe('CliIoHost', () => {
message: 'ci message',
}));

expect(mockStdout).toHaveBeenCalledWith(chalk.white('ci message') + '\n');
expect(mockStdout).toHaveBeenCalledWith(chalk.reset('ci message') + '\n');
expect(mockStderr).not.toHaveBeenCalled();
});

Expand Down Expand Up @@ -275,7 +275,7 @@ describe('CliIoHost', () => {
message: 'info message',
}));

expect(mockStderr).toHaveBeenCalledWith(chalk.white('info message') + '\n');
expect(mockStderr).toHaveBeenCalledWith(chalk.reset('info message') + '\n');
});
});

Expand Down Expand Up @@ -505,7 +505,7 @@ describe('CliIoHost', () => {
defaultResponse: [1, 2, 3],
}));

expect(mockStderr).toHaveBeenCalledWith(chalk.white('test message') + '\n');
expect(mockStderr).toHaveBeenCalledWith(chalk.reset('test message') + '\n');
expect(response).toEqual([1, 2, 3]);
});
});
Expand Down
Loading