diff --git a/package-lock.json b/package-lock.json index c1ef78f37..3c90e6d8f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -58,7 +58,7 @@ "sync-monorepo-packages": "1.0.2", "ts-node": "10.9.2", "tsd": "0.31.2", - "typescript": "5.5.4", + "typescript": "5.6.2", "validate.js": "0.13.1", "webdriverio": "8.40.5", "ws": "8.18.0", @@ -17633,9 +17633,9 @@ "license": "MIT" }, "node_modules/typescript": { - "version": "5.5.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", - "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz", + "integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==", "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", @@ -19664,7 +19664,7 @@ "source-map-support": "0.5.21", "teen_process": "2.2.0", "type-fest": "4.26.1", - "typescript": "5.5.4", + "typescript": "5.6.2", "yaml": "2.5.1", "yargs": "17.7.2", "yargs-parser": "21.1.1" @@ -20808,7 +20808,7 @@ "source-map-support": "0.5.21", "teen_process": "2.2.0", "type-fest": "4.26.1", - "typescript": "5.5.4", + "typescript": "5.6.2", "yaml": "2.5.1", "yargs": "17.7.2", "yargs-parser": "21.1.1" @@ -33241,9 +33241,9 @@ "dev": true }, "typescript": { - "version": "5.5.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", - "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==" + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz", + "integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==" }, "ua-parser-js": { "version": "1.0.33", diff --git a/package.json b/package.json index 6d2afa71c..83beb714a 100644 --- a/package.json +++ b/package.json @@ -128,7 +128,7 @@ "sync-monorepo-packages": "1.0.2", "ts-node": "10.9.2", "tsd": "0.31.2", - "typescript": "5.5.4", + "typescript": "5.6.2", "validate.js": "0.13.1", "webdriverio": "8.40.5", "ws": "8.18.0", diff --git a/packages/docutils/lib/fs.ts b/packages/docutils/lib/fs.ts index b44289757..52c88ba7e 100644 --- a/packages/docutils/lib/fs.ts +++ b/packages/docutils/lib/fs.ts @@ -167,10 +167,12 @@ export function safeWriteFile(filepath: string, content: JsonValue, overwrite = }); } +type WhichFunction = (cmd: string, opts?: {nothrow: boolean}) => Promise; + /** * `which` with memoization */ -const cachedWhich = _.memoize(fs.which as typeof import('which')); +const cachedWhich = _.memoize(fs.which as WhichFunction); /** * Finds `npm` executable @@ -220,7 +222,7 @@ export const findMike = _.partial(async () => { * `python3` is preferred over `python`, since the latter could be Python 2. */ export const findPython = _.memoize( - async (): Promise => (await whichPython3()) ?? (await whichPython()), + async (): Promise => (await whichPython3()) ?? (await whichPython()), ); /** diff --git a/packages/docutils/package.json b/packages/docutils/package.json index 4746313ac..9b248531c 100644 --- a/packages/docutils/package.json +++ b/packages/docutils/package.json @@ -64,7 +64,7 @@ "source-map-support": "0.5.21", "teen_process": "2.2.0", "type-fest": "4.26.1", - "typescript": "5.5.4", + "typescript": "5.6.2", "yaml": "2.5.1", "yargs": "17.7.2", "yargs-parser": "21.1.1"