matchai / spacefish

🚀🐟 The fish shell prompt for astronauts
https://spacefish.matchai.dev
MIT License
963 stars 77 forks source link

Do not display package section for version-less private packages #193

Open matchai opened 5 years ago

matchai commented 5 years ago

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 https://github.com/denysdovhan/spaceship-prompt/pull/441.

🐟 spacefish-bot — Issue copied from: https://github.com/denysdovhan/spaceship-prompt/issues/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.