@wbern/obscene 0.1.0 → 0.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 +14 -0
- package/dist/cli.js +3 -2
- package/package.json +15 -14
package/README.md
CHANGED
|
@@ -25,6 +25,20 @@ Works on any language scc supports. No configuration needed.
|
|
|
25
25
|
|
|
26
26
|
[scc](https://github.com/boyter/scc#install) must be installed and on your PATH.
|
|
27
27
|
|
|
28
|
+
```bash
|
|
29
|
+
brew install scc # macOS
|
|
30
|
+
choco install scc # Windows
|
|
31
|
+
scoop install scc # Windows (alt)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
See [scc install docs](https://github.com/boyter/scc#install) for Linux and other options.
|
|
35
|
+
|
|
36
|
+
## Quick run (no install)
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
pnpm dlx @wbern/obscene --format table
|
|
40
|
+
```
|
|
41
|
+
|
|
28
42
|
## Install
|
|
29
43
|
|
|
30
44
|
```bash
|
package/dist/cli.js
CHANGED
|
@@ -27,7 +27,8 @@ function globToRegex(pattern) {
|
|
|
27
27
|
return new RegExp(escaped);
|
|
28
28
|
}
|
|
29
29
|
function normalizePath(p) {
|
|
30
|
-
|
|
30
|
+
const forwardSlash = p.replaceAll("\\", "/");
|
|
31
|
+
return forwardSlash.startsWith("./") ? forwardSlash.slice(2) : forwardSlash;
|
|
31
32
|
}
|
|
32
33
|
function runScc(excludes = []) {
|
|
33
34
|
const patterns = [...DEFAULT_EXCLUDES, ...excludes.map(globToRegex)];
|
|
@@ -166,7 +167,7 @@ function truncate(s, max) {
|
|
|
166
167
|
|
|
167
168
|
// src/cli.ts
|
|
168
169
|
var program = new Command();
|
|
169
|
-
program.name("obscene").description("Identify hotspot files \u2014 complex code that changes frequently").version("0.1.
|
|
170
|
+
program.name("obscene").description("Identify hotspot files \u2014 complex code that changes frequently").version("0.1.1");
|
|
170
171
|
function addSharedOptions(cmd) {
|
|
171
172
|
return cmd.option("--top <n>", "limit to top N entries (0 = all)", "20").option("--format <type>", "output format: json | table", "json").option(
|
|
172
173
|
"--exclude <patterns...>",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wbern/obscene",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Identify hotspot files — complex code that changes frequently. Churn × complexity analysis for any git repo.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -9,6 +9,19 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
"dist"
|
|
11
11
|
],
|
|
12
|
+
"scripts": {
|
|
13
|
+
"build": "tsup",
|
|
14
|
+
"prepublishOnly": "node scripts/check-publish.js && pnpm run build",
|
|
15
|
+
"test": "vitest run",
|
|
16
|
+
"test:coverage": "vitest run --coverage",
|
|
17
|
+
"typecheck": "tsc --noEmit",
|
|
18
|
+
"lint": "biome check .",
|
|
19
|
+
"lint:fix": "biome check --write .",
|
|
20
|
+
"knip": "knip --no-config-hints",
|
|
21
|
+
"duplication-check": "jscpd",
|
|
22
|
+
"markdownlint": "markdownlint --fix **/*.md --ignore node_modules",
|
|
23
|
+
"prepare": "husky && (claude-instructions --scope=project --prefix= --overwrite || echo .)"
|
|
24
|
+
},
|
|
12
25
|
"keywords": [
|
|
13
26
|
"git",
|
|
14
27
|
"complexity",
|
|
@@ -80,17 +93,5 @@
|
|
|
80
93
|
}
|
|
81
94
|
]
|
|
82
95
|
]
|
|
83
|
-
},
|
|
84
|
-
"scripts": {
|
|
85
|
-
"postinstall": "claude-instructions --scope=project --prefix= --overwrite || true",
|
|
86
|
-
"build": "tsup",
|
|
87
|
-
"test": "vitest run",
|
|
88
|
-
"test:coverage": "vitest run --coverage",
|
|
89
|
-
"typecheck": "tsc --noEmit",
|
|
90
|
-
"lint": "biome check .",
|
|
91
|
-
"lint:fix": "biome check --write .",
|
|
92
|
-
"knip": "knip --no-config-hints",
|
|
93
|
-
"duplication-check": "jscpd",
|
|
94
|
-
"markdownlint": "markdownlint --fix '**/*.md' --ignore node_modules"
|
|
95
96
|
}
|
|
96
|
-
}
|
|
97
|
+
}
|