Skip to content

Fix TS5107 by switching moduleResolution to "bundler"#244

Merged
willeastcott merged 1 commit into
mainfrom
fix/ts-module-resolution-bundler
May 30, 2026
Merged

Fix TS5107 by switching moduleResolution to "bundler"#244
willeastcott merged 1 commit into
mainfrom
fix/ts-module-resolution-bundler

Conversation

@willeastcott
Copy link
Copy Markdown
Contributor

@willeastcott willeastcott commented May 30, 2026

Problem

TypeScript 6.0 (pinned as typescript: 6.0.3) promotes the deprecated moduleResolution: "node" (node10) from a warning to a hard error (TS5107). This breaks npm run docs (typedoc) and tsc:

error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning
in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.

This is currently failing the api-reference GitHub Actions build, which clones main and runs npm run docs.

Fix

Switch moduleResolution from "node" to "bundler". Since module is already ESNext and the package is built with rollup, "bundler" is the correct modern replacement — cleaner than silencing with ignoreDeprecations, which would only defer the problem until TS 7.0 removes the option entirely.

Verification

Both pass cleanly with the change:

  • npm run docs — typedoc generates HTML with no errors
  • npm run type-check (tsc --noEmit) — no errors

🤖 Generated with Claude Code

TypeScript 6.0 promotes the deprecated `moduleResolution: "node"` (node10)
from a warning to a hard error (TS5107), which breaks `npm run docs`
(typedoc) and `tsc`. Since `module` is already `ESNext` and the package is
built with rollup, "bundler" is the correct modern replacement.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@willeastcott willeastcott requested a review from Copilot May 30, 2026 13:39
@willeastcott willeastcott self-assigned this May 30, 2026
@willeastcott willeastcott added the enhancement New feature or request label May 30, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@willeastcott willeastcott merged commit ae4ac87 into main May 30, 2026
2 checks passed
@willeastcott willeastcott deleted the fix/ts-module-resolution-bundler branch May 30, 2026 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants