skif-js-syntax 0.2.0

oxc-based JS/TS module facts and static config extraction for skif; never executes code.
Documentation

skif-js-syntax

The oxc boundary of skif: one JavaScript or TypeScript file in, skif-owned facts out.

  • parse_module returns a ModuleInfo: imports (static, dynamic, require, import.meta.glob, re-exports, with the members accessed through each binding), exports (kind, JSDoc tags, enum and namespace members, removal ranges, custom element registrations), in-file references to exports, and CommonJS/JSX/directive hints.
  • extract_config_object statically evaluates the object a tool config file exports; extract_config_object_with also follows the modules it imports through a ModuleLoader. Nothing is ever executed.
  • parse_cached parses through a ModuleCache (MemoryModuleCache in memory) under a ModuleKey of the file name, its text, the parse options and the crate version, so an unchanged file is not parsed again.

No oxc type appears in the public API; the oxc crates are held to one release (see ADR 0010).