oneup version on a package.json target rewrites the entire file — keys come back alphabetized and formatting normalized — instead of surgically updating only the version field.
Repro
mkdir repro && cd repro && git init -q
cat > package.json <<'EOF'
{
"name": "app",
"main": "expo-router/entry",
"scripts": { "start": "expo start" },
"dependencies": { "react": "19.2.3" },
"private": true
}
EOF
npx @circlesac/oneup version --source git
Result: dependencies moves to the top, name/main/scripts move down, one-line objects get expanded — a full-file diff for a one-field change. Confusing during releases: the reordered file is easy to misread as field loss (name/main no longer at the top), and if a project ever committed the release-time write it would churn the whole file.
Expected
Match the documented gradle behavior ("surgically rewrites only the versionName string, preserving quote style and formatting"): insert/replace only the version member, leaving key order, indentation, and line breaks untouched.
Also
The Homebrew formula lags npm — the current brew binary doesn't know --source at all (error: unexpected argument '--source' found) while npm 26.7.0 supports it. Worth a tap bump alongside the fix.
🤖 Generated with Claude Code
oneup versionon apackage.jsontarget rewrites the entire file — keys come back alphabetized and formatting normalized — instead of surgically updating only theversionfield.Repro
Result:
dependenciesmoves to the top,name/main/scriptsmove down, one-line objects get expanded — a full-file diff for a one-field change. Confusing during releases: the reordered file is easy to misread as field loss (name/mainno longer at the top), and if a project ever committed the release-time write it would churn the whole file.Expected
Match the documented gradle behavior ("surgically rewrites only the versionName string, preserving quote style and formatting"): insert/replace only the
versionmember, leaving key order, indentation, and line breaks untouched.Also
The Homebrew formula lags npm — the current brew binary doesn't know
--sourceat all (error: unexpected argument '--source' found) while npm 26.7.0 supports it. Worth a tap bump alongside the fix.🤖 Generated with Claude Code