Skip to content

fix: strip query and fragment before finding matched tsconfig file#1081

Closed
sapphi-red wants to merge 1 commit into
mainfrom
03-23-fix_strip_query_and_fragment_before_finding_matched_tsconfig_file
Closed

fix: strip query and fragment before finding matched tsconfig file#1081
sapphi-red wants to merge 1 commit into
mainfrom
03-23-fix_strip_query_and_fragment_before_finding_matched_tsconfig_file

Conversation

@sapphi-red

@sapphi-red sapphi-red commented Mar 23, 2026

Copy link
Copy Markdown
Member

When tsconfig: 'auto' is configured, find_tsconfig() receives the raw importer path from the caller. Vite plugins commonly append query parameters to real file paths (e.g. src/routes/index.tsx?custom=foo). This caused the path to not match the expected tsconfig files (vitejs/vite#21889).

This PR fixes that by stripping query params and hash fragments from the importer path before finding the tsconfig.json that matches.

Copy link
Copy Markdown
Member Author

How to use the Graphite Merge Queue

Add the label merge to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@codecov

codecov Bot commented Mar 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.39%. Comparing base (ee4f426) to head (b6d6226).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1081      +/-   ##
==========================================
+ Coverage   92.35%   92.39%   +0.04%     
==========================================
  Files          21       21              
  Lines        4079     4102      +23     
==========================================
+ Hits         3767     3790      +23     
  Misses        312      312              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@codspeed-hq

codspeed-hq Bot commented Mar 23, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 9.19%

❌ 2 regressed benchmarks
✅ 11 untouched benchmarks
⏩ 5 skipped benchmarks1

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
resolver_memory[find tsconfig] 14.6 µs 16.1 µs -9.19%
small 11.3 µs 11.7 µs -3.24%

Comparing 03-23-fix_strip_query_and_fragment_before_finding_matched_tsconfig_file (b6d6226) with main (4d89b43)

Open in CodSpeed

Footnotes

  1. 5 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@sapphi-red sapphi-red force-pushed the 03-23-fix_strip_query_and_fragment_before_finding_matched_tsconfig_file branch from eb92795 to b6d6226 Compare March 23, 2026 09:53
@Boshen Boshen self-assigned this Mar 23, 2026
@sapphi-red sapphi-red requested a review from Boshen March 23, 2026 10:03
@Boshen

Boshen commented Mar 24, 2026

Copy link
Copy Markdown
Member

I'm aware of these PRs but will take some time to get through, it feels like we are accumulating slop.

@graphite-app graphite-app Bot closed this in ef0c86b May 24, 2026
@sapphi-red sapphi-red deleted the 03-23-fix_strip_query_and_fragment_before_finding_matched_tsconfig_file branch May 25, 2026 02:42
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.

2 participants