analytics_gen 1.0.5
analytics_gen: ^1.0.5 copied to clipboard
Type-safe analytics event tracking with code generation from YAML configuration. Supports multiple providers, testing utilities, and export formats.
Changelog #
All notable changes to this project will be documented in this file.
1.0.5 #
- Added
templates/analytics_gen.yamlas a reference for all configuration options. - Added
templates/events.yamldemonstrating event and parameter definitions. - Update README to enhance clarity and structure of
analytics_gendocumentation. - Add onboarding and AI prompt guides to documentation; enhance README with new links.
1.0.4 #
Improvements #
- Introduced
CapabilityProviderBaseto replaceCapabilityProviderMixin(deprecated). - Added
--metricsflag to track generation performance. - Added "Dead Event" Audit Enhancement with git commit info.
- Glob Pattern Support:
EventLoadernow supports glob patterns (e.g.,events/**/*.yaml). - Improved Fingerprint Sensitivity: covers all event/parameter fields.
- Cross-Platform Robustness: Normalized path handling for Windows/macOS/Linux.
- Added
doc/PERFORMANCE.md,doc/TROUBLESHOOTING.md,doc/TESTING.md.
Bug Fixes #
- Fixed data loss bug in
BatchingAnalyticswhere queue would stall after failed auto-flush. - Fixed
ConfigParsercrash when optional fields are explicitlynull. CapabilityRegistrynow throwsStateErroron duplicate capability keys.- Added default error logging to
BatchingAnalyticsandMultiProviderAnalytics.
1.0.3 #
Features #
- Added "Dead Event" Audit Command (
dart run analytics_gen:audit). - Added
test_matcherstarget to generate typedpackage:testmatchers. - Added
dart_typeparameter option to map parameters to existing Dart types. - Added
importsconfiguration for including external types. - Added configurable event naming strategy (
casing:snake_case,title_case,original).
Improvements #
- Generated code now uses
constmaps for constant event parameters. - Removed auto-generated tests in favor of
test_matchers.
1.0.2 #
- Enhanced SQL/CSV/JSON export formats with additional metadata.
- Formalized analytics data representation with
AnalyticsParameterandAnalyticsDomainmodels. - Conditionally generate Flutter or Dart test imports based on project type.
1.0.0 #
- Stable release with full documentation and API reference.
0.2.1 #
Breaking Changes #
- Configuration restructured into logical groups (
inputs,outputs,targets,rules).# Old → New events_path → inputs.events output_path → outputs.dart docs_path → outputs.docs event_parameters_path → inputs.shared_parameters
Features #
- Shared Event Parameters via
shared_parametersconfig. - Parameter validation DSL:
regex,min_length,max_length,min,max. - Enum generation for parameters with
allowed_values. - Enhanced CSV export with multiple files and better escaping.
Analytics.reset()for testing and hot-restart scenarios.
0.2.0 #
Features #
- Extensible Metadata: Support for
metakey-value pairs in YAML. - Batching & Async: Added
BatchingAnalyticsandAsyncAnalyticsAdapter. - Flexible Naming: Configurable naming strategies.
- Strict Mode:
strict_event_namesto prevent high-cardinality.
Improvements #
- Optimized generator with parallel processing.
- Full test coverage (100%).
0.1.6 #
- Added
include_event_descriptionconfig option. - Support interpolated placeholders in
event_name(e.g.,"Screen: {screen_name}").
0.1.5 #
- Full test coverage.
- Added GitHub Actions CI.
0.1.4 #
Features #
- Added CLI flags:
--validate-only,--watch,--verbose,--plan. MultiProviderAnalyticswith error isolation andonProviderFailurehook.- Event deprecation lifecycle with
deprecated+replacement. allowed_valuesfor parameters with runtime validation.- Deterministic fingerprints in exports (no timestamps).
Improvements #
- Stricter YAML parser with better error messages.
RecordedAnalyticsEventfor typed mock assertions.
0.1.3 #
- Fix badge issues.
0.1.2 #
- Refactor string interpolation in code generation.
0.1.1 #
- Minor updates and fixes.
0.1.0 #
- Minor updates and fixes.
0.0.1 #
- Initial release.