tom_build_base 1.3.2
tom_build_base: ^1.3.2 copied to clipboard
Shared utilities for Tom build tools — configuration loading from buildkit.yaml, project scanning, path validation, and build.yaml utilities.
1.3.2 #
Internal #
- Config filename standardization — Updated all code references from
tom_build.yamltobuildkit.yaml. TheTomBuildConfig.projectFilenameconstant was already correct; this release ensureshasTomBuildConfig()andProjectDiscovery.getProjectRecursiveSetting()use the constant instead of hardcoded strings.
1.3.0 #
Features #
yamlToMap()utility — Public function to recursively convertYamlMapto plainMap<String, dynamic>. Eliminates private YAML-to-Map conversion duplicated across build tools.yamlListToList()utility — Companion function to recursively convertYamlListto plainList<dynamic>.
Internal #
- Replaced private
_convertYamlToMapinbuild_config.dartand_yamlToMap/_yamlListToListinbuild_yaml_utils.dartwith the shared public utilities.
1.2.0 #
Features #
show_versionsCLI tool — New executable inbin/show_versions.dart. Run viadart run tom_build_base:show_versions [workspace-path]or install globally withdart pub global activate tom_build_base.showVersions()library function — Importable API inlib/src/show_versions.dartthat discovers projects and reads their pubspec versions. Returns a structuredShowVersionsResult.readPubspecVersion()helper — Reusable function to read theversion:field from any project'spubspec.yaml.
Improvements #
- Example file now delegates to the library function instead of reimplementing the logic.
1.1.0 #
Improvements #
- Comprehensive example — Rewrote the example as a
show_versionsCLI tool that exercises every library feature: config loading & merging, project scanning & discovery, build.yaml utilities, path validation, and result tracking. - Updated user guide — Complete rewrite of
doc/build_base_user_guide.mdwith accurate API signatures,ConfigMergerdocumentation,ProjectDiscoverysection, and an API quick-reference table. - Updated README — Refreshed usage examples to cover
ConfigMerger,ProjectDiscovery, and allbuild.yamlutility functions.
1.0.0 #
Features #
- TomBuildConfig: Unified configuration loading from
tom_build.yamlfiles with support for project paths, glob patterns, scan directories, recursive traversal, exclusion patterns, and tool-specific options. - ProjectScanner: Directory traversal with configurable project validation. Finds subprojects, scans directories recursively, supports glob-based project matching, and applies exclusion patterns.
- ProjectDiscovery: Advanced project discovery with proper scan vs recursive semantics. Scans until it hits a project boundary; recursive mode also looks inside found projects for nested projects. Supports comma-separated glob patterns with brace group handling.
- build.yaml utilities: Detect builder definitions (
isBuildYamlBuilderDefinition) vs consumer configurations (hasBuildYamlConsumerConfig) — so CLI tools can skip packages that define builders and only process consumer packages. - Path utilities: Path containment validation (
isPathContained) and multi-path validation (validatePathContainment) for security. - ProcessingResult: Simple success/failure/file-count tracking for batch operations.
- Multi-project support:
--projectoption accepts comma-separated lists and glob patterns (e.g.,tom_*,xternal/tom_module_*/*). --listflag support: Tools can list discovered projects without processing.