fallow-extract 3.45.0

AST extraction engine for fallow codebase intelligence (parser, complexity, SFC / Astro / MDX / CSS)
Documentation
//! Incremental parse cache with bitcode serialization.
//!
//! Stores parsed module information (exports, imports, re-exports) on disk so
//! unchanged files can skip AST parsing on subsequent runs. Uses xxh3 content
//! hashing to detect changes.

mod conversion;
mod store;
mod types;

#[cfg(all(test, not(miri)))]
mod tests;

/// A test cache directory that is its own write base.
#[cfg(all(test, not(miri)))]
fn at(dir: &std::path::Path) -> fallow_types::path_guard::CacheTarget<'_> {
    fallow_types::path_guard::CacheTarget::inside(dir)
}

#[cfg(test)]
pub(crate) use conversion::module_to_cached_from_parts;
pub use conversion::{
    cached_hit_to_module, cached_to_module, cached_to_module_opts, current_unix_seconds,
    module_to_cached,
};
pub use store::CacheStore;
pub use types::{
    CachedDynamicImport, CachedDynamicImportPattern, CachedExport, CachedImport, CachedMember,
    CachedModule, CachedReExport, CachedRequireCall, CachedSuppression, DEFAULT_CACHE_MAX_SIZE,
    DUPES_CACHE_VERSION,
};