-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Core: add managed ganache version info to the output of truffle version #4686
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Might want to check about what to do about BUNDLE_VERSION
before merging though.
#4671 uses |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @lsqproduction !
Oh, I missed the distinction there, thanks! In that case my opinion is that it should probably be moved up to global. I don't know that it makes a big difference though. |
packages/core/.eslintrc.json
Outdated
"extends": ["../../.eslintrc.package.json"] | ||
"extends": ["../../.eslintrc.package.json"], | ||
"globals": { | ||
"BUNDLE_VERSION":"readonly" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a nit, can you add a space after the :
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okie thank you for catching it.
packages/core/lib/version.js
Outdated
@@ -60,9 +60,15 @@ const logWeb3 = (logger = console) => { | |||
logger.log(`Web3.js v${web3Version}`); | |||
}; | |||
|
|||
const logGanache = (logger = console) => { | |||
const ganacheVersion = pkg.dependencies.ganache; | |||
logger.log(`Ganache V${ganacheVersion}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one more nit, how would you feel about making the V
lowercase so it matches the format that we print web3's version in?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okie I will make the change.
I will keep it at the package level then. |
96598d9
to
fc7de09
Compare
Resolved issue #4678 by reading from Truffle's package.json for Ganache's version number.
Once Ganache adds .version, we can make a change to use that instead.
Also, BUNDLE_VERSION is causing an eslint no-undef rule complaint, this variable is now on the package level eslintrc.json, should this be moved to global eslintrc.json?