optiprune 2.2.23 → 2.3.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 +13 -7
- package/config.md +19 -5
- package/dist/cli.js +20 -11
- package/dist/cli.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -18,8 +18,8 @@ The CLI package is `@optiprune/cli`. The analysis engine is available separately
|
|
|
18
18
|
| Logic analysis | Constant conditions, contradictory guards, unreachable statements, and schema-impossible guards. |
|
|
19
19
|
| Dependencies | `package.json`, scripts, dependency/devDependency usage, package exports, bins, workspace packages, and lockfile-aware context. |
|
|
20
20
|
| Contracts and entries | Public API contracts, schema-aware protection, conventional entries, entry-file exports, test-file handling, and framework/plugin entry points. |
|
|
21
|
-
| Fixes | Opt-in fixes for unreachable files, unused exports and members, dependencies, development dependencies, and
|
|
22
|
-
| Output | Human-readable terminal output, JSON reports, and SARIF output for CI/code-scanning workflows. |
|
|
21
|
+
| Fixes | Opt-in fixes for unreachable files, unused exports and members, dependencies, development dependencies, verified conditions, and safely recoverable `package.json` JSON. Every fix is confidence-gated and supports dry runs. |
|
|
22
|
+
| Output | Human-readable terminal output, JSON reports with optional structured debug diagnostics, and SARIF output for CI/code-scanning workflows. |
|
|
23
23
|
| Headless usage | `analyze`, `shouldFail`, cache helpers, fix helpers, reporters, and public TypeScript types from `@optiprune/core`. |
|
|
24
24
|
| Plugins | Source-aware adapters for frameworks, build tools, test tools, runtimes, package managers, and workspace conventions. |
|
|
25
25
|
|
|
@@ -86,15 +86,17 @@ npx @optiprune/cli analyze --sarif > optiprune.sarif
|
|
|
86
86
|
| `--sarif` | Print SARIF output. | Disabled |
|
|
87
87
|
| `--skip-3` | Skip the SMT constraint-analysis layer. | Disabled |
|
|
88
88
|
| `--skip-4` | Skip the concolic execution-proof layer. | Disabled |
|
|
89
|
-
| `-v, --verbose` | Print verbose output and internal graph state. | Disabled |
|
|
90
|
-
| `--fix <rules...>` | Select fix targets: `files`, `exports`, `dependencies`, `devDependencies`, or `
|
|
91
|
-
| `--
|
|
89
|
+
| `-v, --verbose` | Print verbose output and internal graph state; with `--json`, include structured `debug` diagnostics in the report. | Disabled |
|
|
90
|
+
| `--fix <rules...>` | Select fix targets: `files`, `exports`, `dependencies`, `devDependencies`, `conditions`, or `json`. | None |
|
|
91
|
+
| `--fix-json` | Safely repair recoverable `package.json` JSON errors; shorthand for `--fix json`. | Disabled |
|
|
92
|
+
| `--node-llama-cpp` | Force-enable the dedicated node-llama-cpp semantic analysis plugin. | Disabled |
|
|
93
|
+
| `--confidence <level>` | Minimum fix confidence: `high`, `medium+`, `low+`, or `all`. | `high` |
|
|
92
94
|
| `--force` | Allow a selected fix when the source edit is otherwise considered unsafe. | Disabled |
|
|
93
95
|
| `--dry-run` | Log planned fixes without changing files. | Disabled |
|
|
94
96
|
| `--cache-from <path>` | Import a JSON cache before analysis. | None |
|
|
95
97
|
| `--cache-to <path>` | Export the resulting cache after analysis. | None |
|
|
96
98
|
|
|
97
|
-
`--confidence`, `--force`, and `--dry-run` require `--fix`. Unknown fix targets are rejected before analysis begins.
|
|
99
|
+
`--confidence`, `--force`, and `--dry-run` require `--fix` or `--fix-json`. Unknown fix targets are rejected before analysis begins.
|
|
98
100
|
|
|
99
101
|
## Fixes
|
|
100
102
|
|
|
@@ -102,9 +104,12 @@ Fixes are explicit rather than implicit. Start with a dry run, inspect the outpu
|
|
|
102
104
|
|
|
103
105
|
```bash
|
|
104
106
|
npx @optiprune/cli analyze \
|
|
105
|
-
--fix files exports dependencies devDependencies conditions \
|
|
107
|
+
--fix files exports dependencies devDependencies conditions json \
|
|
106
108
|
--confidence medium+ \
|
|
107
109
|
--dry-run
|
|
110
|
+
|
|
111
|
+
# Or repair only safe package.json syntax issues
|
|
112
|
+
npx @optiprune/cli analyze --fix-json
|
|
108
113
|
```
|
|
109
114
|
|
|
110
115
|
| Target | Applies to |
|
|
@@ -114,6 +119,7 @@ npx @optiprune/cli analyze \
|
|
|
114
119
|
| `dependencies` | Unused runtime dependencies. |
|
|
115
120
|
| `devDependencies` | Unused development dependencies. |
|
|
116
121
|
| `conditions` | Verified constant conditions. |
|
|
122
|
+
| `json` | Safe recovery of malformed `package.json` syntax, including comments, trailing commas, missing commas, and missing closing delimiters. Unsafe forms such as unquoted keys remain unchanged. |
|
|
117
123
|
|
|
118
124
|
`--force` changes the safety decision for the selected fix operation; it does not make an unverified finding correct. Use it only when the source edit has been reviewed.
|
|
119
125
|
|
package/config.md
CHANGED
|
@@ -73,7 +73,7 @@ Determines the minimum issue severity level required to exit the process with a
|
|
|
73
73
|
|
|
74
74
|
verbose (boolean, default: false)
|
|
75
75
|
|
|
76
|
-
Prints step-by-step diagnostic information
|
|
76
|
+
Prints step-by-step diagnostic information. When combined with `json: true` or `output: "json"`, Core embeds machine-readable parser and JSON-recovery diagnostics in `report.debug` instead of mixing them into JSON stdout.
|
|
77
77
|
|
|
78
78
|
json (boolean, default: false)
|
|
79
79
|
|
|
@@ -87,7 +87,7 @@ Configures the automatic removal of dead code. Can be a boolean or an object for
|
|
|
87
87
|
{
|
|
88
88
|
"fix": {
|
|
89
89
|
"confidence": "medium+",
|
|
90
|
-
"rules": ["exports", "files", "dependencies"],
|
|
90
|
+
"rules": ["exports", "files", "dependencies", "devDependencies", "json"],
|
|
91
91
|
"dryRun": false
|
|
92
92
|
}
|
|
93
93
|
}
|
|
@@ -95,11 +95,25 @@ Configures the automatic removal of dead code. Can be a boolean or an object for
|
|
|
95
95
|
|
|
96
96
|
- **confidence**: Minimum confidence to apply a fix (`high`, `medium+`, `low+`, `all`).
|
|
97
97
|
|
|
98
|
-
- **rules**: Specific rules or categories (`exports`, `files`, `dependencies`) to fix.
|
|
98
|
+
- **rules**: Specific rules or categories (`exports`, `files`, `dependencies`, `devDependencies`, `conditions`, `json`) to fix. The `json` rule only rewrites safely recoverable `package.json` syntax such as comments, trailing commas, missing commas, and missing closing delimiters. Ambiguous or unsafe forms remain unchanged and are reported with a location and reason.
|
|
99
99
|
|
|
100
100
|
- **dryRun**: If true, logs what would be fixed without modifying files.
|
|
101
101
|
|
|
102
|
-
**5.
|
|
102
|
+
**5. Plugin Overrides (plugins)**
|
|
103
|
+
|
|
104
|
+
Enable or disable an installed source-aware plugin explicitly. For the dedicated node-llama-cpp semantic analysis plugin, use:
|
|
105
|
+
|
|
106
|
+
```json
|
|
107
|
+
{
|
|
108
|
+
"plugins": {
|
|
109
|
+
"node-llama-cpp-plugin": true
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
The CLI equivalent is `--node-llama-cpp`.
|
|
115
|
+
|
|
116
|
+
**6. Rule Overrides (rules)**Fine-tune or disable specific inspection rules:
|
|
103
117
|
|
|
104
118
|
```json
|
|
105
119
|
"rules": {
|
|
@@ -113,7 +127,7 @@ Configures the automatic removal of dead code. Can be a boolean or an object for
|
|
|
113
127
|
|
|
114
128
|
- `"off"`: Disables rule checking entirely.
|
|
115
129
|
|
|
116
|
-
**
|
|
130
|
+
**7. Engine & Solver Tuning (layers)**Configure isolated runtimes, SMT solvers, and symbolic execution passes:
|
|
117
131
|
|
|
118
132
|
| Option | Type | Default | Purpose |
|
|
119
133
|
| --- | --- | --- | --- |
|
package/dist/cli.js
CHANGED
|
@@ -4,7 +4,7 @@ import fs from "node:fs";
|
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
5
|
import { Command } from "commander";
|
|
6
6
|
const program = new Command();
|
|
7
|
-
const FIX_TARGETS = new Set(["files", "exports", "dependencies", "devDependencies", "conditions"]);
|
|
7
|
+
const FIX_TARGETS = new Set(["files", "exports", "dependencies", "devDependencies", "conditions", "json"]);
|
|
8
8
|
// Using @ts-ignore for core imports as CI environments sometimes struggle
|
|
9
9
|
// with subpath exports resolution in strict NodeNext mode.
|
|
10
10
|
// @ts-ignore
|
|
@@ -56,7 +56,7 @@ function getCoreVersion(rootDir) {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
catch (e) { }
|
|
59
|
-
return "1.
|
|
59
|
+
return "1.12.1";
|
|
60
60
|
}
|
|
61
61
|
const cliVersion = getCliVersion();
|
|
62
62
|
const coreVersion = getCoreVersion(process.cwd());
|
|
@@ -82,9 +82,11 @@ program
|
|
|
82
82
|
.option("--sarif", "Output results in SARIF format")
|
|
83
83
|
.option("--skip-3", "Skip Layer 3 (SMT Constraint Solver)")
|
|
84
84
|
.option("--skip-4", "Skip Layer 4 (Concolic Execution Proofs)")
|
|
85
|
-
.option("-v, --verbose", "Show verbose output and internal graph state")
|
|
86
|
-
.option("--fix <rules...>", "Fix selected targets: files, exports, dependencies, devDependencies")
|
|
87
|
-
.option("--
|
|
85
|
+
.option("-v, --verbose", "Show verbose output and internal graph state; with --json includes structured debug diagnostics")
|
|
86
|
+
.option("--fix <rules...>", "Fix selected targets: files, exports, dependencies, devDependencies, conditions, json")
|
|
87
|
+
.option("--fix-json", "Safely repair recoverable package.json JSON errors (equivalent to --fix json)")
|
|
88
|
+
.option("--node-llama-cpp", "Force-enable the dedicated node-llama-cpp semantic analysis plugin")
|
|
89
|
+
.option("--confidence <level>", "Minimum confidence to fix (high, medium+, low+, all)", "high")
|
|
88
90
|
.option("--force", "Allow fixes when the source edit is otherwise considered unsafe")
|
|
89
91
|
.option("--dry-run", "Log what would be fixed without changing files")
|
|
90
92
|
.option("--cache-from <path>", "Path to a JSON file to import cache from before analysis")
|
|
@@ -93,18 +95,24 @@ program
|
|
|
93
95
|
try {
|
|
94
96
|
const isCliOverride = (name) => command.getOptionValueSource(name) === "cli";
|
|
95
97
|
let fixOption = undefined;
|
|
96
|
-
const
|
|
98
|
+
const hasExplicitFix = isCliOverride("fix");
|
|
99
|
+
const hasJsonFix = isCliOverride("fixJson") && !!options.fixJson;
|
|
100
|
+
const hasFixFlags = hasExplicitFix || hasJsonFix || isCliOverride("confidence") || isCliOverride("force") || isCliOverride("dryRun");
|
|
97
101
|
if (hasFixFlags) {
|
|
98
|
-
if (!
|
|
99
|
-
throw new Error("--confidence, --force, and --dry-run require --fix <target...>");
|
|
102
|
+
if (!hasExplicitFix && !hasJsonFix) {
|
|
103
|
+
throw new Error("--confidence, --force, and --dry-run require --fix <target...> or --fix-json");
|
|
100
104
|
}
|
|
101
|
-
const
|
|
105
|
+
const requestedTargets = [
|
|
106
|
+
...(hasExplicitFix ? options.fix : []),
|
|
107
|
+
...(hasJsonFix ? ["json"] : []),
|
|
108
|
+
];
|
|
109
|
+
const invalidTargets = requestedTargets.filter((target) => !FIX_TARGETS.has(target));
|
|
102
110
|
if (invalidTargets.length > 0) {
|
|
103
|
-
throw new Error(`Unknown --fix target(s): ${invalidTargets.join(", ")}. Choose files, exports, dependencies, devDependencies, or
|
|
111
|
+
throw new Error(`Unknown --fix target(s): ${invalidTargets.join(", ")}. Choose files, exports, dependencies, devDependencies, conditions, or json.`);
|
|
104
112
|
}
|
|
105
113
|
fixOption = {
|
|
106
114
|
confidence: options.confidence,
|
|
107
|
-
rules:
|
|
115
|
+
rules: [...new Set(requestedTargets)],
|
|
108
116
|
force: !!options.force,
|
|
109
117
|
dryRun: !!options.dryRun,
|
|
110
118
|
};
|
|
@@ -129,6 +137,7 @@ program
|
|
|
129
137
|
...(isCliOverride("skip3") && { skip3: options.skip3 }),
|
|
130
138
|
...(isCliOverride("skip4") && { skip4: options.skip4 }),
|
|
131
139
|
...(isCliOverride("verbose") && { verbose: options.verbose }),
|
|
140
|
+
...(isCliOverride("nodeLlamaCpp") && { plugins: { "node-llama-cpp-plugin": !!options.nodeLlamaCpp } }),
|
|
132
141
|
...(fixOption !== undefined && { fix: fixOption }),
|
|
133
142
|
...(isCliOverride("cacheFrom") && { cacheFrom: options.cacheFrom }),
|
|
134
143
|
...(isCliOverride("cacheTo") && { cacheTo: options.cacheTo }),
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA,OAAO,IAA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C,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE;IACpC,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;QACjD,MAAM,WAAW,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;QACvC,OAAO,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,wBAAwB,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;IACxE,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,yBAAyB,EAAE,KAAK,CAAC,CAAC;QAChD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "optiprune",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"description": "CLI for resilient static dead-code analyzer for TypeScript and JavaScript workspaces.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"./package.json": "./package.json"
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"@optiprune/core": "^1.
|
|
72
|
+
"@optiprune/core": "^1.12.1",
|
|
73
73
|
"commander": "^15.0.0",
|
|
74
74
|
"pathe": "2.0.3"
|
|
75
75
|
},
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
},
|
|
84
84
|
"scripts": {
|
|
85
85
|
"build": "tsc -p tsconfig.json",
|
|
86
|
-
"test": "node --test tests
|
|
86
|
+
"test": "node --test tests/*.test.mjs",
|
|
87
87
|
"prepublishOnly": "npm run build"
|
|
88
88
|
},
|
|
89
89
|
"license": "MIT",
|