Skip to content

Commit 36c9bd2

Browse files
committed
the --includeVersion flag now checks if the prefix "v" already exists in the version field of the package to prevent duplicate v's in the project name.
1 parent bef64cc commit 36c9bd2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/lib/converter/plugins/PackagePlugin.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,9 @@ export class PackagePlugin extends ConverterComponent {
136136
}
137137
if (this.includeVersion) {
138138
if (packageInfo.version) {
139-
project.name = `${project.name} - v${packageInfo.version}`;
139+
project.name = `${project.name} - ${
140+
packageInfo.version.slice(0, 1) !== "v" ? "v" : ""
141+
}${packageInfo.version}`;
140142
} else {
141143
// since not all monorepo specifies a meaningful version to the main package.json
142144
// this warning should be optional

0 commit comments

Comments
 (0)