File tree Expand file tree Collapse file tree 2 files changed +32
-3
lines changed
Expand file tree Collapse file tree 2 files changed +32
-3
lines changed Original file line number Diff line number Diff line change @@ -199,6 +199,38 @@ Some commands may remind you to run `nimble refresh` or will run it for you if t
199199
200200
201201
202+ ## ` nimble deps `
203+
204+ The ` nimble deps ` command displays the dependency tree of the current package.
205+ It shows all direct and transitive dependencies along with their version requirements and resolved versions.
206+
207+ ``` sh
208+ $ nimble deps
209+ ```
210+
211+ The output format is:
212+
213+ ```
214+ {PackageName} {Requirements} (@{Resolved Version})
215+ ```
216+
217+ For example:
218+
219+ ```
220+ mypackage (@1.0.0)
221+ ├── jester @>= 0.5.0 (@0.6.0)
222+ │ └── httpbeast @>= 0.4.0 (@0.4.1)
223+ └── chronicles @any (@0.10.3)
224+ ```
225+
226+ ### Options
227+
228+ - ` --format:json ` - Output the dependency tree in JSON format for programmatic use.
229+ - ` -i ` or ` --inverted ` - Show an inverted dependency tree where each package lists which packages depend on it.
230+ - ` -d ` or ` --direct ` - Show only direct dependencies (no transitive dependencies).
231+
232+
233+
202234## ` nimble path `
203235
204236The ` nimble path ` command will show the absolute path to the installed packages matching the specified parameters.
Original file line number Diff line number Diff line change @@ -41,7 +41,6 @@ proc printDepsHumanReadable*(pkgInfo: PackageInfo,
4141 # # print human readable tree deps
4242 # #
4343 if levelInfos.len () == 0 :
44- displayInfo (" Dependency tree format: {PackageName} {Requirements} (@{Resolved Version})" )
4544 displayFormatted (Hint , " \n " )
4645 displayFormatted (Message , pkgInfo.basicInfo.name, " " )
4746 displayFormatted (Success , " (@" , $ pkgInfo.basicInfo.version, " )" )
@@ -99,8 +98,6 @@ proc printDepsHumanReadableInverted*(pkgInfo: PackageInfo,
9998 isRoot = pkgs.len () == 0
10099
101100 if isRoot:
102- displayInfo (" Dependency tree format: {PackageName} (@{Resolved Version})" )
103- displayInfo (" Dependency tree format: {Source Package} {Source Requirements}" )
104101 displayFormatted (Hint , " \n " )
105102 displayFormatted (Message , pkgInfo.basicInfo.name, " " )
106103 displayFormatted (Success , " (@" , $ pkgInfo.basicInfo.version, " )" )
You can’t perform that action at this time.
0 commit comments