Files
composiohq__composio/.changeset
Kshitiz 446c6f65bf fix(cli): unify virtual TypeScript compiler host resolution (#3182)
## Summary
This PR resolves the TODO in
`ts/packages/cli/src/generation/typescript/transpile.ts` by extracting
the shared virtual TypeScript compiler-host logic used by both
production transpilation and test validation.

While doing that refactor, it also fixes a real virtual
module-resolution issue: TypeScript may resolve in-memory files using
`./file.ts`, `file.ts`, or absolute paths, and the previous setup did
not handle those lookups consistently.


## Changes
- added
`ts/packages/cli/src/generation/typescript/virtual-compiler-host.ts`
- extracted shared helpers for virtual file-map creation, compiler-host
patching, and diagnostic formatting
- updated `ts/packages/cli/src/generation/typescript/transpile.ts` to
use the shared helper
- updated `ts/packages/cli/test/__utils__/typescript-compiler.ts` to use
the same shared helper
- updated affected tests to validate complete generated module sets
instead of incomplete single-file inputs
- added a patch changeset for `@composio/cli`

## Type of change
- [x] Bug fix
- [x] Refactor/Chore

## How Has This Been Tested?
Ran focused checks on the touched CLI TypeScript
generation/compiler-host paths:

```bash
pnpm --dir ts/packages/cli exec prettier --check src/generation/typescript/transpile.ts src/generation/typescript/virtual-compiler-host.ts test/__utils__/typescript-compiler.ts test/src/generation/typescript/generate.test.ts test/src/commands/ts/ts.generate.cmd.test.ts
pnpm --dir ts/packages/cli exec vitest run test/__utils__/typescript-compiler.ts
pnpm --dir ts/packages/cli exec vitest run test/src/generation/typescript/generate.test.ts

---------

Co-authored-by: Alberto Schiabel <jkomyno@users.noreply.github.com>
Co-authored-by: jkomyno <alberto@composio.dev>
2026-06-24 18:28:45 +04:00
..
2025-05-19 19:30:29 +05:30

Changesets

Hello and welcome! This folder has been automatically generated by @changesets/cli, a build tool that works with multi-package repos, or single-package repos to help you version and publish your code. You can find the full documentation for it in our repository

We have a quick list of common questions to get you started engaging with this project in our documentation