Skip to content

feat: bun package manager support#306

Closed
jonlabelle wants to merge 3 commits intomasterfrom
feat/bun-pkg-mgr-support-305
Closed

feat: bun package manager support#306
jonlabelle wants to merge 3 commits intomasterfrom
feat/bun-pkg-mgr-support-305

Conversation

@jonlabelle
Copy link
Owner

@jonlabelle jonlabelle commented Apr 5, 2025

Adds support for Bun package manager.

Closes #305

@jonlabelle jonlabelle linked an issue Apr 5, 2025 that may be closed by this pull request
@jonlabelle jonlabelle marked this pull request as ready for review April 5, 2025 16:30
@jonlabelle jonlabelle requested a review from Copilot May 17, 2025 14:01
Copy link

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

Adds support for the Bun package manager by letting the which() helper detect .bunx executables on Windows and streamlining the prettier lookup logic.

  • Extend which() to include the .bunx extension for Bun executables on Windows
  • Simplify make_local_prettier_path() by removing redundant .cmd handling

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
jsprettier/util.py Append .bunx to PATHEXT so Windows which() can find Bun binaries
jsprettier/sthelper.py Remove explicit .cmd extension handling and rely on which()
Comments suppressed due to low confidence (3)

jsprettier/util.py:308

  • Add unit tests to ensure which() correctly resolves executables with the .bunx extension on Windows environments.
pathext.append(".bunx")  # add bunx extension for bun package manager

jsprettier/sthelper.py:196

  • [nitpick] Update the surrounding comment to reflect that .cmd extension handling was removed and extension resolution is now delegated to which().
# 4. check globally install prettier

jsprettier/sthelper.py:197

  • The import for ensure_file_has_ext is no longer used after removing the Windows .cmd logic—consider cleaning up the unused import.
return which('prettier')

@jonlabelle jonlabelle closed this Jul 19, 2025
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.

[Enhancement] automatic prettier_cli_path resolution

1 participant