From ef70a289b855c402d8bf58a7b3766199ab91c7f2 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Mon, 19 Dec 2022 15:20:06 -0800 Subject: [PATCH] Go back to using explicit node verisons in CI (#51965) Fixes https://github.com/microsoft/TypeScript/issues/51943 --- .github/workflows/ci.yml | 8 ++++---- src/compiler/watch.ts | 7 ++++++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d17e16da6ca..692d6b83a94 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,11 +16,11 @@ jobs: strategy: matrix: - # Test the latest version of Node.js plus the last two LTS versions. node-version: - - "*" - - lts/* - - lts/-1 + - "19" + - "18" + - "16" + - "14" bundle: - "true" include: diff --git a/src/compiler/watch.ts b/src/compiler/watch.ts index 0d32009aee6..db7527fa004 100644 --- a/src/compiler/watch.ts +++ b/src/compiler/watch.ts @@ -172,7 +172,12 @@ function getPlainDiagnosticFollowingNewLines(diagnostic: Diagnostic, newLine: st export function getLocaleTimeString(system: System) { return !system.now ? new Date().toLocaleTimeString() : - system.now().toLocaleTimeString("en-US", { timeZone: "UTC" }); + // On some systems / builds of Node, there's a non-breaking space between the time and AM/PM. + // This branch is solely for testing, so just switch it to a normal space for baseline stability. + // See: + // - https://github.com/nodejs/node/issues/45171 + // - https://github.com/nodejs/node/issues/45753 + system.now().toLocaleTimeString("en-US", { timeZone: "UTC" }).replace("\u202f", " "); } /**