Skip to content

Releases: yelmuratoff/analytics_gen

v1.0.4

20 Dec 20:57
66fd854

Choose a tag to compare

v1.0.4

  • Introduced CapabilityProviderBase to replace CapabilityProviderMixin (deprecated).
  • Added --metrics flag to track generation performance.
  • Added "Dead Event" Audit Enhancement with git commit info.
  • Glob Pattern Support: EventLoader now 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

Full Changelog: v1.0.1...v1.0.4

v1.0.1

23 Nov 09:05

Choose a tag to compare

[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 ParameterParser and its tests, consolidating parameter parsing logic into shared components.
  • Formalize analytics data representation with dedicated AnalyticsParameter and AnalyticsDomain models.
  • Conditionally generate Flutter or Dart test imports based on project type.

Full Changelog: v1.0.0...v1.0.1

v1.0.0

22 Nov 19:34

Choose a tag to compare

[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

22 Nov 15:35

Choose a tag to compare

[0.2.1] - 2025-11-21

Breaking Changes

  • Configuration Structure Update: The analytics_gen.yaml file 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_path is strictly removed in favor of inputs.shared_parameters.

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.
  • Enhanced CSV export (multiple files, better escaping).
  • Parameter validation DSL: regex, min_length, max_length, min, max with runtime checks.
  • PII scrubbing support (PiiRenderer + Analytics.sanitizeParams).
  • Enum generation for parameters with allowed_values.

Internal Improvements

  • BaseRenderer to share common rendering logic across generators.
  • Generation telemetry (GenerationTelemetry + implementations) integrated into CodeGenerator.
  • Validator separation: SchemaValidator extracted from YamlParser with tests.
  • YamlParser refactored to use loadYamlNode and enforces strict event-name rules.

Misc

  • Added ignore_for_file lints 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

20 Nov 07:05

Choose a tag to compare

[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 BatchingAnalytics for buffering events and AsyncAnalyticsAdapter for heavy providers.
    • Flexible Naming: Configurable naming strategies for domains, events, and parameters.
    • Strict Mode: Added strict_event_names to prevent high-cardinality anti-patterns.
  • 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

17 Nov 06:43

Choose a tag to compare

  • Add include_event_description config option to optionally include an
    event's description property inside the emitted logger.logEvent
    parameters map. This flag defaults to false to preserve existing
    behavior; enable it via analytics_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.md were updated to document this flag.
    • Unit tests assert that descriptions are properly included when enabled
      and omitted otherwise.
  • Support interpolated placeholders in custom event_name strings
    • You can now include parameter placeholders in event_name using
      {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_name still 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.

v1.0.5

16 Nov 11:51

Choose a tag to compare

  • Added templates/analytics_gen.yaml as a reference for all configuration options.
  • Added templates/events.yaml demonstrating event and parameter definitions.
  • Update README to enhance clarity and structure of analytics_gen documentation.
  • Add onboarding and AI prompt guides to documentation; enhance README with new links.