Skip to content

perf(components): drop the redundant inner in component extend#228

Merged
IgorShevchik merged 1 commit into
mainfrom
sync/nuxt-3bf1a92
Jun 29, 2026
Merged

perf(components): drop the redundant inner in component extend#228
IgorShevchik merged 1 commit into
mainfrom
sync/nuxt-3bf1a92

Conversation

@IgorShevchik

Copy link
Copy Markdown
Collaborator

Upstream

3bf1a92perf(components): drop the redundant inner in component extend (#6647)

Change — direct 1:1 (mechanical)

Every component composes its theme as tv({ extend: tv(theme), … })(…). tv's extend accepts a raw theme object directly, so the inner tv(theme) wrapper is redundant:

- const b24ui = computed(() => tv({ extend: tv(theme), ...(appConfig.b24ui?.accordion || {}) })({
+ const b24ui = computed(() => tv({ extend: theme, ...(appConfig.b24ui?.accordion || {}) })({

Applied to all 162 occurrences across src/runtime/{components,components/prose,components/content,vue/overrides/*} — exactly one line per file (162 files, +162/−162). The outer tv({ … })(…) call is unchanged, so tv stays imported and used. (Upstream touched 163 files; the 1-file delta is just the diverging component set.)

Tests

Behaviour-preserving (identical resolved theme) → no runtime/markup change, no snapshot churn. Full suite unchanged (225 files, 5143 passed / 6 skipped).

Verify (CI=true)

dev:prepare · lint · typecheck · test · build — all green.

Ledger

🤖 Generated with Claude Code


Generated by Claude Code

Port of upstream nuxt/ui 3bf1a92 (#6647).

`tv`'s `extend` accepts a raw theme object, so the inner `tv(theme)` wrapper in
`tv({ extend: tv(theme), … })` is redundant. Replace `extend: tv(theme)` with
`extend: theme` across all 162 component theme compositions. The outer
`tv({ … })(…)` call is unchanged, so `tv` stays imported and used.

Behaviour-preserving (same resolved theme); no snapshot changes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JS8ypVfQSFzYVZzkTHhURb
@IgorShevchik IgorShevchik merged commit 9c2a5af into main Jun 29, 2026
1 check passed
@IgorShevchik IgorShevchik deleted the sync/nuxt-3bf1a92 branch June 29, 2026 14:43
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