From 59d56c733bf037b2b32bc80eed57a625490ecdf1 Mon Sep 17 00:00:00 2001 From: Piotr Paulski Date: Mon, 24 Nov 2025 12:31:48 +0000 Subject: [PATCH] fix: prevent dropping license notices on some files when publishing --- src/McpContext.ts | 1 + src/McpResponse.ts | 1 + src/WaitForHelper.ts | 1 + src/formatters/snapshotFormatter.ts | 1 + src/logger.ts | 1 + src/third_party/index.ts | 1 + src/utils/keyboard.ts | 1 + tests/DevtoolsUtils.test.ts | 1 + tests/McpContext.test.ts | 1 + tests/McpResponse.test.ts | 1 + tests/PageCollector.test.ts | 1 + tests/browser.test.ts | 1 + tests/cli.test.ts | 1 + tests/index.test.ts | 1 + tests/server.ts | 1 + tests/setup.ts | 1 + tests/tools/console.test.ts | 1 + tests/tools/emulation.test.ts | 1 + tests/tools/input.test.ts | 1 + tests/tools/network.test.ts | 1 + tests/tools/pages.test.ts | 1 + tests/tools/performance.test.ts | 1 + tests/tools/screenshot.test.ts | 1 + tests/tools/script.test.ts | 1 + tests/tools/snapshot.test.ts | 1 + tests/trace-processing/parse.test.ts | 1 + tests/utils.ts | 1 + 27 files changed, 27 insertions(+) diff --git a/src/McpContext.ts b/src/McpContext.ts index 0bdf06637..22d54c948 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.ts index 8dc0cd07a..0cf549257 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.ts index 7a5edaf4e..44dbdd3c2 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.ts index 5018381e6..15464dd22 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.ts index 072ece389..4c31f1ffb 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.ts index 6facde826..83194e38a 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.ts index 55c56782f..51b0a3f7b 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.ts index 2c1300841..40ecf2c31 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.ts index 63887a05a..4b5de0911 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.ts index 4cf522525..2c9516bcf 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.ts index ef31d0069..bcf17ff54 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.ts index 8066da5fc..3c8e31ca8 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.ts index 19502e28c..c5c8b088b 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.ts index 4bbe3ddd6..f31d1a84c 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.ts index a0c6e318d..fb6fcd5b4 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.ts index ce4e1b21b..f79b8735e 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.ts index 73c6f092f..c7f6a97da 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.ts index 568631cc8..35b79ea67 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.ts index b6f39622a..230b8a5dc 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.ts index 2a6a1680d..740fb3a16 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.ts index a4a76bcd7..d116e3523 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.ts index 32425788b..900a10c28 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.ts index ebf207e1f..69e70fe13 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.ts index 981ca92e1..b6d52507d 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.ts index 718ea998c..9dc48d94b 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.ts index 79b4ecb57..d54ff24ba 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.ts index a1f97b900..3a7173819 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';