Skip to content

[codex] add native typecheck rollout#2

Merged
edhor1608 merged 2 commits into
mainfrom
chore/tsgo-rollout-create-edhor-stack
Mar 30, 2026
Merged

[codex] add native typecheck rollout#2
edhor1608 merged 2 commits into
mainfrom
chore/tsgo-rollout-create-edhor-stack

Conversation

@edhor1608
Copy link
Copy Markdown
Owner

What changed

  • added native and fallback typecheck scripts to the CLI repo
  • added the same typecheck / typecheck:tsc contract to the generated monorepo root template
  • added per-package native/fallback typecheck scripts to the shipped TypeScript app and package templates
  • documented the rollout decision in docs/plans/decisions-log.md

Why

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

  • the CLI can now be checked with tsgo and with classic tsc
  • new scaffolded projects inherit a native TypeScript entrypoint plus a tsc fallback
  • this does not yet add a generated-project smoke fixture; that can come later if needed

Validation

  • bun run typecheck
  • bun run typecheck:tsc
  • bun run build

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 30, 2026

Walkthrough

Added two ADRs to docs/plans/decisions-log.md documenting a native TypeScript template rollout and a CLI tsconfig adjustment. Added typecheck and typecheck:tsc scripts to the root package.json and multiple template package.json files, added @typescript/native-preview to devDependencies in root/base templates, added a typecheck:tsc task to templates/base/turbo.json, and set "types": ["node"] in the root tsconfig.json. No runtime code or public API/export signatures were changed.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title '[codex] add native typecheck rollout' accurately describes the main change: adding native TypeScript type-checking scripts across the CLI and shipped templates.
Description check ✅ Passed The description is directly related to the changeset, covering what changed (typecheck scripts added), why (keeping migration narrow for CLI and scaffolded projects), impact, and validation steps.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/tsgo-rollout-create-edhor-stack

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between e54e639 and d5cafcb.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (11)
  • docs/plans/decisions-log.md
  • package.json
  • templates/apps/api-elysia/package.json
  • templates/apps/api-hono/package.json
  • templates/apps/mobile/package.json
  • templates/apps/web/package.json
  • templates/base/package.json.hbs
  • templates/base/turbo.json
  • templates/packages/shared/package.json
  • templates/packages/stripe/package.json
  • templates/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.json
  • templates/packages/stripe/package.json
  • templates/apps/web/package.json
  • docs/plans/decisions-log.md
  • templates/apps/api-elysia/package.json
  • templates/packages/ui/package.json
  • templates/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.json
  • templates/apps/api-elysia/package.json
  • package.json
🔇 Additional comments (12)
templates/base/turbo.json (1)

18-20: LGTM!

The typecheck:tsc task mirrors the existing typecheck task configuration with the correct ^build dependency, ensuring upstream packages are built before type-checking. This provides a consistent fallback mechanism alongside the native tsgo path.

templates/packages/shared/package.json (1)

11-14: LGTM!

The typecheck scripts are correctly configured. The tsgo binary will be resolved from the workspace root's @typescript/native-preview dependency 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 tsgo and tsc binaries will resolve from the workspace root's dependencies (@typescript/native-preview and typescript respectively).

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 typescript dependency, and tsgo will 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-preview package version is valid and pinned appropriately.

The version 7.0.0-dev.20260321.1 exists 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.

Comment thread docs/plans/decisions-log.md Outdated
@edhor1608 edhor1608 force-pushed the chore/tsgo-rollout-create-edhor-stack branch from d5cafcb to 350367a Compare March 30, 2026 15:55
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between d5cafcb and 350367a.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (12)
  • docs/plans/decisions-log.md
  • package.json
  • templates/apps/api-elysia/package.json
  • templates/apps/api-hono/package.json
  • templates/apps/mobile/package.json
  • templates/apps/web/package.json
  • templates/base/package.json.hbs
  • templates/base/turbo.json
  • templates/packages/shared/package.json
  • templates/packages/stripe/package.json
  • templates/packages/ui/package.json
  • tsconfig.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 tsgo binary will be available via the root's @typescript/native-preview dependency through monorepo hoisting.

templates/base/turbo.json (1)

18-20: LGTM!

The typecheck:tsc task mirrors the existing typecheck task configuration with appropriate dependsOn: ["^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-preview package and tsgo binary are confirmed.

The package 7.0.0-dev.20260321.1 exists on npm and includes the tsgo binary at bin/tsgo.js. However, as a development preview release (indicated by the -dev prefix 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 tsc and tsgo binaries 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 tsgo and tsc binaries 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 (tsgo native path + tsc fallback) 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.

Comment thread tsconfig.json
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"types": ["node"],
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 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.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
docs/plans/decisions-log.md (1)

40-40: ⚠️ Potential issue | 🟡 Minor

Replace #TBD with 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

📥 Commits

Reviewing files that changed from the base of the PR and between 350367a and 663822b.

📒 Files selected for processing (1)
  • docs/plans/decisions-log.md

@edhor1608 edhor1608 marked this pull request as ready for review March 30, 2026 16:24
@edhor1608 edhor1608 merged commit 3a0fe65 into main Mar 30, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant