Skip to content

Commit 8d20e8d

Browse files
author
Nima21
committed
Merge remote-tracking branch 'upstream/main'
# Conflicts: # .github/workflows/publish-to-npm-on-tag.yml # .release-please-manifest.json # README.md # package-lock.json # package.json # scripts/post-build.ts # server.json # src/browser.ts # src/main.ts # tests/cli.test.ts # tsconfig.json
2 parents 1280365 + 0c4f211 commit 8d20e8d

125 files changed

Lines changed: 14853 additions & 2718 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agent/rules/coding.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
trigger: always_on
3+
---
4+
5+
# Instructions
6+
7+
- Use only scripts from `package.json` to run commands.
8+
- Use `npm run build` to run tsc and test build.
9+
- Use `npm run test` to build and run tests, run all tests to verify correctness.
10+
- Use `npm run test path-to-test.ts` to build and run a single test file, for example, `npm run test tests/McpContext.test.ts`.
11+
- Use `npm run format` to fix formatting and get linting errors.
12+
13+
## Rules for TypeScript
14+
15+
- Do not use `any` type.
16+
- Do not use `as` keyword for type casting.
17+
- Do not use `!` operator for type assertion.
18+
- Do not use `// @ts-ignore` comments.
19+
- Do not use `// @ts-nocheck` comments.
20+
- Do not use `// @ts-expect-error` comments.
21+
- Prefer `for..of` instead of `forEach`.

.claude-plugin/marketplace.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@
99
"plugins": [
1010
{
1111
"name": "chrome-devtools-mcp",
12-
"source": {
13-
"source": "github",
14-
"repo": "ChromeDevTools/chrome-devtools-mcp"
15-
},
12+
"source": "./",
1613
"description": "Reliable automation, in-depth debugging, and performance analysis in Chrome using Chrome DevTools and Puppeteer"
1714
}
1815
]
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: 'Conventional Commit'
22

33
on:
4+
merge_group:
45
pull_request_target:
56
types:
67
# Defaults
@@ -19,6 +20,7 @@ jobs:
1920
permissions:
2021
pull-requests: read
2122
steps:
22-
- uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1
23+
- if: github.event_name != 'merge_group'
24+
uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1
2325
env:
2426
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/pre-release.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: Pre-release
33
permissions: read-all
44

55
on:
6+
workflow_dispatch:
67
push:
78
branches:
89
- release-please-*
@@ -13,20 +14,15 @@ jobs:
1314
runs-on: ubuntu-latest
1415
steps:
1516
- name: Check out repository
16-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
17+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1718
with:
1819
fetch-depth: 2
1920

2021
- name: Set up Node.js
21-
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
22+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
2223
with:
2324
cache: npm
2425
node-version-file: '.nvmrc'
2526

26-
- name: Install MCP Publisher
27-
run: |
28-
export OS=$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/')
29-
curl -L "https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_${OS}.tar.gz" | tar xz mcp-publisher
30-
3127
- name: Verify server.json
3228
run: npm run verify-server-json-version

.github/workflows/presubmit.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: Check code before submitting
33
permissions: read-all
44

55
on:
6+
merge_group:
67
push:
78
branches:
89
- main
@@ -15,12 +16,12 @@ jobs:
1516

1617
steps:
1718
- name: Check out repository
18-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
19+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1920
with:
2021
fetch-depth: 2
2122

2223
- name: Set up Node.js
23-
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
24+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
2425
with:
2526
cache: npm
2627
node-version-file: '.nvmrc'
@@ -37,12 +38,12 @@ jobs:
3738

3839
steps:
3940
- name: Check out repository
40-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
41+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
4142
with:
4243
fetch-depth: 2
4344

4445
- name: Set up Node.js
45-
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
46+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
4647
with:
4748
cache: npm
4849
node-version-file: '.nvmrc'

.github/workflows/publish-to-npm-on-tag.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ jobs:
2020
if: ${{ (github.event_name != 'workflow_dispatch') || (inputs.npm-publish && always()) }}
2121
steps:
2222
- name: Check out repository
23-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
23+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2424
with:
2525
fetch-depth: 2
2626

2727
- name: Set up Node.js
28-
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
28+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
2929
with:
3030
cache: npm
3131
node-version-file: '.nvmrc'

.github/workflows/run-tests.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: Compile and run tests
33
permissions: read-all
44

55
on:
6+
merge_group:
67
push:
78
branches:
89
- main
@@ -26,12 +27,12 @@ jobs:
2627
- 24
2728
steps:
2829
- name: Check out repository
29-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
30+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3031
with:
3132
fetch-depth: 2
3233

3334
- name: Set up Node.js
34-
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
35+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
3536
with:
3637
cache: npm
3738
node-version: 22 # build works only with 22+.
@@ -46,7 +47,7 @@ jobs:
4647
NODE_OPTIONS: '--max_old_space_size=4096'
4748

4849
- name: Set up Node.js
49-
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
50+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
5051
with:
5152
cache: npm
5253
node-version: ${{ matrix.node }}
@@ -56,15 +57,10 @@ jobs:
5657
shell: bash
5758
run: echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
5859

59-
- name: Run tests (node20)
60-
if: ${{ matrix.node == '20' }}
61-
shell: bash
62-
run: npm run test:node20
63-
6460
- name: Run tests
6561
shell: bash
66-
if: ${{ matrix.node != '20' }}
67-
run: npm run test:no-build
62+
# Retry tests if they fail in the merge queue.
63+
run: npm run test:no-build -- ${{ github.event_name == 'merge_group' && '--retry' || '' }}
6864

6965
# Gating job for branch protection.
7066
test-success:

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ yarn-error.log*
77
lerna-debug.log*
88
.pnpm-debug.log*
99

10+
trace.json
11+
trace.json.gz
12+
1013
# Diagnostic reports (https://nodejs.org/api/report.html)
1114
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
1215

.mcp.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"chrome-devtools": {
3+
"command": "npx",
4+
"args": ["chrome-devtools-mcp@latest"]
5+
}
6+
}

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.12.3"
2+
".": "0.17.3"
33
}

0 commit comments

Comments
 (0)