chore(create-taujs): derive generated docs and pins from the scaffold plan and workspace peers - #167
Merged
Merged
Conversation
… plan and workspace peers Fixed drift: solid pinned fastify ^5.2.0 while react/vue pinned ^5.8.5 (the version @taujs/server's own peerDependencies actually require) - solid now matches. The README's "Project Structure" tree special-cased vue only, so every solid README silently omitted renderId.ts and tsconfig.solid.json and linked react.dev instead of solidjs.com. What now derives from what: - generatePackageJson pulls shared pins (fastify, vite, typescript, tsx, cross-env, esbuild, @types/node) from one SHARED_PINS object, and each framework's own extras (renderer package, runtime, Vite plugin, @types) from a Record<Framework, ...> - a missing framework is a compile error, not a silently-skipped branch. pins.test.ts reads the workspace manifests (server/react/vue/solid package.json) directly and asserts the generated pins equal or satisfy those peers, so this cannot drift unnoticed again. - generateReadme's tree is rendered from planFiles(config)'s real paths via a small directory-trie helper, with descriptions from one FILE_NOTES map and framework-varying bits (docs link, main UI file, client extension) from FRAMEWORK_META. README.md is now computed last, from the other entries' paths, to avoid a circular call. Tests in generate.test.ts assert every planned path has a note (no undocumented file), every note is claimed by some framework (no orphan), and the README lists every path in tree order. - generateClaudeMd (src/mcp.ts) stays a short pointer but now names taujs_find_contract and points at skill-guided workflows without enumerating tool names that will rot; mcp.test.ts imports allTools from the new @taujs/mcp devDependency and asserts every taujs_* token the pointer names is a real tool. - CHANGELOG.md's heading and package.json keywords now match the published package name. Gates run from the worktree root: pnpm install, pnpm -r build, pnpm -r --workspace-concurrency=1 test (create-taujs: 5 files / 64 tests incl. the lifecycle pack-and-boot test), pnpm -r typecheck, pnpm check-format, pnpm check-exports, git diff --check - all green.
…d guard runtime pins Review follow-up to the scaffold hygiene commit. Two hardening notes, both non-blocking: - generatePackageJson still had three per-framework branches, so a fourth framework would satisfy the FRAMEWORK_EXTRAS record and fall through to the react branch. The branches differed only in the renderer package named in the esbuild externals and the lint script; both now come from the record (rendererPackage was previously unused; lint is new), and the dependency maps are built once and written in alphabetical key order - the order every framework already shipped in - so generated package.json output is byte-identical to before (checked for react, vue and solid against the previous commit's generator). - pins.test.ts now also asserts each framework's runtime pins (react, react-dom, vue, @vue/server-renderer, solid-js) equal the renderer's own peerDependencies, and that the @types/* pins satisfy their peer floors. Gates from the worktree root: pnpm -r build, pnpm -r --workspace-concurrency=1 test, pnpm -r typecheck, pnpm check-format, pnpm check-exports, git diff --check.
Merged
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.
Hygiene for the scaffolder. Fixes drift and makes every generated document derive from data the scaffolder already acts on, guarded by tests that fail when they diverge.
Gates: pnpm -r build, pnpm -r --workspace-concurrency=1 test (incl. the lifecycle pack-and-boot test for all three frameworks), pnpm -r typecheck, check-format, check-exports, git diff --check.