<commit_before>"use strict";

var path = require('path')
var prime = require('prime')
var WrapUpGraphvizRequireError = require('../errors').GraphvizRequireError
var relative = require('../util').relative

var output = prime({

    inherits: require('./'),

    relativeModules: function(){
        var modules = {}
        for (var fullpath in this.modules){
            var mod = this.modules[fullpath]
            if (mod.err) return
            modules[relative(fullpath)] = mod.deps.map(function(dep){
                for (var fullpath in this.modules){
                    if (this.modules[fullpath].uid === dep) return relative(fullpath)
                }
            }, this)
        }
        return modules
    },


    up: function(callback){

        var graphviz, options = this._options
        var modules = this.relativeModules()

        try {
            graphviz = require('graphviz')
        } catch (err){
            return callback(new WrapUpGraphvizRequireError())
        }

        var graph = graphviz.digraph("G")

        for (var x in modules){
            graph.addNode(x)
            var deps = modules[x]
            deps.forEach(function(dep){<commit_msg>Ignore unresolved dependencies in the graph output<commit_after>"use strict";

var path = require('path')
var prime = require('prime')
var WrapUpGraphvizRequireError = require('../errors').GraphvizRequireError
var relative = require('../util').relative

var output = prime({

    inherits: require('./'),

    relativeModules: function(){
        var modules = {}
        for (var fullpath in this.modules){
            var mod = this.modules[fullpath]
            if (mod.err) return
            modules[relative(fullpath)] = mod.deps.filter(function(dep){
                return !!dep
            }).map(function(dep){
                for (var fullpath in this.modules){
                    if (this.modules[fullpath].uid === dep) return relative(fullpath)
                }
            }, this)
        }
        return modules
    },


    up: function(callback){

        var graphviz, options = this._options
        var modules = this.relativeModules()

        try {
            graphviz = require('graphviz')
        } catch (err){
            return callback(new WrapUpGraphvizRequireError())
        }

        var graph = graphviz.digraph("G")

        for (var x in modules){
            graph.addNode(x)
            var deps = modules[x]
            deps.forEach(function(dep){
{'fraction_non_alphanumeric': 0.118192819685357, 'fraction_numerical': 0.0, 'mean_word_length': 1.9771908763505401, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1957894', 'n_tokens_mistral': 677, 'n_tokens_neox': 656, 'n_words': 166}