clang-format-node
Version:
Node wrapper for clang-format native binary inspired by angular/clang-format.🐉
95 lines (55 loc) • 6.21 kB
Markdown
# clang-format-node
&color=83ba63&display_name=release)
[](https://www.npmjs.com/package/clang-format-node)


[](https://github.com/lumirlumir/npm-clang-format-node/actions/workflows/lint.yml)
[](https://github.com/lumirlumir/npm-clang-format-node/actions/workflows/test.yml)
[](https://github.com/lumirlumir/npm-clang-format-node/actions/workflows/test-cross-platform.yml)
[](https://codecov.io/gh/lumirlumir/npm-clang-format-node)
> [!IMPORTANT]
>
> If you like this package, please give it a star on [GitHub](https://github.com/lumirlumir/npm-clang-format-node)!⭐<br/>
> Your support helps us improve and maintain the project.
Node wrapper for LLVM Clang's `clang-format` and `git-clang-format` native binaries inspired by [angular/clang-format](https://github.com/angular/clang-format).🐉
## Documentation
For full documentation, see the [official documentation of the `clang-format-node`](https://clang-format-node.lumir.page).
## Fully Secure Binaries
Binaries are built directly from the [official LLVM project source code](https://github.com/llvm/llvm-project). No third-party binaries are used; everything is built from scratch using [GitHub Actions](https://github.com/lumirlumir/npm-clang-format-node/blob/main/.github/workflows/llvm-build-bump-pr.yml).
All binaries are fully verified by [GitHub Actions Attestation Provenances](https://github.com/lumirlumir/npm-clang-format-node/attestations) and [npm Build Provenances](https://docs.npmjs.com/generating-provenance-statements).
For more information, please refer to the [Security](https://github.com/lumirlumir/npm-clang-format-node/blob/main/SECURITY.md) page.
## Included Packages
This repository is maintained as a **monorepo** and includes the following **three** packages.
### `clang-format-node` - <small>[Repository](https://github.com/lumirlumir/npm-clang-format-node/tree/main/packages/clang-format-node) | [npm](https://www.npmjs.com/package/clang-format-node)</small>
[](https://www.npmjs.com/package/clang-format-node)

Node wrapper for `clang-format` native binary inspired by angular/clang-format. (The **CORE** package.)
### `clang-format-git` - <small>[Repository](https://github.com/lumirlumir/npm-clang-format-node/tree/main/packages/clang-format-git) | [npm](https://www.npmjs.com/package/clang-format-git)</small>
[](https://www.npmjs.com/package/clang-format-git)

Node wrapper for `git-clang-format` Python script as a standalone native binary to **allow execution without a Python dependency**.
### `clang-format-git-python` - <small>[Repository](https://github.com/lumirlumir/npm-clang-format-node/tree/main/packages/clang-format-git-python) | [npm](https://www.npmjs.com/package/clang-format-git-python)</small>
[](https://www.npmjs.com/package/clang-format-git-python)

Node wrapper for `git-clang-format` Python script. **This package requires Python3 as a dependency**.
## Supported
See the [supported](https://clang-format-node.lumir.page/docs/get-started/supported) section of the documentation, which lists the following:
- OS Platforms and Architectures
- Node.js Version
- GitHub Actions Runner Images
- Docker Build Images
## Releases
Each package intends to release a new npm package for every **latest** release of `clang-format` and `git-clang-format`. Automated GitHub Actions check for the latest LLVM release every week, builds all packages using their own pipeline, and makes a pull request. **All processes are automated**. If you are interested in the build process, take a look at [`.github/workflows/llvm-build-bump-pr.yml`](https://github.com/lumirlumir/npm-clang-format-node/blob/main/.github/workflows/llvm-build-bump-pr.yml).
## Contributing (Issues & Pull Requests)
Thanks for having attention to this package🙇♂️. We appreciate you spending the time to work on these things. Every issue and pull request about bugs, suggestions and the other topics is always welcome!
Please read our [Code of Conduct](https://github.com/lumirlumir/.github/blob/main/CODE_OF_CONDUCT.md#contributor-covenant-code-of-conduct) and [Contributing](https://github.com/lumirlumir/npm-clang-format-node/blob/main/CONTRIBUTING.md) Guides before you work on these things. We also recommend you to read the [Guides on LLVM `clang-format`](http://clang-format-node.lumir.page/docs/further-reading/guides-on-llvm-clang-format) mentioned in the documentation before contributing.
## Code of Conduct
See [Code of Conduct](https://github.com/lumirlumir/.github/blob/main/CODE_OF_CONDUCT.md#contributor-covenant-code-of-conduct).
## Change Log
See [Change Log](https://github.com/lumirlumir/npm-clang-format-node/blob/main/CHANGELOG.md).
## Versioning
See [Versioning](http://clang-format-node.lumir.page/docs/community/versioning).
## Security
See [Security](https://github.com/lumirlumir/npm-clang-format-node/blob/main/SECURITY.md).
## License
[MIT](https://github.com/lumirlumir/npm-clang-format-node/blob/main/LICENSE.md) under [LLVM Apache License 2.0](https://github.com/llvm/llvm-project/blob/main/LICENSE.TXT).