Files
hyperframes/docs/contributing/testing-local-changes.mdx
T
ukimsanov d01253771f docs: three things the source contradicts, found by reading the pages
**`bun unlink hyperframes` does not exist.** Bun answers "error: bun unlink
{packageName} not implemented yet" — I ran it. The command takes no package name;
it unregisters whatever directory you are standing in. The reader arrives at that
block having just been told to cd into a video project, so even the correct form
would unregister the wrong thing and leave the global link in place — which is
exactly the failure the same page's troubleshooting section then explains. The
page created the bug it diagnosed. Now `cd packages/cli && bun unlink`.

**`data-media-start` and `data-playback-start` are one value, not two features.**
The schema page gave them separate rows with different-sounding meanings, so a
reader would reasonably think they compose. Six read sites in core are all
`playbackStart ?? mediaStart` — runtime/media.ts:18 and :92, runtime/init.ts:751,
1993, 2928, 3010. One row now, alias named, and it says which wins.

**Canary rollouts contradicted itself.** Line 109 called enrolment a pure function
of `(feature, installId, percentage)`; line 195 said canaries bucket on a
dedicated `bucketSeed`, not the telemetry id. The second is right —
cli/src/telemetry/canary.ts:98 is `unitId: config.bucketSeed ?? config.anonymousId`.

Also on the Studio shortcuts page earlier: J/Shift+J for keyframe navigation,
Backspace to delete, and Ctrl+Y for redo were all missing.
2026-08-04 14:14:38 -07:00

89 lines
2.4 KiB
Plaintext

---
title: Test local CLI changes
description: Run an unreleased HyperFrames CLI build against a real project outside the monorepo.
---
Package tests do not prove that the CLI behaves correctly in an ordinary video project. After the focused tests pass, run the changed command against a project outside the HyperFrames repository.
## Build the workspace
From the repository root:
```bash
bun install
bun run build
```
Rebuild after changing CLI code or a package bundled by the CLI.
## Run the local build
Choose one method.
### Link the CLI
Use this when you will test several commands or projects:
```bash
cd packages/cli
bun link
hyperframes --version
which hyperframes
```
The resolved binary should point into the local HyperFrames checkout. Run it from a separate project:
```bash
cd /path/to/a/video-project
hyperframes lint
hyperframes check
hyperframes preview
```
Remove the link when finished. `bun unlink` takes no package name — it
unregisters whichever directory you run it from, so go back to the CLI package
first:
```bash
cd packages/cli
bun unlink
```
### Call the built entry directly
Use this when you do not want to change your `PATH`:
```bash
node /path/to/hyperframes/packages/cli/dist/cli.js preview /path/to/a/video-project
```
### Test the package archive
Use this before a release to check the files that would actually be published:
```bash
cd packages/cli
npm pack
npx ./hyperframes-<version>.tgz --help
```
Run the archive against an isolated project as well as the command you changed.
## What to verify
Test the user-visible outcome, not only the exit code:
- the command accepts the documented arguments;
- errors explain how to recover;
- `--json` remains machine-readable when the command supports it;
- Preview opens the correct project and reflects file changes;
- a render produces a playable file with the expected duration and media;
- temporary files and background processes are cleaned up after success and failure.
For Studio changes, exercise the exact interaction in Preview. For rendering changes, inspect the output with `ffprobe` or the repository's existing fixture tests rather than relying on visual playback alone.
## Common problems
If a globally installed CLI shadows the link, inspect `which hyperframes`, remove the global package, and link again. Preview starts at port `3002` and automatically tries a free port; pass `--port` only when a fixed port is required.