Skip to content

chore: remove allowJs from tsconfig.json and annotate URLPattern - #3290

Merged
OrKoN merged 1 commit into
mainfrom
chore/remove-allowjs
Oct 21, 2026
Merged

OrKoN merged 1 commit into
mainfrom
chore/remove-allowjs

Conversation

@Lightning00Blade

@Lightning00Blade Lightning00Blade commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Removes allowJs and the acorn.mjs entry from tsconfig.json (transpiling pre-built DevTools third-party JS/MJS files in scripts/post-build.ts instead), updates rollup.config.js to discover bundled DevTools third_party packages from Rollup chunks and read their metadata/licenses from README.chromium, and adds an explicit type annotation to URLPattern in src/third_party/cli.ts in preparation for enabling isolatedDeclarations.

@Lightning00Blade
Lightning00Blade force-pushed the chore/remove-allowjs branch 3 times, most recently from 0d8157e to 290bd60 Compare October 21, 2026 13:24
@OrKoN
OrKoN added this pull request to the merge queue Oct 21, 2026
Merged via the queue into main with commit 92c4a55 Oct 21, 2026
23 checks passed
@OrKoN
OrKoN deleted the chore/remove-allowjs branch October 21, 2026 17:21
yashdesai87 pushed a commit to yashdesai87/chrome-devtools-mcp that referenced this pull request Oct 21, 2026
Stacked on ChromeDevTools#3290.

Enables `isolatedDeclarations` in `tsconfig.json`. The option requires
`declaration`, so that is enabled too.

`isolatedDeclarations` requires explicit types on exports, so the CLI
option types are now declared instead of inferred from the Yargs option
objects:

- `BrowserArguments`, `PuppeteerArguments`, `ToolArguments`,
`CategoryArguments` and `McpArguments` declare the parsed value of each
option. `ParsedArguments` is now defined in `mcp-options.ts` from
`McpArguments` instead of `InferredOptionTypes<typeof mcpOptions>`.
- `McpOptionsFor<TArgs, TBase>` derives the type of an option map from
its arguments interface. It checks each option's `type`, `default`,
`choices` and `coerce` against the declared value type. A required
argument must have a `default`. An optional (`?`) argument has no
`default`.
- `ParsedArguments` is imported from `mcp-options.ts` everywhere. The
re-exports from `ServerConfig.ts` and `ConfigParser.ts` are removed, and
so is an unused `McpOption` re-export.
- `package.json` excludes the emitted `.d.ts` files from the npm
package. npm matches a negated `files` entry such as `!*.d.ts` only at
the package root, so the entry is `!**/*.d.ts`.

## User-visible changes

None. The option definitions, defaults and generated docs do not change
(`npm run gen` produces no diff). `npm pack --dry-run` lists no `.d.ts`
files.

## Testing

- `npm run format`
- `npm run test`
- `npm run gen` (no changes)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants