fix(cli): read actual composition dimensions in info and fix semver update check#194
Conversation
vanceingalls
left a comment
There was a problem hiding this comment.
Review feedback
Important: Non-null assertions
packages/cli/src/commands/info.ts uses widthMatch[1]! and heightMatch[1]!. Same project convention issue as #193 — use widthMatch?.[1] ?? "" or a guard.
Note: No tests
Neither the semver comparison nor the dimension extraction have tests. Even one test for isNewerSemver("0.2.1", "0.2.0") === true would add confidence. The semver fix itself is clearly correct though.
Note: Regex brittleness
The dual-regex for data-width extraction works for all realistic compositions but is fragile. Ideally dimensions should come from the parser output rather than a separate regex pass.
2a564cf to
096f09b
Compare
|
Addressed:
|
…pdate check Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace hand-rolled isNewerSemver with compare-versions (3KB, zero deps) which handles prerelease tags (alpha, beta, rc) per the semver spec. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
096f09b to
806f008
Compare
d8b0187 to
4bb01fd
Compare
Address review: widthMatch[1]! and heightMatch[1]! replaced with widthMatch?.[1] per project convention against ! assertions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
806f008 to
0694b9e
Compare
Merge activity
|
…pdate check (#194) ## Summary - **`info`** **command** now reads actual `data-width`/`data-height` from the root composition element instead of hardcoding 1920x1080 or 1080x1920 based on a parser heuristic that defaults to "portrait" - **Update check** now uses proper semver comparison instead of string inequality (`!== VERSION`). Previously reported "update available" when installed `0.2.1` and npm had `0.2.0` **Part 2 of 5** in a stacked PR series fixing E2E test findings. ## Test plan - [x] `npx hyperframes info` on a 1920x1080 project shows "1920x1080" (not "1080x1920") - [x] `npx hyperframes info --json` returns correct width/height fields - [x] Version check no longer reports downgrade as available update

Summary
infocommand now reads actualdata-width/data-heightfrom the root composition element instead of hardcoding 1920x1080 or 1080x1920 based on a parser heuristic that defaults to "portrait"!== VERSION). Previously reported "update available" when installed0.2.1and npm had0.2.0Part 2 of 5 in a stacked PR series fixing E2E test findings.
Test plan
npx hyperframes infoon a 1920x1080 project shows "1920x1080" (not "1080x1920")npx hyperframes info --jsonreturns correct width/height fields