Skip to content

fix(source-type): don't treat d.ts as a declaration file#19185

Merged
Dunqing merged 1 commit intomainfrom
c/02-09-fix_source-type_don_t_treat_d.ts_as_a_declaration_file
Feb 10, 2026
Merged

fix(source-type): don't treat d.ts as a declaration file#19185
Dunqing merged 1 commit intomainfrom
c/02-09-fix_source-type_don_t_treat_d.ts_as_a_declaration_file

Conversation

@camc314
Copy link
Contributor

@camc314 camc314 commented Feb 9, 2026

No description provided.

Copy link
Contributor Author

camc314 commented Feb 9, 2026


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

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.

@camc314 camc314 marked this pull request as ready for review February 9, 2026 16:57
Copilot AI review requested due to automatic review settings February 9, 2026 16:57
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adjusts TypeScript declaration-file detection so filenames like d.ts are not incorrectly classified as declaration files.

Changes:

  • Updates .ts / .mts / .cts declaration detection logic to require a non-empty basename before the .d marker.
  • Adds new test cases covering d.ts, .d.ts, and corresponding .mts/.cts variants.

@codspeed-hq
Copy link

codspeed-hq bot commented Feb 9, 2026

Merging this PR will not alter performance

✅ 47 untouched benchmarks
⏩ 3 skipped benchmarks1


Comparing c/02-09-fix_source-type_don_t_treat_d.ts_as_a_declaration_file (dc6ae0f) with main (03b2955)2

Open in CodSpeed

Footnotes

  1. 3 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.

  2. No successful run was found on main (bec7ffc) during the generation of this report, so 03b2955 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@Dunqing Dunqing merged commit 0441237 into main Feb 10, 2026
48 of 51 checks passed
@Dunqing Dunqing deleted the c/02-09-fix_source-type_don_t_treat_d.ts_as_a_declaration_file branch February 10, 2026 09:33
owjs3901 pushed a commit to owjs3901/oxc that referenced this pull request Feb 11, 2026
OskarLebuda pushed a commit to OskarLebuda/oxc that referenced this pull request Feb 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-bug Category - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments