Conversation
…t and CRLF checkouts - accept both `const authored` and `export const demos` array declarations as the entry-insertion anchor (the exported const is a spread result and never matches) - tolerate CRLF working trees in both insertion anchors (import + entry) - fail loudly when the import anchor does not match instead of writing a registry that references an unimported factory - add the required `updatedAt` field to the scaffolded entry so `npm run build` passes before any manual edit, as the README promises
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.
Problem
npm run new-demo— step 1 of the documented "Add your own showcase" flow — fails on currentmain(verified at 0d75d2b):export const demos: DemoEntry[] = [+ newline, but the registry now declaresconst authored: DemoEntry[] = [(the exported const is[...authored], whose line never ends with an open bracket). The anchor can never match → "insert the entry manually".\n-exact, so on CRLF working trees (Windows default) even the import insertion silently fails — producing a registry that references an unimported factory and failstsc.src/demos/<id>/behind, so the retry hits "already exists — pick a different id".updatedAtfield, sonpm run buildfails even after the anchors are fixed.Fix
const authored/export const demosas the entry anchor; tolerate\r?\nin both anchors.updatedAton the scaffolded entry.Verification
npm run new-demo -- pr-scaffold-check "Scaffold Check" objectcompletes and inserts the entry intoconst authored;npx tsc --noEmitis clean; probe artifacts removed afterwards.registry.tsto confirm the tolerance.