Skip to content

fix(tools): format chrome-extension manifest.json after version sync - #404

Merged
V3RON merged 1 commit into
mainfrom
fix/release-manifest-oxfmt
Aug 13, 2026
Merged

fix(tools): format chrome-extension manifest.json after version sync#404
V3RON merged 1 commit into
mainfrom
fix/release-manifest-oxfmt

Conversation

@V3RON

@V3RON V3RON commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes the release automation added in #394: after syncChromeExtensionManifestVersion() rewrites packages/chrome-extension/manifest.json's version field via JSON.stringify(manifest, null, 2), the file's short arrays (permissions, resources, matches) get expanded onto multiple lines, which doesn't match oxfmt's formatting (it collapses arrays that fit on one line). Since commitVersionChanges() runs a normal git commit, lefthook's pre-commit hook runs oxfmt --check on the staged file and fails, aborting the release commit.

See the failed run: https://github.com/callstackincubator/rozenite/actions/runs/31677909005/job/94376470953

Related Issue

N/A — no existing issue for this change.

Context

Rather than hand-matching oxfmt's array-collapsing rules in the manual JSON.stringify output, syncChromeExtensionManifestVersion() now runs oxfmt --write on the file immediately after writing it, so the staged file is already correctly formatted regardless of future oxfmt config changes.

Testing

  • Simulated a version bump against the current manifest.json and confirmed the pre-existing JSON.stringify output fails oxfmt --check (arrays expand to multi-line) while the fixed code (oxfmt --write after writing) passes.
  • pnpm exec oxfmt --check scripts/release/release.mjs
  • pnpm exec eslint scripts/release/release.mjs — pre-existing unrelated no-undef errors for console/Buffer confirmed present before this change too.

@V3RON
V3RON merged commit 9b0d419 into main Aug 13, 2026
4 checks passed
@V3RON
V3RON deleted the fix/release-manifest-oxfmt branch August 13, 2026 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant