code-gauge 4.1.0 → 4.1.1
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 -9
- package/package.json +15 -6
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[](https://github.com/WillBooster/code-gauge/actions/workflows/test-rust.yml)
|
|
4
4
|
[](https://github.com/WillBooster/code-gauge/actions/workflows/test.yml)
|
|
5
5
|
[](https://github.com/semantic-release/semantic-release)
|
|
6
|
-
[](https://github.com/WillBooster/shared/tree/main/packages/wbfy)
|
|
7
7
|
|
|
8
8
|
A command-line tool that ranks the files of a project by refactoring priority and gates changes
|
|
9
9
|
against metric regressions, built for AI-agent workflows: an agent asked to "refactor this
|
|
@@ -198,14 +198,15 @@ arbitrary grammars would mean shipping incomplete metrics for them.
|
|
|
198
198
|
## Native (Rust) engine
|
|
199
199
|
|
|
200
200
|
Parsing and every metric pass run in a Rust addon (tree-sitter); the thin TypeScript layer handles
|
|
201
|
-
the CLI, cross-file matching, and the Halstead float derivations.
|
|
202
|
-
|
|
203
|
-
builds the addon from the bundled sources
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
201
|
+
the CLI, cross-file matching, and the Halstead float derivations. Releases include prebuilt addons
|
|
202
|
+
for Linux x64/arm64 (glibc and musl), macOS x64/arm64, and Windows x64. On other platforms,
|
|
203
|
+
`postinstall` builds the addon from the bundled sources, which requires a
|
|
204
|
+
[Rust toolchain](https://rustup.rs).
|
|
205
|
+
|
|
206
|
+
If a prebuilt addon is unavailable, package managers that block dependency install scripts by
|
|
207
|
+
default (recent npm versions, and Bun unless `code-gauge` is listed in `trustedDependencies`) skip
|
|
208
|
+
the fallback build. Either approve `code-gauge`'s install script, or build the addon manually
|
|
209
|
+
inside the installed package (the runtime error message points here too):
|
|
209
210
|
|
|
210
211
|
```sh
|
|
211
212
|
node node_modules/code-gauge/scripts/buildNative.mjs
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "code-gauge",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.1",
|
|
4
4
|
"description": "Measure code metrics with tree-sitter.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"postinstall": "node scripts/installNative.mjs",
|
|
49
49
|
"lint": "bun wb lint",
|
|
50
50
|
"lint-fix": "bun wb lint --fix",
|
|
51
|
-
"prepare": "bun lefthook install || true",
|
|
51
|
+
"prepare": "(bun lefthook install || true) && (test ! -f .lefthook/normalize-bun-lockfile.sh || bash .lefthook/normalize-bun-lockfile.sh)",
|
|
52
52
|
"test": "bun wb test",
|
|
53
53
|
"test/ci": "bun run build-native && vitest",
|
|
54
54
|
"typecheck": "bun wb typecheck",
|
|
@@ -67,12 +67,12 @@
|
|
|
67
67
|
"@types/node": "25.9.4",
|
|
68
68
|
"@willbooster/oxfmt-config": "1.2.2",
|
|
69
69
|
"@willbooster/oxlint-config": "1.4.8",
|
|
70
|
-
"@willbooster/wb": "
|
|
71
|
-
"build-ts": "21.0.
|
|
70
|
+
"@willbooster/wb": "22.0.1",
|
|
71
|
+
"build-ts": "21.0.9",
|
|
72
72
|
"conventional-changelog-conventionalcommits": "9.3.1",
|
|
73
73
|
"lefthook": "2.1.10",
|
|
74
|
-
"oxfmt": "0.
|
|
75
|
-
"oxlint": "1.
|
|
74
|
+
"oxfmt": "0.63.0",
|
|
75
|
+
"oxlint": "1.78.0",
|
|
76
76
|
"oxlint-tsgolint": "7.0.2001",
|
|
77
77
|
"semantic-release": "25.0.5",
|
|
78
78
|
"sort-package-json": "4.0.0",
|
|
@@ -85,5 +85,14 @@
|
|
|
85
85
|
"publishConfig": {
|
|
86
86
|
"access": "public",
|
|
87
87
|
"registry": "https://registry.npmjs.org/"
|
|
88
|
+
},
|
|
89
|
+
"optionalDependencies": {
|
|
90
|
+
"code-gauge-linux-x64-gnu": "4.1.1",
|
|
91
|
+
"code-gauge-linux-arm64-gnu": "4.1.1",
|
|
92
|
+
"code-gauge-linux-x64-musl": "4.1.1",
|
|
93
|
+
"code-gauge-linux-arm64-musl": "4.1.1",
|
|
94
|
+
"code-gauge-darwin-x64": "4.1.1",
|
|
95
|
+
"code-gauge-darwin-arm64": "4.1.1",
|
|
96
|
+
"code-gauge-win32-x64-msvc": "4.1.1"
|
|
88
97
|
}
|
|
89
98
|
}
|