From cede745ab3251f0cf186d360d9587ddf1449d345 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 29 May 2023 20:05:35 +0000 Subject: [PATCH] Cherry-picks 544d432 into release-5.1. --- package-lock.json | 16 ++++++++-------- src/compiler/sys.ts | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 833297b372004..5190401f6f649 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "typescript", - "version": "5.1.0", + "version": "5.1.1-rc", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "typescript", - "version": "5.1.0", + "version": "5.1.1-rc", "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", @@ -809,9 +809,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.1.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.1.4.tgz", - "integrity": "sha512-At4pvmIOki8yuwLtd7BNHl3CiWNbtclUbNtScGx4OHfBd4/oWoJC8KRCIxXwkdndzhxOsPXihrsOoydxBjlE9Q==", + "version": "20.2.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.2.5.tgz", + "integrity": "sha512-JJulVEQXmiY9Px5axXHeYGLSjhkZEnD+MDPDGbCbIAbMslkKwmygtZFy1X6s/075Yo94sf8GuSlFfPzysQrWZQ==", "dev": true }, "node_modules/@types/semver": { @@ -5080,9 +5080,9 @@ "dev": true }, "@types/node": { - "version": "20.1.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.1.4.tgz", - "integrity": "sha512-At4pvmIOki8yuwLtd7BNHl3CiWNbtclUbNtScGx4OHfBd4/oWoJC8KRCIxXwkdndzhxOsPXihrsOoydxBjlE9Q==", + "version": "20.2.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.2.5.tgz", + "integrity": "sha512-JJulVEQXmiY9Px5axXHeYGLSjhkZEnD+MDPDGbCbIAbMslkKwmygtZFy1X6s/075Yo94sf8GuSlFfPzysQrWZQ==", "dev": true }, "@types/semver": { diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index ace8ed10678dc..f0b07b429e33f 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -812,7 +812,7 @@ function createDirectoryWatcherSupportingRecursive({ } /** @internal */ -export type FsWatchCallback = (eventName: "rename" | "change", relativeFileName: string | undefined, modifiedTime?: Date) => void; +export type FsWatchCallback = (eventName: "rename" | "change", relativeFileName: string | undefined | null, modifiedTime?: Date) => void; /** @internal */ export type FsWatch = (fileOrDirectory: string, entryKind: FileSystemEntryKind, callback: FsWatchCallback, recursive: boolean, fallbackPollingInterval: PollingInterval, fallbackOptions: WatchOptions | undefined) => FileWatcher; /** @internal */ @@ -1205,7 +1205,7 @@ export function createSystemWatchFunctions({ } } - function callbackChangingToMissingFileSystemEntry(event: "rename" | "change", relativeName: string | undefined) { + function callbackChangingToMissingFileSystemEntry(event: "rename" | "change", relativeName: string | undefined | null) { // In some scenarios, file save operation fires event with fileName.ext~ instead of fileName.ext // To ensure we see the file going missing and coming back up (file delete and then recreated) // and watches being updated correctly we are calling back with fileName.ext as well as fileName.ext~