Skip to content

Commit

Permalink
Auto merge of #6890 - rwwagner90:dag, r=Turbo87
Browse files Browse the repository at this point in the history
Replace lib/utilities/DAG.js with dag-map package

Resolves #6881
  • Loading branch information
homu committed Mar 24, 2017
2 parents 06891ff + 141b2c5 commit bcd7cd1
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 181 deletions.
10 changes: 5 additions & 5 deletions lib/models/addons-factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@module ember-cli
*/

const DAG = require('../utilities/DAG');
const DAGMap = require('dag-map').default;
let logger = require('heimdalljs-logger')('ember-cli:addons-factory');
const heimdall = require('heimdalljs');

Expand All @@ -27,7 +27,7 @@ class AddonsFactory {
let addonParentName = typeof addonParent.name === 'function' ? addonParent.name() : addonParent.name;

let initializeAddonsToken = heimdall.start(`${addonParentName}: initializeAddons`);
let graph = new DAG();
let graph = new DAGMap();
const Addon = require('../models/addon');
let addonInfo, emberAddonConfig;

Expand All @@ -38,12 +38,12 @@ class AddonsFactory {
addonInfo = addonPackages[name];
emberAddonConfig = addonInfo.pkg['ember-addon'];

graph.addEdges(name, addonInfo, emberAddonConfig.before, emberAddonConfig.after);
graph.add(name, addonInfo, emberAddonConfig.before, emberAddonConfig.after);
}

let addons = [];
graph.topsort(vertex => {
let addonInfo = vertex.value;
graph.each((key, value) => {
let addonInfo = value;
if (addonInfo) {
let initializeAddonToken = heimdall.start({
name: `initialize ${addonInfo.name}`,
Expand Down
176 changes: 0 additions & 176 deletions lib/utilities/DAG.js

This file was deleted.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"configstore": "^3.0.0",
"console-ui": "^1.0.2",
"core-object": "^3.0.0",
"dag-map": "^2.0.2",
"diff": "^3.2.0",
"ember-cli-broccoli-sane-watcher": "^2.0.4",
"ember-cli-get-component-path-option": "^1.0.0",
Expand Down
4 changes: 4 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1295,6 +1295,10 @@ d@^0.1.1, d@~0.1.1:
dependencies:
es5-ext "~0.10.2"

dag-map@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/dag-map/-/dag-map-2.0.2.tgz#9714b472de82a1843de2fba9b6876938cab44c68"

debug@2, debug@^2.1.0, debug@^2.1.1, debug@^2.1.3, debug@^2.2.0:
version "2.6.2"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.2.tgz#dfa96a861ee9b8c2f29349b3bcc41aa599a71e0f"
Expand Down

0 comments on commit bcd7cd1

Please sign in to comment.