Kotsu icon indicating copy to clipboard operation
Kotsu copied to clipboard

Fix failing Greenkeeper tests and `package-lockfile.json`

Open ArmorDarks opened this issue 6 years ago • 4 comments

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:

  1. Use official package greenkeeper-lockfile.

    Downsides:

    1. Additional dependency
    2. Requires Github API token setup on CI-side, which makes init of Kotsu longer...
    3. Supports limited amount of CI tools
  2. 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:

    1. That will pass sometimes possible discrepancies caused by different NPM versions in lockfile
    2. Will supports limited amount of CI tools too, because it requires to know which env property to check

ArmorDarks avatar Dec 24 '17 12:12 ArmorDarks