Skip to content

Comments

Prevent tsserver crash when adding new files#305

Merged
mizdra merged 1 commit intomainfrom
fix-adding-file-causes-tsserver-to-crash
Jan 12, 2026
Merged

Prevent tsserver crash when adding new files#305
mizdra merged 1 commit intomainfrom
fix-adding-file-causes-tsserver-to-crash

Conversation

@mizdra
Copy link
Owner

@mizdra mizdra commented Jan 12, 2026

close: #304

@mizdra mizdra added the Type: Bug Bug or Bug fixes label Jan 12, 2026
@changeset-bot
Copy link

changeset-bot bot commented Jan 12, 2026

🦋 Changeset detected

Latest commit: f55fca0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@css-modules-kit/ts-plugin Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@mizdra mizdra force-pushed the fix-adding-file-causes-tsserver-to-crash branch from 82943b2 to 013d187 Compare January 12, 2026 16:36
Use Proxy instead of spread syntax to override `rootDirs` in
`getCompilationSettings`. The spread syntax failed to copy
non-enumerable properties like `configFile`, causing tsserver
to crash with "Cannot read properties of undefined".

Fixes #304

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@mizdra mizdra force-pushed the fix-adding-file-causes-tsserver-to-crash branch from 013d187 to f55fca0 Compare January 12, 2026 16:48
@mizdra mizdra marked this pull request as ready for review January 12, 2026 16:48
@mizdra mizdra merged commit 51a78a7 into main Jan 12, 2026
30 of 32 checks passed
@mizdra mizdra deleted the fix-adding-file-causes-tsserver-to-crash branch January 12, 2026 16:55
@github-actions github-actions bot mentioned this pull request Jan 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Bug Bug or Bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adding file causes tsserver to crash

1 participant