-
Notifications
You must be signed in to change notification settings - Fork 14
chore(cli): Convert JS files to TS (part I) #855
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
Conversation
✅ Deploy Preview for cedarjs canceled.
|
Greptile SummaryThis PR converts several CLI JavaScript files to TypeScript as part of an incremental migration to improve type safety in the CLI codebase. Key Changes
Type Safety Improvements
Temporary WorkaroundsSeveral Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant CLI as CLI (dev.ts)
participant Handler as devHandler.ts
participant Config as project-config
participant Ports as ports.ts
participant Prisma as generatePrismaClient
participant Concurrent as concurrently
User->>CLI: yarn cedar dev
CLI->>Handler: handler(options)
Handler->>Config: getConfig()
Config-->>Handler: config (port numbers, etc)
Handler->>Ports: getFreePort(apiPreferredPort)
Ports-->>Handler: apiAvailablePort
Handler->>Ports: getFreePort(webPreferredPort, excludePorts)
Ports-->>Handler: webAvailablePort
alt ports changed
Handler->>User: exitWithError (port conflict)
end
Handler->>Prisma: generatePrismaClient()
Prisma-->>Handler: success/error
Handler->>Handler: shutdownPort(apiAvailablePort)
Handler->>Handler: shutdownPort(webAvailablePort)
Handler->>Config: getConfigPath()
Config-->>Handler: redwoodConfigPath
Handler->>Handler: Build jobs config (api, web, gen)
Handler->>Concurrent: concurrently(jobs)
Concurrent-->>User: Start dev servers
|
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.
12 files reviewed, 1 comment
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx run-many -t build:pack --exclude create-ceda... |
✅ Succeeded | 2s | View ↗ |
nx run-many -t build |
✅ Succeeded | 9s | View ↗ |
nx run-many -t test --minWorkers=1 --maxWorkers=4 |
✅ Succeeded | 1m 41s | View ↗ |
nx run-many -t test:types |
✅ Succeeded | 9s | View ↗ |
☁️ Nx Cloud last updated this comment at 2025-12-27 16:16:28 UTC
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx run-many -t build |
✅ Succeeded | 5s | View ↗ |
☁️ Nx Cloud last updated this comment at 2025-12-27 15:56:40 UTC
de43992 to
1b538b1
Compare

It's scary working on the CLI because it doesn't have any types. It's one of the oldest parts of the code base and it's still written in JavaScript. I'm going to start working on adding types a few files at a time