Skip to content

Chrome DevTools for coding agents

refactor: extract version in a seprate file (#1032)

Nikolay Vitkov0106865aad6d
diff --git a/release-please-config.json b/release-please-config.json
index 160a9bbc..27a585ff 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 0c2235dc..f2ed38e1 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 4c1fce50..250363da 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -30,11 +30,7 @@ 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';
-
-// If moved update release-please config
-// x-release-please-start-version
-const VERSION = '0.17.3';
-// x-release-please-end
+import {VERSION} from './version.js';
export const args = parseArguments(VERSION);
diff --git a/src/version.ts b/src/version.ts
new file mode 100644
index 00000000..b3afc496
--- /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