Do not display package section for version-less private packages
matchai opened this issue · 0 comments
Bug Report
Current Behavior
Shows a ⚠️
symbol when the package version is not defined.
Expected Behavior
Does not show the package section if no version is defined.
Possible Solution
Remove the ⚠️
symbol for version, as was done in spaceship-prompt/spaceship-prompt#441.
🐟 spacefish-bot — Issue copied from: spaceship-prompt/spaceship-prompt#655.
Is your feature request related to a problem? Please describe.
Many applications will use package.json
to track dependencies and scripts but have no intentions of publishing to a package repository. A package version probably does not mean much either in those contexts. It is recommended that such projects set private: true
.
For such projects, seeing a warning symbol in the prompt leads to think something is misconfigured.
Describe the solution you'd like
If package.json
does not contain a version but is marked private, do not display the `package section.
Describe alternatives you've considered
Add a configuration option to opt into this behaviour. I think this should be the default behaviour but could be convinced that it needs an opt in.
Documentation, adoption
Recommend setting private: true
for version-less packages.