npm-bump icon indicating copy to clipboard operation
npm-bump copied to clipboard

allow ignoring unknown files + tests

Open AubreyHewes opened this issue 9 years ago • 1 comments

allow ignoring unknown files...

a project may contain files that are not ready to be committed (unknown; not yet git added).. this lets you npm-bump even if your project contains unknown files...

Current logic was to break on any output from git status -s .. This change allows execution when the files start with ?? (unknown files; not yet added)..

I had to change some stuff to be able to create tests... As there are not any tests I did not want to refactor the module for easier/normal test support. I have only done the bare minimum to create tests that support the change...

A possible todo is to add a prompt confirming you want to ignore these files.. or just mention the unknown files...

AubreyHewes avatar Sep 07 '16 20:09 AubreyHewes

This seems like it could be done if a file is truly untracked (I don't think we could do it for tracked changed files because of all git resets that are invoked etc.). This seems to introduce some risk, though so I'd like to first setup some test infrastructure for this project (a hard requirement before bumping the version to 0.1.0). This is tracked in #9.

mgol avatar Oct 19 '16 12:10 mgol