Skip to content

build(web): move to TypeScript 6.0 and patch Monaco's DOMPurify - #31

Merged
RyPope merged 1 commit into
mainfrom
chore/typescript-6
Nov 2, 2026
Merged

RyPope merged 1 commit into
mainfrom
chore/typescript-6

Conversation

@RyPope

@RyPope RyPope commented Nov 2, 2026

Copy link
Copy Markdown
Owner

TypeScript 5.9.3 → 6.0.3

TypeScript 7 (the native compiler) can't be used yet: typescript-eslint 8.72 supports <6.1 because it depends on the TypeScript JS API that 7 doesn't provide. 6.0.3 is the newest version it supports.

openapi-typescript 7.13 declares a ^5 peer (no release since February), so package.json gets an overrides entry letting it use our TypeScript. It's only used by make api-types; regenerating with 6.0.3 produces identical openapi.json and src/generated/api.ts.

DOMPurify in Monaco

npm audit flagged a critical issue already present on main: Monaco 0.57 pins dompurify 3.4.15, affected by several XSS advisories (GHSA-p98j-92pf-mc4p and others, fixed in 3.4.17). An override points Monaco at our own direct dependency, 3.4.17 (patch-level). npm audit --omit=dev now reports 0 vulnerabilities.

The remaining dev-only finding is minimatch (moderate ReDoS) inside ESLint and openapi-typescript's tooling; the fix needs a major ESLint doesn't support, and it only processes our own glob patterns.

Testing

  • tsc -b, make lint, web tests (17) and vite build pass on TypeScript 6.0.3.
  • Rebuilt the app image; the workspace and Monaco editor load with no console errors.

TypeScript 6.0.3 is the newest release typescript-eslint supports. An npm
override lets openapi-typescript (which declares ^5) use it; the
regenerated API types are identical.

Monaco 0.57 pins DOMPurify 3.4.15, which has several XSS advisories; an
override points it at our own 3.4.17.
@RyPope
RyPope merged commit 37a21ba into main Nov 2, 2026
5 checks passed
@RyPope
RyPope deleted the chore/typescript-6 branch November 2, 2026 00:23
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.

1 participant