Skip to content

Commit 13e464e

Browse files
committed
fix: Fix the wrong version being displayed.
1 parent 55f5d9f commit 13e464e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1+
import path from 'node:path';
2+
import { fileURLToPath } from 'node:url';
13
import { PackageStructure } from '@boost/common';
24
import { FileSystem } from '../FileSystem';
35

6+
const PKG_PATH = path.join(path.dirname(fileURLToPath(import.meta.url)), '../../package.json');
7+
48
export function getVersion(fs: FileSystem): string {
5-
return fs.readJson<PackageStructure>(new URL('../../package.json', import.meta.url).href).version;
9+
return fs.readJson<PackageStructure>(PKG_PATH).version;
610
}

0 commit comments

Comments
 (0)