Skip to content

chore: prepare tsconfig for TypeScript 6 compatibility#145

Merged
willeastcott merged 1 commit into
mainfrom
fix/tsconfig-module-resolution-bundler
Apr 29, 2026
Merged

chore: prepare tsconfig for TypeScript 6 compatibility#145
willeastcott merged 1 commit into
mainfrom
fix/tsconfig-module-resolution-bundler

Conversation

@willeastcott

Copy link
Copy Markdown
Contributor

Summary

Prepares tsconfig.json so the build passes under TypeScript 6.x, unblocking the dependency bump in #144.

The CI failure on #144 is:

TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0.

After fixing that, two further TS 6 default-tightenings surface (TS5011 rootDir, and new strict-null-check errors). This PR addresses all three with the smallest surgical change.

Changes

  • moduleResolution: "node""bundler". The deprecated node (alias of node10) is a hard error in TS 6 and goes away in TS 7. bundler matches the Rollup-based build, pairs with the existing "module": "esnext", and requires no source changes — all relative imports in src/ are already extension-less.
  • rootDir: set explicitly to "./src". TS 6 no longer infers it from the input set (TS5011).
  • strictNullChecks: explicitly set to false. TS 6 flipped the default and the codebase was authored without strict-null semantics; making this explicit preserves prior behavior and keeps the dependency bump scoped.

Verification

Locally with [email protected]:

  • npm run build — green (UMD + ESM + styles + .d.ts emit)
  • npm run lint — green

Once this lands, Renovate will rebase #144 and CI should go green.

TypeScript 6.0 makes several previously-implicit settings explicit
errors. Update tsconfig so the build passes on both 5.x and 6.x:

- moduleResolution: replace deprecated "node" (alias of "node10",
  removed in TS 7) with "bundler", which matches the Rollup build and
  pairs with "module": "esnext".
- rootDir: set explicitly to "./src" — TS 6 requires it (TS5011) and
  no longer infers it from the input set.
- strictNullChecks: set false to preserve the project's existing
  non-strict behavior (TS 6 changed the default), avoiding a wider
  refactor in this dependency-bump PR.

Unblocks the renovate TS 6 upgrade in #144.

Made-with: Cursor
@willeastcott willeastcott self-assigned this Apr 29, 2026
@willeastcott willeastcott requested a review from Copilot April 29, 2026 14:29
@willeastcott willeastcott added the enhancement New feature or request label Apr 29, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 fed9083 into main Apr 29, 2026
2 checks passed
@willeastcott willeastcott deleted the fix/tsconfig-module-resolution-bundler branch April 29, 2026 14:30
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