Kotsu
Kotsu copied to clipboard
Fix failing Greenkeeper tests and `package-lockfile.json`
Constantly failing Greenkeeper tests due to modified files checks and always modified package-lockfile.json
starts to be really annoying.
It becomes even worse, when the user uses NPM older than the one used in the CI tools, since package-lockfile.json
in some version has a different order and that results in different output after npm install
.
Right now there are two ways to fix this:
-
Use official package greenkeeper-lockfile.
Downsides:
- Additional dependency
- Requires Github API token setup on CI-side, which makes init of Kotsu longer...
- Supports limited amount of CI tools
-
Ignore
package-lock.json
changes during modified files tests if the current environment is Greenkeeper.This is easily done that way, by checking
env
properties which CI tools exposing.Downsides:
- That will pass sometimes possible discrepancies caused by different NPM versions in lockfile
- Will supports limited amount of CI tools too, because it requires to know which
env
property to check