[codex] add native typecheck rollout#2
Conversation
WalkthroughAdded two ADRs to docs/plans/decisions-log.md documenting a native TypeScript template rollout and a CLI tsconfig adjustment. Added Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/plans/decisions-log.md`:
- Around line 24-26: Add a concrete follow-up reference next to the bullet
"template runtime compatibility is still validated later when a real generated
project uses the updated templates" by appending a tracking issue/milestone
reference (e.g., "Tracking: #<issue-number> (owner) / milestone: <name> / target
date: <YYYY-MM-DD>") and a TODO tag so it won't be lost; ensure the note
includes an owner (GitHub handle or team), an issue or PR link placeholder, and
a target date to make the deferred compatibility validation actionable.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 6eb98a79-cce3-4359-8577-977d21fe29a7
⛔ Files ignored due to path filters (1)
bun.lockis excluded by!**/*.lock
📒 Files selected for processing (11)
docs/plans/decisions-log.mdpackage.jsontemplates/apps/api-elysia/package.jsontemplates/apps/api-hono/package.jsontemplates/apps/mobile/package.jsontemplates/apps/web/package.jsontemplates/base/package.json.hbstemplates/base/turbo.jsontemplates/packages/shared/package.jsontemplates/packages/stripe/package.jsontemplates/packages/ui/package.json
📜 Review details
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: CR
Repo: edhor1608/create-edhor-stack PR: 0
File: templates/base/AGENTS.md:0-0
Timestamp: 2026-03-30T15:32:52.755Z
Learning: Applies to templates/base/**/*{Component,component}.{ts,tsx} : Follow the `add-component` skill pattern: create component files with TypeScript, export from index files, and follow project patterns
Learnt from: CR
Repo: edhor1608/create-edhor-stack PR: 0
File: templates/base/AGENTS.md:0-0
Timestamp: 2026-03-30T15:32:52.755Z
Learning: Applies to templates/base/**/*.test.{ts,tsx,js} : Use TDD (test-first) approach for all new functionality
📚 Learning: 2026-03-30T15:32:52.755Z
Learnt from: CR
Repo: edhor1608/create-edhor-stack PR: 0
File: templates/base/AGENTS.md:0-0
Timestamp: 2026-03-30T15:32:52.755Z
Learning: Applies to templates/base/**/*{Component,component}.{ts,tsx} : Follow the `add-component` skill pattern: create component files with TypeScript, export from index files, and follow project patterns
Applied to files:
templates/packages/shared/package.jsontemplates/packages/stripe/package.jsontemplates/apps/web/package.jsondocs/plans/decisions-log.mdtemplates/apps/api-elysia/package.jsontemplates/packages/ui/package.jsontemplates/base/package.json.hbs
📚 Learning: 2026-03-30T15:32:52.755Z
Learnt from: CR
Repo: edhor1608/create-edhor-stack PR: 0
File: templates/base/AGENTS.md:0-0
Timestamp: 2026-03-30T15:32:52.755Z
Learning: Run `bun check` before committing code to verify quality
Applied to files:
templates/apps/api-hono/package.jsontemplates/apps/api-elysia/package.jsonpackage.json
🔇 Additional comments (12)
templates/base/turbo.json (1)
18-20: LGTM!The
typecheck:tsctask mirrors the existingtypechecktask configuration with the correct^builddependency, ensuring upstream packages are built before type-checking. This provides a consistent fallback mechanism alongside the nativetsgopath.templates/packages/shared/package.json (1)
11-14: LGTM!The typecheck scripts are correctly configured. The
tsgobinary will be resolved from the workspace root's@typescript/native-previewdependency via Bun's workspace hoisting.templates/apps/mobile/package.json (1)
10-12: LGTM!The typecheck scripts follow the established pattern consistently with other app templates.
templates/packages/stripe/package.json (1)
11-14: LGTM!Typecheck scripts are consistently added following the established pattern.
templates/packages/ui/package.json (1)
12-16: LGTM!The typecheck scripts are correctly added. Both
tsgoandtscbinaries will resolve from the workspace root's dependencies (@typescript/native-previewandtypescriptrespectively).templates/apps/web/package.json (1)
8-10: LGTM!Typecheck scripts are consistently added. The web app template correctly relies on workspace-level TypeScript tooling.
templates/apps/api-elysia/package.json (1)
8-10: LGTM!Typecheck scripts follow the established pattern. This template has local
typescriptdependency, andtsgowill resolve from the workspace root.templates/base/package.json.hbs (2)
8-9: LGTM!The Turbo-based typecheck scripts correctly orchestrate type-checking across the monorepo workspaces.
18-18: The@typescript/native-previewpackage version is valid and pinned appropriately.The version
7.0.0-dev.20260321.1exists on npm and the package follows a daily dev release pattern, confirming this is a rapidly evolving nightly build. Pinning to a specific dev version is the right approach to avoid unexpected breakage. Consider documenting the upgrade path when a stable release becomes available.templates/apps/api-hono/package.json (1)
8-10: Typecheck script contract is consistent and well-scoped.Adding both native (
typecheck) and fallback (typecheck:tsc) scripts cleanly matches the rollout contract for generated packages.package.json (2)
17-18: Root typecheck entrypoints are correctly split into native and fallback paths.This keeps the CLI contract explicit and aligns with template rollout behavior.
42-42: Pinned native preview dependency is a good rollout choice.Using an exact version here reduces drift during the migration window.
d5cafcb to
350367a
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@tsconfig.json`:
- Line 9: The tsconfig currently sets "types": ["node"], which prevents
automatic inclusion of other `@types` packages; either remove the "types" property
from the tsconfig to allow TypeScript to include all installed `@types/`*
automatically, or explicitly add any additional type packages you need (e.g.,
add entries to the array like "types": ["node", "jest", "react"]); update the
tsconfig.json entry for "types" accordingly so future `@types` dependencies are
picked up.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 3776d512-5365-4ac1-be16-ec5abba6799a
⛔ Files ignored due to path filters (1)
bun.lockis excluded by!**/*.lock
📒 Files selected for processing (12)
docs/plans/decisions-log.mdpackage.jsontemplates/apps/api-elysia/package.jsontemplates/apps/api-hono/package.jsontemplates/apps/mobile/package.jsontemplates/apps/web/package.jsontemplates/base/package.json.hbstemplates/base/turbo.jsontemplates/packages/shared/package.jsontemplates/packages/stripe/package.jsontemplates/packages/ui/package.jsontsconfig.json
📜 Review details
🔇 Additional comments (12)
templates/packages/shared/package.json (1)
11-14: LGTM!The typecheck scripts follow the consistent pattern established across all templates. The
tsgobinary will be available via the root's@typescript/native-previewdependency through monorepo hoisting.templates/base/turbo.json (1)
18-20: LGTM!The
typecheck:tsctask mirrors the existingtypechecktask configuration with appropriatedependsOn: ["^build"]to ensure dependencies are built before type-checking.templates/base/package.json.hbs (2)
8-9: LGTM!The typecheck scripts correctly delegate to Turbo, which will orchestrate the monorepo's package-level typecheck scripts.
18-18: The@typescript/native-previewpackage andtsgobinary are confirmed.The package
7.0.0-dev.20260321.1exists on npm and includes thetsgobinary atbin/tsgo.js. However, as a development preview release (indicated by the-devprefix and date-based identifier), evaluate whether this version meets stability requirements for production rollout.templates/apps/mobile/package.json (1)
10-12: LGTM!The typecheck scripts follow the established pattern. Note that this template uses TypeScript
~5.9.2(line 39) while other templates use^5.8.x. This may be intentional for Expo/React Native compatibility.templates/packages/stripe/package.json (1)
11-14: LGTM!The typecheck scripts are consistent with the established pattern across all package templates.
templates/apps/web/package.json (1)
8-10: LGTM!The typecheck scripts follow the consistent pattern. The
tscandtsgobinaries will be available through the root package's dependencies.templates/packages/ui/package.json (1)
13-15: LGTM!The typecheck scripts are consistent with sibling package templates. The
tsgoandtscbinaries will be available through monorepo hoisting from the root's dependencies.docs/plans/decisions-log.md (1)
38-40: Deferred compatibility validation still lacks a concrete tracker.Line 40 still defers follow-up without an issue/milestone/owner/target date, so this action can be lost.
package.json (1)
17-18: Typecheck contract wiring at root looks consistent.Line 17, Line 18, and Line 40 align with the rollout goal (
tsgonative path +tscfallback) and are coherent with the rest of the root package setup.Also applies to: 40-40
templates/apps/api-elysia/package.json (1)
8-10: Template script contract update is clean and consistent.Line 9 and Line 10 correctly introduce native/fallback typecheck entrypoints while keeping Line 8 unchanged in behavior.
templates/apps/api-hono/package.json (1)
8-10: Hono template now matches the intended typecheck rollout contract.Line 9 and Line 10 are correctly added and consistent with the CLI/template migration pattern.
| "strict": true, | ||
| "esModuleInterop": true, | ||
| "skipLibCheck": true, | ||
| "types": ["node"], |
There was a problem hiding this comment.
🧹 Nitpick | 🔵 Trivial
Explicit types array limits automatic type inclusion.
Setting "types": ["node"] restricts TypeScript to only include @types/node ambient declarations. Other @types/* packages installed in the project won't be automatically included unless explicitly added to this array.
This is fine if the CLI only needs Node.js types. If you later add dependencies with companion @types/* packages, they'll need to be added here.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@tsconfig.json` at line 9, The tsconfig currently sets "types": ["node"],
which prevents automatic inclusion of other `@types` packages; either remove the
"types" property from the tsconfig to allow TypeScript to include all installed
`@types/`* automatically, or explicitly add any additional type packages you need
(e.g., add entries to the array like "types": ["node", "jest", "react"]); update
the tsconfig.json entry for "types" accordingly so future `@types` dependencies
are picked up.
There was a problem hiding this comment.
♻️ Duplicate comments (1)
docs/plans/decisions-log.md (1)
40-40:⚠️ Potential issue | 🟡 MinorReplace
#TBDwith a real issue/PR link before merge.The deferred validation tracker is still a placeholder, so this is not yet fully actionable. Please replace
issue#TBD`` with an actual reference prior to merging.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/plans/decisions-log.md` at line 40, Replace the placeholder issue reference `#TBD` in the "template runtime compatibility is still validated..." decision note with a real issue or PR URL before merging; locate the text fragment containing `TODO tracking: issue \`#TBD\`, owner \`@edhor1608\`, target date \`2026-04-06\`` and update `#TBD` to the actual issue/PR link (e.g., https://github.com/.../issues/123 or PR URL) so the deferred validation tracker is actionable and points to the real ticket.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@docs/plans/decisions-log.md`:
- Line 40: Replace the placeholder issue reference `#TBD` in the "template
runtime compatibility is still validated..." decision note with a real issue or
PR URL before merging; locate the text fragment containing `TODO tracking: issue
\`#TBD\`, owner \`@edhor1608\`, target date \`2026-04-06\`` and update `#TBD` to
the actual issue/PR link (e.g., https://github.com/.../issues/123 or PR URL) so
the deferred validation tracker is actionable and points to the real ticket.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: fcf2073f-bbd9-4a02-91bf-37f8a77c4018
📒 Files selected for processing (1)
docs/plans/decisions-log.md
What changed
typecheck/typecheck:tsccontract to the generated monorepo root templatedocs/plans/decisions-log.mdWhy
This repo is both a TypeScript CLI and a project generator. Rolling out native TypeScript only in the CLI would leave newly scaffolded projects on the old contract, so this updates the shipped templates as well while keeping the migration narrow.
Impact
tsgoand with classictsctscfallbackValidation
bun run typecheckbun run typecheck:tscbun run build