feat(package): add support for nimble project package version (#2569)

* feat(nim): add support for nimble project package version

* Replace find_file with context scanner. Fixes the failing tests.

* Replace `utils::exec_cmd` with `context.exec_cmd` so that it uses
global timeout

* Add tests for nimble project version

* Add docs for nimble in package version module for english language

* Update docs/config/README.md

Co-authored-by: David Knaack <davidkna@users.noreply.github.com>

* Add test for a case when nimble is not available

* Remove extract_vlang_version

I don't know why it did not come up while I was fixing merge conflicts
on rebase.

Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
This commit is contained in:
Pratik Chaudhary
2021-05-09 10:23:16 +05:45
committed by GitHub
parent 3b37bcd063
commit f3984eaf16
2 changed files with 135 additions and 8 deletions
+3 -3
View File
@@ -2006,13 +2006,13 @@ symbol = "☁️ "
## Package Version
The `package` module is shown when the current directory is the repository for a
package, and shows its current version. The module currently supports `npm`, `cargo`,
package, and shows its current version. The module currently supports `npm`, `nimble`, `cargo`,
`poetry`, `composer`, `gradle`, `julia`, `mix` and `helm` packages.
- [**npm**](https://docs.npmjs.com/cli/commands/npm) The `npm` package version is extracted from the `package.json` present
in the current directory
- [**cargo**](https://doc.rust-lang.org/cargo/) The `cargo` package version is extracted from the `Cargo.toml` present
in the current directory
- [**cargo**](https://doc.rust-lang.org/cargo/) The `cargo` package version is extracted from the `Cargo.toml` present in the current directory
- [**nimble**](https://github.com/nim-lang/nimble) - The `nimble` package version is extracted from the `*.nimble` file present in the current directory with the `nimble dump` command
- [**poetry**](https://python-poetry.org/) The `poetry` package version is extracted from the `pyproject.toml` present
in the current directory
- [**composer**](https://getcomposer.org/) The `composer` package version is extracted from the `composer.json` present