Skip to content

Comments

feat(oxfmt): Support non-js/ts(external) files with prettier#16424

Closed
leaysgur wants to merge 5 commits into12-03-refactor_oxfmt_standardize_the_reporting_line_for_successfrom
12-03-feat_oxfmt_support_non-js_ts_external_files_with_prettier
Closed

feat(oxfmt): Support non-js/ts(external) files with prettier#16424
leaysgur wants to merge 5 commits into12-03-refactor_oxfmt_standardize_the_reporting_line_for_successfrom
12-03-feat_oxfmt_support_non-js_ts_external_files_with_prettier

Conversation

@leaysgur
Copy link
Member

@leaysgur leaysgur commented Dec 3, 2025

Finally, compiled all previous PRs and made them available.

  • Added config.experimentalExternalFormatter: bool, disabled by default
    • For now, will be enabled by default after dogfooding
  • Collect all files except for ignored
  • Then, mark as not-handled if this options is disabled or napi feature is disabled
    • This is expected to negatively impact performance...
  • Otherwise, call prettier to format them

Not yet covered:

  • Option and variable names could be reconsidered
  • Prettier also throws errors when encountering files it doesn't support by default
  • No error handling when detecting parsing errors in files Prettier does support
  • Enabling it will generate diffs for all existing snapshot tests
  • Still doesn't support configuration files

Copy link
Member Author

leaysgur commented Dec 3, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


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.

@Boshen
Copy link
Member

Boshen commented Dec 3, 2025

はやい!

@codspeed-hq
Copy link

codspeed-hq bot commented Dec 3, 2025

CodSpeed Performance Report

Merging #16424 will not alter performance

Comparing 12-03-feat_oxfmt_support_non-js_ts_external_files_with_prettier (a7618d6) with main (699406a)1

Summary

✅ 38 untouched
⏩ 7 skipped2

Footnotes

  1. No successful run was found on 12-03-refactor_oxfmt_standardize_the_reporting_line_for_success (c869edd) during the generation of this report, so main (699406a) was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

  2. 7 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.

@leaysgur
Copy link
Member Author

leaysgur commented Dec 3, 2025

Closing due to a change in our plans.
#15899 (comment)

@leaysgur leaysgur closed this Dec 3, 2025
@leaysgur leaysgur deleted the 12-03-feat_oxfmt_support_non-js_ts_external_files_with_prettier branch December 3, 2025 06:03
@leaysgur leaysgur restored the 12-03-feat_oxfmt_support_non-js_ts_external_files_with_prettier branch December 3, 2025 08:41
@leaysgur leaysgur reopened this Dec 3, 2025
@leaysgur
Copy link
Member Author

leaysgur commented Dec 3, 2025

Why conflicts... 😢 I will pick changes and open another PR tomorrow.

NOTE: experimentalExternalFormatter is not needed.

@leaysgur leaysgur closed this Dec 3, 2025
@leaysgur leaysgur deleted the 12-03-feat_oxfmt_support_non-js_ts_external_files_with_prettier branch December 3, 2025 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli Area - CLI A-formatter Area - Formatter C-enhancement Category - New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants