fallow 2.72.0 → 2.73.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fallow",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.73.0",
|
|
4
4
|
"description": "Codebase intelligence for TypeScript and JavaScript. Finds unused code, duplication, circular dependencies, complexity hotspots, and architecture drift. Optional runtime intelligence layer (Fallow Runtime) adds production execution evidence. Rust-native, sub-second, 94 framework plugins.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -73,13 +73,13 @@
|
|
|
73
73
|
"@tanstack/intent": "0.0.40"
|
|
74
74
|
},
|
|
75
75
|
"optionalDependencies": {
|
|
76
|
-
"@fallow-cli/darwin-arm64": "2.
|
|
77
|
-
"@fallow-cli/darwin-x64": "2.
|
|
78
|
-
"@fallow-cli/linux-x64-gnu": "2.
|
|
79
|
-
"@fallow-cli/linux-arm64-gnu": "2.
|
|
80
|
-
"@fallow-cli/linux-x64-musl": "2.
|
|
81
|
-
"@fallow-cli/linux-arm64-musl": "2.
|
|
82
|
-
"@fallow-cli/win32-arm64-msvc": "2.
|
|
83
|
-
"@fallow-cli/win32-x64-msvc": "2.
|
|
76
|
+
"@fallow-cli/darwin-arm64": "2.73.0",
|
|
77
|
+
"@fallow-cli/darwin-x64": "2.73.0",
|
|
78
|
+
"@fallow-cli/linux-x64-gnu": "2.73.0",
|
|
79
|
+
"@fallow-cli/linux-arm64-gnu": "2.73.0",
|
|
80
|
+
"@fallow-cli/linux-x64-musl": "2.73.0",
|
|
81
|
+
"@fallow-cli/linux-arm64-musl": "2.73.0",
|
|
82
|
+
"@fallow-cli/win32-arm64-msvc": "2.73.0",
|
|
83
|
+
"@fallow-cli/win32-x64-msvc": "2.73.0"
|
|
84
84
|
}
|
|
85
85
|
}
|
package/schema.json
CHANGED
|
@@ -79,6 +79,13 @@
|
|
|
79
79
|
"$ref": "#/$defs/IgnoreCatalogReferenceRule"
|
|
80
80
|
}
|
|
81
81
|
},
|
|
82
|
+
"ignoreDependencyOverrides": {
|
|
83
|
+
"description": "Rules for suppressing `unused-dependency-override` and\n`misconfigured-dependency-override` findings.\n\nEach rule matches by override target package, optionally scoped to the\ndeclaring source file (`pnpm-workspace.yaml` or `package.json`). Useful\nfor overrides targeting purely-transitive packages (CVE-fix pattern)\nwhere the conservative static algorithm would otherwise cry wolf.",
|
|
84
|
+
"type": "array",
|
|
85
|
+
"items": {
|
|
86
|
+
"$ref": "#/$defs/IgnoreDependencyOverrideRule"
|
|
87
|
+
}
|
|
88
|
+
},
|
|
82
89
|
"ignoreExportsUsedInFile": {
|
|
83
90
|
"description": "Suppress unused-export findings when the exported symbol is referenced\ninside the file that declares it. This mirrors Knip's\n`ignoreExportsUsedInFile` option while still reporting exports that have\nno references at all.",
|
|
84
91
|
"$ref": "#/$defs/IgnoreExportsUsedInFileConfig",
|
|
@@ -158,7 +165,9 @@
|
|
|
158
165
|
"feature-flags": "off",
|
|
159
166
|
"stale-suppressions": "warn",
|
|
160
167
|
"unused-catalog-entries": "warn",
|
|
161
|
-
"unresolved-catalog-references": "error"
|
|
168
|
+
"unresolved-catalog-references": "error",
|
|
169
|
+
"unused-dependency-overrides": "warn",
|
|
170
|
+
"misconfigured-dependency-overrides": "error"
|
|
162
171
|
}
|
|
163
172
|
},
|
|
164
173
|
"boundaries": {
|
|
@@ -566,6 +575,27 @@
|
|
|
566
575
|
"package"
|
|
567
576
|
]
|
|
568
577
|
},
|
|
578
|
+
"IgnoreDependencyOverrideRule": {
|
|
579
|
+
"description": "Rule for suppressing an `unused-dependency-override` or\n`misconfigured-dependency-override` finding.\n\nA finding is suppressed when ALL provided fields match the finding:\n- `package` matches the override's target package name exactly\n (case-sensitive). For parent-chain overrides (`react>react-dom`), the\n target is the rightmost segment (`react-dom`).\n- `source`, if set, scopes the suppression to overrides declared in that\n source file. Accepts `\"pnpm-workspace.yaml\"` or `\"package.json\"`.\n When omitted, both sources match.\n\nTypical use cases:\n- Library-internal CI tooling overrides we cannot drop yet\n- Overrides targeting purely-transitive packages (CVE-fix pattern)",
|
|
580
|
+
"type": "object",
|
|
581
|
+
"properties": {
|
|
582
|
+
"package": {
|
|
583
|
+
"description": "Override target package name (exact match; case-sensitive).",
|
|
584
|
+
"type": "string"
|
|
585
|
+
},
|
|
586
|
+
"source": {
|
|
587
|
+
"description": "Source file scope: `\"pnpm-workspace.yaml\"` or `\"package.json\"`.\n`None` matches both sources.",
|
|
588
|
+
"type": [
|
|
589
|
+
"string",
|
|
590
|
+
"null"
|
|
591
|
+
]
|
|
592
|
+
}
|
|
593
|
+
},
|
|
594
|
+
"additionalProperties": false,
|
|
595
|
+
"required": [
|
|
596
|
+
"package"
|
|
597
|
+
]
|
|
598
|
+
},
|
|
569
599
|
"IgnoreExportsUsedInFileConfig": {
|
|
570
600
|
"description": "Controls whether exports referenced only inside their defining file are\nreported as unused exports.",
|
|
571
601
|
"anyOf": [
|
|
@@ -926,6 +956,14 @@
|
|
|
926
956
|
"unresolved-catalog-references": {
|
|
927
957
|
"$ref": "#/$defs/Severity",
|
|
928
958
|
"default": "error"
|
|
959
|
+
},
|
|
960
|
+
"unused-dependency-overrides": {
|
|
961
|
+
"$ref": "#/$defs/Severity",
|
|
962
|
+
"default": "warn"
|
|
963
|
+
},
|
|
964
|
+
"misconfigured-dependency-overrides": {
|
|
965
|
+
"$ref": "#/$defs/Severity",
|
|
966
|
+
"default": "error"
|
|
929
967
|
}
|
|
930
968
|
}
|
|
931
969
|
},
|
|
@@ -1390,6 +1428,26 @@
|
|
|
1390
1428
|
"type": "null"
|
|
1391
1429
|
}
|
|
1392
1430
|
]
|
|
1431
|
+
},
|
|
1432
|
+
"unused-dependency-overrides": {
|
|
1433
|
+
"anyOf": [
|
|
1434
|
+
{
|
|
1435
|
+
"$ref": "#/$defs/Severity"
|
|
1436
|
+
},
|
|
1437
|
+
{
|
|
1438
|
+
"type": "null"
|
|
1439
|
+
}
|
|
1440
|
+
]
|
|
1441
|
+
},
|
|
1442
|
+
"misconfigured-dependency-overrides": {
|
|
1443
|
+
"anyOf": [
|
|
1444
|
+
{
|
|
1445
|
+
"$ref": "#/$defs/Severity"
|
|
1446
|
+
},
|
|
1447
|
+
{
|
|
1448
|
+
"type": "null"
|
|
1449
|
+
}
|
|
1450
|
+
]
|
|
1393
1451
|
}
|
|
1394
1452
|
}
|
|
1395
1453
|
},
|
package/skills/fallow/SKILL.md
CHANGED
|
@@ -109,7 +109,7 @@ When using fallow via MCP (`fallow-mcp`), the following tools are available:
|
|
|
109
109
|
|------|-------------|
|
|
110
110
|
| `analyze` | Full dead code analysis (unused files/exports/types/dependencies/members + circular dependencies + boundary violations + stale suppressions). Private type leaks are an opt-in API hygiene check via `issue_types: ["private-type-leaks"]`. Set `boundary_violations: true` as a convenience alias for `issue_types: ["boundary-violations"]`. Set `group_by` to `"owner"`, `"directory"`, `"package"`, or `"section"` to partition results. The `section` mode reads GitLab CODEOWNERS `[Section]` headers and emits `owners` metadata per group |
|
|
111
111
|
| `check_changed` | Incremental analysis of files changed since a git ref |
|
|
112
|
-
| `find_dupes` | Code duplication detection. Set `changed_since` to scope to changed files since a git ref |
|
|
112
|
+
| `find_dupes` | Code duplication detection. Set `changed_since` to scope to changed files since a git ref. Set `min_occurrences` (≥ 2, default 2) to hide pair-only clones and focus on widespread copy-paste; JSON gains `stats.clone_groups_below_min_occurrences` when the filter hides anything |
|
|
113
113
|
| `fix_preview` | Dry-run auto-fix preview |
|
|
114
114
|
| `fix_apply` | Apply auto-fixes (destructive) |
|
|
115
115
|
| `check_health` | Complexity metrics, health scores, hotspots, and refactoring targets. Set `group_by` to `owner`, `directory`, `package`, or `section` for per-group `vital_signs` / `health_score`; SARIF results gain `properties.group`, CodeClimate issues gain a top-level `group` field |
|
|
@@ -138,10 +138,11 @@ By default, `fallow dupes` skips generated framework output matching `**/.next/*
|
|
|
138
138
|
|------|------|---------|-------------|
|
|
139
139
|
| `--format` | `human\|json\|sarif\|compact\|markdown\|codeclimate\|gitlab-codequality\|pr-comment-github\|pr-comment-gitlab\|review-github\|review-gitlab` | `human` | Output format |
|
|
140
140
|
| `--quiet` | bool | `false` | Suppress progress bars |
|
|
141
|
-
| `--top` | number | — | Show only the N
|
|
141
|
+
| `--top` | number | — | Show only the N most-duplicated clone groups (sorted by instance count desc, tiebreak: line count desc, then path/line). Summary stats reflect the full project. |
|
|
142
142
|
| `--mode` | `strict\|mild\|weak\|semantic` | `mild` | Detection mode |
|
|
143
143
|
| `--min-tokens` | number | `50` | Minimum token count for a clone |
|
|
144
144
|
| `--min-lines` | number | `5` | Minimum line count for a clone |
|
|
145
|
+
| `--min-occurrences` | number | `2` | Minimum number of occurrences before a clone group is reported (must be ≥ 2). Raise to skip pair-only clones and focus on widespread copy-paste worth refactoring. `fallow init` writes `minOccurrences: 3` into new projects. |
|
|
145
146
|
| `--threshold` | number | `0` | Fail if duplication exceeds this percentage |
|
|
146
147
|
| `--skip-local` | bool | `false` | Only report cross-directory duplicates |
|
|
147
148
|
| `--cross-language` | bool | `false` | Strip type annotations for TS↔JS matching |
|
|
@@ -424,7 +425,7 @@ fallow health --format json --quiet --trend
|
|
|
424
425
|
```json
|
|
425
426
|
{
|
|
426
427
|
"schema_version": 3,
|
|
427
|
-
"version": "2.
|
|
428
|
+
"version": "2.72.0",
|
|
428
429
|
"elapsed_ms": 32,
|
|
429
430
|
"summary": {
|
|
430
431
|
"files_analyzed": 482,
|
|
@@ -810,7 +811,7 @@ fallow audit \
|
|
|
810
811
|
```json
|
|
811
812
|
{
|
|
812
813
|
"schema_version": 3,
|
|
813
|
-
"version": "2.
|
|
814
|
+
"version": "2.72.0",
|
|
814
815
|
"command": "audit",
|
|
815
816
|
"verdict": "fail",
|
|
816
817
|
"changed_files_count": 12,
|
|
@@ -883,7 +884,7 @@ fallow flags --format json --quiet --workspace my-package
|
|
|
883
884
|
```json
|
|
884
885
|
{
|
|
885
886
|
"schema_version": 3,
|
|
886
|
-
"version": "2.
|
|
887
|
+
"version": "2.72.0",
|
|
887
888
|
"elapsed_ms": 116,
|
|
888
889
|
"feature_flags": [],
|
|
889
890
|
"total_flags": 0
|
|
@@ -1302,7 +1303,7 @@ The HTTP layer mirrors the bash `gh_api_retry` / `curl_retry` helpers: `FALLOW_A
|
|
|
1302
1303
|
```json
|
|
1303
1304
|
{
|
|
1304
1305
|
"schema_version": 3,
|
|
1305
|
-
"version": "2.
|
|
1306
|
+
"version": "2.72.0",
|
|
1306
1307
|
"elapsed_ms": 45,
|
|
1307
1308
|
"total_issues": 12,
|
|
1308
1309
|
"entry_points": {
|
|
@@ -1449,7 +1450,7 @@ When `--baseline` is used in combined output, the JSON includes a `baseline_delt
|
|
|
1449
1450
|
```json
|
|
1450
1451
|
{
|
|
1451
1452
|
"schema_version": 3,
|
|
1452
|
-
"version": "2.
|
|
1453
|
+
"version": "2.72.0",
|
|
1453
1454
|
"elapsed_ms": 82,
|
|
1454
1455
|
"total_clones": 15,
|
|
1455
1456
|
"total_lines_duplicated": 230,
|
|
@@ -1493,7 +1494,7 @@ When running `fallow` with no subcommand (all analyses), the JSON output combine
|
|
|
1493
1494
|
{
|
|
1494
1495
|
"check": {
|
|
1495
1496
|
"schema_version": 3,
|
|
1496
|
-
"version": "2.
|
|
1497
|
+
"version": "2.72.0",
|
|
1497
1498
|
"elapsed_ms": 45,
|
|
1498
1499
|
"total_issues": 12,
|
|
1499
1500
|
"unused_files": [],
|
|
@@ -1515,7 +1516,7 @@ When running `fallow` with no subcommand (all analyses), the JSON output combine
|
|
|
1515
1516
|
},
|
|
1516
1517
|
"dupes": {
|
|
1517
1518
|
"schema_version": 3,
|
|
1518
|
-
"version": "2.
|
|
1519
|
+
"version": "2.72.0",
|
|
1519
1520
|
"elapsed_ms": 82,
|
|
1520
1521
|
"total_clones": 15,
|
|
1521
1522
|
"total_lines_duplicated": 230,
|
|
@@ -1524,7 +1525,7 @@ When running `fallow` with no subcommand (all analyses), the JSON output combine
|
|
|
1524
1525
|
},
|
|
1525
1526
|
"health": {
|
|
1526
1527
|
"schema_version": 3,
|
|
1527
|
-
"version": "2.
|
|
1528
|
+
"version": "2.72.0",
|
|
1528
1529
|
"elapsed_ms": 32,
|
|
1529
1530
|
"summary": {},
|
|
1530
1531
|
"findings": [],
|
|
@@ -121,6 +121,14 @@ unused_catalog_entries?: UnusedCatalogEntry[]
|
|
|
121
121
|
* Workspace package.json references to catalogs (catalog: or catalog:<name>) that do not declare the consumed package. pnpm install will error until the named catalog grows to include the package or the reference is switched / removed.
|
|
122
122
|
*/
|
|
123
123
|
unresolved_catalog_references?: UnresolvedCatalogReference[]
|
|
124
|
+
/**
|
|
125
|
+
* Entries in pnpm-workspace.yaml's overrides: section, or package.json's pnpm.overrides block, whose target package no workspace package depends on. Default severity is warn because some entries are intentional pins for transitive CVEs; the hint field flags the cases the conservative algorithm cannot disambiguate.
|
|
126
|
+
*/
|
|
127
|
+
unused_dependency_overrides?: UnusedDependencyOverride[]
|
|
128
|
+
/**
|
|
129
|
+
* pnpm.overrides entries whose key or value does not parse as a valid override spec (empty key, empty value, malformed selector, unbalanced parent matcher). pnpm install will reject these. Default severity is error.
|
|
130
|
+
*/
|
|
131
|
+
misconfigured_dependency_overrides?: MisconfiguredDependencyOverride[]
|
|
124
132
|
entry_points?: EntryPoints
|
|
125
133
|
summary?: CheckSummary
|
|
126
134
|
baseline_deltas?: BaselineDeltas
|
|
@@ -143,7 +151,7 @@ export interface FixAction {
|
|
|
143
151
|
/**
|
|
144
152
|
* Kebab-case identifier for the fix action.
|
|
145
153
|
*/
|
|
146
|
-
type: ("remove-export" | "delete-file" | "remove-dependency" | "move-dependency" | "remove-enum-member" | "remove-class-member" | "resolve-import" | "install-dependency" | "remove-duplicate" | "move-to-dev" | "refactor-cycle" | "refactor-boundary" | "export-type" | "remove-catalog-entry" | "update-catalog-reference" | "add-catalog-entry" | "remove-catalog-reference")
|
|
154
|
+
type: ("remove-export" | "delete-file" | "remove-dependency" | "move-dependency" | "remove-enum-member" | "remove-class-member" | "resolve-import" | "install-dependency" | "remove-duplicate" | "move-to-dev" | "refactor-cycle" | "refactor-boundary" | "export-type" | "remove-catalog-entry" | "update-catalog-reference" | "add-catalog-entry" | "remove-catalog-reference" | "remove-dependency-override" | "fix-dependency-override")
|
|
147
155
|
/**
|
|
148
156
|
* Whether `fallow fix` can apply this fix automatically.
|
|
149
157
|
*/
|
|
@@ -219,12 +227,14 @@ description: string
|
|
|
219
227
|
*/
|
|
220
228
|
config_key: string
|
|
221
229
|
/**
|
|
222
|
-
* Value to add to the config key. Shape depends on `config_key`. For scalar config keys (`ignoreDependencies`, others) this is a string such as `"lodash"`. For `ignoreExports` this is an array of `{ file, exports }` rule objects so the snippet can be merged into the user's config verbatim.
|
|
230
|
+
* Value to add to the config key. Shape depends on `config_key`. For scalar config keys (`ignoreDependencies`, others) this is a string such as `"lodash"`. For `ignoreExports` this is an array of `{ file, exports }` rule objects so the snippet can be merged into the user's config verbatim. For `ignoreCatalogReferences` and `ignoreDependencyOverrides` this is an object whose shape matches the rule entry users add to their fallow config.
|
|
223
231
|
*/
|
|
224
232
|
value: (string | {
|
|
225
233
|
file: string
|
|
226
234
|
exports: string[]
|
|
227
|
-
}[]
|
|
235
|
+
}[] | {
|
|
236
|
+
|
|
237
|
+
})
|
|
228
238
|
/**
|
|
229
239
|
* Optional URL pointing at a stable JSON Schema fragment that describes the shape of `value`. Agents that intend to validate `value` before writing it into a user's config can fetch the linked schema and run it against `value`. The URL is a JSON Pointer fragment into fallow's main config schema (e.g. `schema.json#/properties/ignoreExports` for the ignoreExports action, or `schema.json#/properties/ignoreDependencies/items` for the per-package ignoreDependencies action). Strictly additive: consumers that ignore the field keep working unchanged.
|
|
230
240
|
*/
|
|
@@ -621,6 +631,80 @@ available_in_catalogs?: string[]
|
|
|
621
631
|
actions?: IssueAction[]
|
|
622
632
|
introduced?: AuditIntroduced
|
|
623
633
|
}
|
|
634
|
+
/**
|
|
635
|
+
* A pnpm.overrides entry whose target package is not declared in any workspace package.json (directly or as a declared parent in a parent>child override). May still be intentional for a transitive CVE pin; see `hint`.
|
|
636
|
+
*/
|
|
637
|
+
export interface UnusedDependencyOverride {
|
|
638
|
+
/**
|
|
639
|
+
* Full original override key as written (e.g. 'react>react-dom', '@types/react@<18').
|
|
640
|
+
*/
|
|
641
|
+
raw_key: string
|
|
642
|
+
/**
|
|
643
|
+
* Target package the override rewrites (rightmost segment for parent>child keys).
|
|
644
|
+
*/
|
|
645
|
+
target_package: string
|
|
646
|
+
/**
|
|
647
|
+
* Optional parent package (left side of `>`). Omitted for bare-target keys.
|
|
648
|
+
*/
|
|
649
|
+
parent_package?: string
|
|
650
|
+
/**
|
|
651
|
+
* Optional version selector on the target (e.g. '<18' for '@types/react@<18'). Omitted when absent.
|
|
652
|
+
*/
|
|
653
|
+
version_constraint?: string
|
|
654
|
+
/**
|
|
655
|
+
* Right-hand side of the entry: the version pnpm should force.
|
|
656
|
+
*/
|
|
657
|
+
version_range: string
|
|
658
|
+
/**
|
|
659
|
+
* File the override was declared in. Matches the value users write in `ignoreDependencyOverrides[].source`.
|
|
660
|
+
*/
|
|
661
|
+
source: ("pnpm-workspace.yaml" | "package.json")
|
|
662
|
+
/**
|
|
663
|
+
* Relative path to the source file.
|
|
664
|
+
*/
|
|
665
|
+
path: string
|
|
666
|
+
/**
|
|
667
|
+
* 1-based line number of the entry.
|
|
668
|
+
*/
|
|
669
|
+
line: number
|
|
670
|
+
/**
|
|
671
|
+
* Soft hint for cases the conservative algorithm cannot disambiguate (e.g. a transitive CVE pin not visible to static analysis). Omitted when absent.
|
|
672
|
+
*/
|
|
673
|
+
hint?: string
|
|
674
|
+
actions?: IssueAction[]
|
|
675
|
+
introduced?: AuditIntroduced
|
|
676
|
+
}
|
|
677
|
+
/**
|
|
678
|
+
* A pnpm.overrides entry whose key or value does not parse as a valid pnpm override spec. `pnpm install` will reject these.
|
|
679
|
+
*/
|
|
680
|
+
export interface MisconfiguredDependencyOverride {
|
|
681
|
+
/**
|
|
682
|
+
* Full original override key as written.
|
|
683
|
+
*/
|
|
684
|
+
raw_key: string
|
|
685
|
+
/**
|
|
686
|
+
* Right-hand side of the entry, exactly as written. Empty when the value was missing.
|
|
687
|
+
*/
|
|
688
|
+
raw_value: string
|
|
689
|
+
/**
|
|
690
|
+
* Classifier for the misconfiguration. 'unparsable-key' = the key is not a valid pnpm shape; 'empty-value' = the value is missing, empty, or contains line breaks.
|
|
691
|
+
*/
|
|
692
|
+
reason: ("unparsable-key" | "empty-value")
|
|
693
|
+
/**
|
|
694
|
+
* File the override was declared in.
|
|
695
|
+
*/
|
|
696
|
+
source: ("pnpm-workspace.yaml" | "package.json")
|
|
697
|
+
/**
|
|
698
|
+
* Relative path to the source file.
|
|
699
|
+
*/
|
|
700
|
+
path: string
|
|
701
|
+
/**
|
|
702
|
+
* 1-based line number of the entry.
|
|
703
|
+
*/
|
|
704
|
+
line: number
|
|
705
|
+
actions?: IssueAction[]
|
|
706
|
+
introduced?: AuditIntroduced
|
|
707
|
+
}
|
|
624
708
|
/**
|
|
625
709
|
* Entry point detection summary showing total detected entry points and their sources.
|
|
626
710
|
*/
|
|
@@ -656,6 +740,8 @@ boundary_violations?: number
|
|
|
656
740
|
stale_suppressions?: number
|
|
657
741
|
unused_catalog_entries?: number
|
|
658
742
|
unresolved_catalog_references?: number
|
|
743
|
+
unused_dependency_overrides?: number
|
|
744
|
+
misconfigured_dependency_overrides?: number
|
|
659
745
|
}
|
|
660
746
|
/**
|
|
661
747
|
* Per-category delta comparison against a saved baseline. Shows current count, baseline count, and delta for each category.
|