Repository navigation
fix(cli): list the examples init --example accepts in docs examples - #5446
Open
Muhtasim-Munif-Fahim wants to merge 1 commit into
Open
Muhtasim-Munif-Fahim wants to merge 1 commit into
Muhtasim-Munif-Fahim wants to merge 1 commit into
Conversation
The examples topic listed title-card and video-edit, which do not exist, and none of the eight examples in registry/examples. List blank plus the registry examples with their registry-item descriptions, and add a test that fails when the topic and registry/examples disagree. Fixes heygen-com#5393
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
hyperframes docs exampleslistedtitle-cardandvideo-edit, whichinit --exampledoes not accept, and none of the eight examples that live inregistry/examples/.packages/cli/src/docs/examples.mdnow listsblankplus every example inregistry/examples/(decision-tree,kinetic-type,nyt-graph,play-mode,product-promo,swiss-grid,vignelli,warm-grain), each with the description from itsregistry-item.json. The usage line shows the real form,npx hyperframes init <name> --example <example>.packages/cli/src/commands/docs.test.ts(the "better still" from the issue): fails when the topic's sections andregistry/examples/disagree, or when an example's description drifts from itsregistry-item.json.Fixes #5393
Verification
bunx vitest run src/commands/docs.test.ts(inpackages/cli) → 2 passed; with the oldexamples.mdboth tests fail (expected [ 'blank', 'title-card', 'video-edit' ] to deeply equal [ 'blank', 'decision-tree', … ]).oxfmtandoxlinton the changed files,fallow audit --base origin/main(no new issues), commitlint on the commit message.AI assistance was used to help find the cause, write the patch, and run tests; I reviewed the change.