supafreeze 2.1.1 copy "supafreeze: ^2.1.1" to clipboard
supafreeze: ^2.1.1 copied to clipboard

Generate Freezed models from Supabase database schema automatically. Supports incremental generation, smart caching, and build_runner integration.

Changelog #

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

2.1.1 - 2026-03-11 #

Fixed #

  • enum型フィールドがdynamicになるバグを修正(mergeEnumTypesにOpenAPI enum情報を渡すよう修正)

2.1.0 - 2026-03-11 #

Added #

  • PostgreSQL enum auto-generation (generate_enums)
    • Queries pg_enum catalog via execute_sql RPC to fetch enum type definitions
    • Generates Dart enum files with toJson()/fromJson() for JSON serialization
    • Freezed model fields use generated Dart enum types instead of String
    • Configurable output directory via enum_output (default: {output}/enums)
    • Falls back to OpenAPI spec detection when execute_sql is not available
    • Handles special characters in enum values (hyphens, digits, reserved words)
    • Generates barrel file enums.dart for convenient imports
  • EnumGenerator class for Dart enum code generation
  • SupafreezeConfig.generateEnums and SupafreezeConfig.enumOutput settings

Changed #

  • Bumped supabase_schema_core dependency to ^1.4.0

2.0.3 - 2026-02-18 #

Fixed #

  • Generated models now use abstract class instead of class for freezed 3.x compatibility with Dart 3.10+

2.0.2 - 2026-02-18 #

Fixed #

  • Widened analyzer constraint to >=9.0.0 <11.0.0 (supports latest stable)
  • Added example file for pub.dev scoring

2.0.1 - 2026-02-18 #

Fixed #

  • Added comprehensive ignore_for_file directives to suppress lint warnings in generated code

2.0.0 - 2026-02-12 #

Changed #

  • Major version bump for breaking changes

1.0.6 - 2025-12-10 #

Fixed #

  • Added CHANGELOG.md entries for all versions to satisfy pub.dev validation

1.0.5 - 2025-12-10 #

Fixed #

  • Fixed Dart formatting issues for pub.dev static analysis compliance
  • All source files now pass dart format check

1.0.4 - 2025-12-10 #

Fixed #

  • Formatted Dart sources to satisfy pub.dev static analysis checks
  • Bumped package version to align with latest release tag

1.0.3 - 2025-12-10 #

Fixed #

  • Fixed analyzer compatibility for build_runner integration

1.0.2 - 2025-12-10 #

Fixed #

  • Loosened analyzer range to stay compatible with build_runner/freezed toolchains while still allowing latest releases
  • Updated example dependencies to resolve build_runner formatting errors caused by analyzer incompatibility

1.0.1 - 2025-12-10 #

Changed #

  • Renamed Supabase environment variable to SUPABASE_DATA_API_URL in docs and validations for clarity

1.0.0 - 2024-12-10 #

Added #

  • Initial release
  • Fetch table schema from Supabase via OpenAPI spec
  • Generate Freezed models with fromJson/toJson
  • build_runner integration (runs before freezed/json_serializable)
  • Per-table incremental caching with SHA256 hashes
  • Automatic file cleanup when tables are deleted
  • Configuration via supafreeze.yaml
  • Variable resolution from dart-define, .env, and environment variables
  • Fetch modes: always, if_no_cache, never
  • Table filtering with include/exclude options
  • Optional barrel file generation
  • Comprehensive PostgreSQL to Dart type mapping
  • Property sorting (required first, grouped by type)
  • snake_case to camelCase conversion with @JsonKey annotations
  • Support for nullable fields, primary keys, and default values
  • Relation embedding - Auto-detect FK from *_id columns and embed related models
  • Per-table relation configuration with relations option
  • Dart reserved word escaping for field and class names
  • Custom enum type detection from OpenAPI spec
  • CLI tool (dart run supafreeze:supafreeze) for manual schema sync
  • --force flag to regenerate all models regardless of cache
1
likes
130
points
213
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Generate Freezed models from Supabase database schema automatically. Supports incremental generation, smart caching, and build_runner integration.

Homepage
Repository (GitHub)
View/report issues

Topics

#supabase #freezed #code-generation #build-runner #postgresql

License

MIT (license)

Dependencies

analyzer, build, crypto, http, path, recase, source_gen, supabase_schema_core, yaml

More

Packages that depend on supafreeze