Skip to content

Commit

Permalink
fix: regression with migrate command
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesgeorge007 committed Apr 5, 2020
1 parent 6d825c4 commit 70c7539
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/migrate/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import chalk from 'chalk';
import diff from 'diff';
import { Change, diffLines } from 'diff';
import fs from 'fs';
import inquirer from 'inquirer';
import Listr from 'listr';
Expand Down Expand Up @@ -90,9 +90,9 @@ function runMigration(currentConfigPath: string, outputConfigPath: string): Prom
.run()
.then((ctx: Node): void | Promise<void> => {
const result: string = ctx.ast.toSource(recastOptions);
const diffOutput: diff.Change[] = diff.diffLines(ctx.source, result);
const diffOutput: Change[] = diffLines(ctx.source, result);

diffOutput.forEach((diffLine: diff.Change): void => {
diffOutput.forEach((diffLine: Change): void => {
if (diffLine.added) {
process.stdout.write(chalk.green(`+ ${diffLine.value}`));
} else if (diffLine.removed) {
Expand Down

0 comments on commit 70c7539

Please sign in to comment.