Skip to content

Commit 1ec6f4b

Browse files
authored
fix: sync CLI --version with package.json (#34)
1 parent 575db52 commit 1ec6f4b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/cli.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,17 @@ interface CliOptions {
1414
horizontalSpacing: number;
1515
}
1616

17+
// Read version from package.json
18+
const packageJsonPath = path.join(__dirname, '..', 'package.json');
19+
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
20+
const version = packageJson.version;
21+
1722
const program = new Command();
1823

1924
program
2025
.name('plan-viz')
2126
.description('Convert Apache Data Fusion Physical Execution Plans to Excalidraw JSON')
22-
.version('0.1.7');
27+
.version(version);
2328

2429
program
2530
.option('-i, --input <file>', 'Input file containing the execution plan')

0 commit comments

Comments
 (0)