chore: prepare tsconfig for TypeScript 6 compatibility#145
Merged
Conversation
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
Contributor
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Prepares
tsconfig.jsonso the build passes under TypeScript 6.x, unblocking the dependency bump in #144.The CI failure on #144 is:
After fixing that, two further TS 6 default-tightenings surface (
TS5011rootDir, and new strict-null-check errors). This PR addresses all three with the smallest surgical change.Changes
moduleResolution:"node"→"bundler". The deprecatednode(alias ofnode10) is a hard error in TS 6 and goes away in TS 7.bundlermatches the Rollup-based build, pairs with the existing"module": "esnext", and requires no source changes — all relative imports insrc/are already extension-less.rootDir: set explicitly to"./src". TS 6 no longer infers it from the input set (TS5011).strictNullChecks: explicitly set tofalse. 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.tsemit)npm run lint— greenOnce this lands, Renovate will rebase #144 and CI should go green.