Skip to content

Commit

Permalink
build(deps): bump viz.js from 1.8.2 to 2.1.2
Browse files Browse the repository at this point in the history
Bumps [viz.js](https://github.com/mdaines/viz.js) from 1.8.2 to 2.1.2.
- [Release notes](https://github.com/mdaines/viz.js/releases)
- [Commits](mdaines/viz-js@v1.8.2...v2.1.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
  • Loading branch information
dependabot-preview[bot] authored and michaelsbradleyjr committed Mar 6, 2020
1 parent 1a4eaab commit d98edd5
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 25 deletions.
1 change: 0 additions & 1 deletion packages/embark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@
"simples": "0.8.8",
"source-map-support": "0.5.16",
"term.js": "0.0.7",
"viz.js": "1.8.2",
"vm2": "3.6.4",
"web3": "1.2.6",
"web3-bzz": "1.2.6",
Expand Down
17 changes: 9 additions & 8 deletions packages/embark/src/cmd/cmd_controller.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Config, Events, fs, TemplateGenerator } from 'embark-core';
import { Engine } from 'embark-engine';
import { __ } from 'embark-i18n';
import { dappPath, joinPath, setUpEnv, warnIfPackageNotDefinedLocally } from 'embark-utils';
import { dappPath, joinPath, setUpEnv } from 'embark-utils';
import { Logger, LogLevels } from 'embark-logger';
let async = require('async');
const constants = require('embark-core/constants');
Expand Down Expand Up @@ -544,10 +544,6 @@ class EmbarkController {
engine.logger.info(__("loaded plugins") + ": " + pluginList.join(", "));
}

if (warnIfPackageNotDefinedLocally("embark-graph", engine.logger.error) !== true) {
process.exit(1);
}

engine.startEngine(async () => {
let contractsFiles = await engine.events.request2("config:contractsFiles");
let compiledContracts = await engine.events.request2("compiler:contracts:compile", contractsFiles);
Expand All @@ -562,13 +558,18 @@ class EmbarkController {
if (err) {
engine.logger.error(err.message);
engine.logger.info(err.stack);
process.exit(1);
} else {
engine.events.request("graph:create", options, () => {
engine.events.request("graph:create", options, (err) => {
if (err) {
engine.logger.error(err.message);
engine.logger.info(err.stack);
process.exit(1);
}
engine.logger.info(__("Done. %s generated", options.output).underline);
process.exit(0);
});
}

process.exit(err ? 1 : 0);
});

}
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/graph/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"async": "3.2.0",
"core-js": "3.4.3",
"embark-utils": "^5.3.0-nightly.5",
"viz.js": "1.8.2"
"viz.js": "2.1.2"
},
"devDependencies": {
"embark-solo": "^5.2.3",
Expand Down
16 changes: 8 additions & 8 deletions packages/plugins/graph/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { warnIfPackageNotDefinedLocally } from 'embark-utils';

const async = require('async');
const Viz = require('viz.js');
const { Module, render } = require('viz.js/full.render.js');

class GraphGenerator {
constructor(embark, _options) {
Expand Down Expand Up @@ -123,22 +124,21 @@ class GraphGenerator {
next();
},
function (next) {
let dot = `
const dot = `
digraph Contracts {
node[shape=record,style=filled]
edge[dir=back, arrowtail=empty]
${contractString}
${relationshipString}
}`;

let svg = Viz(dot);

self.embark.fs.writeFileSync(options.output, svg, (err) => {
if (err) throw err;
next();
});
const viz = new Viz({ Module, render });
viz.renderString(dot)
.then(svg => self.embark.fs.writeFile(options.output, svg, next))
.catch(next);
}
], function(_err, _result) {
], function(err) {
if (err) return cb(err);
cb();
});
}
Expand Down
3 changes: 1 addition & 2 deletions packages/plugins/specialconfigs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@
"async": "3.2.0",
"core-js": "3.4.3",
"embark-i18n": "^5.3.0-nightly.5",
"string-replace-async": "1.2.1",
"viz.js": "1.8.2"
"string-replace-async": "1.2.1"
},
"devDependencies": {
"@babel/core": "7.8.6",
Expand Down
1 change: 0 additions & 1 deletion packages/plugins/transaction-tracker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
"@babel/runtime-corejs3": "7.8.4",
"async": "3.2.0",
"core-js": "3.4.3",
"viz.js": "1.8.2",
"web3": "1.2.6"
},
"devDependencies": {
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -23466,10 +23466,10 @@ verror@1.10.0:
core-util-is "1.0.2"
extsprintf "^1.2.0"

viz.js@1.8.2:
version "1.8.2"
resolved "https://registry.yarnpkg.com/viz.js/-/viz.js-1.8.2.tgz#d9cc04cd99f98ec986bf9054db76a6cbcdc5d97a"
integrity sha512-W+1+N/hdzLpQZEcvz79n2IgUE9pfx6JLdHh3Kh8RGvLL8P1LdJVQmi2OsDcLdY4QVID4OUy+FPelyerX0nJxIQ==
viz.js@2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/viz.js/-/viz.js-2.1.2.tgz#6f09cd4e10af28754a6d50b055bd2e4a7693983a"
integrity sha512-UO6CPAuEMJ8oNR0gLLNl+wUiIzQUsyUOp8SyyDKTqVRBtq7kk1VnFmIZW8QufjxGrGEuI+LVR7p/C7uEKy0LQw==

vm-browserify@^1.0.1:
version "1.1.0"
Expand Down

0 comments on commit d98edd5

Please sign in to comment.