We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b47268e commit 2d94574Copy full SHA for 2d94574
bin/diffpatch
@@ -1,8 +1,9 @@
1
#!/usr/bin/env node
2
3
-const diffpatch = require('..');
+import { DiffPatcher } from '../lib/index.js';
4
+import ConsoleFormatter from '../lib/formatters/console.js';
5
-const fs = require('fs');
6
+import fs from 'node:fs';
7
8
const fileLeft = process.argv[2];
9
const fileRight = process.argv[3];
@@ -15,5 +16,6 @@ if (!fileLeft || !fileRight) {
15
16
const left = JSON.parse(fs.readFileSync(fileLeft));
17
const right = JSON.parse(fs.readFileSync(fileRight));
18
-const delta = diffpatch.diff(left, right);
19
-diffpatch.console.log(delta);
+const delta = new DiffPatcher().diff(left, right);
20
+
21
+console.log(new ConsoleFormatter().format(delta));
0 commit comments