rev-dep 2.17.0 → 2.19.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 +39 -0
- package/bin.js +15 -0
- package/package.json +4 -4
package/Readme.md
CHANGED
|
@@ -798,6 +798,8 @@ rev-dep config run [flags]
|
|
|
798
798
|
--follow-monorepo-packages strings Enable resolution of imports from monorepo workspace packages. Pass without value to follow all, or pass package names
|
|
799
799
|
--format string Output format (json, issues-list)
|
|
800
800
|
-h, --help help for run
|
|
801
|
+
--lint-config config lint Also lint the config after running; prints only error/warning counts and fails (non-zero exit) on any lint error. Use config lint for details and --fix
|
|
802
|
+
--lint-config-rules strings Which lint rules to run with --lint-config (comma-separated). Default: all. Implies --lint-config
|
|
801
803
|
--list-all-issues List all issues instead of limiting output
|
|
802
804
|
--package-json string Path to package.json (default: ./package.json)
|
|
803
805
|
--recheck Run all checks again after '--fix' to validate the final state
|
|
@@ -827,6 +829,43 @@ rev-dep config init [flags]
|
|
|
827
829
|
```
|
|
828
830
|
|
|
829
831
|
|
|
832
|
+
### rev-dep config lint
|
|
833
|
+
|
|
834
|
+
Report (and optionally remove) config glob/path patterns that match nothing
|
|
835
|
+
|
|
836
|
+
#### Synopsis
|
|
837
|
+
|
|
838
|
+
Scan a (.)rev-dep.config.json(c) for "dead" glob and path patterns — ignore
|
|
839
|
+
patterns, entry point patterns, rule paths, graph excludes, denied files/modules and
|
|
840
|
+
similar — that no longer match any discovered file or module. Over time configs
|
|
841
|
+
accumulate patterns for files that were renamed or deleted; this command surfaces them
|
|
842
|
+
so the config stays lean.
|
|
843
|
+
|
|
844
|
+
With --fix, dead patterns are removed in place, preserving all comments and formatting.
|
|
845
|
+
Some patterns are reported but never auto-removed because deleting them could change a
|
|
846
|
+
check's behavior or make the config invalid — rule paths, required entry points / files
|
|
847
|
+
/ modules, and module-boundary selectors. These are marked "not auto-removed"; resolve
|
|
848
|
+
them by hand.
|
|
849
|
+
|
|
850
|
+
```
|
|
851
|
+
rev-dep config lint [flags]
|
|
852
|
+
```
|
|
853
|
+
|
|
854
|
+
#### Options
|
|
855
|
+
|
|
856
|
+
```
|
|
857
|
+
--condition-names strings List of conditions for package.json imports resolution (e.g. node, imports, default)
|
|
858
|
+
-c, --cwd string Working directory (default "$PWD")
|
|
859
|
+
--fix Remove dead patterns from the config file (preserves comments and formatting)
|
|
860
|
+
--follow-monorepo-packages strings Enable resolution of imports from monorepo workspace packages. Pass without value to follow all, or pass package names
|
|
861
|
+
-h, --help help for lint
|
|
862
|
+
--package-json string Path to package.json (default: ./package.json)
|
|
863
|
+
--rules strings Lint rules to run (comma-separated): orphan-file-globs, orphan-module-globs, overlapping-globs, trailing-commas, compact. Default: all. orphan-file-globs/overlapping-globs use file discovery; orphan-module-globs parses the dependency tree; trailing-commas and compact only read the config file.
|
|
864
|
+
--tsconfig-json string Path to tsconfig.json (default: ./tsconfig.json)
|
|
865
|
+
-v, --verbose Show warnings and verbose output
|
|
866
|
+
```
|
|
867
|
+
|
|
868
|
+
|
|
830
869
|
### rev-dep entry-points
|
|
831
870
|
|
|
832
871
|
Discover and list all entry points in the project
|
package/bin.js
CHANGED
|
@@ -54,6 +54,21 @@ if (!fs.existsSync(binary)) {
|
|
|
54
54
|
process.exit(1)
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
+
// config init needs interactive terminal
|
|
58
|
+
const positionalArgs = binaryArgs.filter((arg) => !arg.startsWith('-'))
|
|
59
|
+
const isConfigInit = positionalArgs[0] === 'config' && positionalArgs[1] === 'init'
|
|
60
|
+
const isInteractiveTerminal = Boolean(process.stdin.isTTY && process.stdout.isTTY)
|
|
61
|
+
|
|
62
|
+
if (isConfigInit && isInteractiveTerminal) {
|
|
63
|
+
const interactive = cp.spawnSync(binary, binaryArgs, { stdio: 'inherit' })
|
|
64
|
+
if (interactive.error) {
|
|
65
|
+
console.error(interactive.error.message)
|
|
66
|
+
process.exit(1)
|
|
67
|
+
}
|
|
68
|
+
// status is null when the child was killed by a signal; treat that as a failure.
|
|
69
|
+
process.exit(interactive.status === null ? 1 : interactive.status)
|
|
70
|
+
}
|
|
71
|
+
|
|
57
72
|
try {
|
|
58
73
|
const binaryArgsWrapped = binaryArgs.map((arg) => `"${arg}"`)
|
|
59
74
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rev-dep",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.19.0",
|
|
4
4
|
"description": "Trace imports, detect unused code, clean dependencies — all with a super-fast CLI",
|
|
5
5
|
"bin": "bin.js",
|
|
6
6
|
"files": [
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
"node": ">=18"
|
|
18
18
|
},
|
|
19
19
|
"optionalDependencies": {
|
|
20
|
-
"@rev-dep/darwin-arm64": "2.
|
|
21
|
-
"@rev-dep/linux-x64": "2.
|
|
22
|
-
"@rev-dep/win32-x64": "2.
|
|
20
|
+
"@rev-dep/darwin-arm64": "2.19.0",
|
|
21
|
+
"@rev-dep/linux-x64": "2.19.0",
|
|
22
|
+
"@rev-dep/win32-x64": "2.19.0"
|
|
23
23
|
},
|
|
24
24
|
"keywords": [
|
|
25
25
|
"dependency-analysis",
|