Skip to content

Commit

Permalink
fix: Fix the wrong version being displayed.
Browse files Browse the repository at this point in the history
  • Loading branch information
milesj committed Mar 9, 2024
1 parent 55f5d9f commit 13e464e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/packemon/src/helpers/getVersion.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import { PackageStructure } from '@boost/common';
import { FileSystem } from '../FileSystem';

const PKG_PATH = path.join(path.dirname(fileURLToPath(import.meta.url)), '../../package.json');

export function getVersion(fs: FileSystem): string {
return fs.readJson<PackageStructure>(new URL('../../package.json', import.meta.url).href).version;
return fs.readJson<PackageStructure>(PKG_PATH).version;
}

0 comments on commit 13e464e

Please sign in to comment.