rev-dep 2.2.1 → 2.3.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 +13 -29
- package/package.json +4 -4
package/Readme.md
CHANGED
|
@@ -164,6 +164,12 @@ rev-dep entry-points
|
|
|
164
164
|
|
|
165
165
|
Exclude framework entry points if needed using `--result-exclude`.
|
|
166
166
|
|
|
167
|
+
For example exclude Next.js valid entry points when using pages router, exclude scripts directory - scripts are valid entry-points and exclude all test files:
|
|
168
|
+
|
|
169
|
+
```
|
|
170
|
+
rev-dep entry-points --result-exclude "pages/**","scripts/**","**/*.test.*"
|
|
171
|
+
```
|
|
172
|
+
|
|
167
173
|
### **How to list all files imported by an entry point**
|
|
168
174
|
|
|
169
175
|
```
|
|
@@ -261,35 +267,6 @@ V2 comes with bunch of new commands
|
|
|
261
267
|
|
|
262
268
|
Comparing to previous versions, these tsconfig features are not supported
|
|
263
269
|
|
|
264
|
-
#### Config extends
|
|
265
|
-
|
|
266
|
-
If you tsconfig uses extends, and you have some paths defined in config being extended, paths from extended config won't be used during resolution
|
|
267
|
-
|
|
268
|
-
eg.
|
|
269
|
-
|
|
270
|
-
```json
|
|
271
|
-
// tsconfig.json
|
|
272
|
-
{
|
|
273
|
-
"extends": "./tsconfig.base.json",
|
|
274
|
-
"paths": {
|
|
275
|
-
"@/components": ["src/components/*"]
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
```
|
|
279
|
-
|
|
280
|
-
```json
|
|
281
|
-
// tsconfig.base.json
|
|
282
|
-
{
|
|
283
|
-
"paths": {
|
|
284
|
-
"@/utils": ["src/utils/*"]
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
```
|
|
288
|
-
|
|
289
|
-
In that scenario imports with `@/utils` won't be resolved.
|
|
290
|
-
|
|
291
|
-
Why it's not supported ? I consider this typescript capability as an usage edge-case. I forgot to to implement it at the begging and I don't feel like investing more time now, before this package get some reasonable adoption and people will be actually requesting this feature.
|
|
292
|
-
|
|
293
270
|
#### Multiple path aliases
|
|
294
271
|
|
|
295
272
|
Only first path will be used in resolution.
|
|
@@ -356,6 +333,7 @@ rev-dep circular --ignore-types-imports
|
|
|
356
333
|
-t, --ignore-type-imports Exclude type imports from the analysis
|
|
357
334
|
--package-json string Path to package.json (default: ./package.json)
|
|
358
335
|
--tsconfig-json string Path to tsconfig.json (default: ./tsconfig.json)
|
|
336
|
+
-v, --verbose Show warnings and verbose output
|
|
359
337
|
```
|
|
360
338
|
|
|
361
339
|
|
|
@@ -391,6 +369,7 @@ rev-dep entry-points --print-deps-count
|
|
|
391
369
|
--result-exclude strings Exclude files matching these glob patterns from results
|
|
392
370
|
--result-include strings Only include files matching these glob patterns in results
|
|
393
371
|
--tsconfig-json string Path to tsconfig.json (default: ./tsconfig.json)
|
|
372
|
+
-v, --verbose Show warnings and verbose output
|
|
394
373
|
```
|
|
395
374
|
|
|
396
375
|
|
|
@@ -423,6 +402,7 @@ rev-dep files --entry-point src/index.ts
|
|
|
423
402
|
-t, --ignore-type-imports Exclude type imports from the analysis
|
|
424
403
|
--package-json string Path to package.json (default: ./package.json)
|
|
425
404
|
--tsconfig-json string Path to tsconfig.json (default: ./tsconfig.json)
|
|
405
|
+
-v, --verbose Show warnings and verbose output
|
|
426
406
|
```
|
|
427
407
|
|
|
428
408
|
|
|
@@ -625,6 +605,7 @@ rev-dep node-modules missing --entry-points=src/main.ts
|
|
|
625
605
|
--package-json string Path to package.json (default: ./package.json)
|
|
626
606
|
--pkg-fields-with-binaries strings Additional package.json fields to check for binary usages
|
|
627
607
|
--tsconfig-json string Path to tsconfig.json (default: ./tsconfig.json)
|
|
608
|
+
-v, --verbose Show warnings and verbose output
|
|
628
609
|
--zero-exit-code Use this flag to always return zero exit code
|
|
629
610
|
```
|
|
630
611
|
|
|
@@ -663,6 +644,7 @@ rev-dep node-modules unused --exclude-modules=@types/*
|
|
|
663
644
|
--package-json string Path to package.json (default: ./package.json)
|
|
664
645
|
--pkg-fields-with-binaries strings Additional package.json fields to check for binary usages
|
|
665
646
|
--tsconfig-json string Path to tsconfig.json (default: ./tsconfig.json)
|
|
647
|
+
-v, --verbose Show warnings and verbose output
|
|
666
648
|
--zero-exit-code Use this flag to always return zero exit code
|
|
667
649
|
```
|
|
668
650
|
|
|
@@ -703,6 +685,7 @@ rev-dep node-modules used -p src/index.ts --group-by-module
|
|
|
703
685
|
--package-json string Path to package.json (default: ./package.json)
|
|
704
686
|
--pkg-fields-with-binaries strings Additional package.json fields to check for binary usages
|
|
705
687
|
--tsconfig-json string Path to tsconfig.json (default: ./tsconfig.json)
|
|
688
|
+
-v, --verbose Show warnings and verbose output
|
|
706
689
|
```
|
|
707
690
|
|
|
708
691
|
|
|
@@ -738,6 +721,7 @@ rev-dep resolve -p src/index.ts -f src/utils/helpers.ts
|
|
|
738
721
|
-t, --ignore-type-imports Exclude type imports from the analysis
|
|
739
722
|
--package-json string Path to package.json (default: ./package.json)
|
|
740
723
|
--tsconfig-json string Path to tsconfig.json (default: ./tsconfig.json)
|
|
724
|
+
-v, --verbose Show warnings and verbose output
|
|
741
725
|
```
|
|
742
726
|
|
|
743
727
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rev-dep",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.1",
|
|
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.3.1",
|
|
21
|
+
"@rev-dep/linux-x64": "2.3.1",
|
|
22
|
+
"@rev-dep/win32-x64": "2.3.1"
|
|
23
23
|
},
|
|
24
24
|
"keywords": [
|
|
25
25
|
"dependency-analysis",
|