fix(scaffold-core): generated project typechecks clean out of the box#248
Merged
Conversation
… pin, ContentfulStatusCode, typed body catch
E2E production test (generate -> npm install -> tsc --noEmit) on the merged
1.8.0 candidate caught three residual template defects:
- generated tsconfig omitted "lib", so tsc injected lib.dom which collides
with @cloudflare/workers-types globals; pin lib: ["ES2022"] + skipLibCheck,
matching the materializer's renderTsConfig
- HttpError.status was number; Hono's c.json(body, status) requires
ContentfulStatusCode, so the generated app.onError failed typecheck
- route templates' .json<T>().catch(() => ({})) widened the body union to {},
breaking property access under strict
Both representative archetypes now install + typecheck + run generated tests
clean from a cold download. Regression guards in output-quality.test.ts.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Follow-through on #247 / stackbilt-web#151. Production-testing the 1.8.0 candidate end-to-end (generate → npm install → tsc --noEmit, the exact visitor path) surfaced three residual template defects that still broke a downloaded project's typecheck:
lib— tsc injectslib.domby default, which collides with@cloudflare/workers-typesglobals (~40 declaration-conflict errors). Now pinslib: ["ES2022"]+skipLibCheck: true, matching the materializer'srenderTsConfig(the two templates had drifted).HttpError.status: number— Hono'sc.json(body, status)requiresContentfulStatusCode; the generatedapp.onErrorfailed typecheck. Now typed asContentfulStatusCode..json<T>().catch(() => ({}))— widens the body union to{}and breaks property access understrict. Catch fallbacks now typed{} as T(4 route templates).Verified: both a URL-shortener and a realtime-chat intention now generate projects that install, typecheck, and pass their generated tests from a cold download. Regression guards added to
output-quality.test.ts(108 scaffold-core tests pass; 850 repo-wide).Gate for the scaffold-core 1.8.0 npm publish — this completes the production-test requirement.
🤖 Generated with Claude Code