It move the `spawnSync` usage to only a single place which is simpler to maintain.
It also simplify testing as there is no more need to mock an external dep
All this variables were used to check if user was running Yarn and do this accordingly.
Now we use the factory to get the "right" version of JsPackageManager instance so there is no need to worry anywhere about that.
The goal of this will be to use the Factory Pattern to encapsulate everything specific to a package manager in a single class.
Then a factory will return an instance of NPM, Yarn or Yarn 2 proxy class according to the package manager used/prefered in end project.
All CLI code will be package manager agnostic and will just call functions of JsPackageManager interface.