-
-
Notifications
You must be signed in to change notification settings - Fork 1
fix(*): drop shx
and replace it with Node.js native script
#402
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
fix(*): drop shx
and replace it with Node.js native script
#402
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
Labels have been automatically applied based on the Conventional Commits specification.🏷️ |
Bundle ReportChanges will decrease total bundle size by 9 bytes (-0.0%) ⬇️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: website-esmAssets Changed:
Files in
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
@@ Coverage Diff @@
## main #402 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 11 11
Lines 424 424
=========================================
Hits 424 424 Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
There was a problem hiding this 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 removes the shx
dependency and shell-based chmod
commands, replacing them with Node.js native scripts to set executable permissions in each package.
- Updated
package.json
in three packages to includechmod.js
, removeshx
, and changepostinstall
tonode chmod.js
- Added
chmod.js
in each package to programmatically set file permissions - Removed redundant
chmod
andpostbuild
scripts andshx
dependencies
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
packages/clang-format-node/package.json | Added chmod.js to files , removed shx , updated scripts |
packages/clang-format-node/chmod.js | New script to set bin file permissions via Node |
packages/clang-format-git/package.json | Added chmod.js , removed shx , updated scripts |
packages/clang-format-git/chmod.js | New script to set bin file permissions via Node |
packages/clang-format-git-python/package.json | Added chmod.js , removed shx , updated scripts |
packages/clang-format-git-python/chmod.js | New script to set script file permissions via Node |
Comments suppressed due to low confidence (2)
packages/clang-format-node/chmod.js:1
- There are no tests verifying that this script sets the intended permissions; consider adding a small integration or unit test to ensure future changes don't break file permissions.
/**
packages/clang-format-node/chmod.js:19
- The
recursive
option forfs.readdirSync
is only supported in Node.js v16.7+; consider adding a small helper or usingfs.promises.opendir
to walk directories for broader compatibility.
const clangFormatNodePaths = readdirSync(binPath, {
https://github.com/lumirlumir/npm-clang-format-node into fix-drop-shx-and-replace-it-with-nodejs-native-script
…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
This pull request refactors the handling of file permissions across three packages (
clang-format-git-python
,clang-format-git
, andclang-format-node
) by replacing the use of theshx
dependency with customchmod.js
scripts. These scripts ensure that the necessary files and binaries have the correct execution permissions. Additionally, thepostinstall
andpostbuild
scripts are updated to use these newchmod.js
files, and theshx
dependency is removed.File Permission Handling Updates:
packages/clang-format-git-python/chmod.js
: Added a script to set execution permissions for thegit-clang-format
script usingchmodSync
.packages/clang-format-git/chmod.js
: Added a script to set execution permissions for binaries in thebin
directory, filtering for files containinggit-clang-format
.packages/clang-format-node/chmod.js
: Added a script to set execution permissions for binaries in thebin
directory, filtering for files containingclang-format
.Package Configuration Updates:
packages/clang-format-git-python/package.json
: Addedchmod.js
to thefiles
array, replacednpm run chmod
withnode chmod.js
in thepostinstall
script, and removed theshx
dependency. [1] [2]packages/clang-format-git/package.json
: Addedchmod.js
to thefiles
array, replacednpm run chmod
withnode chmod.js
in thepostinstall
script, and removed theshx
dependency. [1] [2]packages/clang-format-node/package.json
: Addedchmod.js
to thefiles
array, replacednpm run chmod
withnode chmod.js
in thepostinstall
script, and removed theshx
dependency. [1] [2]