Remove use of deprecated trimLeft/trimRight
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@backstage/backend-common': patch
|
||||
'@backstage/cli': patch
|
||||
---
|
||||
|
||||
Remove use of deprecated trimLeft/trimRight
|
||||
@@ -34,7 +34,7 @@ export function requestLoggingHandler(logger?: Logger): RequestHandler {
|
||||
return morgan('combined', {
|
||||
stream: {
|
||||
write(message: String) {
|
||||
actualLogger.info(message.trimRight());
|
||||
actualLogger.info(message.trimEnd());
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
@@ -101,7 +101,7 @@ export async function command(opts: OptionValues): Promise<void> {
|
||||
if (resultText) {
|
||||
console.log();
|
||||
console.log(chalk.red(`Lint failed in ${relativeDir}:`));
|
||||
console.log(resultText.trimLeft());
|
||||
console.log(resultText.trimStart());
|
||||
|
||||
failed = true;
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ export function spawnPiped(cmd: string[], options?: SpawnOptions) {
|
||||
return (data: Buffer) => {
|
||||
const prefixedMsg = data
|
||||
.toString('utf8')
|
||||
.trimRight()
|
||||
.trimEnd()
|
||||
.replace(/^/gm, prefix);
|
||||
stream.write(`${prefixedMsg}\n`, 'utf8');
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user