Skip to content

v0.1.7

Choose a tag to compare

@homanp homanp released this 04 Feb 16:24
· 34 commits to main since this release
24702bd
Screenshot 2026-02-04 at 17 24 16

v0.1.7 - Registry Plugin System

Refactored package scanning into a pluggable adapter-based architecture for easier multi-registry support

Features

  • Registry Adapter Architecture - New RegistryAdapter trait defines a standard interface for registry-specific logic (metadata fetching, package downloading, trust scoring, CVE ecosystem mapping)
  • Unified Package Types - Introduced ExtractedPackage and PackageMetadata types that work across all registries, eliminating duplicate code paths
  • Adapter Registry - Central AdapterRegistry manages multiple adapters, making it easy to add new registries by implementing the trait
  • Unified Scanner Methods - New scan_unified() and scan_tarball_unified() methods replace registry-specific scan functions

Technical Changes

  • NpmAdapter - Refactored existing npm client into adapter pattern with fetch_metadata, download_package, extract_local, and compute_trust_score
  • PypiAdapter - Refactored existing PyPI client into adapter pattern with support for both sdist and wheel formats
  • Capabilities Module - Updated to detect language (Python vs JS/TS) from unified SourceFile types and apply appropriate analysis
  • Simplified Worker Dispatch - Main worker loop now uses single code path for all registries

Architecture

RegistryAdapter (trait)
├── NpmAdapter → npm registry
├── PypiAdapter → PyPI registry
└── CratesAdapter → crates.io (future)

Benefits

  • Extensibility - Add new registries by implementing RegistryAdapter trait
  • Maintainability - Single unified scan path instead of duplicated npm/PyPI code
  • Consistency - All registries produce the same ExtractedPackage format for downstream processing

Full Changelog: v0.1.6...v0.1.7

What's Changed

  • feat: add registry plugin system by @homanp in #27

Full Changelog: v0.1.6...v0.1.7