Skip to content

fix(document): skip no-op YAML rewrites on editor open - #547

Open
TotomInc wants to merge 1 commit into
nuxt-content:mainfrom
TotomInc:fix/formatting-issue-after-write
Open

fix(document): skip no-op YAML rewrites on editor open#547
TotomInc wants to merge 1 commit into
nuxt-content:mainfrom
TotomInc:fix/formatting-issue-after-write

Conversation

@TotomInc

Copy link
Copy Markdown
Contributor

Summary

Fixes #546.

Opening a page in the visual editor was enough to rewrite ::component YAML (key order + omitted Vue defaults) and, on the next open, surface a Git vs Website conflict. This PR stops those silent writes and keeps authored prop order when the component form saves.

Related: #356, #382, #544.

Out of scope

  • checkConflict still has a raw-string fallback after structural compare
  • legacy.ts unbind order and getOrderedSchemaKeys alphabetical frontmatter sort are unchanged

Test plan

  • Open a page with mixed scalar + nested object YAML (see content/index.md in studio-repro) without editing — git status stays clean
  • Confirm omitted Vue defaults (e.g. imageSize: 1/2) are not written into the YAML
  • Confirm an explicitly authored default is kept
  • Re-open the same page in production and confirm no Git vs Website conflict from key-order-only drift
  • Edit a real prop and confirm the file still updates

@vercel

vercel Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

@TotomInc is attempting to deploy a commit to the Nuxt Team on Vercel.

A member of the Team first needs to authorize it.

@pkg-pr-new

pkg-pr-new Bot commented Aug 20, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/nuxt-studio@547

commit: fe6fd3b

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.

Opening a page in Studio rewrites Comark block YAML (key order + default props) and then conflicts on reopen

1 participant