From cf70f242ea65d11b122187bc0c1e31e9900c2dce Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 May 2025 20:10:28 +0000 Subject: [PATCH 1/3] chore: bump typescript from 5.6.2 to 5.8.3 Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.6.2 to 5.8.3. - [Release notes](https://github.com/microsoft/TypeScript/releases) - [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release-publish.yml) - [Commits](https://github.com/microsoft/TypeScript/compare/v5.6.2...v5.8.3) --- updated-dependencies: - dependency-name: typescript dependency-version: 5.8.3 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6c92be24f1e9..10e9ea84d30f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6076,9 +6076,9 @@ } }, "node_modules/typescript": { - "version": "5.6.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz", - "integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==", + "version": "5.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", + "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", "dev": true, "license": "Apache-2.0", "bin": { From 523ce9221501e052edbca3053476a5134794a489 Mon Sep 17 00:00:00 2001 From: Asher Date: Mon, 16 Jun 2025 13:12:23 -0800 Subject: [PATCH 2/3] as T --- src/node/settings.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node/settings.ts b/src/node/settings.ts index 709ce950cb89..29716af036f9 100644 --- a/src/node/settings.ts +++ b/src/node/settings.ts @@ -17,7 +17,7 @@ export class SettingsProvider { public async read(): Promise { try { const raw = (await fs.readFile(this.settingsPath, "utf8")).trim() - return raw ? JSON.parse(raw) : {} + return raw ? JSON.parse(raw) : ({} as T) } catch (error: any) { if (error.code !== "ENOENT") { logger.warn(error.message) From a28c8bbeb8b76f1b16a65b99c7c5881f21eb82d3 Mon Sep 17 00:00:00 2001 From: Asher Date: Mon, 16 Jun 2025 15:22:01 -0800 Subject: [PATCH 3/3] Update JSON error --- test/unit/node/settings.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/node/settings.test.ts b/test/unit/node/settings.test.ts index 59c6f46a50bc..ad04b15ff81b 100644 --- a/test/unit/node/settings.test.ts +++ b/test/unit/node/settings.test.ts @@ -29,7 +29,7 @@ describe("settings", () => { const settings = new SettingsProvider(pathToMockSettingsFile) await settings.read() // This happens when we can't parse a JSON (usually error in file) - expect(logger.warn).toHaveBeenCalledWith(expect.stringMatching(/Unexpected token/)) + expect(logger.warn).toHaveBeenCalledWith(expect.stringMatching(/Expected ':'/)) }) }) describe("with invalid settings file path", () => {