Skip to content

fix(oxfmt): Exclude lock files to be formatted#16629

Merged
graphite-app[bot] merged 1 commit intomainfrom
12-09-fix_oxfmt_exclude_lock_files_to_be_formatted
Dec 9, 2025
Merged

fix(oxfmt): Exclude lock files to be formatted#16629
graphite-app[bot] merged 1 commit intomainfrom
12-09-fix_oxfmt_exclude_lock_files_to_be_formatted

Conversation

@leaysgur
Copy link
Copy Markdown
Member

@leaysgur leaysgur commented Dec 9, 2025

Fixes #16598

@github-actions github-actions bot added A-cli Area - CLI A-formatter Area - Formatter C-bug Category - Bug labels Dec 9, 2025
Copy link
Copy Markdown
Member Author

leaysgur commented Dec 9, 2025


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.

@leaysgur leaysgur marked this pull request as ready for review December 9, 2025 05:03
Copilot AI review requested due to automatic review settings December 9, 2025 05:03
Copy link
Copy Markdown
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

This PR fixes issue #16598 by excluding lock files from being formatted by oxfmt. Lock files are generated by package managers and build tools and should not be formatted as they are auto-generated and formatting them could interfere with tooling expectations.

Key Changes:

  • Added early exclusion check for lock files in get_external_parser_name() function
  • Moved package-lock.json from JSON_STRINGIFY_FILENAMES to new EXCLUDE_FILENAMES set
  • Added comprehensive list of lock files from various ecosystems (npm, pnpm, yarn, Bazel, Bun, Deno, Composer, Swift, Python, Nix, and Minecraft)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label Dec 9, 2025
Copy link
Copy Markdown
Member

Boshen commented Dec 9, 2025

Merge activity

@graphite-app graphite-app bot force-pushed the 12-09-fix_oxfmt_exclude_lock_files_to_be_formatted branch from 6870272 to 37c1a06 Compare December 9, 2025 07:31
@graphite-app graphite-app bot merged commit 37c1a06 into main Dec 9, 2025
18 checks passed
@graphite-app graphite-app bot deleted the 12-09-fix_oxfmt_exclude_lock_files_to_be_formatted branch December 9, 2025 07:37
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Dec 9, 2025
Copilot AI pushed a commit that referenced this pull request Dec 10, 2025
taearls pushed a commit to taearls/oxc that referenced this pull request Dec 11, 2025
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-bug Category - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

oxfmt: ignore pnpm-lock.yaml by default

4 participants