Package version package¶
This section is rendered asynchronously by default
Note
This is the version of the package you are working with, not the version of the package manager itself. Many people use the term project instead of package and in this context it is the same thing.
Attention
This section uses external tools for retrieving package versions.
We use yq, jq, python or node to parse package version in JSON/YAML/TOML/XML files. Install jq and/or yq to get more info from this section.
The package section shows when the current directory is a package.
Supported package managers¶
Currently, these package managers are supported:
npm— version formpackage.jsonfile. Private packages are detected.lerna— version fromlerna.jsonfile.cargo— version fromCargo.tomlfile.cargo pkgidis used to detect the version, which depends onCargo.lock. Runcargo buildto generateCargo.lockif version is not shown.composer— version fromcomposer.jsonfile.julia— version fromProject.tomlfile.maven— version frommvncommand.gradle— version fromgradlecommand.python— version frompyproject.toml, either insetuptoolsorpoetryformat.dart— version from thepubspec.yamlfile.
Options¶
| Variable | Default | Meaning |
|---|---|---|
SPACESHIP_PACKAGE_SHOW |
true |
Show section |
SPACESHIP_PACKAGE_ASYNC |
true |
Render section asynchronously |
SPACESHIP_PACKAGE_SHOW_PRIVATE |
false |
Show when a package is private |
SPACESHIP_PACKAGE_PREFIX |
is· |
Section's prefix |
SPACESHIP_PACKAGE_SUFFIX |
$SPACESHIP_PROMPT_DEFAULT_SUFFIX |
Section's suffix |
SPACESHIP_PACKAGE_SYMBOL |
📦· |
Symbol displayed before the section |
SPACESHIP_PACKAGE_COLOR |
red |
Section's color |