Skip to content

Chrome DevTools for coding agents

build: sync all dependencies with one command (#3446)

Nikolay Vitkovef61af37e184
diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml
index 66aa03dc..2bf12d05 100644
--- a/.github/workflows/pre-release.yml
+++ b/.github/workflows/pre-release.yml
@@ -38,16 +38,12 @@ jobs:
shell: bash
run: npm install -g npm@latest
- - name: Install dependencies
+ - name: Install and sync dependencies
shell: bash
- run: npm ci
+ run: npm run sync
env:
PUPPETEER_SKIP_DOWNLOAD: true
- - name: Sync DevTools dependencies
- shell: bash
- run: npm run gclient-sync
-
- name: Build and bundle
shell: bash
run: npm run bundle
diff --git a/.github/workflows/presubmit.yml b/.github/workflows/presubmit.yml
index 54a6580d..8d316073 100644
--- a/.github/workflows/presubmit.yml
+++ b/.github/workflows/presubmit.yml
@@ -27,12 +27,9 @@ jobs:
cache: npm
node-version-file: '.nvmrc'
- - name: Install dependencies
- run: npm ci
-
- - name: Sync DevTools dependencies
+ - name: Install and sync dependencies
shell: bash
- run: npm run gclient-sync
+ run: npm run sync
- name: Run format check
run: npm run check-format
@@ -53,12 +50,9 @@ jobs:
cache: npm
node-version-file: '.nvmrc'
- - name: Install dependencies
- run: npm ci
-
- - name: Sync DevTools dependencies
+ - name: Install and sync dependencies
shell: bash
- run: npm run gclient-sync
+ run: npm run sync
- name: Generate
run: npm run gen
diff --git a/.github/workflows/publish-to-mcp-registry-on-tag.yml b/.github/workflows/publish-to-mcp-registry-on-tag.yml
index e839aa2e..b4900171 100644
--- a/.github/workflows/publish-to-mcp-registry-on-tag.yml
+++ b/.github/workflows/publish-to-mcp-registry-on-tag.yml
@@ -32,12 +32,9 @@ jobs:
- name: Update npm
run: npm install -g npm@latest
- - name: Install dependencies
- run: npm ci
-
- - name: Sync DevTools dependencies
+ - name: Install and sync dependencies
shell: bash
- run: npm run gclient-sync
+ run: npm run sync
- name: Build and bundle
run: npm run bundle
diff --git a/.github/workflows/publish-to-npm-on-tag.yml b/.github/workflows/publish-to-npm-on-tag.yml
index 2717116a..a4663ff6 100644
--- a/.github/workflows/publish-to-npm-on-tag.yml
+++ b/.github/workflows/publish-to-npm-on-tag.yml
@@ -28,12 +28,9 @@ jobs:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
- - name: Install dependencies
- run: npm ci
-
- - name: Sync DevTools dependencies
+ - name: Install and sync dependencies
shell: bash
- run: npm run gclient-sync
+ run: npm run sync
- name: Build and bundle
run: npm run bundle
diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml
index 69bc513e..2e4ab73b 100644
--- a/.github/workflows/run-tests.yml
+++ b/.github/workflows/run-tests.yml
@@ -37,16 +37,12 @@ jobs:
cache: npm
node-version: 22 # build works only with 22+.
- - name: Install dependencies
+ - name: Install and sync dependencies
shell: bash
- run: npm ci
+ run: npm run sync
env:
PUPPETEER_SKIP_DOWNLOAD: true
- - name: Sync DevTools dependencies
- shell: bash
- run: npm run gclient-sync
-
- name: Install browser
shell: bash
run: npx puppeteer browsers install chrome
diff --git a/.github/workflows/test-memory-leaks.yml b/.github/workflows/test-memory-leaks.yml
index c078557d..b952d280 100644
--- a/.github/workflows/test-memory-leaks.yml
+++ b/.github/workflows/test-memory-leaks.yml
@@ -27,16 +27,12 @@ jobs:
cache: npm
node-version: 22
- - name: Install dependencies
+ - name: Install and sync dependencies
shell: bash
- run: npm ci
+ run: npm run sync
env:
PUPPETEER_SKIP_DOWNLOAD: true
- - name: Sync DevTools dependencies
- shell: bash
- run: npm run gclient-sync
-
- name: Install browser
shell: bash
run: npx puppeteer browsers install chrome
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 0fb29a32..28a5c096 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -74,8 +74,7 @@ Check that you are using node version specified in .nvmrc, then run following co
```sh
git clone https://github.com/ChromeDevTools/chrome-devtools-mcp.git
cd chrome-devtools-mcp
-npm ci
-npm run gclient-sync
+npm run sync
npm run build
```
diff --git a/package.json b/package.json
index 168ef6dd..ed3d7de3 100644
--- a/package.json
+++ b/package.json
@@ -28,9 +28,8 @@
"test:only": "npm run build && node scripts/test.js --test-only",
"test:update-snapshots": "npm run build && node scripts/test.js --test-update-snapshots",
"prepare": "node scripts/prepare.ts",
- "gclient-sync": "node scripts/gclient-sync.ts",
"gn:gen": "node scripts/gn-gen.ts",
- "sync": "npm ci && git submodule update --init",
+ "sync": "npm ci && git submodule update --init && node scripts/gclient-sync.ts",
"verify-server-json-version": "node scripts/verify-server-json-version.ts",
"update-lighthouse": "node scripts/update-lighthouse.ts",
"update-metrics": "node scripts/update_metrics.ts",