:warning: The Truffle Suite is being sunset. For information on ongoing support, migration options and FAQs, visit the Consensys blog. Thank you for all the support over the years.
Let's extend `VersionCheck` so we can pass a `packageName` property to it to avoid the additional `package.json` file read and parse on every ganache start up.
While `new VersionCheck(version, "ganache")` would work, we need to consider the case were someone wanted to use the `@ganache/cli` package instead of the bundled `ganache` package. In this case should the `packageName`, and thus the `config` itself, be different? Hmmmmmmm. An alternative is to `new VersionCheck(version, process.env.PACKAGE_NAME)` and set `PACKAGE_NAME` in our webpack bundle step.
UPDATE:
I just noticed that `DEFAULTS` already has a `packageName` property we could use for `Conf`'s `packageName` option... though teccchnnnically these values represent different things: one is for the `version-check` server and one is for the config path.
UPDATE 2:
Ugh. So Ganache UI uses `Ganache` for it's configuration location; we probably shouldn't reuse the same folder name for both :sob:. Maybe we should default to `ganache-cli`? Thoughts?
_Originally posted by @davidmurdoch in https://github.com/trufflesuite/ganache/pull/3285#discussion_r942937066_
const versionCheck = new VersionCheck(version);