feat: unify attribute syntax across renderers #1

Merged
dan merged 1 commit from feat/consistent-syntax into main 2026-09-27 20:10:32 +00:00
Member

Change

OpenSpec: consistent-syntax · spec-driven · 23/23 tasks complete.

  • Centralize ordinary attribute replacement, explicit controls, and class-only accumulation.
  • Resolve client shared fields in current Content order; suppress unchanged DOM writes.
  • Generate direct boolean/nullish attribute unions; preserve numeric and enum constraints.
  • Escape server attribute values at serialization, including class and inline style.
  • Add runtime, compiler, renderer, client parity, and type coverage. Update README migration guidance.

Breaking behavior

Ordinary attributes now use last-value-wins. False/nullish attribute values remove prior values; Content-position Empty still contributes nothing. Only class accumulates, preserving ordered duplicates.

Verification

  • bun run test: 276 tests pass, 0 fail; 43 snapshots pass.
  • bun run check: all workspace typechecks pass.
  • bun run lint: 0 errors, 51 warnings.
  • git diff --check: pass.
  • Regenerated from packages/lexicon; CSS helpers and attr() signature unchanged.
  • openspec validate consistent-syntax --strict: change valid.

Known notes

  • Bun workspace test runner emits internal directory-mismatch diagnostics; tests still pass. Focused package runs pass without those diagnostics.
  • Happy DOM truncates quoted custom-property values containing semicolons when parsing CSS. Escaping coverage compares parsed HTML attribute data directly and checks original client CSS API values.
  • Archive currently blocked by existing malformed main specs: lexicon-html-gen, runtime-classifier, server-render. No unrelated spec repairs included.
  • Raw/structured style composition remains outside change scope.

Commit

d394231 feat: unify attribute syntax across renderers

## Change OpenSpec: `consistent-syntax` · `spec-driven` · 23/23 tasks complete. - Centralize ordinary attribute replacement, explicit controls, and class-only accumulation. - Resolve client shared fields in current Content order; suppress unchanged DOM writes. - Generate direct boolean/nullish attribute unions; preserve numeric and enum constraints. - Escape server attribute values at serialization, including class and inline style. - Add runtime, compiler, renderer, client parity, and type coverage. Update README migration guidance. ## Breaking behavior Ordinary attributes now use last-value-wins. False/nullish attribute values remove prior values; Content-position Empty still contributes nothing. Only class accumulates, preserving ordered duplicates. ## Verification - `bun run test`: 276 tests pass, 0 fail; 43 snapshots pass. - `bun run check`: all workspace typechecks pass. - `bun run lint`: 0 errors, 51 warnings. - `git diff --check`: pass. - Regenerated from `packages/lexicon`; CSS helpers and `attr()` signature unchanged. - `openspec validate consistent-syntax --strict`: change valid. ## Known notes - Bun workspace test runner emits internal directory-mismatch diagnostics; tests still pass. Focused package runs pass without those diagnostics. - Happy DOM truncates quoted custom-property values containing semicolons when parsing CSS. Escaping coverage compares parsed HTML attribute data directly and checks original client CSS API values. - Archive currently blocked by existing malformed main specs: `lexicon-html-gen`, `runtime-classifier`, `server-render`. No unrelated spec repairs included. - Raw/structured style composition remains outside change scope. ## Commit `d394231` feat: unify attribute syntax across renderers
feat!: unify attribute syntax across renderers
All checks were successful
Checks / checks (pull_request) Successful in 13s
Checks / release (pull_request) Has been skipped
fd4be184a2
Resolve shared element fields in Content order. Preserve class tokens.
Emit attribute controls and escape server values. Add parity coverage and migration docs.

BREAKING CHANGE: ordinary attributes use last-value-wins.
False/nullish values remove prior attributes. Only class accumulates.
dan force-pushed feat/consistent-syntax from fd4be184a2
All checks were successful
Checks / checks (pull_request) Successful in 13s
Checks / release (pull_request) Has been skipped
to d394231331
All checks were successful
Checks / checks (pull_request) Successful in 14s
Checks / release (pull_request) Has been skipped
2026-09-27 19:40:13 +00:00
Compare
toad changed title from feat!: unify attribute syntax across renderers to feat: unify attribute syntax across renderers 2026-09-27 19:40:19 +00:00
dan merged commit df00240065 into main 2026-09-27 20:10:32 +00:00
dan deleted branch feat/consistent-syntax 2026-09-27 20:10:32 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
sigitex/hypeup!1
No description provided.