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 1d67963 commit 3d91efeCopy full SHA for 3d91efe
src/utils.ts
@@ -23,15 +23,14 @@ export const getVersion = (config: GeneriOptions): string | undefined => {
23
const pkg = fs.existsSync(config.packagePath)
24
? destr<Record<string, any>>(fs.readFileSync(config.packagePath))
25
: {};
26
+
27
+ if (pkg?.version) return `v${pkg.version}`;
28
29
const lerna = fs.existsSync(config.lernaPath)
30
? destr<Record<string, any>>(fs.readFileSync(config.lernaPath))
31
32
- return pkg.version
- ? `v${pkg.version}`
- : lerna.version
33
- ? `v${lerna.version}`
34
- : undefined;
+ return lerna?.version ? `v${lerna.version}` : undefined;
35
};
36
37
export const getChangelogRoot = (name: string = 'CHANGELOG.md') => {
0 commit comments