豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content
This repository was archived by the owner on Apr 16, 2026. It is now read-only.

Commit 0106865

Browse files
refactor: extract version in a seprate file (ChromeDevTools#1032)
1 parent dd26bbf commit 0106865

File tree

4 files changed

+14
-8
lines changed

4 files changed

+14
-8
lines changed

release-please-config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"extra-files": [
1919
{
2020
"type": "generic",
21-
"path": "src/main.ts"
21+
"path": "src/version.ts"
2222
},
2323
{
2424
"type": "json",

src/daemon/daemon.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import {StdioClientTransport} from '@modelcontextprotocol/sdk/client/stdio.js';
1515

1616
import {logger} from '../logger.js';
1717
import {PipeTransport} from '../third_party/index.js';
18+
import {VERSION} from '../version.js';
1819

1920
import {
2021
getSocketPath,
@@ -43,8 +44,7 @@ async function setupMCPClient() {
4344
mcpClient = new Client(
4445
{
4546
name: 'chrome-devtools-cli-daemon',
46-
// TODO: handle client version (optional).
47-
version: '0.1.0',
47+
version: VERSION,
4848
},
4949
{
5050
capabilities: {},

src/main.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,7 @@ import {ToolCategory} from './tools/categories.js';
3030
import {tools as slimTools} from './tools/slim/tools.js';
3131
import type {ToolDefinition} from './tools/ToolDefinition.js';
3232
import {tools} from './tools/tools.js';
33-
34-
// If moved update release-please config
35-
// x-release-please-start-version
36-
const VERSION = '0.17.3';
37-
// x-release-please-end
33+
import {VERSION} from './version.js';
3834

3935
export const args = parseArguments(VERSION);
4036

src/version.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/**
2+
* @license
3+
* Copyright 2026 Google LLC
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
// If moved update release-please config
8+
// x-release-please-start-version
9+
export const VERSION = '0.17.3';
10+
// x-release-please-end

0 commit comments

Comments
 (0)