-
Notifications
You must be signed in to change notification settings - Fork 14
chore(cli): Convert JS files to TS (part III) #873
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for cedarjs canceled.
|
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx run-many -t test --minWorkers=1 --maxWorkers=4 |
❌ Failed | 1m 17s | View ↗ |
nx run-many -t build:pack --exclude create-ceda... |
✅ Succeeded | 8s | View ↗ |
nx run-many -t build |
✅ Succeeded | 8s | View ↗ |
nx run-many -t test:types |
✅ Succeeded | 6s | View ↗ |
☁️ Nx Cloud last updated this comment at 2025-12-30 12:53:30 UTC
Greptile SummaryThis PR continues the TypeScript migration of the Cedar CLI by converting 23 JavaScript files to TypeScript. The conversion includes:
The conversion adds proper type safety through:
Previous syntax issues from thread comments have been addressed - template literal interpolation now works correctly in both Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Dev as Developer
participant CLI as Cedar CLI
participant TS as TypeScript Compiler
participant Babel as Babel
participant Yargs as Yargs Parser
Note over Dev,CLI: JS to TS Conversion Process
Dev->>CLI: Runs CLI command (e.g., cedar build)
CLI->>Yargs: Parse command with typed Argv<T>
Yargs-->>CLI: Typed command options
alt Command requires handler execution
CLI->>TS: Type-check handler with interfaces
Note over CLI,TS: BuildOptions, ExecOptions, etc.
TS-->>CLI: Type validation passed
CLI->>Babel: Transpile TS files with @ts-expect-error
Note over Babel: For lib/colors.js, lib/exec.js, etc.
Babel-->>CLI: Compiled JS code
CLI->>CLI: Execute handler logic
alt Command involves external tools
CLI->>CLI: Run Prisma/ESLint/Jest via execa
end
end
Note over Dev,CLI: All commands now have type safety
CLI-->>Dev: Command execution result
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional Comments (1)
-
packages/cli/src/commands/execHandler.ts, line 177-179 (link)syntax: Same template literal interpolation issue
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
31 files reviewed, 3 comments
|
@greptileai Please do a full review again and update your review summary |

Continue on #855