ReviewOS

also looking at this

stacks/bumpx

fix: synchronize drifted native versions in recursive releases

#2015
Merged chris wants to merge codex/recursive-native-version-drift into main
2 files +26 -2

Review threads live on the whole diff, not on one commit, so none are shown here - a thread's line means something in the branch's final form, and painting it into an intermediate step would put it on code it is not about.

packages/bumpx/src/utils.tsmodifiedformatting only+1-1
Changes to packages/bumpx/src/utils.ts
@@ -436,13 +436,13 @@ export function updateVersionInFile(filePath: string, oldVersion: string, newVer
436436 }
437437
438438 const packageJson = JSON.parse(jsonContent)
439 const declaredVersion = forceUpdate ? String(packageJson.version) : oldVersion
439440 if (packageJson.version === oldVersion || forceUpdate) {
440441 packageJson.version = newVersion
441442
442443 // For JSONC files, preserve the original formatting with comments
443444 if (isJsonc) {
444445 // Replace the version value while preserving comments and formatting
445 const declaredVersion = forceUpdate ? String(packageJson.version) : oldVersion
446446 const versionRegex = new RegExp(
447447 `(["']version["']\\s*:\\s*)["']${declaredVersion.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}["']`,
448448 'g',