fix(default-reporter): replace deprecated right-pad with String.padEnd (#8068)

This commit is contained in:
Wm Salt Hale
2024-05-10 07:53:32 -07:00
committed by GitHub
parent a7aef51c66
commit 524990fd95
4 changed files with 6 additions and 6 deletions

View File

@@ -0,0 +1,4 @@
---
"@pnpm/default-reporter": minor
---
fix(default-reporter): replace deprecated right-pad with String.padEnd

View File

@@ -48,7 +48,6 @@
"pretty-bytes": "^5.6.0",
"pretty-ms": "^7.0.1",
"ramda": "npm:@pnpm/ramda@0.28.1",
"right-pad": "^1.0.1",
"rxjs": "^7.8.1",
"semver": "^7.6.0",
"stacktracey": "^2.1.8",

View File

@@ -1,4 +1,3 @@
import rightPad from 'right-pad'
import { PREFIX_MAX_LENGTH } from '../outputConstants'
import { formatPrefix } from './formatPrefix'
@@ -17,5 +16,6 @@ export function autozoom (
}
export function zoomOut (currentPrefix: string, logPrefix: string, line: string): string {
return `${rightPad(formatPrefix(currentPrefix, logPrefix), PREFIX_MAX_LENGTH)} | ${line}`
const prefix: string = formatPrefix(currentPrefix, logPrefix)
return `${prefix.padEnd(PREFIX_MAX_LENGTH)} | ${line}`
}

3
pnpm-lock.yaml generated
View File

@@ -490,9 +490,6 @@ importers:
ramda:
specifier: npm:@pnpm/ramda@0.28.1
version: '@pnpm/ramda@0.28.1'
right-pad:
specifier: ^1.0.1
version: 1.0.1
rxjs:
specifier: ^7.8.1
version: 7.8.1