<commit_before>import async from 'async'
import chalk from 'chalk'
import path from 'path'

import duration from '../../duration'
import * as log from '../../log'
import hoisting from '../../hoisting'
import { withBase as createGraph } from '../../graph/create'

import createTaskInstall from '../../tasks/install'
import taskTouch, { print as touchInfo } from '../../tasks/touch'

export default function runFix(dependencies, end) {
    createGraph(path.resolve('.'), (err, nodes, layers, nodeBase) => {
        if (err) {
            end(err)
            return
        }

        log.info(`using hoisting base ${chalk.yellow(nodeBase.name)}`)

        const { dependencyFixing } = hoisting(
            nodeBase.packageJson,
            nodeBase.reachable.map(({ packageJson }) => packageJson),
            dependencies
        )

        const canFixAll = dependencyFixing.every(entry => entry.canFix)

        const dependencyDelta = {
            dependencies: dependencyFixing
                .filter(entry => entry.canFix === true)
                .reduce(
                    (result, { name, version }) => ({
                        ...result,<commit_msg>Error output on harmony --fix<commit_after>import async from 'async'
import chalk from 'chalk'
import path from 'path'

import duration from '../../duration'
import * as log from '../../log'
import hoisting from '../../hoisting'
import { withBase as createGraph } from '../../graph/create'

import createTaskInstall from '../../tasks/install'
import taskTouch, { print as touchInfo } from '../../tasks/touch'

export default function runFix(dependencies, end) {
    createGraph(path.resolve('.'), (err, nodes, layers, nodeBase) => {
        if (err) {
            log.failure(err)
            end(err)
            return
        }

        log.info(`using hoisting base ${chalk.yellow(nodeBase.name)}`)

        const { dependencyFixing } = hoisting(
            nodeBase.packageJson,
            nodeBase.reachable.map(({ packageJson }) => packageJson),
            dependencies
        )

        const canFixAll = dependencyFixing.every(entry => entry.canFix)

        const dependencyDelta = {
            dependencies: dependencyFixing
                .filter(entry => entry.canFix === true)
                .reduce(
                    (result, { name, version }) => ({
                        ...result,
{'fraction_non_alphanumeric': 0.13431578947368422, 'fraction_numerical': 0.0, 'mean_word_length': 2.0500641848523746, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '4863791', 'n_tokens_mistral': 616, 'n_tokens_neox': 605, 'n_words': 172}