mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Strip more kinds of timestamps and versions from dockerfile output (#32519)
* Strip more kinds of timestamps and versions from dockerfile output, rewrite office-ui-fabric dockerfile to use new lerna build system * Add another filter for just output * Update user baselines (#23) * Update user baselines (#24) * Strip only maybe-present timestamps * More lenient timestamp filter * Update user baselines (#25) * Simplify and enhance vscode dockerfile to use nightly ts in ts extension, too * Update user baselines (#26) * Update user baselines (#27)
This commit is contained in:
@@ -185,7 +185,8 @@ function stripRushStageNumbers(result: string): string {
|
||||
* so we purge as much of the gulp output as we can
|
||||
*/
|
||||
function sanitizeUnimportantGulpOutput(result: string): string {
|
||||
return result.replace(/^.*(\] (Starting)|(Finished)).*$/gm, "") // task start/end messages (nondeterministic order)
|
||||
return result.replace(/^.*(\] (Starting)|(Finished)).*$/gm, "") // "gulp" task start/end messages (nondeterministic order)
|
||||
.replace(/^.*(\] . (finished)|(started)).*$/gm, "") // "just" task start/end messages (nondeterministic order)
|
||||
.replace(/^.*\] Respawned to PID: \d+.*$/gm, "") // PID of child is OS and system-load dependent (likely stableish in a container but still dangerous)
|
||||
.replace(/\n+/g, "\n");
|
||||
}
|
||||
@@ -193,14 +194,17 @@ function sanitizeUnimportantGulpOutput(result: string): string {
|
||||
function sanitizeTimestamps(result: string): string {
|
||||
return result.replace(/\[\d?\d:\d\d:\d\d (A|P)M\]/g, "[XX:XX:XX XM]")
|
||||
.replace(/\[\d?\d:\d\d:\d\d\]/g, "[XX:XX:XX]")
|
||||
.replace(/\/\d+-\d+-[\d_TZ]+-debug.log/g, "\/XXXX-XX-XXXXXXXXX-debug.log")
|
||||
.replace(/\d+(\.\d+)? sec(onds?)?/g, "? seconds")
|
||||
.replace(/\d+(\.\d+)? min(utes?)?/g, "")
|
||||
.replace(/\d+(\.\d+)?( m)?s/g, "?s");
|
||||
.replace(/\d+(\.\d+)? ?m?s/g, "?s")
|
||||
.replace(/ \(\?s\)/g, "");
|
||||
}
|
||||
|
||||
function sanitizeVersionSpecifiers(result: string): string {
|
||||
return result
|
||||
.replace(/\d+.\d+.\d+-insiders.\d\d\d\d\d\d\d\d/g, "X.X.X-insiders.xxxxxxxx")
|
||||
.replace(/Rush Multi-Project Build Tool (\d+)\.\d+\.\d+/g, "Rush Multi-Project Build Tool $1.X.X")
|
||||
.replace(/([@v\()])\d+\.\d+\.\d+/g, "$1X.X.X");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user