feat: support Node.js v12.x and newer

Remove the `<12.0.0` restriction re: Node.js version in the `"engines"`
settings for all the packages in the monorepo that had that restriction.

Add missing `"engines"` settings in `packages/plugins/snark/package.json`.

Adjust the Azure Pipelines config to include builds for Node.js v12.x and
v13.x.

Bump `solc` to `0.4.26` in `dapps/tests/app` and `dapps/tests/contracts`. It
was discovered that older versions suffered a fatal `Maximum call stack size
exceeded` error when run on Windows with Node.js v12.x or newer. Display a
warning re: the bad combo (solc version + Windows + Node version) if it's
detected at runtime.

Adjust the root `yarn.lock` so that the `sha3` transitive dependency resolves
to a newer version that is compatible with Node v13.x.
This commit is contained in:
Michael Bradley, Jr 2020-01-17 11:32:32 -06:00 committed by Michael Bradley
parent a2244019c9
commit c093cf88ea
76 changed files with 110 additions and 76 deletions

View File

@ -5,6 +5,8 @@ variables:
YARN_CACHE_FOLDER: $(Pipeline.Workspace)/.yarn
ipfsVersion: '0.4.22'
node10: '^10.17.0'
node12: '^12.0.0'
node13: '^13.0.0'
pythonVersion: '2.7.x'
yarnVersion: '1.19.1'
@ -19,6 +21,24 @@ strategy:
Node 10 / Windows:
nodeVersion: $(node10)
imageName: 'vs2017-win2016'
Node 12 / Linux:
nodeVersion: $(node12)
imageName: 'ubuntu-18.04'
Node 12 / macOS:
nodeVersion: $(node12)
imageName: 'macos-10.14'
Node 12 / Windows:
nodeVersion: $(node12)
imageName: 'vs2017-win2016'
Node 13 / Linux:
nodeVersion: $(node13)
imageName: 'ubuntu-18.04'
Node 13 / macOS:
nodeVersion: $(node13)
imageName: 'macos-10.14'
Node 13 / Windows:
nodeVersion: $(node13)
imageName: 'vs2017-win2016'
pool:
vmImage: $(imageName)

View File

@ -15,7 +15,7 @@
"buildDir": "dist/",
"config": "config/",
"versions": {
"solc": "0.4.25"
"solc": "0.4.26"
},
"plugins": {
"embark-dapp-test-service": {}

View File

@ -1,7 +1,7 @@
{
"default": {
"versions": {
"solc": "0.4.24"
"solc": "0.4.26"
},
"dappConnection": [
"$EMBARK",

View File

@ -12,7 +12,7 @@
"namesystem": "ens.json"
},
"versions": {
"solc": "0.4.24"
"solc": "0.4.26"
},
"plugins": {
}

View File

@ -16,7 +16,7 @@
"semver": "5.6.0"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
},

View File

@ -56,7 +56,7 @@
"rimraf": "3.0.0"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -120,7 +120,7 @@
]
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -74,7 +74,7 @@
"typescript": "3.7.2"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
},

View File

@ -72,7 +72,7 @@
"typescript": "3.7.2"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
},

View File

@ -79,7 +79,7 @@
"typescript": "3.7.2"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -103,7 +103,7 @@
"typescript": "3.7.2"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -58,7 +58,7 @@
"typescript": "3.7.2"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -56,7 +56,7 @@
"rimraf": "3.0.0"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -39,7 +39,7 @@
"npm-run-all": "4.1.5"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -84,7 +84,7 @@
"typescript": "3.7.2"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -158,13 +158,13 @@
"sinon": "4.5.0"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
},
"runtime": {
"engines": {
"node": ">=10.17.0 <12.0.0"
"node": ">=10.17.0"
}
}
}

View File

@ -82,7 +82,7 @@
"web3": "1.2.4"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -61,7 +61,7 @@
"rimraf": "3.0.0"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -59,7 +59,7 @@
"rimraf": "3.0.0"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -60,7 +60,7 @@
"rimraf": "3.0.0"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -59,7 +59,7 @@
"rimraf": "3.0.0"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -60,7 +60,7 @@
"rimraf": "3.0.0"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -63,7 +63,7 @@
"typescript": "3.7.2"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -96,7 +96,7 @@
"rimraf": "3.0.0"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
},

View File

@ -73,7 +73,7 @@
"typescript": "3.7.2"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -57,7 +57,7 @@
"typescript": "3.7.2"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -62,7 +62,7 @@
"sinon": "7.4.1"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
},

View File

@ -95,7 +95,7 @@
}
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -62,7 +62,7 @@
"rimraf": "3.0.0"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -55,7 +55,7 @@
"rimraf": "3.0.0"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -68,7 +68,7 @@
"typescript": "3.7.2"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -56,7 +56,7 @@
"rimraf": "3.0.0"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -66,7 +66,7 @@
"rimraf": "3.0.0"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -68,7 +68,7 @@
"source-map-support": "0.5.13"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -60,7 +60,7 @@
"rimraf": "3.0.0"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -62,7 +62,7 @@
"rimraf": "3.0.0"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -48,7 +48,7 @@
"rimraf": "3.0.0"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -58,7 +58,7 @@
"rimraf": "3.0.0"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -67,7 +67,7 @@
"typescript": "3.7.2"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
},

View File

@ -64,7 +64,7 @@
"typescript": "3.7.2"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -101,5 +101,10 @@
},
"prettier": {
"singleQuote": true
},
"engines": {
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}
}

View File

@ -57,7 +57,7 @@
"rimraf": "3.0.0"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -69,7 +69,7 @@
"source-map-support": "0.5.13"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -62,7 +62,7 @@
"rimraf": "3.0.0"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -1,6 +1,7 @@
import { __ } from 'embark-i18n';
import { ProcessLauncher } from 'embark-core';
import { dappPath, joinPath, toForwardSlashes } from 'embark-utils';
const semver = require('semver');
const uuid = require('uuid/v1');
class SolcW {
@ -69,6 +70,14 @@ class SolcW {
this.solcProcess.once("result", "initiated", () => {
this.events.request("version:get:solc", (solcVersion) => {
if (semver.lte(solcVersion, '0.4.25') &&
process.platform === 'win32' &&
semver.gte(process.version, '12.0.0')) {
this.logger.warn([
'Versions of the solc package older than 0.4.26 are known to have',
'problems running on Windows with Node.js v12.x and newer.'
].join(' '));
}
if (solcVersion === this.embark.config.package.dependencies.solc) {
return this.solcProcess.send({action: 'loadCompiler', requirePath: 'solc'});
}

View File

@ -57,7 +57,7 @@
"rimraf": "3.0.0"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -66,7 +66,7 @@
"rimraf": "3.0.0"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -66,7 +66,7 @@
"typescript": "3.7.2"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -56,7 +56,7 @@
"rimraf": "3.0.0"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -57,7 +57,7 @@
"rimraf": "3.0.0"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -61,7 +61,7 @@
"rimraf": "3.0.0"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -61,7 +61,7 @@
"web3": "1.2.4"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -61,7 +61,7 @@
"web3": "1.2.4"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -69,7 +69,7 @@
"typescript": "3.7.2"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -58,7 +58,7 @@
"rimraf": "3.0.0"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -55,7 +55,7 @@
"rimraf": "3.0.0"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -69,7 +69,7 @@
"typescript": "3.7.2"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
},

View File

@ -64,7 +64,7 @@
"rimraf": "3.0.0"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
},

View File

@ -63,7 +63,7 @@
"typescript": "3.7.2"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
},

View File

@ -66,7 +66,7 @@
"typescript": "3.7.2"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -64,7 +64,7 @@
"rimraf": "3.0.0"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
},

View File

@ -57,7 +57,7 @@
"rimraf": "3.0.0"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -60,7 +60,7 @@
"web3": "1.2.4"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -56,7 +56,7 @@
"rimraf": "3.0.0"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -61,7 +61,7 @@
"rimraf": "3.0.0"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -55,7 +55,7 @@
"rimraf": "3.0.0"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -69,7 +69,7 @@
"typescript": "3.7.2"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -61,7 +61,7 @@
"rimraf": "3.0.0"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -76,7 +76,7 @@
"source-map-support": "0.5.13"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -57,7 +57,7 @@
"rimraf": "3.0.0"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -64,7 +64,7 @@
"rimraf": "3.0.0"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -71,7 +71,7 @@
"typescript": "3.7.2"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -14,7 +14,7 @@
"rimraf": "3.0.0"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -19,7 +19,7 @@
"rimraf": "3.0.0"
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -81,7 +81,7 @@
}
},
"engines": {
"node": ">=10.17.0 <12.0.0",
"node": ">=10.17.0",
"npm": ">=6.11.3",
"yarn": ">=1.19.1"
}

View File

@ -19082,9 +19082,9 @@ sha.js@^2.4.0, sha.js@^2.4.8:
safe-buffer "^5.0.1"
sha3@^1.2.2:
version "1.2.3"
resolved "https://registry.yarnpkg.com/sha3/-/sha3-1.2.3.tgz#ed5958fa8331df1b1b8529ca9fdf225a340c5418"
integrity sha512-sOWDZi8cDBRkLfWOw18wvJyNblXDHzwMGnRWut8zNNeIeLnmMRO17bjpLc7OzMuj1ASUgx2IyohzUCAl+Kx5vA==
version "1.2.6"
resolved "https://registry.yarnpkg.com/sha3/-/sha3-1.2.6.tgz#102aa3e47dc793e2357902c3cce8760822f9e905"
integrity sha512-KgLGmJGrmNB4JWVsAV11Yk6KbvsAiygWJc7t5IebWva/0NukNrjJqhtKhzy3Eiv2AKuGvhZZt7dt1mDo7HkoiQ==
dependencies:
nan "2.13.2"