diff --git a/CHANGELOG.md b/CHANGELOG.md index 2be4eb4..b83577b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [1.19.0] - 2025-04-06 (Pre-release) +## [1.20.2] + +### Fixed + +- Killing the simulator on macOS + +## [1.20.0] - 2025-10-08 ### Added diff --git a/package.json b/package.json index a8c5403..cd5860c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "playdate-debug", "displayName": "Playdate Debug", - "version": "1.20.0", + "version": "1.20.1", "publisher": "midouest", "description": "Unofficial Playdate debug extension for macOS, Windows and Ubuntu", "icon": "images/icon@2x.png", diff --git a/src/simulator/getKillSimulatorCommand.ts b/src/simulator/getKillSimulatorCommand.ts index bb66e52..491e633 100644 --- a/src/simulator/getKillSimulatorCommand.ts +++ b/src/simulator/getKillSimulatorCommand.ts @@ -1,9 +1,9 @@ export function getKillSimulatorCommand( - platform: NodeJS.Platform = process.platform + platform: NodeJS.Platform = process.platform, ): string { switch (platform) { case "darwin": - return 'killall "Playdate Simulator"'; + return 'killall -9 "Playdate Simulator"'; case "win32": return "taskkill /IM PlaydateSimulator.exe"; case "linux": diff --git a/src/test/suite/configuration.test.ts b/src/test/suite/configuration.test.ts index 02ab8fb..60891ef 100644 --- a/src/test/suite/configuration.test.ts +++ b/src/test/suite/configuration.test.ts @@ -42,18 +42,18 @@ suite("Configuration Test Suite", () => { assert.ok(path.isAbsolute(sdkPath)); assert.strictEqual(sdkPath, process.env.PLAYDATE_SDK_PATH); - assert.strictEqual(sdkVersion, "1.12.3"); + assert.match(sdkVersion, /^\d+\.\d+\.\d+$/); assert.ok(path.isAbsolute(sourcePath)); assert.ok( sourcePath.endsWith( - path.join("/fixtures/workspace/basic-configuration/source") - ) + path.join("/fixtures/workspace/basic-configuration/source"), + ), ); assert.ok(path.isAbsolute(outputPath)); assert.ok( - outputPath.endsWith(path.join("/fixtures/workspace/basic-configuration")) + outputPath.endsWith(path.join("/fixtures/workspace/basic-configuration")), ); assert.strictEqual(productName, "Basic Configuration"); @@ -61,17 +61,19 @@ suite("Configuration Test Suite", () => { assert.ok(path.isAbsolute(productPath)); assert.ok( productPath.endsWith( - path.join("/fixtures/workspace/basic-configuration/Basic Configuration") - ) + path.join( + "/fixtures/workspace/basic-configuration/Basic Configuration", + ), + ), ); assert.ok(path.isAbsolute(gamePath)); assert.ok( gamePath.endsWith( path.join( - "/fixtures/workspace/basic-configuration/Basic Configuration.pdx" - ) - ) + "/fixtures/workspace/basic-configuration/Basic Configuration.pdx", + ), + ), ); }); @@ -95,15 +97,15 @@ suite("Configuration Test Suite", () => { assert.ok(path.isAbsolute(sourcePath)); assert.ok( sourcePath.endsWith( - path.join("/fixtures/workspace/basic-configuration/source") - ) + path.join("/fixtures/workspace/basic-configuration/source"), + ), ); assert.ok(path.isAbsolute(outputPath)); assert.ok( outputPath.endsWith( - path.join("/fixtures/workspace/override-configuration") - ) + path.join("/fixtures/workspace/override-configuration"), + ), ); assert.strictEqual(productName, "Override Configuration"); @@ -112,18 +114,18 @@ suite("Configuration Test Suite", () => { assert.ok( productPath.endsWith( path.join( - "/fixtures/workspace/override-configuration/Override Configuration" - ) - ) + "/fixtures/workspace/override-configuration/Override Configuration", + ), + ), ); assert.ok(path.isAbsolute(gamePath)); assert.ok( gamePath.endsWith( path.join( - "/fixtures/workspace/override-configuration/Override Configuration.pdx" - ) - ) + "/fixtures/workspace/override-configuration/Override Configuration.pdx", + ), + ), ); }); }); diff --git a/src/test/suite/index.ts b/src/test/suite/index.ts index 86a68f2..e8b2915 100644 --- a/src/test/suite/index.ts +++ b/src/test/suite/index.ts @@ -9,7 +9,7 @@ export function run(): Promise { const mocha = new Mocha({ ui: "tdd", color: true, - timeout: 10000, + timeout: 30000, }); const testsRoot = path.resolve(__dirname, ".."); diff --git a/src/test/suite/suiteTestUtils.ts b/src/test/suite/suiteTestUtils.ts index 711fc20..7388f5d 100644 --- a/src/test/suite/suiteTestUtils.ts +++ b/src/test/suite/suiteTestUtils.ts @@ -49,7 +49,10 @@ export async function assertSimulatorRunning(expectedCount = 1): Promise { const { platform } = process; if (platform === "darwin") { - await assertRunningUnix("Playdate Simulator.app", expectedCount); + await assertRunningUnix( + "Playdate Simulator.app/Contents/MacOS/Playdate Simulator", + expectedCount, + ); return; } @@ -85,8 +88,8 @@ interface WaitForSimulatorOptions { export async function waitForSimulator( options: Partial = {}, ): Promise { - const maxRetries = options.maxRetries ?? 25; - const retryTimeout = options.retryTimeout ?? 200; + const maxRetries = options.maxRetries ?? 20; + const retryTimeout = options.retryTimeout ?? 1000; for (let i = 0; i < maxRetries; i++) { try { await assertSimulatorRunning();