From dc6bb9334973eb4c089b27a8d2f1f827f175eae3 Mon Sep 17 00:00:00 2001 From: Philipp Kunz Date: Wed, 4 Dec 2024 22:58:46 +0100 Subject: [PATCH] fix(cli): Fix incorrect watch mode and update npm test command. --- .vscode/launch.json | 24 +++--------------------- changelog.md | 6 ++++++ test/test.ts | 2 +- ts/00_commitinfo_data.ts | 2 +- ts/tswatch.classes.watcher.ts | 1 + 5 files changed, 12 insertions(+), 23 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 885e34e..26e9f92 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -2,28 +2,10 @@ "version": "0.2.0", "configurations": [ { - "name": "current file", - "type": "node", + "command": "npm test", + "name": "Run npm test", "request": "launch", - "args": [ - "${relativeFile}" - ], - "runtimeArgs": ["-r", "@git.zone/tsrun"], - "cwd": "${workspaceRoot}", - "protocol": "inspector", - "internalConsoleOptions": "openOnSessionStart" - }, - { - "name": "test.ts", - "type": "node", - "request": "launch", - "args": [ - "test/test.ts" - ], - "runtimeArgs": ["-r", "@git.zone/tsrun"], - "cwd": "${workspaceRoot}", - "protocol": "inspector", - "internalConsoleOptions": "openOnSessionStart" + "type": "node-terminal" } ] } diff --git a/changelog.md b/changelog.md index 1349b2f..f21d918 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,11 @@ # Changelog +## 2024-12-04 - 2.0.30 - fix(cli) +Fix incorrect watch mode and update npm test command. + +- Updated the npm test command in .vscode/launch.json for streamlined launching. +- Corrected the watch mode from 'echoSomething' to 'echo' in test/test.ts. + ## 2024-12-04 - 2.0.29 - fix(core) No changes detected in the codebase. diff --git a/test/test.ts b/test/test.ts index 5f227bb..71a3d8a 100644 --- a/test/test.ts +++ b/test/test.ts @@ -5,7 +5,7 @@ import * as tswatch from '../ts/index.js'; let testTsWatchInstance: tswatch.TsWatch; tap.test('should create a valid TsWatch instance', async () => { - testTsWatchInstance = new tswatch.TsWatch('echoSomething'); + testTsWatchInstance = new tswatch.TsWatch('echo'); }); tap.test('should start the tswatch instance', async () => { diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index 94fdd47..b51b740 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@git.zone/tswatch', - version: '2.0.29', + version: '2.0.30', description: 'watch typescript projects during development' } diff --git a/ts/tswatch.classes.watcher.ts b/ts/tswatch.classes.watcher.ts index ddd2cc9..9dd45a5 100644 --- a/ts/tswatch.classes.watcher.ts +++ b/ts/tswatch.classes.watcher.ts @@ -40,6 +40,7 @@ export class Watcher { this.updateCurrentExecution(); }); await this.updateCurrentExecution(); + logger.log('info', `watcher started for ${this.options.filePathToWatch}`); } /**