v3.3.0
What's New
Rich pmat extract --list output (#217)
pmat extract --list now returns a rich JSON object instead of a flat array, providing everything needed to split large files into compilable parts:
New top-level fields:
file— file pathlanguage— detected language (rust,typescript,python,c,cpp,go,lua)imports— all top-level import/use statements (full text)cfg_test_line— line where#[cfg(test)]appears (Rust only)
New per-item field:
visibility—"pub","pub(crate)","pub(super)","export", or""(private)
Example output:
{
"file": "src/lib.rs",
"language": "rust",
"imports": ["use std::collections::HashMap;"],
"cfg_test_line": 150,
"items": [
{"name": "process", "type": "function", "start_line": 10, "end_line": 25, "lines": 16, "visibility": "pub"}
]
}Visibility detection per language:
| Language | Public | Crate-scoped | Private |
|---|---|---|---|
| Rust | pub |
pub(crate), pub(super) |
"" |
| TypeScript | export |
— | "" |
| Go | pub (uppercase) |
— | "" |
| Python, C, C++, Lua | — | — | "" |
Install
cargo install pmatFull Changelog: v3.2.0...v3.3.0