fallow 3.11.0 → 3.13.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/capabilities.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fallow",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.13.0",
|
|
4
4
|
"manifest_version": "1",
|
|
5
5
|
"description": "Codebase analyzer for TypeScript/JavaScript: unused code, circular dependencies, code duplication, complexity hotspots, and architecture boundary violations",
|
|
6
6
|
"global_flags": [
|
|
@@ -133,7 +133,6 @@
|
|
|
133
133
|
"type": "string",
|
|
134
134
|
"required": false,
|
|
135
135
|
"description": "How `--baseline` matches health findings: per file and category (`count`, the default) or per function identity (`identity`, strict, and only against a baseline that was saved with `--baseline-mode identity`; such a baseline still reads in count mode)",
|
|
136
|
-
"default": "count",
|
|
137
136
|
"possible_values": [
|
|
138
137
|
"count",
|
|
139
138
|
"identity"
|
|
@@ -490,6 +489,16 @@
|
|
|
490
489
|
"false"
|
|
491
490
|
]
|
|
492
491
|
},
|
|
492
|
+
{
|
|
493
|
+
"name": "--no-type-aware",
|
|
494
|
+
"type": "bool",
|
|
495
|
+
"required": false,
|
|
496
|
+
"description": "Disable TypeScript semantic analysis even when `typeAware.enabled` or `FALLOW_TYPE_AWARE` opts in, keeping this run fully syntactic",
|
|
497
|
+
"possible_values": [
|
|
498
|
+
"true",
|
|
499
|
+
"false"
|
|
500
|
+
]
|
|
501
|
+
},
|
|
493
502
|
{
|
|
494
503
|
"name": "--type-aware-project",
|
|
495
504
|
"type": "string",
|
|
@@ -5928,6 +5937,7 @@
|
|
|
5928
5937
|
"FALLOW_EXTENDS_TIMEOUT_SECS": "Timeout in seconds for fetching https:// configs referenced via the extends field (default 5).",
|
|
5929
5938
|
"FALLOW_COVERAGE": "Path to Istanbul coverage data (coverage-final.json) for accurate per-function CRAP scores. CLI --coverage flag overrides this.",
|
|
5930
5939
|
"FALLOW_MAX_FILE_SIZE": "Per-file size ceiling in megabytes for source discovery (default 5; 0 = no limit). CLI --max-file-size flag overrides this.",
|
|
5940
|
+
"FALLOW_TYPE_AWARE": "Enable or disable TypeScript semantic (type-aware) analysis for the run (true/false/1/0/yes/no/on/off). Precedence: --type-aware/--no-type-aware CLI flags, then FALLOW_TYPE_AWARE, then the audit.typeAware config field, then typeAware.enabled.",
|
|
5931
5941
|
"FALLOW_AUDIT_BASE": "Pins the fallow audit comparison base ref when no --base/--changed-since is passed (e.g. upstream/main).",
|
|
5932
5942
|
"FALLOW_AUDIT_CACHE_MAX_AGE_DAYS": "GC threshold in days for reusable audit base-snapshot caches (default 30; 0 disables the sweep).",
|
|
5933
5943
|
"FALLOW_IMPACT_STORE_MAX_AGE_DAYS": "GC threshold in days for per-project fallow impact stores; a recorded run reclaims stores older than this (unset/0 keeps every store forever).",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fallow",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.13.0",
|
|
4
4
|
"description": "Codebase intelligence for TypeScript and JavaScript. Free static analysis of code and styles, optional paid runtime intelligence (Fallow Runtime). Quality, risk, architecture, dependencies, duplication, and design-system drift for humans, CI, and the agents writing your code. Zero-config framework support.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -87,14 +87,14 @@
|
|
|
87
87
|
"@tanstack/intent": "0.3.6"
|
|
88
88
|
},
|
|
89
89
|
"optionalDependencies": {
|
|
90
|
-
"@fallow-cli/darwin-arm64": "3.
|
|
91
|
-
"@fallow-cli/darwin-x64": "3.
|
|
92
|
-
"@fallow-cli/linux-x64-gnu": "3.
|
|
93
|
-
"@fallow-cli/linux-arm64-gnu": "3.
|
|
94
|
-
"@fallow-cli/linux-x64-musl": "3.
|
|
95
|
-
"@fallow-cli/linux-arm64-musl": "3.
|
|
96
|
-
"@fallow-cli/win32-arm64-msvc": "3.
|
|
97
|
-
"@fallow-cli/win32-x64-msvc": "3.
|
|
98
|
-
"fallow-type-aware": "3.
|
|
90
|
+
"@fallow-cli/darwin-arm64": "3.13.0",
|
|
91
|
+
"@fallow-cli/darwin-x64": "3.13.0",
|
|
92
|
+
"@fallow-cli/linux-x64-gnu": "3.13.0",
|
|
93
|
+
"@fallow-cli/linux-arm64-gnu": "3.13.0",
|
|
94
|
+
"@fallow-cli/linux-x64-musl": "3.13.0",
|
|
95
|
+
"@fallow-cli/linux-arm64-musl": "3.13.0",
|
|
96
|
+
"@fallow-cli/win32-arm64-msvc": "3.13.0",
|
|
97
|
+
"@fallow-cli/win32-x64-msvc": "3.13.0",
|
|
98
|
+
"fallow-type-aware": "3.13.0"
|
|
99
99
|
}
|
|
100
100
|
}
|
package/schema.json
CHANGED
|
@@ -2705,6 +2705,13 @@
|
|
|
2705
2705
|
],
|
|
2706
2706
|
"format": "uint32",
|
|
2707
2707
|
"minimum": 0
|
|
2708
|
+
},
|
|
2709
|
+
"typeAware": {
|
|
2710
|
+
"description": "Overrides the top-level `typeAware.enabled` opt-in for `fallow audit` only: set `false` to keep persistent type-aware analysis on for cleanup commands (`dead-code`, `fix`, `health`) while the audit gate stays syntactic, or `true` to enable it for audit alone. Unset inherits `typeAware.enabled`. The `--type-aware`/`--no-type-aware` CLI flags and the `FALLOW_TYPE_AWARE` environment variable both take precedence over this field.",
|
|
2711
|
+
"type": [
|
|
2712
|
+
"boolean",
|
|
2713
|
+
"null"
|
|
2714
|
+
]
|
|
2708
2715
|
}
|
|
2709
2716
|
}
|
|
2710
2717
|
},
|
|
@@ -517,7 +517,7 @@ fallow health --format json --quiet --trend
|
|
|
517
517
|
{
|
|
518
518
|
"kind": "health",
|
|
519
519
|
"schema_version": 7,
|
|
520
|
-
"version": "3.
|
|
520
|
+
"version": "3.13.0",
|
|
521
521
|
"elapsed_ms": 32,
|
|
522
522
|
"summary": {
|
|
523
523
|
"files_analyzed": 482,
|
|
@@ -915,7 +915,7 @@ fallow audit \
|
|
|
915
915
|
{
|
|
916
916
|
"kind": "audit",
|
|
917
917
|
"schema_version": 7,
|
|
918
|
-
"version": "3.
|
|
918
|
+
"version": "3.13.0",
|
|
919
919
|
"command": "audit",
|
|
920
920
|
"verdict": "fail",
|
|
921
921
|
"changed_files_count": 12,
|
|
@@ -992,7 +992,7 @@ fallow flags --format json --quiet --workspace my-package
|
|
|
992
992
|
```json
|
|
993
993
|
{
|
|
994
994
|
"schema_version": 7,
|
|
995
|
-
"version": "3.
|
|
995
|
+
"version": "3.13.0",
|
|
996
996
|
"elapsed_ms": 116,
|
|
997
997
|
"feature_flags": [],
|
|
998
998
|
"total_flags": 0
|
|
@@ -1093,7 +1093,7 @@ fallow security --gate newly-reachable --changed-since origin/main
|
|
|
1093
1093
|
{
|
|
1094
1094
|
"kind": "security",
|
|
1095
1095
|
"schema_version": "4",
|
|
1096
|
-
"version": "3.
|
|
1096
|
+
"version": "3.13.0",
|
|
1097
1097
|
"elapsed_ms": 42,
|
|
1098
1098
|
"config": {
|
|
1099
1099
|
"rules": {
|
|
@@ -1122,7 +1122,7 @@ fallow security --gate newly-reachable --changed-since origin/main
|
|
|
1122
1122
|
{
|
|
1123
1123
|
"kind": "security",
|
|
1124
1124
|
"schema_version": "4",
|
|
1125
|
-
"version": "3.
|
|
1125
|
+
"version": "3.13.0",
|
|
1126
1126
|
"elapsed_ms": 42,
|
|
1127
1127
|
"config": {
|
|
1128
1128
|
"rules": {
|
|
@@ -1681,7 +1681,7 @@ Available on all commands:
|
|
|
1681
1681
|
| `--churn-file` | `string` | - | Import change history from a `fallow-churn/v1` JSON file instead of `git log`, powering hotspots, ownership, and bus-factor on projects with no git repository (Yandex Arc, Mercurial, Perforce). A small wrapper translates your VCS log into the contract. Resolved relative to `--root`. Affects `health --hotspots` / `--ownership` / `--targets` only; `audit`, `impact`, and `--changed-since` still require git |
|
|
1682
1682
|
| `--max-file-size` | `string` | - | Skip source files larger than this many megabytes (default 5) instead of parsing them, guarding against the out-of-memory blowup a single multi-MB generated/vendored/bundled file causes on large repos. Use `0` for no limit. Declaration files (`.d.ts`) are always analyzed. Skipped files are reported and excluded from every analysis. Also settable via `FALLOW_MAX_FILE_SIZE` |
|
|
1683
1683
|
| `--baseline` | `string` | - | Compare to baseline |
|
|
1684
|
-
| `--baseline-mode` | `count\|identity` |
|
|
1684
|
+
| `--baseline-mode` | `count\|identity` | - | How `--baseline` matches health findings: per file and category (`count`, the default) or per function identity (`identity`, strict, and only against a baseline saved with `--baseline-mode identity`; such a baseline still reads in count mode). Identity is file path plus function name, so renaming or moving a function that is still in the baseline reports it as new; re-save after that kind of refactor. |
|
|
1685
1685
|
| `--parent-run` | `string` | - | Correlate this run with a previous telemetry analysis run |
|
|
1686
1686
|
| `--save-baseline` | `string` | - | Save results as baseline |
|
|
1687
1687
|
| `--production` | `bool` | `false` | Exclude test/dev files, only start/build scripts (applies to every analysis) |
|
|
@@ -1723,6 +1723,7 @@ Available on all commands:
|
|
|
1723
1723
|
| `--coverage-root` | `string` | - | Absolute prefix to strip from Istanbul file paths in combined mode. Also settable via `FALLOW_COVERAGE_ROOT` or `health.coverageRoot` |
|
|
1724
1724
|
| `--include-entry-exports` | `bool` | `false` | Report unused exports in entry files instead of auto-marking them as used |
|
|
1725
1725
|
| `--type-aware` | `bool` | `false` | Opt in to TypeScript semantic analysis for project-wide symbol evidence. This does not emit compiler diagnostics or typed lint findings |
|
|
1726
|
+
| `--no-type-aware` | `bool` | `false` | Disable TypeScript semantic analysis even when `typeAware.enabled` or `FALLOW_TYPE_AWARE` opts in, keeping this run fully syntactic |
|
|
1726
1727
|
| `--type-aware-project` | `string` | - | TypeScript project config to use for type-aware analysis (repeatable) |
|
|
1727
1728
|
| `--type-aware-require` | `best-effort\|complete` | - | Decide whether incomplete type-aware analysis is advisory or gating |
|
|
1728
1729
|
<!-- generated:flags:global:end -->
|
|
@@ -1779,6 +1780,7 @@ These are global flags with behavior specific to bare `fallow` combined mode.
|
|
|
1779
1780
|
| `FALLOW_CACHE_MAX_SIZE` | Maximum on-disk extraction cache (`.fallow/cache.bin`) size in megabytes (default: `256`). Triggers LRU eviction when crossed. Wins over `cache.maxSizeMb` config field. Intended for CI runners with disk quotas. `--no-cache` short-circuits this knob. |
|
|
1780
1781
|
| `FALLOW_COVERAGE` | Path to Istanbul coverage data for exact CRAP scoring in `health`, `audit`, and bare `fallow`. |
|
|
1781
1782
|
| `FALLOW_COVERAGE_ROOT` | Absolute coverage-data prefix to strip before matching Istanbul paths in `health`, `audit`, and bare `fallow`. |
|
|
1783
|
+
| `FALLOW_TYPE_AWARE` | Enable or disable TypeScript semantic (type-aware) analysis for the run. Accepts `true`/`false`/`1`/`0`/`yes`/`no`/`on`/`off`; any other value is a hard error. Sits mid-chain in the precedence: the `--type-aware`/`--no-type-aware` CLI flags win over it, and it wins over the `audit.typeAware` config field, which wins over `typeAware.enabled`. |
|
|
1782
1784
|
| `FALLOW_AUDIT_BASE` | Pin the `fallow audit` comparison base when `--base` / `--changed-since` is unset (precedence: flag > env > auto-detect). Escape hatch for the agent gate and forks, e.g. `FALLOW_AUDIT_BASE=upstream/main`. When unset, audit auto-detects the `git merge-base` against the branch's upstream or the remote default. A malformed value exits 2. |
|
|
1783
1785
|
| `FALLOW_AUDIT_CACHE_MAX_AGE_DAYS` | Max age (in days since last reuse or fresh create) of a persistent reusable `fallow audit` base-snapshot worktree cache. Older entries are reclaimed at the top of the next `fallow audit` invocation (default: `30`). Wins over `audit.cacheMaxAgeDays` config field. `0` disables the GC; invalid values silently fall back to config / default. |
|
|
1784
1786
|
| `FALLOW_UPDATE_CHECK` | Set to `off`, `0`, `false`, `disabled`, or `no` to disable the human-TTY upgrade nudge and its background latest-version check. `DO_NOT_TRACK`, `FALLOW_TELEMETRY_DISABLED`, and CI also suppress it. |
|
|
@@ -1884,7 +1886,7 @@ The HTTP layer mirrors the bash `gh_api_retry` / `curl_retry` helpers: `FALLOW_A
|
|
|
1884
1886
|
{
|
|
1885
1887
|
"kind": "dead-code",
|
|
1886
1888
|
"schema_version": 7,
|
|
1887
|
-
"version": "3.
|
|
1889
|
+
"version": "3.13.0",
|
|
1888
1890
|
"elapsed_ms": 45,
|
|
1889
1891
|
"total_issues": 12,
|
|
1890
1892
|
"entry_points": {
|
|
@@ -2044,7 +2046,7 @@ When `--baseline` is used in combined output, the JSON includes a `baseline_delt
|
|
|
2044
2046
|
{
|
|
2045
2047
|
"kind": "dupes",
|
|
2046
2048
|
"schema_version": 7,
|
|
2047
|
-
"version": "3.
|
|
2049
|
+
"version": "3.13.0",
|
|
2048
2050
|
"elapsed_ms": 82,
|
|
2049
2051
|
"total_clones": 15,
|
|
2050
2052
|
"total_lines_duplicated": 230,
|
|
@@ -2088,11 +2090,11 @@ When running `fallow` with no subcommand (all analyses), the JSON output combine
|
|
|
2088
2090
|
{
|
|
2089
2091
|
"kind": "combined",
|
|
2090
2092
|
"schema_version": 7,
|
|
2091
|
-
"version": "3.
|
|
2093
|
+
"version": "3.13.0",
|
|
2092
2094
|
"elapsed_ms": 159,
|
|
2093
2095
|
"check": {
|
|
2094
2096
|
"schema_version": 7,
|
|
2095
|
-
"version": "3.
|
|
2097
|
+
"version": "3.13.0",
|
|
2096
2098
|
"elapsed_ms": 45,
|
|
2097
2099
|
"total_issues": 12,
|
|
2098
2100
|
"unused_files": [],
|
|
@@ -780,7 +780,7 @@ Manual files:
|
|
|
780
780
|
Prefer `fallow hooks install --target agent` to install this file. The script is written and maintained by fallow itself; the canonical source is [`crates/cli/src/setup_hooks/fallow-gate.sh`](https://github.com/fallow-rs/fallow/blob/main/crates/cli/src/setup_hooks/fallow-gate.sh).
|
|
781
781
|
|
|
782
782
|
Behavior you can rely on:
|
|
783
|
-
- Runs only when the intercepted command
|
|
783
|
+
- Runs only when the intercepted command is a `git commit` or `git push`, including invocations that pass git-level options before the subcommand (`git -c user.name=x commit`, `git --no-pager commit`, `git -C dir push`, `git --git-dir=/x push`); anything else exits 0. Set `FALLOW_GATE_DEBUG=1` to log skipped commands to stderr.
|
|
784
784
|
- Resolves `fallow` from PATH first, then `npx --no-install fallow` as a fallback. Skips with a stderr notice if neither is available or if `jq` is missing.
|
|
785
785
|
- Enforces a version floor via `FALLOW_GATE_MIN_VERSION` (default `2.85.0`). Binaries below the floor are blocked with an upgrade hint. Set the env var to the empty string to disable the check.
|
|
786
786
|
- Runs `fallow audit --format json --quiet --explain --gate-marker agent` and, on verdict=`fail`, writes the full JSON envelope to stderr preceded by `fallow-gate: blocked by fallow <version> at <binary>` so the responsible binary is always identifiable. The gate marker lets local Impact record blocked-then-cleared agent gate events when Impact is enabled.
|
|
@@ -5328,6 +5328,53 @@ istanbul_total?: (number | null)
|
|
|
5328
5328
|
severity_critical_count: number
|
|
5329
5329
|
severity_high_count: number
|
|
5330
5330
|
severity_moderate_count: number
|
|
5331
|
+
/**
|
|
5332
|
+
* Baseline staleness data, present only when a baseline was loaded.
|
|
5333
|
+
*/
|
|
5334
|
+
baseline_staleness?: (HealthBaselineStaleness | null)
|
|
5335
|
+
}
|
|
5336
|
+
/**
|
|
5337
|
+
* Staleness of a loaded health baseline.
|
|
5338
|
+
*
|
|
5339
|
+
* Reports how many saved complexity and CRAP finding entries still matched a
|
|
5340
|
+
* current finding on this run, so consumers can see a rotting baseline before
|
|
5341
|
+
* it degrades to zero overlap. Runtime-coverage suppressions and refactoring
|
|
5342
|
+
* target keys carried by the same baseline are not counted here. Present in
|
|
5343
|
+
* the summary only when a baseline was loaded.
|
|
5344
|
+
*/
|
|
5345
|
+
export interface HealthBaselineStaleness {
|
|
5346
|
+
/**
|
|
5347
|
+
* Complexity and CRAP finding entries carried by the loaded baseline.
|
|
5348
|
+
*/
|
|
5349
|
+
baseline_entries: number
|
|
5350
|
+
/**
|
|
5351
|
+
* Entries that matched a current finding in the active baseline mode,
|
|
5352
|
+
* including entries matched through a followed file move.
|
|
5353
|
+
*/
|
|
5354
|
+
matched_entries: number
|
|
5355
|
+
/**
|
|
5356
|
+
* Entries that matched no current finding on this run.
|
|
5357
|
+
*/
|
|
5358
|
+
stale_entries: number
|
|
5359
|
+
/**
|
|
5360
|
+
* Entries that matched only by following a file move in identity mode.
|
|
5361
|
+
* Always zero in count mode.
|
|
5362
|
+
*/
|
|
5363
|
+
moved_entries: number
|
|
5364
|
+
/**
|
|
5365
|
+
* True when this run analyzed a subset of the project (changed-file,
|
|
5366
|
+
* diff, or workspace scoping), so the baseline was compared against a
|
|
5367
|
+
* narrowed finding set and staleness cannot be judged. `stale` is always
|
|
5368
|
+
* false on scoped runs.
|
|
5369
|
+
*/
|
|
5370
|
+
change_scoped: boolean
|
|
5371
|
+
/**
|
|
5372
|
+
* True exactly when the run was not change-scoped, at least one current
|
|
5373
|
+
* finding existed before baseline filtering, and `stale_entries` reached
|
|
5374
|
+
* a quarter of `baseline_entries`. Mirrors the human warning so machine
|
|
5375
|
+
* consumers do not have to reimplement the threshold.
|
|
5376
|
+
*/
|
|
5377
|
+
stale: boolean
|
|
5331
5378
|
}
|
|
5332
5379
|
/**
|
|
5333
5380
|
* Report entry describing whether a threshold override is active, stale, or
|