diff options
author | Thomas O'Donnell <andytom@users.noreply.github.com> | 2021-08-06 21:16:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-06 21:16:14 +0200 |
commit | b7b7df98854b2d4ff9c5f2fdddc796449cdab908 (patch) | |
tree | c80814bf0e41351c48892981c0b931f588850698 /docs | |
parent | 3ea425318bd262c287db9346831d41422e976fb8 (diff) |
feat(package): Add ability to format the version (#2959)
Have added the ability to use format the version of the package using
the `version_format` option. While doing this I have also done some
refactoring of the module to remove the if/else if/... block and replace
it with an iterator. This should make fix some edge cases where versions
are not correctly picked up due to other files an example would be a
python project that has a `pyproject.toml` file but using the
`setup.cfg` for the package version. It should also make it easier to
make the order of the list configurable in the future.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/config/README.md | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/docs/config/README.md b/docs/config/README.md index e4fe6b1de..f32c0b231 100644 --- a/docs/config/README.md +++ b/docs/config/README.md @@ -2139,13 +2139,14 @@ package, and shows its current version. The module currently supports `npm`, `ni ### Options -| Option | Default | Description | -| ----------------- | ---------------------------------- | ---------------------------------------------------------- | -| `format` | `"is [$symbol$version]($style) "` | The format for the module. | -| `symbol` | `"📦 "` | The symbol used before displaying the version the package. | -| `style` | `"bold 208"` | The style for the module. | -| `display_private` | `false` | Enable displaying version for packages marked as private. | -| `disabled` | `false` | Disables the `package` module. | +| Option | Default | Description | +| ----------------- | ---------------------------------- | ------------------------------------------------------------------------ | +| `format` | `"is [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"📦 "` | The symbol used before displaying the version the package. | +| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch`| +| `style` | `"bold 208"` | The style for the module. | +| `display_private` | `false` | Enable displaying version for packages marked as private. | +| `disabled` | `false` | Disables the `package` module. | ### Variables |