Skip to content

Conversation

@harlan-zw
Copy link
Collaborator

@harlan-zw harlan-zw commented Jan 4, 2026

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

This PR converts renderDOMHead from async to sync execution, improving performance and simplifying the client-side rendering pipeline. This means all dom:* related hooks can only be processed sync as well.

-await renderDOMHead(...)
+renderDOMHead(...)

⚠️ Breaking Changes Migration

renderDOMHead is now synchronous

Before:

await renderDOMHead(head, { document })

After:

renderDOMHead(head, { document })
// or check return value
const didRender = renderDOMHead(head, { document })

Hook return types changed

If you have custom plugins using these hooks, update return types:

Before:

const plugin = {
  hooks: {
    'dom:beforeRender': async (ctx) => {
      await someAsyncOperation()
      ctx.shouldRender = true
    },
    'entries:resolve': async (ctx) => {
      await processEntries(ctx)
    }
  }
}

After:

const plugin = {
  hooks: {
    'dom:beforeRender': (ctx) => {
      // Must be synchronous now
      ctx.shouldRender = true
    },
    'entries:resolve': (ctx) => {
      // Must be synchronous now
      processEntriesSync(ctx)
    }
  }
}

@harlan-zw harlan-zw changed the title chore: release v3.0.0-beta.1 fix!: sync renderDOMHead Jan 4, 2026
@harlan-zw harlan-zw changed the title fix!: sync renderDOMHead fix!: sync renderDOMHead Jan 4, 2026
@harlan-zw
Copy link
Collaborator Author

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

πŸ€– Generated with Claude Code

@harlan-zw harlan-zw changed the title fix!: sync renderDOMHead fix!: sync renderDOMHead() Jan 4, 2026
@harlan-zw harlan-zw mentioned this pull request Jan 4, 2026
6 tasks
@harlan-zw harlan-zw merged commit 627eb05 into v3 Jan 4, 2026
1 check passed
@harlan-zw harlan-zw mentioned this pull request Jan 4, 2026
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.

2 participants