File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1001,13 +1001,13 @@ export class PullRequestGenerator {
1001
1001
*/
1002
1002
private formatVersionChange ( currentVersion : string , newVersion : string ) : string {
1003
1003
// Check if current version has constraint prefix (^, ~, >=, etc.)
1004
- const constraintMatch = currentVersion . match ( / ^ ( [ ^ 0 - 9 ] + ) / )
1004
+ const constraintMatch = currentVersion . match ( / ^ ( \D + ) / )
1005
1005
const constraintPrefix = constraintMatch ? constraintMatch [ 1 ] : ''
1006
1006
1007
1007
// If there's a constraint prefix, preserve it in the new version display
1008
1008
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 + / , '' )
1011
1011
return `\`${ constraintPrefix } ${ cleanCurrent } \` → \`${ constraintPrefix } ${ cleanNew } \``
1012
1012
}
1013
1013
You can’t perform that action at this time.
0 commit comments