Skip to content

Commit 8cd83af

Browse files
author
Piotr Paulski
committed
refactor: bundle remaining dependencies together
1 parent 2ab2bff commit 8cd83af

File tree

6 files changed

+20
-8
lines changed

6 files changed

+20
-8
lines changed

rollup.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ const bundleDependency = (
110110
});
111111

112112
export default [
113+
bundleDependency('./build/src/third_party/index.js'),
113114
bundleDependency('./build/src/third_party/modelcontextprotocol-sdk/index.js'),
114115
bundleDependency(
115116
'./build/src/third_party/puppeteer-core/index.js',

src/McpContext.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ import fs from 'node:fs/promises';
77
import os from 'node:os';
88
import path from 'node:path';
99

10-
import type {Debugger} from 'debug';
11-
1210
import type {ListenerMap} from './PageCollector.js';
1311
import {NetworkCollector, PageCollector} from './PageCollector.js';
12+
import type {Debugger} from './third_party/index.js';
1413
import {Locator} from './third_party/puppeteer-core/index.js';
1514
import type {
1615
Browser,

src/cli.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7-
import type {Options as YargsOptions} from 'yargs';
8-
import yargs from 'yargs';
9-
import {hideBin} from 'yargs/helpers';
7+
import type {YargsOptions} from './third_party/index.js';
8+
import {yargs, hideBin} from './third_party/index.js';
109

1110
export const cliOptions = {
1211
browserUrl: {

src/logger.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
import fs from 'node:fs';
77

8-
import debug from 'debug';
8+
import {debug} from './third_party/index.js';
99

1010
const mcpDebugNamespace = 'mcp:log';
1111

src/polyfill.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7-
import 'core-js/modules/es.promise.with-resolvers.js';
8-
import 'core-js/proposals/iterator-helpers.js';
7+
// polyfills are now bundled with all other dependencies
8+
import './third_party/index.js';

src/third_party/index.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/**
2+
* @license
3+
* Copyright 2025 Google LLC
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
import 'core-js/modules/es.promise.with-resolvers.js';
7+
import 'core-js/proposals/iterator-helpers.js';
8+
9+
export type {Options as YargsOptions} from 'yargs';
10+
export {default as yargs} from 'yargs';
11+
export {hideBin} from 'yargs/helpers';
12+
export {debug} from 'debug';
13+
export type {Debugger} from 'debug';

0 commit comments

Comments
 (0)