[ty] Add "list modules" implementation

The actual implementation wasn't too bad. It's not long
but pretty fiddly. I copied over the tests from the existing
module resolver and adapted them to work with this API. Then
I added a number of my own tests as well.
This commit is contained in:
Andrew Gallant 2025-08-12 14:14:31 -04:00 committed by Andrew Gallant
parent ec7c2efef9
commit 4db20f459c
3 changed files with 1679 additions and 2 deletions

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,6 @@
use std::iter::FusedIterator;
pub use list::list_modules;
pub(crate) use module::KnownModule;
pub use module::Module;
pub use path::SearchPathValidationError;
@ -12,6 +13,7 @@ use crate::Db;
use crate::module_resolver::resolver::{ModuleResolveMode, search_paths};
use resolver::SearchPathIterator;
mod list;
mod module;
mod path;
mod resolver;