spacefish icon indicating copy to clipboard operation
spacefish copied to clipboard

Do not display package section for version-less private packages

Open matchai opened this issue 5 years ago • 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 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.

matchai avatar May 21 '19 17:05 matchai