Skip to content

fix(deps): require @solidtv/renderer 1.10.1 for the boundsMargin tuple - #70

Merged
chiefcll merged 1 commit into
mainfrom
fix/renderer-1.10.1-bounds-margin
Oct 6, 2026
Merged

chiefcll merged 1 commit into
mainfrom
fix/renderer-1.10.1-bounds-margin

Conversation

@chiefcll

@chiefcll chiefcll commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Problem

main has failed Build and Test since #67 (run):

src/core/lightningInit.ts(24,28): error TS2345: Argument of type 'RendererMainSettings | DomRendererMainSettings'
is not assignable to parameter of type 'Partial<RendererMainSettings>'.
  Types of property 'boundsMargin' are incompatible.
    Type '[number, number, number, number]' is not assignable to type 'number'.

#67 widened DomRendererMainSettings.boundsMargin to number | [top, right, bottom, left], which matches the API in @solidtv/renderer 1.10.1. The lockfile still resolved renderer 1.9.0, where RendererMainSettings.boundsMargin is number only. startLightningRenderer passes the same options object to either renderer, so the union stopped type-checking.

Renderer 1.10.0 still has boundsMargin: number. 1.10.1 is the first release with the tuple; it was published 16 minutes before #67 merged.

Fix

  • Raise the @solidtv/renderer peer range from ^1.9.0 to ^1.10.1 and refresh pnpm-lock.yaml (1.9.0 → 1.10.1).

  • Update tests/contract-types.tsx. With the new renderer, the contract tsc pass (added in test: contract tests and a benchmark harness (no src changes) #68) failed on the next export change: @solidtv/solid re-exports the renderer's names through export type * from '@solidtv/renderer', and between 1.9.0 and 1.10.1 the renderer's export list changed by:

    • removed: AnimationTickPayload
    • added: BoundsMargin, normalizeBoundsMargin

    The list is updated to match (100 names on 1.10). Nothing in src referenced AnimationTickPayload.

Consumer impact (for release notes)

Verification

Run locally on this branch, following the CI steps:

  • pnpm install --frozen-lockfile ✅
  • pnpm build (both tsc passes) ✅
  • pnpm test: 36 files, 656 passed, 23 skipped ✅
  • pnpm lint: 0 errors (157 warnings, the same count as on main) ✅

🤖 Generated with Claude Code

#67 widened DomRendererMainSettings.boundsMargin to accept a per-side
tuple, matching renderer 1.10.1. The repo still resolved renderer 1.9.0,
whose RendererMainSettings.boundsMargin is number-only, so
startLightningRenderer no longer type-checked and `pnpm build` failed.

Raise the peer floor to ^1.10.1 (the first release with the tuple) and
refresh the lockfile.

Renderer 1.10.1 also dropped AnimationTickPayload and added BoundsMargin
and normalizeBoundsMargin, which @solidtv/solid re-exports via
`export type *`. Update the contract-types list to match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chiefcll
chiefcll merged commit 899f277 into main Oct 6, 2026
1 check passed
chiefcll added a commit that referenced this pull request Oct 6, 2026
Main brought the contract tests and benchmark harness from 1.7, adapted to
1.6.4 on renderer 1.9 (#68), the per-side boundsMargin tuple on the DOM
renderer (#67), restoreFocus skipping destroyed elements (#69), the
renderer 1.10.1 requirement (#70) and version 1.6.5. Resolution, keeping
1.7's behaviour and the smallest diff against main:

- Tests: merged against the Phase 1 commits main started from (a12c778),
  so only main's rewording applied. 1.7's assertions and expected values
  win. Main's headers are kept where true on 1.7; "1.6.4 (renderer 1.9)"
  becomes "1.7 (renderer 2.0)". contract-types.tsx keeps 1.7's renderer 2
  type names (main added no Solid-side name that 1.7 lacks);
  tests/webgl/setup.ts and the late-font WebGL test stay 1.7's (renderer 2
  lets a text wait for its font). tests/focusStack.test.tsx from main
  passes on 1.7.
- bench/: main's files, plus arm B (f1c8ab0 on renderer faf4b9f), arm C on
  the linked ../renderer-v2-solid (main's installed-renderer lookup, plus
  1.7's rebuild of its dist and its revision in the record), skipC for the
  demo scripts, the A/B and B/C ratio table, default --arms A,B,C.
  Main's probe fix (renderer 1.x shader props are non-enumerable accessors)
  and the summary's per-arm Solid/renderer lines are kept; the renderer 2
  hooks install on arms B and C. bench/src/arm-v2.ts, bench/demo/* and
  bench/micro/* stay.
- docs/perf/README.md: main's text plus arm B, the per-major count hooks,
  the 120 Hz note and a section for bench/demo and bench/micro.
- package.json: version 1.6.5; @solidtv/renderer stays 1.7's (peer
  ^2.0.0-alpha.0, devDependency link:../renderer-v2-solid). pnpm install
  regenerated the lockfile (unchanged from 1.7's).
- .gitignore, eslint.config.js: union (main's recursive results ignore,
  1.7's .superpowers ignores).
- src/: #67 and #69's createFocusStack change auto-merged. #69's DOMNode
  `destroyed` field and markDestroyed() are dropped: 1.7's DOMNode already
  has a `destroyed` getter (this node or an ancestor destroyed), which
  restoreFocus reads through ElementNode.destroyed. Renderer 2.0 still
  takes one boundsMargin number (the tuple's widest edge, with a warning),
  so the tuple works on the DOM renderer only.
- MIGRATION-1.7.md: the boundsMargin tuple is a break inherited from
  renderer 2.0; the DOM renderer's `destroyed` was undefined before 1.6.5.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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