fix(@embark/library-manager): add web3 to versions list

This is needed by the cockpit for the communication component
This commit is contained in:
Jonathan Rainville 2019-11-20 11:57:56 -05:00
parent ebdd573548
commit 3c760c3515
2 changed files with 5 additions and 1 deletions

View File

@ -53,7 +53,8 @@
"embark-solo": "^5.0.0-alpha.0", "embark-solo": "^5.0.0-alpha.0",
"eslint": "5.7.0", "eslint": "5.7.0",
"npm-run-all": "4.1.5", "npm-run-all": "4.1.5",
"rimraf": "3.0.0" "rimraf": "3.0.0",
"web3": "1.2.1"
}, },
"engines": { "engines": {
"node": ">=10.17.0 <12.0.0", "node": ">=10.17.0 <12.0.0",

View File

@ -1,5 +1,6 @@
import { __ } from 'embark-i18n'; import { __ } from 'embark-i18n';
import { dappPath, embarkPath, normalizePath, toForwardSlashes } from 'embark-utils'; import { dappPath, embarkPath, normalizePath, toForwardSlashes } from 'embark-utils';
import web3 from 'web3';
const Npm = require('./npm.js'); const Npm = require('./npm.js');
const {callbackify} = require('util'); const {callbackify} = require('util');
@ -45,6 +46,8 @@ class LibraryManager {
this.versions['solc'] = solcVersionInConfig; this.versions['solc'] = solcVersionInConfig;
this.versions.web3 = web3.version;
Object.keys(this.versions).forEach(versionKey => { Object.keys(this.versions).forEach(versionKey => {
if (!this.isVersionable(versionKey)) return; if (!this.isVersionable(versionKey)) return;
const newVersion = this.versions[versionKey].trim(); const newVersion = this.versions[versionKey].trim();