Releases: yelmuratoff/analytics_gen
Releases · yelmuratoff/analytics_gen
v1.0.4
v1.0.4
- 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.
What's Changed
- Feature/v1.0.1 by @yelmuratoff in #6
- v1.0.4 by @yelmuratoff in #7
Full Changelog: v1.0.1...v1.0.4
v1.0.1
[1.0.1]
- Enhance SQL generator with additional event and parameter metadata, sorting, and utility functions for improved data representation.
- Update analytics CSV and JSON export formats with new event metadata fields and improved structure.
- Delete
ParameterParserand its tests, consolidating parameter parsing logic into shared components. - Formalize analytics data representation with dedicated
AnalyticsParameterandAnalyticsDomainmodels. - Conditionally generate Flutter or Dart test imports based on project type.
Full Changelog: v1.0.0...v1.0.1
v1.0.0
[1.0.0]
- Add new documentation files and configure pubspec for API reference links and dartdoc inclusion.
Full Changelog: v0.2.1...v1.0.0
v0.2.1
[0.2.1] - 2025-11-21
Breaking Changes
- Configuration Structure Update: The
analytics_gen.yamlfile has been completely restructured into logical groups (inputs,outputs,targets,rules) to improve readability and organization.- Migration Guide:
# Old (v0.2.0) analytics_gen: events_path: events output_path: lib/src/analytics docs_path: docs/analytics.md generate_docs: true strict_event_names: true event_parameters_path: events/shared.yaml # New (v0.2.1) analytics_gen: inputs: events: events shared_parameters: - events/shared.yaml outputs: dart: lib/src/analytics docs: docs/analytics.md targets: docs: true rules: strict_event_names: true
- Note: The old flat structure is deprecated but may still work for some fields during a transition period, though migration is strongly recommended.
event_parameters_pathis strictly removed in favor ofinputs.shared_parameters.
- Migration Guide:
Highlights
- Improved error reporting, validation, and generated code ergonomics.
- Better CSV/exports, optional PII scrubbing, and safer enum generation for parameter values.
- Added telemetry hooks and testing helpers (e.g.,
Analytics.reset()).
Documentation & DX
- Clarified
BatchingAnalytics.flush()behavior and updated README guidance. - Added CI example for plan validation in
doc/VALIDATION.md.
Key Additions
- Shared Event Parameters: Support for centrally defined parameters via
shared_parameters.- Reuse parameters across events by referencing them (or leaving value as
null). - Enforce consistency with
enforce_centrally_defined_parameters. - Prevent duplicates with
prevent_event_parameter_duplicates.
- Reuse parameters across events by referencing them (or leaving value as
- Enhanced CSV export (multiple files, better escaping).
- Parameter validation DSL:
regex,min_length,max_length,min,maxwith runtime checks. - PII scrubbing support (
PiiRenderer+Analytics.sanitizeParams). - Enum generation for parameters with
allowed_values.
Internal Improvements
BaseRendererto share common rendering logic across generators.- Generation telemetry (
GenerationTelemetry+ implementations) integrated intoCodeGenerator. - Validator separation:
SchemaValidatorextracted fromYamlParserwith tests. YamlParserrefactored to useloadYamlNodeand enforces strict event-name rules.
Misc
- Added
ignore_for_filelints and generation timestamp to generated files. Analytics.reset()for testing and hot-restart scenarios.
Full Changelog: v0.2.0...v0.2.1
v0.2.0
[0.2.0] - 2025-11-20
- Updates:
- Optimized generator performance with parallel processing and smart I/O.
- Stable API supporting both Dependency Injection and Singleton patterns.
- Major Features:
- Extensible Metadata: Support for arbitrary key-value pairs (
meta) in YAML, propagated to code and exports. - Batching & Async: Added
BatchingAnalyticsfor buffering events andAsyncAnalyticsAdapterfor heavy providers. - Flexible Naming: Configurable naming strategies for domains, events, and parameters.
- Strict Mode: Added
strict_event_namesto prevent high-cardinality anti-patterns.
- Extensible Metadata: Support for arbitrary key-value pairs (
- Developer Experience:
- Improved Error Reporting: Aggregated validation errors for faster debugging.
- Performance: Parallelized generation and incremental file writes.
- Documentation: Added migration guides, scalability benchmarks, and onboarding checklists.
- Quality Assurance:
- Full test coverage (100%).
- Stricter linting rules and CI guardrails.
Full Changelog: v1.0.6...v0.2.0
v0.1.6
- Add
include_event_descriptionconfig option to optionally include an
event'sdescriptionproperty inside the emittedlogger.logEvent
parameters map. This flag defaults tofalseto preserve existing
behavior; enable it viaanalytics_gen.yaml(key:include_event_description).- The code generator now inserts a
'description'key for events that
have a non-empty description when the flag is enabled. - The example config and
README.mdwere updated to document this flag. - Unit tests assert that descriptions are properly included when enabled
and omitted otherwise.
- The code generator now inserts a
- Support interpolated placeholders in custom
event_namestrings- You can now include parameter placeholders in
event_nameusing
{parameter_name}and the code generator will replace them with
Dart string interpolation in generated methods (for example,
"Screen: {screen_name}"→"Screen: ${screenName}"). - The raw
event_namestill appears unchanged in docs/exports so
metadata remains stable across teams and exports. - If a placeholder doesn't match a parameter, it is preserved as-is
(no silent mutations), so designs and engineers can detect typos
or handle advanced use cases explicitly.
- You can now include parameter placeholders in
v1.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.