Skip to content

fix: keep the case of Svelte file paths with --tsgo-experimental-api - #3160

Closed
xyrolle wants to merge 1 commit into
sveltejs:masterfrom
xyrolle:fix/tsgo-api-svelte-file-casing
Closed

xyrolle wants to merge 1 commit into
sveltejs:masterfrom
xyrolle:fix/tsgo-api-svelte-file-casing

Conversation

@xyrolle

@xyrolle xyrolle commented Oct 22, 2026 •

Copy link
Copy Markdown

Fixes #3159

getAllSvelteFiles() returned the keys of the provider's FileMap, which are lowercase on case-insensitive file systems. svelte-check reported the Svelte compiler and CSS diagnostics of every file under that lowercased path, and separately from the file's TS errors. It now returns the snapshots' own paths.

Test: CI runs on Linux, where the keys keep their case. So the new test stubs ts.sys.useCaseSensitiveFileNames to false while creating a provider for a one-file project with Upper.svelte, and checks the returned path; the stub is restored in afterEach too. It fails without the change. Root pnpm test passes. pnpm lint passes with #3161's ignore rules; without them it fails on generated files after pnpm test. On macOS, the reproduction from the issue reports both diagnostics under src/Warn.svelte, with 1 file with problems instead of 2.

@changeset-bot

changeset-bot Bot commented Oct 22, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 24de0e3

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

This PR includes changesets to release 2 packages
Name Type
svelte-language-server Patch
svelte-check 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

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.

--tsgo-experimental-api lowercases Svelte diagnostic paths on case-insensitive filesystems

1 participant