mehen 0.0.4 → 0.1.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.
Files changed (2) hide show
  1. package/README.md +12 -19
  2. package/package.json +9 -9
package/README.md CHANGED
@@ -60,35 +60,28 @@ Other supported output formats: YAML, TOML, CBOR.
60
60
 
61
61
  ## CI Integration
62
62
 
63
- `mehen` works well in CI pipelines. Here is a real-world example from a GitHub Actions workflow that computes metrics on pull requests, compares against the `main` branch, and posts a summary comment:
63
+ `mehen` ships a GitHub Action that computes changed-file metric trends on pull requests, compares against the base branch, and posts a summary comment:
64
64
 
65
65
  ```yaml
66
+ permissions:
67
+ contents: read
68
+ pull-requests: write
69
+ issues: write
70
+
66
71
  steps:
67
72
  - uses: actions/checkout@v5
68
73
  with:
69
74
  fetch-depth: 0
70
75
 
71
- - name: Set up Node.js
72
- uses: actions/setup-node@v5
73
- with:
74
- node-version: '22'
75
-
76
- # Run mehen on the PR branch
77
- - run: mkdir -p $HOME/mehen-json
78
- - run: npx -y mehen -m -O json -o "$HOME/mehen-json" -p src
79
-
80
- # Run mehen on main for baseline comparison
81
- - uses: actions/checkout@v5
76
+ - uses: ophidiarium/mehen@v1
82
77
  with:
83
- ref: main
84
- path: main
85
- - run: mkdir -p $HOME/mehen-json-base
86
- - run: npx -y mehen -m -O json -o "$HOME/mehen-json-base" -p main/src
87
-
88
- # Compare and comment on PR (using actions/github-script or similar)
78
+ paths: src
79
+ thresholds: |
80
+ cyclomatic=5
81
+ cognitive=4
89
82
  ```
90
83
 
91
- The JSON output per file contains structured metric data that can be diffed across branches to surface regressions.
84
+ The action is backed by `mehen diff`, so polyglot repositories can pass multiple roots and let `mehen` pick supported languages from changed files.
92
85
 
93
86
  ## Platforms
94
87
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mehen",
3
- "version": "0.0.4",
3
+ "version": "0.1.0",
4
4
  "description": "Tool to compute and export code metrics",
5
5
  "keywords": [
6
6
  "metrics",
@@ -37,14 +37,14 @@
37
37
  "node": ">=18.0.0"
38
38
  },
39
39
  "optionalDependencies": {
40
- "@mehen/linux-x64-gnu": "0.0.4",
41
- "@mehen/linux-x64-musl": "0.0.4",
42
- "@mehen/linux-arm64-gnu": "0.0.4",
43
- "@mehen/linux-arm64-musl": "0.0.4",
44
- "@mehen/darwin-x64": "0.0.4",
45
- "@mehen/darwin-arm64": "0.0.4",
46
- "@mehen/win32-x64": "0.0.4",
47
- "@mehen/win32-arm64": "0.0.4"
40
+ "@mehen/linux-x64-gnu": "0.1.0",
41
+ "@mehen/linux-x64-musl": "0.1.0",
42
+ "@mehen/linux-arm64-gnu": "0.1.0",
43
+ "@mehen/linux-arm64-musl": "0.1.0",
44
+ "@mehen/darwin-x64": "0.1.0",
45
+ "@mehen/darwin-arm64": "0.1.0",
46
+ "@mehen/win32-x64": "0.1.0",
47
+ "@mehen/win32-arm64": "0.1.0"
48
48
  },
49
49
  "publishConfig": {
50
50
  "access": "public"