We should upgrade Node.js to version v8.12.0(LTS) and align the other products lisk-build and lisk-commander.
The rationale behind upgrading to version v8.12.0(LTS) are:
package-lock.json, this will allow us to lock down the dependencies versions.6.x is under Maintenance LTS and we want to move to Node.js 8.x which the current Active LTSFollowing is summary of features comes with upgrading from 6.x to 8.x:
package-lock.json and faster package install)Currently, lisk-core supports node.js version v6.14.1 and npm 3.10.10.
1.0.0
Given that this change won't be happening very soon, it should not specify the version so exactly. Node v10 would be more appropriate.
As part of this issue, we should set up the process of Node version upgrade for the future purposes.
Node.js v10.5.0(dubnium) Features:
Status on possible breaking change that might be introduced when we upgrade from v6.14.3 to v.8.11.3:
After investigating the changes that were introduced in node v.8.11.3, the possible breaking change that will be introduced to our application is Buffer in node v.8.11.3
We use Buffer.from function to generate a Hex and utf8, the Buffer.from function in v8.11.3 has been changed to accept invalid hex string meaning
v6.14.3): Buffer.from('abx', 'hex') caused: TypeError: Invalid hex string.v8.11.3): Buffer.from('abx', 'hex') results in: <Buffer ab>.So with the node v8.11.3 these fuctions has changed to ignore invalid hex strings, which is the only possible breaking change that can impact to us that i can see of, otherwise rest all the features are not making any impact
Buffer#write(), Buffer#fill() and Buffer.from() now ignore invalid hex strings.Here is the full list of changes that were introduced from v6.14.3 to v.8.11.3: v6.14.3 ====> v.8.11.3
This issue should be updated to reflect the decision to move to v8 first (with some explanation).
Node.js v8.11.3 Features:
package-lock.json and faster package install)We decided to move to Node v8 first before upgrading to Node v10 straight away, because:
sodium-native is failing for Node v10, but passing for Node v8.The LTS Node v8 version changed https://nodejs.org/download/release/latest-v8.x. on 12-09-2018. I updated the issue description and changed the Node version from v8.11.3 to the latest v8.12.0.
Reopening this issue as the fix was not applied in all places(nvmrc, README, etc.).