From 6f6f9730049f8236a371b3fc686afaa6effddc81 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 22 Jan 2026 08:37:31 +0100 Subject: [PATCH 1/7] fix local remove --- package.json | 2 +- pnpm-lock.yaml | 44 ++++---- src/tools/sync/yaml.ts | 63 +++++++---- tests/tools/sync/yaml.spec.ts | 200 ++++++++++++++++++++++++++++++++-- 4 files changed, 259 insertions(+), 50 deletions(-) diff --git a/package.json b/package.json index 64eaf75..35813e4 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ }, "devDependencies": { "@biomejs/biome": "2.3.11", - "@types/node": "25.0.9", + "@types/node": "25.0.10", "@types/tabtab": "3.0.4", "@types/unzipper": "0.10.11", "@types/which": "3.0.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bd5a2a4..30d64cb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -46,7 +46,7 @@ importers: version: 0.12.3 vitest-mock-extended: specifier: 3.1.0 - version: 3.1.0(typescript@5.9.3)(vitest@4.0.17(@types/node@25.0.9)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2)) + version: 3.1.0(typescript@5.9.3)(vitest@4.0.17(@types/node@25.0.10)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2)) which: specifier: 6.0.0 version: 6.0.0 @@ -61,8 +61,8 @@ importers: specifier: 2.3.11 version: 2.3.11 '@types/node': - specifier: 25.0.9 - version: 25.0.9 + specifier: 25.0.10 + version: 25.0.10 '@types/tabtab': specifier: 3.0.4 version: 3.0.4 @@ -89,10 +89,10 @@ importers: version: 5.9.3 vite-tsconfig-paths: specifier: 6.0.4 - version: 6.0.4(typescript@5.9.3)(vite@7.3.1(@types/node@25.0.9)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2)) + version: 6.0.4(typescript@5.9.3)(vite@7.3.1(@types/node@25.0.10)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2)) vitest: specifier: 4.0.17 - version: 4.0.17(@types/node@25.0.9)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + version: 4.0.17(@types/node@25.0.10)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) packages: @@ -761,8 +761,8 @@ packages: '@types/hast@3.0.4': resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==} - '@types/node@25.0.9': - resolution: {integrity: sha512-/rpCXHlCWeqClNBwUhDcusJxXYDjZTyE8v5oTO7WbL8eij2nKhUeU89/6xgjU7N4/Vh3He0BtyhJdQbDyhiXAw==} + '@types/node@25.0.10': + resolution: {integrity: sha512-zWW5KPngR/yvakJgGOmZ5vTBemDoSqF3AcV/LrO5u5wTWyEAVVh+IT39G4gtyAkh3CtTZs8aX/yRM82OfzHJRg==} '@types/shell-quote@1.7.5': resolution: {integrity: sha512-+UE8GAGRPbJVQDdxi16dgadcBfQ+KG2vgZhV1+3A1XmHbmwcdwhCUwIdy+d3pAGrbvgRoVSjeI9vOWyq376Yzw==} @@ -2386,7 +2386,7 @@ snapshots: dependencies: '@types/unist': 3.0.3 - '@types/node@25.0.9': + '@types/node@25.0.10': dependencies: undici-types: 7.16.0 @@ -2394,13 +2394,13 @@ snapshots: '@types/tabtab@3.0.4': dependencies: - '@types/node': 25.0.9 + '@types/node': 25.0.10 '@types/unist@3.0.3': {} '@types/unzipper@0.10.11': dependencies: - '@types/node': 25.0.9 + '@types/node': 25.0.10 '@types/which@3.0.4': {} @@ -2413,13 +2413,13 @@ snapshots: chai: 6.2.2 tinyrainbow: 3.0.3 - '@vitest/mocker@4.0.17(vite@7.3.1(@types/node@25.0.9)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2))': + '@vitest/mocker@4.0.17(vite@7.3.1(@types/node@25.0.10)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2))': dependencies: '@vitest/spy': 4.0.17 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: - vite: 7.3.1(@types/node@25.0.9)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + vite: 7.3.1(@types/node@25.0.10)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) '@vitest/pretty-format@4.0.17': dependencies: @@ -3347,18 +3347,18 @@ snapshots: util-deprecate@1.0.2: {} - vite-tsconfig-paths@6.0.4(typescript@5.9.3)(vite@7.3.1(@types/node@25.0.9)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2)): + vite-tsconfig-paths@6.0.4(typescript@5.9.3)(vite@7.3.1(@types/node@25.0.10)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2)): dependencies: debug: 4.4.3(supports-color@10.2.2) globrex: 0.1.2 tsconfck: 3.1.6(typescript@5.9.3) optionalDependencies: - vite: 7.3.1(@types/node@25.0.9)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + vite: 7.3.1(@types/node@25.0.10)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) transitivePeerDependencies: - supports-color - typescript - vite@7.3.1(@types/node@25.0.9)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2): + vite@7.3.1(@types/node@25.0.10)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2): dependencies: esbuild: 0.27.0 fdir: 6.5.0(picomatch@4.0.3) @@ -3367,22 +3367,22 @@ snapshots: rollup: 4.55.1 tinyglobby: 0.2.15 optionalDependencies: - '@types/node': 25.0.9 + '@types/node': 25.0.10 fsevents: 2.3.3 jiti: 2.6.1 tsx: 4.21.0 yaml: 2.8.2 - vitest-mock-extended@3.1.0(typescript@5.9.3)(vitest@4.0.17(@types/node@25.0.9)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2)): + vitest-mock-extended@3.1.0(typescript@5.9.3)(vitest@4.0.17(@types/node@25.0.10)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2)): dependencies: ts-essentials: 10.1.1(typescript@5.9.3) typescript: 5.9.3 - vitest: 4.0.17(@types/node@25.0.9)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + vitest: 4.0.17(@types/node@25.0.10)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) - vitest@4.0.17(@types/node@25.0.9)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2): + vitest@4.0.17(@types/node@25.0.10)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2): dependencies: '@vitest/expect': 4.0.17 - '@vitest/mocker': 4.0.17(vite@7.3.1(@types/node@25.0.9)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2)) + '@vitest/mocker': 4.0.17(vite@7.3.1(@types/node@25.0.10)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2)) '@vitest/pretty-format': 4.0.17 '@vitest/runner': 4.0.17 '@vitest/snapshot': 4.0.17 @@ -3399,10 +3399,10 @@ snapshots: tinyexec: 1.0.2 tinyglobby: 0.2.15 tinyrainbow: 3.0.3 - vite: 7.3.1(@types/node@25.0.9)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) + vite: 7.3.1(@types/node@25.0.10)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.2) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 25.0.9 + '@types/node': 25.0.10 transitivePeerDependencies: - jiti - less diff --git a/src/tools/sync/yaml.ts b/src/tools/sync/yaml.ts index 7451476..825da12 100644 --- a/src/tools/sync/yaml.ts +++ b/src/tools/sync/yaml.ts @@ -58,7 +58,7 @@ export const writeYaml = async ( destination?: string, ): Promise => { cleanupFilesystem({ - newTestCases: data.testCases, + remoteTestCases: data.testCases, destination, }); @@ -177,9 +177,11 @@ const collectYamlFiles = (startDir: string): string[] => { return files; }; -export const readTestCasesFromDir = (startDir: string): SyncTestCase[] => { +export const readTestCasesFromDir = ( + startDir: string, +): Array => { const yamlFiles = collectYamlFiles(startDir); - const testCases: SyncTestCase[] = []; + const testCases: Array = []; for (const file of yamlFiles) { try { const content = fs.readFileSync(file, "utf8"); @@ -187,7 +189,7 @@ export const readTestCasesFromDir = (startDir: string): SyncTestCase[] => { const result = syncTestCaseSchema.safeParse(raw); if (result.success) { - testCases.push(result.data); + testCases.push({ ...result.data, filePath: file }); } else { console.warn( `Failed to read test case from ${file}: ${result.error.message}`, @@ -210,20 +212,35 @@ export const loadTestCase = (testCasePath: string): SyncTestCase => { } }; +export const removeEmptyDirectoriesRecursively = ( + dirPath: string, + rootFolderPath: string, +): void => { + if (dirPath === rootFolderPath || !fs.existsSync(dirPath)) { + return; + } + + const remainingFiles = fs.readdirSync(dirPath); + if (remainingFiles.length === 0) { + fs.rmdirSync(dirPath); + removeEmptyDirectoriesRecursively(path.dirname(dirPath), rootFolderPath); + } +}; + export const cleanupFilesystem = ({ - newTestCases, + remoteTestCases, destination, }: { - newTestCases: SyncTestCase[]; + remoteTestCases: SyncTestCase[]; destination: string | undefined; }) => { const rootFolderPath = destination ?? process.cwd(); - const existingtestCases = readTestCasesFromDir(rootFolderPath); + const localTestCases = readTestCasesFromDir(rootFolderPath); - const existingTestCasesById = new Map( - existingtestCases.map((tc) => [tc.id, tc]), - ); + const localTestCasesById = new Map(localTestCases.map((tc) => [tc.id, tc])); + + const remoteTestCasesById = new Map(remoteTestCases.map((tc) => [tc.id, tc])); // There is generally a bigger issue here: // We need a better check what changed locally. @@ -231,20 +248,17 @@ export const cleanupFilesystem = ({ // Then you pull, and you local changes will just be deleted. // Same applies for changing the dependency, as it will be in a different folder. We also don't clean up these folders properly. - for (const testCase of newTestCases) { - const existingTestCase = existingTestCasesById.get(testCase.id); - if (existingTestCase) { - const existingTestCasePath = buildFilename( - existingTestCase, - rootFolderPath, - ); + for (const remoteTestCase of remoteTestCases) { + const localTestCase = localTestCasesById.get(remoteTestCase.id); + if (localTestCase) { + const localTestCasePath = buildFilename(localTestCase, rootFolderPath); const oldFolderPath = path.join( rootFolderPath, - existingTestCasePath.replace(/\.yaml$/, ""), + localTestCasePath.replace(/\.yaml$/, ""), ); - const oldFilePath = path.join(rootFolderPath, existingTestCasePath); + const oldFilePath = path.join(rootFolderPath, localTestCasePath); - if (existingTestCase.description !== testCase.description) { + if (localTestCase.description !== remoteTestCase.description) { if (fs.existsSync(oldFilePath)) { fs.unlinkSync(oldFilePath); } @@ -255,4 +269,13 @@ export const cleanupFilesystem = ({ } } } + for (const localTestCase of localTestCases) { + // If the local test case is not in the remote test cases, remove it + if (!remoteTestCasesById.has(localTestCase.id) && localTestCase.filePath) { + fs.rmSync(localTestCase.filePath, { recursive: true, force: true }); + + const dirPath = path.dirname(localTestCase.filePath); + removeEmptyDirectoriesRecursively(dirPath, rootFolderPath); + } + } }; diff --git a/tests/tools/sync/yaml.spec.ts b/tests/tools/sync/yaml.spec.ts index d143e02..e7cb608 100644 --- a/tests/tools/sync/yaml.spec.ts +++ b/tests/tools/sync/yaml.spec.ts @@ -10,6 +10,7 @@ import { buildFolderName, cleanupFilesystem, readTestCasesFromDir, + removeEmptyDirectoriesRecursively, } from "../../../src/tools/sync/yaml"; import { createMockSyncTestCase } from "../../mocks"; @@ -186,11 +187,11 @@ describe("yaml", () => { fs.mkdirSync(path.join(tmpDir, "test1")); const testCase = createMockSyncTestCase(); - fs.writeFileSync( - path.join(tmpDir, "test1", "test.yaml"), - yaml.stringify(testCase), - ); - expect(readTestCasesFromDir(tmpDir)).toEqual([testCase]); + const filePath = path.join(tmpDir, "test1", "test.yaml"); + fs.writeFileSync(filePath, yaml.stringify(testCase)); + expect(readTestCasesFromDir(tmpDir)).toEqual([ + { ...testCase, filePath }, + ]); }); it("should skip invalid test cases and log an error", () => { @@ -229,7 +230,7 @@ describe("yaml", () => { }; cleanupFilesystem({ - newTestCases: [updatedTestCase], + remoteTestCases: [updatedTestCase], destination: tmpDir, }); @@ -266,11 +267,196 @@ describe("yaml", () => { }; cleanupFilesystem({ - newTestCases: [updatedTestCase], + remoteTestCases: [updatedTestCase], destination: tmpDir, }); expect(fs.existsSync(oldFolderPath)).toBe(false); }); + + it("should remove local test case files that no longer exist remotely", () => { + const localTestCase = createMockSyncTestCase({ + id: crypto.randomUUID(), + description: "Local test case", + }); + const remoteTestCase = createMockSyncTestCase({ + id: crypto.randomUUID(), + description: "Remote test case", + }); + + const localFilePath = path.join( + tmpDir, + buildFilename(localTestCase, tmpDir), + ); + fs.writeFileSync(localFilePath, yaml.stringify(localTestCase)); + + expect(fs.existsSync(localFilePath)).toBe(true); + + cleanupFilesystem({ + remoteTestCases: [remoteTestCase], + destination: tmpDir, + }); + + expect(fs.existsSync(localFilePath)).toBe(false); + }); + + it("should remove empty directories after removing local test cases", () => { + const parentTestCase = createMockSyncTestCase({ + id: crypto.randomUUID(), + description: "Parent test case", + }); + const childTestCase = createMockSyncTestCase({ + id: crypto.randomUUID(), + description: "Child test case", + dependencyId: parentTestCase.id, + }); + + const parentDir = path.join(tmpDir, "parentTestCase"); + fs.mkdirSync(parentDir, { recursive: true }); + + const childFilePath = path.join( + parentDir, + buildFilename(childTestCase, tmpDir), + ); + fs.writeFileSync( + path.join(tmpDir, buildFilename(parentTestCase, tmpDir)), + yaml.stringify(parentTestCase), + ); + fs.writeFileSync(childFilePath, yaml.stringify(childTestCase)); + + expect(fs.existsSync(parentDir)).toBe(true); + expect(fs.existsSync(childFilePath)).toBe(true); + + cleanupFilesystem({ + remoteTestCases: [parentTestCase], + destination: tmpDir, + }); + + expect(fs.existsSync(childFilePath)).toBe(false); + expect(fs.existsSync(parentDir)).toBe(false); + }); + + it("should not remove directories that still contain files", () => { + const parentTestCase = createMockSyncTestCase({ + id: crypto.randomUUID(), + description: "Parent test case", + }); + const childTestCase1 = createMockSyncTestCase({ + id: crypto.randomUUID(), + description: "Child test case 1", + dependencyId: parentTestCase.id, + }); + const childTestCase2 = createMockSyncTestCase({ + id: crypto.randomUUID(), + description: "Child test case 2", + dependencyId: parentTestCase.id, + }); + + const parentDir = path.join(tmpDir, "parentTestCase"); + fs.mkdirSync(parentDir, { recursive: true }); + + const childFilePath1 = path.join( + parentDir, + buildFilename(childTestCase1, tmpDir), + ); + const childFilePath2 = path.join( + parentDir, + buildFilename(childTestCase2, tmpDir), + ); + fs.writeFileSync( + path.join(tmpDir, buildFilename(parentTestCase, tmpDir)), + yaml.stringify(parentTestCase), + ); + fs.writeFileSync(childFilePath1, yaml.stringify(childTestCase1)); + fs.writeFileSync(childFilePath2, yaml.stringify(childTestCase2)); + + expect(fs.existsSync(parentDir)).toBe(true); + + cleanupFilesystem({ + remoteTestCases: [parentTestCase, childTestCase2], + destination: tmpDir, + }); + + expect(fs.existsSync(childFilePath1)).toBe(false); + expect(fs.existsSync(childFilePath2)).toBe(true); + expect(fs.existsSync(parentDir)).toBe(true); + }); + }); + + describe("removeEmptyDirectoriesRecursively", () => { + it("should remove a single empty directory", () => { + const emptyDir = path.join(tmpDir, "emptyDir"); + fs.mkdirSync(emptyDir); + + expect(fs.existsSync(emptyDir)).toBe(true); + + removeEmptyDirectoriesRecursively(emptyDir, tmpDir); + + expect(fs.existsSync(emptyDir)).toBe(false); + }); + + it("should recursively remove nested empty directories", () => { + const level1 = path.join(tmpDir, "level1"); + const level2 = path.join(level1, "level2"); + const level3 = path.join(level2, "level3"); + + fs.mkdirSync(level3, { recursive: true }); + + expect(fs.existsSync(level1)).toBe(true); + expect(fs.existsSync(level2)).toBe(true); + expect(fs.existsSync(level3)).toBe(true); + + removeEmptyDirectoriesRecursively(level3, tmpDir); + + expect(fs.existsSync(level3)).toBe(false); + expect(fs.existsSync(level2)).toBe(false); + expect(fs.existsSync(level1)).toBe(false); + }); + + it("should stop at root folder path", () => { + const subDir = path.join(tmpDir, "subDir"); + fs.mkdirSync(subDir); + + removeEmptyDirectoriesRecursively(subDir, tmpDir); + + expect(fs.existsSync(subDir)).toBe(false); + expect(fs.existsSync(tmpDir)).toBe(true); + }); + + it("should not remove directories that contain files", () => { + const level1 = path.join(tmpDir, "level1"); + const level2 = path.join(level1, "level2"); + + fs.mkdirSync(level2, { recursive: true }); + fs.writeFileSync(path.join(level1, "file.txt"), "content"); + + removeEmptyDirectoriesRecursively(level2, tmpDir); + + expect(fs.existsSync(level2)).toBe(false); + expect(fs.existsSync(level1)).toBe(true); + }); + + it("should handle non-existent directories gracefully", () => { + const nonExistent = path.join(tmpDir, "nonExistent"); + + expect(() => + removeEmptyDirectoriesRecursively(nonExistent, tmpDir), + ).not.toThrow(); + }); + + it("should not remove directories with subdirectories that contain files", () => { + const level1 = path.join(tmpDir, "level1"); + const level2 = path.join(level1, "level2"); + const level3 = path.join(level2, "level3"); + + fs.mkdirSync(level3, { recursive: true }); + fs.writeFileSync(path.join(level2, "file.txt"), "content"); + + removeEmptyDirectoriesRecursively(level3, tmpDir); + + expect(fs.existsSync(level3)).toBe(false); + expect(fs.existsSync(level2)).toBe(true); + expect(fs.existsSync(level1)).toBe(true); + }); }); }); From 7dc935bb1854bc8b9043c31def265632b6bceb08 Mon Sep 17 00:00:00 2001 From: Stefan Rinke Date: Thu, 22 Jan 2026 11:28:36 +0100 Subject: [PATCH 2/7] lint --- tests/tools/sync/yaml.spec.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/tools/sync/yaml.spec.ts b/tests/tools/sync/yaml.spec.ts index e7cb608..c4d3cff 100644 --- a/tests/tools/sync/yaml.spec.ts +++ b/tests/tools/sync/yaml.spec.ts @@ -189,9 +189,7 @@ describe("yaml", () => { const testCase = createMockSyncTestCase(); const filePath = path.join(tmpDir, "test1", "test.yaml"); fs.writeFileSync(filePath, yaml.stringify(testCase)); - expect(readTestCasesFromDir(tmpDir)).toEqual([ - { ...testCase, filePath }, - ]); + expect(readTestCasesFromDir(tmpDir)).toEqual([{ ...testCase, filePath }]); }); it("should skip invalid test cases and log an error", () => { From 96d222558230a8573d226fa129339553ec53039e Mon Sep 17 00:00:00 2001 From: Stefan Rinke Date: Thu, 22 Jan 2026 11:30:04 +0100 Subject: [PATCH 3/7] version --- README.md | 2 +- package.json | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e09e0e4..7882e66 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ This way even entityIds like environmentIds or testCaseIds will be autocompleted # octomind -Octomind cli tool. Version: 4.3.2. Additional documentation see https://octomind.dev/docs/api-reference/ +Octomind cli tool. Version: 4.3.3. Additional documentation see https://octomind.dev/docs/api-reference/ **Usage:** `octomind [options] [command]` diff --git a/package.json b/package.json index 35813e4..79342e9 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,16 @@ { "name": "@octomind/octomind", - "version": "4.3.2", + "version": "4.3.3", "description": "a command line client for octomind apis", "main": "./dist/index.js", "packageManager": "pnpm@10.28.1+sha512.7d7dbbca9e99447b7c3bf7a73286afaaf6be99251eb9498baefa7d406892f67b879adb3a1d7e687fc4ccc1a388c7175fbaae567a26ab44d1067b54fcb0d6a316", - "files": ["dist", "src", "README.md", "LICENSE", "package.json"], + "files": [ + "dist", + "src", + "README.md", + "LICENSE", + "package.json" + ], "engines": { "node": ">=22.0.0" }, @@ -69,4 +75,4 @@ "vite-tsconfig-paths": "6.0.4", "vitest": "4.0.17" } -} +} \ No newline at end of file From a68f2ab5d58ab1cb36eb003a1ac5241489cf8276 Mon Sep 17 00:00:00 2001 From: Stefan Rinke Date: Thu, 22 Jan 2026 15:19:40 +0100 Subject: [PATCH 4/7] lint --- package.json | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/package.json b/package.json index 79342e9..256e711 100644 --- a/package.json +++ b/package.json @@ -4,13 +4,7 @@ "description": "a command line client for octomind apis", "main": "./dist/index.js", "packageManager": "pnpm@10.28.1+sha512.7d7dbbca9e99447b7c3bf7a73286afaaf6be99251eb9498baefa7d406892f67b879adb3a1d7e687fc4ccc1a388c7175fbaae567a26ab44d1067b54fcb0d6a316", - "files": [ - "dist", - "src", - "README.md", - "LICENSE", - "package.json" - ], + "files": ["dist", "src", "README.md", "LICENSE", "package.json"], "engines": { "node": ">=22.0.0" }, From ab65ea2d43a1960f7e062001fce8db3f4e85aa74 Mon Sep 17 00:00:00 2001 From: Stefan Rinke Date: Thu, 22 Jan 2026 15:49:11 +0100 Subject: [PATCH 5/7] format --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 256e711..0b0ea53 100644 --- a/package.json +++ b/package.json @@ -69,4 +69,4 @@ "vite-tsconfig-paths": "6.0.4", "vitest": "4.0.17" } -} \ No newline at end of file +} From 38a26b4edb13e6a1ad402129a12f4684d24a66bf Mon Sep 17 00:00:00 2001 From: Stefan Rinke Date: Fri, 23 Jan 2026 08:46:13 +0100 Subject: [PATCH 6/7] pr comments --- src/tools/sync/yaml.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools/sync/yaml.ts b/src/tools/sync/yaml.ts index 825da12..84712b5 100644 --- a/src/tools/sync/yaml.ts +++ b/src/tools/sync/yaml.ts @@ -181,7 +181,7 @@ export const readTestCasesFromDir = ( startDir: string, ): Array => { const yamlFiles = collectYamlFiles(startDir); - const testCases: Array = []; + const testCases: Array = []; for (const file of yamlFiles) { try { const content = fs.readFileSync(file, "utf8"); @@ -272,7 +272,7 @@ export const cleanupFilesystem = ({ for (const localTestCase of localTestCases) { // If the local test case is not in the remote test cases, remove it if (!remoteTestCasesById.has(localTestCase.id) && localTestCase.filePath) { - fs.rmSync(localTestCase.filePath, { recursive: true, force: true }); + fs.rmSync(localTestCase.filePath); const dirPath = path.dirname(localTestCase.filePath); removeEmptyDirectoriesRecursively(dirPath, rootFolderPath); From bee2fb4e058453d2d0ea49d3290efef0daa2ae4d Mon Sep 17 00:00:00 2001 From: Stefan Rinke Date: Fri, 23 Jan 2026 08:49:59 +0100 Subject: [PATCH 7/7] fix test --- src/tools/sync/yaml.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/sync/yaml.ts b/src/tools/sync/yaml.ts index 84712b5..0742b6a 100644 --- a/src/tools/sync/yaml.ts +++ b/src/tools/sync/yaml.ts @@ -272,7 +272,7 @@ export const cleanupFilesystem = ({ for (const localTestCase of localTestCases) { // If the local test case is not in the remote test cases, remove it if (!remoteTestCasesById.has(localTestCase.id) && localTestCase.filePath) { - fs.rmSync(localTestCase.filePath); + fs.rmSync(localTestCase.filePath, { force: true }); const dirPath = path.dirname(localTestCase.filePath); removeEmptyDirectoriesRecursively(dirPath, rootFolderPath);