Skip to content

refactor(*): simplify paths to the binary files #401

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 13, 2025

Conversation

lumirlumir
Copy link
Owner

@lumirlumir lumirlumir commented Jul 13, 2025

This pull request reorganizes the directory structure of several packages (clang-format-git, clang-format-git-python, and clang-format-node) to simplify paths and improve consistency. It also updates related scripts, tests, and documentation to reflect these changes.

Directory Structure Updates:

  • .github/workflows/llvm-build-bump-pr.yml and .github/workflows/test-cross-platform.yml: Updated artifact paths for clang-format-git, clang-format-git-python, and clang-format-node to remove src directories and directly reference bin or script directories. [1] [2]

Package Configuration Changes:

  • packages/clang-format-git/package.json, packages/clang-format-git-python/package.json, and packages/clang-format-node/package.json: Updated files arrays to include new directories (bin or script) and modified build and chmod scripts to reflect the updated directory structure. [1] [2] [3] [4] [5] [6]

Code Updates:

  • packages/clang-format-git/src/utils/getGitClangFormatPath.js and packages/clang-format-node/src/utils/getClangFormatPath.js: Adjusted path resolution logic to account for the removal of src directories. [1] [2]
  • packages/clang-format-git-python/src/utils/gitClangFormatPath.js and packages/clang-format-git-python/src/utils/gitClangFormatPath.test.js: Updated path references for git-clang-format script and corresponding tests. [1] [2]

Documentation and Script Updates:

Copy link

vercel bot commented Jul 13, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
npm-clang-format-node-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 13, 2025 11:10am

@github-actions github-actions bot added 🏷️ scope: * Auto-generated label based on Conventional Commits specification for GitHub release notes 🏷️ type: refactor Auto-generated label based on Conventional Commits specification for GitHub release notes labels Jul 13, 2025
Copy link

Labels have been automatically applied based on the Conventional Commits specification.🏷️

Copy link

codecov bot commented Jul 13, 2025

Bundle Report

Changes will decrease total bundle size by 52 bytes (-0.01%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
website-esm 603.07kB -52 bytes (-0.01%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: website-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
@localSearchIndexroot.*.js -48 bytes 93.04kB -0.05%
docs_apis_clang-format-git-python.*.js -4 bytes 15.3kB -0.03%

Files in docs_apis_clang-format-git-python.*.js:

  • ./docs/apis/clang-format-git-python.md → Total Size: 15.28kB

Copy link

codecov bot commented Jul 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (0f5dd9a) to head (c82ad2c).
Report is 1 commits behind head on main.

@@            Coverage Diff            @@
##              main      #401   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           11        11           
  Lines          422       424    +2     
=========================================
+ Hits           422       424    +2     
Files with missing lines Coverage Δ
...-format-git-python/src/utils/gitClangFormatPath.js 100.00% <100.00%> (ø)
...lang-format-git/src/utils/getGitClangFormatPath.js 100.00% <100.00%> (ø)
.../clang-format-node/src/utils/getClangFormatPath.js 100.00% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0f5dd9a...c82ad2c. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lumirlumir lumirlumir marked this pull request as ready for review July 13, 2025 11:13
@Copilot Copilot AI review requested due to automatic review settings July 13, 2025 11:13
Copy link
Contributor

@Copilot 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 refactors the structure of binary files by moving them out of src into top-level bin or script directories, updating path resolutions, build scripts, and CI workflows accordingly.

  • Moved bin and script folders to package roots and updated get*Path utilities
  • Simplified cp.mjs build helper and adjusted package.json build & chmod scripts
  • Updated documentation links and GitHub Actions workflows to reflect new paths

Reviewed Changes

Copilot reviewed 11 out of 28 changed files in this pull request and generated no comments.

Show a summary per file
File Description
website/docs/apis/clang-format-git-python.md Updated Markdown link to the relocated script path
scripts/cp.mjs Removed unnecessary recursive flag from cpSync
packages/clang-format-node/src/utils/getClangFormatPath.js Adjusted path resolution to new bin directory
packages/clang-format-node/package.json Updated files, build, and chmod scripts
packages/clang-format-git/src/utils/getGitClangFormatPath.js Adjusted path resolution to new bin directory
packages/clang-format-git/package.json Updated files, build, and chmod scripts
packages/clang-format-git-python/src/utils/gitClangFormatPath.js Updated documentation link and path resolution
packages/clang-format-git-python/src/utils/gitClangFormatPath.test.js Updated test to expect new path depth
packages/clang-format-git-python/package.json Updated files, build, and chmod scripts
.github/workflows/test-cross-platform.yml Updated Docker copy paths to new bin locations
.github/workflows/llvm-build-bump-pr.yml Updated artifact download paths to new directories

@lumirlumir lumirlumir merged commit ee3b675 into main Jul 13, 2025
54 checks passed
@lumirlumir lumirlumir deleted the refactor-simplify-paths-to-the-binary-files branch July 13, 2025 11:16
lumirlumir added a commit that referenced this pull request Jul 14, 2025
…ch`) (#404)

## Release Information: `v1.3.5`

New release of `lumirlumir/npm-clang-format-node` has arrived! 🎉

This PR bumps the package versions from `v1.3.4` to `v1.3.5` (`patch`).

See
[Actions](https://github.com/lumirlumir/npm-clang-format-node/actions/runs/16264909140)
for more details.

| Info        | Value                      |
| ----------- | -------------------------- |
| Repository  | `lumirlumir/npm-clang-format-node` |
| SEMVER      | `patch`     |
| Pre ID      | `canary`      |
| Short SHA   | df49101       |
| Old Version | `v1.3.4`  |
| New Version | `v1.3.5`  |

<!-- Release notes generated using configuration in .github/release.yml
at main -->

## What's Changed
### 🐛 Bug Fixes
* fix(*): drop `shx` and replace it with Node.js native script by
@lumirlumir in
#402
### 🛠️ Builds
* build(*): add `cp.mjs` script for file copying and update build
scripts by @lumirlumir in
#400
### ♻️ Code Refactoring
* refactor(*): simplify paths to the binary files by @lumirlumir in
#401
### ⬆️ Dependency Updates
* chore(deps-dev): bump eslint from 9.30.1 to 9.31.0 by @dependabot[bot]
in #403


**Full Changelog**:
v1.3.4...v1.3.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ scope: * Auto-generated label based on Conventional Commits specification for GitHub release notes 🏷️ type: refactor Auto-generated label based on Conventional Commits specification for GitHub release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant