Describe the solution you'd like
Just make work this awesome lib for Deno
It would be great. ts-morph was actually previously used in Deno's build system when it was still on node.
ts-morph doesn't have too many dependencies, so I don't believe this would be too hard. I think probably the easiest solution here would be to build code-block-writer for Deno (has no dependencies), then bundle ts-morph and @ts-morph/common into a single file, then implement https://github.com/dsherret/ts-morph/blob/latest/packages/common/src/fileSystem/RealFileSystemHost.ts for Deno.
Opened https://github.com/dsherret/code-block-writer/issues/36
Edit: This is complete now.
One part about this was figuring out how to bundle the .d.ts files (aka lib files) for Deno. https://github.com/dsherret/ts-morph/pull/934 should solve this, but I think for Deno it will have to remove the "require" and always load the lib files module in getLibFiles()
ts-morph/common dependencies
ensureDir at https://deno.land/[email protected]/fs/README.mdexpandGlob https://deno.land/[email protected]/fsts-morph dependencies
Remaining Tasks
Deno implementation of the Runtime interface.Deno. Can just be a single file.Runtime and add some basic tests for Deno.@hemedani this is now available here: https://deno.land/x/ts_morph
Note that I haven't developed a way to run the tests for the Deno module yet, so it might be a little bit unstable. I started using it in some of my Deno code in a different repo and seems to work well so far...
awesome