clang-format-node 1.3.4 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -2
- package/bin/cfn-darwin-arm64/clang-format +0 -0
- package/bin/cfn-darwin-x64/clang-format +0 -0
- package/bin/cfn-linux-arm/clang-format +0 -0
- package/bin/cfn-linux-arm64/clang-format +0 -0
- package/bin/cfn-linux-ppc64/clang-format +0 -0
- package/bin/cfn-linux-s390x/clang-format +0 -0
- package/bin/cfn-linux-x64/clang-format +0 -0
- package/{build/bin → bin}/cfn-win32-x64/clang-format.exe +0 -0
- package/build/utils/getClangFormatPath.js +1 -1
- package/chmod.js +36 -0
- package/package.json +6 -9
- package/build/bin/cfn-darwin-arm64/clang-format +0 -0
- package/build/bin/cfn-darwin-x64/clang-format +0 -0
- package/build/bin/cfn-linux-arm/clang-format +0 -0
- package/build/bin/cfn-linux-arm64/clang-format +0 -0
- package/build/bin/cfn-linux-ppc64/clang-format +0 -0
- package/build/bin/cfn-linux-s390x/clang-format +0 -0
- package/build/bin/cfn-linux-x64/clang-format +0 -0
package/README.md
CHANGED
|
@@ -21,6 +21,14 @@ Node wrapper for LLVM Clang's `clang-format` and `git-clang-format` native binar
|
|
|
21
21
|
|
|
22
22
|
For full documentation, see the [official documentation of the `clang-format-node`](https://clang-format-node.lumir.page).
|
|
23
23
|
|
|
24
|
+
## Fully Secure Binaries
|
|
25
|
+
|
|
26
|
+
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).
|
|
27
|
+
|
|
28
|
+
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).
|
|
29
|
+
|
|
30
|
+
For more information, please refer to the [Security](https://github.com/lumirlumir/npm-clang-format-node/blob/main/SECURITY.md) page.
|
|
31
|
+
|
|
24
32
|
## Included Packages
|
|
25
33
|
|
|
26
34
|
This repository is maintained as a **monorepo** and includes the following **three** packages.
|
|
@@ -63,11 +71,11 @@ Each package intends to release a new npm package for every **latest** release o
|
|
|
63
71
|
|
|
64
72
|
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!
|
|
65
73
|
|
|
66
|
-
Please read our [Code of Conduct](https://github.com/lumirlumir/
|
|
74
|
+
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.
|
|
67
75
|
|
|
68
76
|
## Code of Conduct
|
|
69
77
|
|
|
70
|
-
See [Code of Conduct](https://github.com/lumirlumir/
|
|
78
|
+
See [Code of Conduct](https://github.com/lumirlumir/.github/blob/main/CODE_OF_CONDUCT.md#contributor-covenant-code-of-conduct).
|
|
71
79
|
|
|
72
80
|
## Change Log
|
|
73
81
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var _require=require("fs"),existsSync=_require.existsSync;var _require2=require("path"),resolve=_require2.resolve;function getClangFormatPath(osPlatform,architecture){var clangFormatPath=resolve(__dirname,"..","bin","cfn-".concat(osPlatform,"-").concat(architecture),"clang-format".concat(osPlatform==="win32"?".exe":""));if(!existsSync(clangFormatPath))throw new Error("No executable found for '".concat(osPlatform,"(OS platform)-").concat(architecture,"(architecture)'\nThe possible combinations are 'darwin-arm64', 'darwin-x64', 'linux-arm', 'linux-arm64', 'linux-ppc64', 'linux-s390x', 'linux-x64', 'win32-x64'"));return clangFormatPath}var getClangFormatNodePath=getClangFormatPath;module.exports={getClangFormatPath:getClangFormatPath,getClangFormatNodePath:getClangFormatNodePath};
|
|
1
|
+
"use strict";var _require=require("fs"),existsSync=_require.existsSync;var _require2=require("path"),resolve=_require2.resolve;function getClangFormatPath(osPlatform,architecture){var clangFormatPath=resolve(__dirname,"..","..","bin","cfn-".concat(osPlatform,"-").concat(architecture),"clang-format".concat(osPlatform==="win32"?".exe":""));if(!existsSync(clangFormatPath))throw new Error("No executable found for '".concat(osPlatform,"(OS platform)-").concat(architecture,"(architecture)'\nThe possible combinations are 'darwin-arm64', 'darwin-x64', 'linux-arm', 'linux-arm64', 'linux-ppc64', 'linux-s390x', 'linux-x64', 'win32-x64'"));return clangFormatPath}var getClangFormatNodePath=getClangFormatPath;module.exports={getClangFormatPath:getClangFormatPath,getClangFormatNodePath:getClangFormatNodePath};
|
package/chmod.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Script to change permissions of binaries.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/* eslint-disable n/prefer-node-protocol -- DO NOT USE `node:` namespace for backward compatibility */
|
|
6
|
+
|
|
7
|
+
// --------------------------------------------------------------------------------
|
|
8
|
+
// Require
|
|
9
|
+
// --------------------------------------------------------------------------------
|
|
10
|
+
|
|
11
|
+
const { resolve } = require('path');
|
|
12
|
+
const { chmodSync, readdirSync } = require('fs');
|
|
13
|
+
|
|
14
|
+
// --------------------------------------------------------------------------------
|
|
15
|
+
// Execution
|
|
16
|
+
// --------------------------------------------------------------------------------
|
|
17
|
+
|
|
18
|
+
const binPath = resolve(__dirname, 'bin');
|
|
19
|
+
const clangFormatNodePaths = readdirSync(binPath, {
|
|
20
|
+
recursive: true,
|
|
21
|
+
})
|
|
22
|
+
.filter(path => path.includes('clang-format'))
|
|
23
|
+
.map(path => resolve(binPath, path));
|
|
24
|
+
|
|
25
|
+
clangFormatNodePaths.forEach(clangFormatNodePath => {
|
|
26
|
+
try {
|
|
27
|
+
chmodSync(clangFormatNodePath, 0o755);
|
|
28
|
+
} catch (error) {
|
|
29
|
+
// eslint-disable-next-line no-console
|
|
30
|
+
console.error(
|
|
31
|
+
`Error changing permissions for ${clangFormatNodePath}:`,
|
|
32
|
+
error.message,
|
|
33
|
+
);
|
|
34
|
+
throw error;
|
|
35
|
+
}
|
|
36
|
+
});
|
package/package.json
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clang-format-node",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Node wrapper for clang-format native binary inspired by angular/clang-format.🐉",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"files": [
|
|
7
|
+
"bin",
|
|
7
8
|
"build",
|
|
9
|
+
"chmod.js",
|
|
8
10
|
"LICENSE.md",
|
|
9
11
|
"README.md"
|
|
10
12
|
],
|
|
@@ -46,17 +48,12 @@
|
|
|
46
48
|
"provenance": true
|
|
47
49
|
},
|
|
48
50
|
"scripts": {
|
|
49
|
-
"postinstall": "
|
|
51
|
+
"postinstall": "node chmod.js || exit 0",
|
|
50
52
|
"prepublishOnly": "npm run build",
|
|
51
|
-
"build": "npx babel src -d build && npx tsc &&
|
|
52
|
-
"postbuild": "npm run chmod",
|
|
53
|
+
"build": "npx babel src -d build && npx tsc && node ../../scripts/cp.mjs ../../LICENSE.md LICENSE.md ../../README.md README.md",
|
|
53
54
|
"test": "node --test",
|
|
54
|
-
"chmod": "shx chmod 755 ./src/bin/**/* ./build/bin/**/* || exit 0",
|
|
55
55
|
"dev": "node src/cli.js",
|
|
56
56
|
"start": "node build/cli.js"
|
|
57
57
|
},
|
|
58
|
-
"
|
|
59
|
-
"shx": "^0.4.0"
|
|
60
|
-
},
|
|
61
|
-
"gitHead": "d8fec7bde3bea04baea693e431b9b3d52c016023"
|
|
58
|
+
"gitHead": "4ba751fe252a63bbf1889246f54511390830d8ef"
|
|
62
59
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|