Skip to content

Commit d707975

Browse files
committed
feat: manifest updateversion regex content replacement updated
1 parent 1ad9b3d commit d707975

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/utils/manifestParser.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ export class ManifestParser {
105105
}
106106
this.fileHandler.writeFile(manifestPath, JSON.stringify(data, null, 2));
107107
} else if (type === 'regex' && options.regexReplace) {
108-
content = content.replace(options.regexReplace, newVersion);
108+
content = content.replace(options.regexReplace, (_match, prefix, _oldVersion, suffix) => {
109+
return `${prefix}${newVersion}${suffix}`;
110+
});
109111
this.fileHandler.writeFile(manifestPath, content);
110112
}
111113
}

0 commit comments

Comments
 (0)