From 43f340cb5d9661e6d9987486f2403a9e54b3d885 Mon Sep 17 00:00:00 2001 From: Nikolay Vitkov Date: Tue, 24 Feb 2026 14:59:47 +0100 Subject: [PATCH 1/2] refactor: extract version in a seprate file --- release-please-config.json | 2 +- src/daemon/daemon.ts | 4 ++-- src/main.ts | 6 ++---- src/version.ts | 10 ++++++++++ 4 files changed, 15 insertions(+), 7 deletions(-) create mode 100644 src/version.ts diff --git a/release-please-config.json b/release-please-config.json index 160a9bbcc..27a585ff7 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -18,7 +18,7 @@ "extra-files": [ { "type": "generic", - "path": "src/main.ts" + "path": "src/version.ts" }, { "type": "json", diff --git a/src/daemon/daemon.ts b/src/daemon/daemon.ts index 0c2235dc2..f2ed38e17 100644 --- a/src/daemon/daemon.ts +++ b/src/daemon/daemon.ts @@ -15,6 +15,7 @@ import {StdioClientTransport} from '@modelcontextprotocol/sdk/client/stdio.js'; import {logger} from '../logger.js'; import {PipeTransport} from '../third_party/index.js'; +import {VERSION} from '../version.js'; import { getSocketPath, @@ -43,8 +44,7 @@ async function setupMCPClient() { mcpClient = new Client( { name: 'chrome-devtools-cli-daemon', - // TODO: handle client version (optional). - version: '0.1.0', + version: VERSION, }, { capabilities: {}, diff --git a/src/main.ts b/src/main.ts index 4c1fce50c..a584dcf3c 100644 --- a/src/main.ts +++ b/src/main.ts @@ -30,11 +30,9 @@ import {ToolCategory} from './tools/categories.js'; import {tools as slimTools} from './tools/slim/tools.js'; import type {ToolDefinition} from './tools/ToolDefinition.js'; import {tools} from './tools/tools.js'; +import {VERSION} from './version.js'; + -// If moved update release-please config -// x-release-please-start-version -const VERSION = '0.17.3'; -// x-release-please-end export const args = parseArguments(VERSION); diff --git a/src/version.ts b/src/version.ts new file mode 100644 index 000000000..b3afc496e --- /dev/null +++ b/src/version.ts @@ -0,0 +1,10 @@ +/** + * @license + * Copyright 2026 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +// If moved update release-please config +// x-release-please-start-version +export const VERSION = '0.17.3'; +// x-release-please-end From c98aed9dd504561b59402e3a2f58b37caf804529 Mon Sep 17 00:00:00 2001 From: Nikolay Vitkov Date: Tue, 24 Feb 2026 15:01:14 +0100 Subject: [PATCH 2/2] fix --- src/main.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/main.ts b/src/main.ts index a584dcf3c..250363daa 100644 --- a/src/main.ts +++ b/src/main.ts @@ -32,8 +32,6 @@ import type {ToolDefinition} from './tools/ToolDefinition.js'; import {tools} from './tools/tools.js'; import {VERSION} from './version.js'; - - export const args = parseArguments(VERSION); const logFile = args.logFile ? saveLogsToFile(args.logFile) : undefined;