Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 44 additions & 0 deletions docs/plans/decisions-log.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,47 @@ This keeps the same scaffold behavior while reducing direct dependencies and ali

### Consequences
The CLI depends on fewer packages, generated deployment templates now include `.dockerignore`, and deployment-disabled scaffolds remove that file together with `Dockerfile` and `fly.toml`.

## ADR-2026-03-30-typescript-native-template-rollout

### Context

`create-edhor-stack` is both a TypeScript CLI and a scaffolder for Bun/Turborepo TypeScript projects. A native TypeScript rollout that only changes the CLI would leave newly generated projects on the old contract, while a full generated-project smoke fixture would expand scope beyond the current migration pass.

### Decision

Roll out the native TypeScript contract at two levels:

- the CLI repo itself gets `typecheck` and `typecheck:tsc`
- the shipped root and package templates get matching `typecheck` and `typecheck:tsc` scripts, plus a root `@typescript/native-preview` dependency and Turbo fallback task wiring

Skip the extra generated-project smoke fixture in this pass.

### Rationale

This keeps the change aligned with the purpose of the repo. The CLI becomes native-ready, and future scaffolded projects inherit the same contract immediately. Skipping the generated fixture keeps the branch focused and avoids turning one repo migration into a broader template QA project.

### Consequences

- the repo can be verified directly
- generated projects will expose native typecheck commands without additional manual setup
- template runtime compatibility is still validated later when a real generated project uses the updated templates; TODO tracking: issue `#TBD` before merge, owner `@edhor1608`, target date `2026-04-06`

## ADR-2026-03-30-explicit-node-types-for-native-cli-check

### Context

After rebasing the rollout branch onto the newer `main`, the CLI source used `node:*` imports and `process`. Classic `tsc` still passed, but `tsgo` required explicit Node ambient types in the root config.

### Decision

Add `"types": ["node"]` to the root CLI `tsconfig.json`.

### Rationale

This is the smallest compatibility fix for the native checker and keeps the CLI contract explicit.

### Consequences

- `tsgo` and `tsc` align again on the CLI repo
- the change stays local to the root config and does not alter runtime behavior
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
"scripts": {
"dev": "bun run src/index.ts",
"build": "bun build src/index.ts --outdir dist --target node",
"typecheck": "tsgo --noEmit -p tsconfig.json",
"typecheck:tsc": "tsc --noEmit -p tsconfig.json",
"prepublishOnly": "bun run build"
},
"keywords": [
Expand All @@ -35,6 +37,7 @@
"picocolors": "^1.1.1"
},
"devDependencies": {
"@typescript/native-preview": "7.0.0-dev.20260321.1",
"@types/node": "^22.15.21",
"typescript": "^5.8.3"
}
Expand Down
4 changes: 3 additions & 1 deletion templates/apps/api-elysia/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"scripts": {
"dev": "bun run --hot src/index.ts",
"start": "bun run src/index.ts",
"test": "bun test"
"test": "bun test",
"typecheck": "tsgo --noEmit -p tsconfig.json",
"typecheck:tsc": "tsc --noEmit -p tsconfig.json"
},
"dependencies": {
"elysia": "^1.2.0",
Expand Down
4 changes: 3 additions & 1 deletion templates/apps/api-hono/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"scripts": {
"dev": "bun run --hot src/index.ts",
"start": "bun run src/index.ts",
"test": "bun test"
"test": "bun test",
"typecheck": "tsgo --noEmit -p tsconfig.json",
"typecheck:tsc": "tsc --noEmit -p tsconfig.json"
},
"dependencies": {
"hono": "^4.7.0",
Expand Down
4 changes: 3 additions & 1 deletion templates/apps/mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
"dev": "expo start",
"android": "expo run:android",
"ios": "expo run:ios",
"build": "eas build"
"build": "eas build",
"typecheck": "tsgo --noEmit -p tsconfig.json",
"typecheck:tsc": "tsc --noEmit -p tsconfig.json"
},
"dependencies": {
"expo": "~54.0.0",
Expand Down
4 changes: 3 additions & 1 deletion templates/apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"scripts": {
"dev": "vite",
"build": "vite build",
"start": "node .output/server/index.mjs"
"start": "node .output/server/index.mjs",
"typecheck": "tsgo --noEmit -p tsconfig.json",
"typecheck:tsc": "tsc --noEmit -p tsconfig.json"
},
"dependencies": {
"@tanstack/react-router": "^1.154.14",
Expand Down
3 changes: 3 additions & 0 deletions templates/base/package.json.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
"scripts": {
"dev": "turbo dev",
"build": "turbo build",
"typecheck": "turbo run typecheck",
"typecheck:tsc": "turbo run typecheck:tsc",
"lint": "biome lint .",
"format": "biome format --write .",
"check": "biome check --write .",
Expand All @@ -13,6 +15,7 @@
},
"devDependencies": {
"@biomejs/biome": "2.3.11",
"@typescript/native-preview": "7.0.0-dev.20260321.1",
"husky": "^9.1.7",
"lint-staged": "^16.1.0",
"turbo": "^2.5.4",
Expand Down
3 changes: 3 additions & 0 deletions templates/base/turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
"typecheck": {
"dependsOn": ["^build"]
},
"typecheck:tsc": {
"dependsOn": ["^build"]
},
"clean": {
"cache": false
}
Expand Down
4 changes: 4 additions & 0 deletions templates/packages/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
"./types": "./src/types.ts",
"./utils": "./src/utils.ts"
},
"scripts": {
"typecheck": "tsgo --noEmit -p tsconfig.json",
"typecheck:tsc": "tsc --noEmit -p tsconfig.json"
},
"dependencies": {
"zod": "^3.24.0"
},
Expand Down
4 changes: 4 additions & 0 deletions templates/packages/stripe/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
"./webhooks": "./src/webhooks.ts",
"./schemas": "./src/schemas.ts"
},
"scripts": {
"typecheck": "tsgo --noEmit -p tsconfig.json",
"typecheck:tsc": "tsc --noEmit -p tsconfig.json"
},
"dependencies": {
"stripe": "^17.0.0",
"zod": "^3.24.0"
Expand Down
4 changes: 3 additions & 1 deletion templates/packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
"./styles.css": "./src/styles.css"
},
"scripts": {
"ui:add": "bunx shadcn@latest add"
"ui:add": "bunx shadcn@latest add",
"typecheck": "tsgo --noEmit -p tsconfig.json",
"typecheck:tsc": "tsc --noEmit -p tsconfig.json"
},
"dependencies": {
"@radix-ui/react-slot": "^1.1.0",
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"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.

"outDir": "dist",
"rootDir": "src",
"declaration": true,
Expand Down