Skip to content

Commit 14de83e

Browse files
committed
chore: lint
1 parent ac2b9e9 commit 14de83e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/pr/pr-generator.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,13 +1001,13 @@ export class PullRequestGenerator {
10011001
*/
10021002
private formatVersionChange(currentVersion: string, newVersion: string): string {
10031003
// Check if current version has constraint prefix (^, ~, >=, etc.)
1004-
const constraintMatch = currentVersion.match(/^([^0-9]+)/)
1004+
const constraintMatch = currentVersion.match(/^(\D+)/)
10051005
const constraintPrefix = constraintMatch ? constraintMatch[1] : ''
10061006

10071007
// If there's a constraint prefix, preserve it in the new version display
10081008
if (constraintPrefix) {
1009-
const cleanCurrent = currentVersion.replace(/^[^0-9]+/, '')
1010-
const cleanNew = newVersion.replace(/^[^0-9]+/, '')
1009+
const cleanCurrent = currentVersion.replace(/^\D+/, '')
1010+
const cleanNew = newVersion.replace(/^\D+/, '')
10111011
return `\`${constraintPrefix}${cleanCurrent}\` → \`${constraintPrefix}${cleanNew}\``
10121012
}
10131013

0 commit comments

Comments
 (0)