mirror of
https://github.com/starship/starship.git
synced 2026-06-22 02:02:12 +07:00
feat(package): Extract package version from PEP 621 compliant pyproject.toml (#3950)
* feat(package): Extract package version from PEP621 pyproject.toml * Update docs explaining PEP 621 package version * Only read pyproject.toml once * Simplify get_pep621_version * Handle version formatting in get_pyproject_version
This commit is contained in:
@@ -2503,7 +2503,7 @@ symbol = "☁️ "
|
||||
|
||||
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`, `nimble`, `cargo`,
|
||||
`poetry`, `composer`, `gradle`, `julia`, `mix`, `helm`, `shards` and `dart` packages.
|
||||
`poetry`, `python`, `composer`, `gradle`, `julia`, `mix`, `helm`, `shards` and `dart` packages.
|
||||
|
||||
- [**npm**](https://docs.npmjs.com/cli/commands/npm) – The `npm` package version is extracted from the `package.json` present
|
||||
in the current directory
|
||||
@@ -2511,7 +2511,7 @@ package, and shows its current version. The module currently supports `npm`, `ni
|
||||
- [**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
|
||||
- [**Python**](https://www.python.org) - The `python` package version is extracted from the `setup.cfg` present in the current directory
|
||||
- [**Python**](https://www.python.org) - The `python` package version is extracted from a [PEP 621](https://peps.python.org/pep-0621/) compliant `pyproject.toml` or a `setup.cfg` present in the current directory
|
||||
- [**Composer**](https://getcomposer.org/) – The `composer` package version is extracted from the `composer.json` present
|
||||
in the current directory
|
||||
- [**Gradle**](https://gradle.org/) – The `gradle` package version is extracted from the `build.gradle` present
|
||||
|
||||
Reference in New Issue
Block a user