Files
compiler-explorer/static/client.d.ts
Matt Godbolt 861bbde8ca Update major dependencies (TypeScript 6, zod 4, webpack-cli 7, commander 15, …) (#8761)
Bumps the remaining major-version dependencies. **golden-layout is
deliberately excluded** (we depend on its internals too heavily for the
1.x → 2.x jump).

Each bump is its own commit, verified independently (ts-check, lint,
unit tests, and where relevant the webpack build + cypress).

## Included
- **TypeScript 6.0** — pin `ignoreDeprecations: "6.0"`
(downlevelIteration + the frontend's `es5` target are
deprecated-but-functional until TS7), pin the frontend to
`module=commonjs`/`moduleResolution=node` (TS6's new esnext/bundler
defaults break deep monaco esm imports), and declare `*.css`/`*.scss`
side-effect modules (`noUncheckedSideEffectImports` now defaults true).
- **marked 18** — no code changes; only use is the Claude-explain view.
- **Build chain**: webpack-cli 7 (renamed `--node-env` →
`--config-node-env` in the `webpack` script), webpack-dev-middleware 8,
sass-loader 17.
- **zod 4** — only used by the MCP tool schemas via stable primitives;
MCP SDK already supports `^3.25 || ^4.0`.
- **lint-staged 17** — dev tooling; pre-commit pipeline exercised.
- **commander 15** — both CLI entrypoints use options only; v15's
stricter excess-args default only tightens rejection of stray
positionals. Requires Node ≥22.12.
- **enhanced-ms 5**, **which 7** — small utilities, APIs unchanged.

## Node floor bump — split into its own PR
The first commit (`Bump Node floor to v22`: `engines >=22` + `find-node`
`NODE_MIN_VERSION=22`) is **isolated and intended to be cherry-picked
into a separate PR**. It aligns the declared floor with production (Node
22.13.1) and is a prerequisite for commander 15 (needs ≥22.12).

## Follow-ups (not in this PR)
- The `es5 → es2015` frontend migration, required before TS7 (currently
bridged by `ignoreDeprecations`).

## Testing
- Local: ts-check, lint, full unit suite, production webpack build, and
cypress (81 specs) all pass.
- Pre-existing: 13 `dontMaskFilenames` filter snapshots fail **locally
only** (a local /tmp path leaks into output where the snapshot expects a
clean `example.cpp`); they fail identically on `main` and pass in CI.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 18:50:47 -05:00

58 lines
2.3 KiB
TypeScript

// Copyright (c) 2025, Compiler Explorer Authors
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
// These .pug files are different from the ones on the server. Our webpack
// config will translate the .pug files into JS objects that are importable
// with `hash` and `text` properties.
//
// See the code in `/etc/scripts/parsed-pug/parsed_pug_file.js` for details.
declare module '*.pug' {
type WebpackBuiltPugFile = {
hash: string;
text: string;
};
declare const content: WebpackBuiltPugFile;
export default content;
}
// Side-effect CSS/SCSS imports; webpack handles the actual bundling. TS6 defaults
// noUncheckedSideEffectImports to true, so these need ambient declarations.
declare module '*.css';
declare module '*.scss';
declare module '*.svg' {
const src: string;
export default src;
}
declare module '*.png' {
const src: string;
export default src;
}
declare module 'lodash.clonedeep' {
const cloneDeep: <T>(value: T) => T;
export = cloneDeep;
}