Chrome DevTools for coding agents
fix: prevent dropping license notices on some files when publishing (#604)
zyzyzyryxy94752ffade84
diff --git a/src/McpContext.ts b/src/McpContext.tsindex 0bdf0663..22d54c94 100644--- a/src/McpContext.ts+++ b/src/McpContext.ts@@ -3,6 +3,7 @@* Copyright 2025 Google LLC* SPDX-License-Identifier: Apache-2.0*/+import fs from 'node:fs/promises';import os from 'node:os';import path from 'node:path';diff --git a/src/McpResponse.ts b/src/McpResponse.tsindex 8dc0cd07..0cf54925 100644--- a/src/McpResponse.ts+++ b/src/McpResponse.ts@@ -3,6 +3,7 @@* Copyright 2025 Google LLC* SPDX-License-Identifier: Apache-2.0*/+import {AggregatedIssue,Marked,diff --git a/src/WaitForHelper.ts b/src/WaitForHelper.tsindex 7a5edaf4..44dbdd3c 100644--- a/src/WaitForHelper.ts+++ b/src/WaitForHelper.ts@@ -3,6 +3,7 @@* Copyright 2025 Google LLC* SPDX-License-Identifier: Apache-2.0*/+import {logger} from './logger.js';import type {Page, Protocol, CdpPage} from './third_party/index.js';diff --git a/src/formatters/snapshotFormatter.ts b/src/formatters/snapshotFormatter.tsindex 5018381e..15464dd2 100644--- a/src/formatters/snapshotFormatter.ts+++ b/src/formatters/snapshotFormatter.ts@@ -3,6 +3,7 @@* Copyright 2025 Google LLC* SPDX-License-Identifier: Apache-2.0*/+import type {TextSnapshot, TextSnapshotNode} from '../McpContext.js';export function formatSnapshotNode(diff --git a/src/logger.ts b/src/logger.tsindex 072ece38..4c31f1ff 100644--- a/src/logger.ts+++ b/src/logger.ts@@ -3,6 +3,7 @@* Copyright 2025 Google LLC* SPDX-License-Identifier: Apache-2.0*/+import fs from 'node:fs';import {debug} from './third_party/index.js';diff --git a/src/third_party/index.ts b/src/third_party/index.tsindex 6facde82..83194e38 100644--- a/src/third_party/index.ts+++ b/src/third_party/index.ts@@ -3,6 +3,7 @@* Copyright 2025 Google LLC* SPDX-License-Identifier: Apache-2.0*/+import 'core-js/modules/es.promise.with-resolvers.js';import 'core-js/proposals/iterator-helpers.js';diff --git a/src/utils/keyboard.ts b/src/utils/keyboard.tsindex 55c56782..51b0a3f7 100644--- a/src/utils/keyboard.ts+++ b/src/utils/keyboard.ts@@ -3,6 +3,7 @@* Copyright 2025 Google LLC* SPDX-License-Identifier: Apache-2.0*/+import type {KeyInput} from '../third_party/index.js';// See the KeyInput type for the list of supported keys.diff --git a/tests/DevtoolsUtils.test.ts b/tests/DevtoolsUtils.test.tsindex 2c130084..40ecf2c3 100644--- a/tests/DevtoolsUtils.test.ts+++ b/tests/DevtoolsUtils.test.ts@@ -3,6 +3,7 @@* Copyright 2025 Google LLC* SPDX-License-Identifier: Apache-2.0*/+import assert from 'node:assert';import {describe, it} from 'node:test';diff --git a/tests/McpContext.test.ts b/tests/McpContext.test.tsindex 63887a05..4b5de091 100644--- a/tests/McpContext.test.ts+++ b/tests/McpContext.test.ts@@ -3,6 +3,7 @@* Copyright 2025 Google LLC* SPDX-License-Identifier: Apache-2.0*/+import assert from 'node:assert';import {describe, it} from 'node:test';diff --git a/tests/McpResponse.test.ts b/tests/McpResponse.test.tsindex 4cf52252..2c9516bc 100644--- a/tests/McpResponse.test.ts+++ b/tests/McpResponse.test.ts@@ -3,6 +3,7 @@* Copyright 2025 Google LLC* SPDX-License-Identifier: Apache-2.0*/+import assert from 'node:assert';import {readFile, rm} from 'node:fs/promises';import {tmpdir} from 'node:os';diff --git a/tests/PageCollector.test.ts b/tests/PageCollector.test.tsindex ef31d006..bcf17ff5 100644--- a/tests/PageCollector.test.ts+++ b/tests/PageCollector.test.ts@@ -3,6 +3,7 @@* Copyright 2025 Google LLC* SPDX-License-Identifier: Apache-2.0*/+import assert from 'node:assert';import {afterEach, beforeEach, describe, it} from 'node:test';diff --git a/tests/browser.test.ts b/tests/browser.test.tsindex 8066da5f..3c8e31ca 100644--- a/tests/browser.test.ts+++ b/tests/browser.test.ts@@ -3,6 +3,7 @@* Copyright 2025 Google LLC* SPDX-License-Identifier: Apache-2.0*/+import assert from 'node:assert';import os from 'node:os';import path from 'node:path';diff --git a/tests/cli.test.ts b/tests/cli.test.tsindex 19502e28..c5c8b088 100644--- a/tests/cli.test.ts+++ b/tests/cli.test.ts@@ -3,6 +3,7 @@* Copyright 2025 Google LLC* SPDX-License-Identifier: Apache-2.0*/+import assert from 'node:assert';import {describe, it} from 'node:test';diff --git a/tests/index.test.ts b/tests/index.test.tsindex 4bbe3ddd..f31d1a84 100644--- a/tests/index.test.ts+++ b/tests/index.test.ts@@ -3,6 +3,7 @@* Copyright 2025 Google LLC* SPDX-License-Identifier: Apache-2.0*/+import assert from 'node:assert';import fs from 'node:fs';import {describe, it} from 'node:test';diff --git a/tests/server.ts b/tests/server.tsindex a0c6e318..fb6fcd5b 100644--- a/tests/server.ts+++ b/tests/server.ts@@ -3,6 +3,7 @@* Copyright 2025 Google LLC* SPDX-License-Identifier: Apache-2.0*/+import http, {type IncomingMessage,type Server,diff --git a/tests/setup.ts b/tests/setup.tsindex ce4e1b21..f79b8735 100644--- a/tests/setup.ts+++ b/tests/setup.ts@@ -3,6 +3,7 @@* Copyright 2025 Google LLC* SPDX-License-Identifier: Apache-2.0*/+import '../src/polyfill.js';import path from 'node:path';diff --git a/tests/tools/console.test.ts b/tests/tools/console.test.tsindex 73c6f092..c7f6a97d 100644--- a/tests/tools/console.test.ts+++ b/tests/tools/console.test.ts@@ -3,6 +3,7 @@* Copyright 2025 Google LLC* SPDX-License-Identifier: Apache-2.0*/+import assert from 'node:assert';import {afterEach, before, beforeEach, describe, it} from 'node:test';diff --git a/tests/tools/emulation.test.ts b/tests/tools/emulation.test.tsindex 568631cc..35b79ea6 100644--- a/tests/tools/emulation.test.ts+++ b/tests/tools/emulation.test.ts@@ -3,6 +3,7 @@* Copyright 2025 Google LLC* SPDX-License-Identifier: Apache-2.0*/+import assert from 'node:assert';import {describe, it} from 'node:test';diff --git a/tests/tools/input.test.ts b/tests/tools/input.test.tsindex b6f39622..230b8a5d 100644--- a/tests/tools/input.test.ts+++ b/tests/tools/input.test.ts@@ -3,6 +3,7 @@* Copyright 2025 Google LLC* SPDX-License-Identifier: Apache-2.0*/+import assert from 'node:assert';import fs from 'node:fs/promises';import path from 'node:path';diff --git a/tests/tools/network.test.ts b/tests/tools/network.test.tsindex 2a6a1680..740fb3a1 100644--- a/tests/tools/network.test.ts+++ b/tests/tools/network.test.ts@@ -3,6 +3,7 @@* Copyright 2025 Google LLC* SPDX-License-Identifier: Apache-2.0*/+import assert from 'node:assert';import {describe, it} from 'node:test';diff --git a/tests/tools/pages.test.ts b/tests/tools/pages.test.tsindex a4a76bcd..d116e352 100644--- a/tests/tools/pages.test.ts+++ b/tests/tools/pages.test.ts@@ -3,6 +3,7 @@* Copyright 2025 Google LLC* SPDX-License-Identifier: Apache-2.0*/+import assert from 'node:assert';import {describe, it} from 'node:test';diff --git a/tests/tools/performance.test.ts b/tests/tools/performance.test.tsindex 32425788..900a10c2 100644--- a/tests/tools/performance.test.ts+++ b/tests/tools/performance.test.ts@@ -3,6 +3,7 @@* Copyright 2025 Google LLC* SPDX-License-Identifier: Apache-2.0*/+import assert from 'node:assert';import {describe, it, afterEach} from 'node:test';diff --git a/tests/tools/screenshot.test.ts b/tests/tools/screenshot.test.tsindex ebf207e1..69e70fe1 100644--- a/tests/tools/screenshot.test.ts+++ b/tests/tools/screenshot.test.ts@@ -3,6 +3,7 @@* Copyright 2025 Google LLC* SPDX-License-Identifier: Apache-2.0*/+import assert from 'node:assert';import {rm, stat, mkdir, chmod, writeFile} from 'node:fs/promises';import {tmpdir} from 'node:os';diff --git a/tests/tools/script.test.ts b/tests/tools/script.test.tsindex 981ca92e..b6d52507 100644--- a/tests/tools/script.test.ts+++ b/tests/tools/script.test.ts@@ -3,6 +3,7 @@* Copyright 2025 Google LLC* SPDX-License-Identifier: Apache-2.0*/+import assert from 'node:assert';import {describe, it} from 'node:test';diff --git a/tests/tools/snapshot.test.ts b/tests/tools/snapshot.test.tsindex 718ea998..9dc48d94 100644--- a/tests/tools/snapshot.test.ts+++ b/tests/tools/snapshot.test.ts@@ -3,6 +3,7 @@* Copyright 2025 Google LLC* SPDX-License-Identifier: Apache-2.0*/+import assert from 'node:assert';import {describe, it} from 'node:test';diff --git a/tests/trace-processing/parse.test.ts b/tests/trace-processing/parse.test.tsindex 79b4ecb5..d54ff24b 100644--- a/tests/trace-processing/parse.test.ts+++ b/tests/trace-processing/parse.test.ts@@ -3,6 +3,7 @@* Copyright 2025 Google LLC* SPDX-License-Identifier: Apache-2.0*/+import assert from 'node:assert';import {describe, it} from 'node:test';diff --git a/tests/utils.ts b/tests/utils.tsindex a1f97b90..3a717381 100644--- a/tests/utils.ts+++ b/tests/utils.ts@@ -3,6 +3,7 @@* Copyright 2025 Google LLC* SPDX-License-Identifier: Apache-2.0*/+import logger from 'debug';import type {Browser} from 'puppeteer';import puppeteer, {Locator} from 'puppeteer';