Skip to content

Ack 2.0.0-alpha.1

Pre-release
Pre-release

Choose a tag to compare

@leoafarias leoafarias released this 22 Oct 13:56
· 5 commits to main since this release
796f572

First prerelease of Ack 2.0, published for ack, ack_generator, ack_json_schema_builder, ack_firebase_ai and ack_mcp_dart. It runs on stable Dart (3.13 language features, including primary constructors on @Schemable classes).

Breaking

  • Remove the legacy 1.x generator annotations (@AckType, @AckInfer, @AckModel, @AckField and friends). Use @Schemable() on top-level schemas and on hand-written classes and unions.
  • Replace the top-level presence and constraint annotations (@Optional, @Min, @Matches, @Email, …) and package:ack/format_annotations.dart with the @Validate.* namespace.
  • Remove Ack.enumCodec (use Ack.enumValues) and the unused StandardSchemaV1; seal SchemaError and AckSchema.
  • Ack.fromJsonSchema() defaults to assertFormats: false, matching Draft 2020-12; toJsonSchema() preserves imported Draft 2020-12 resources (use toJsonSchemaDraft7() for Draft-07 lowering).

Added

  • @Validate.* presence and constraint annotations, exported from package:ack/ack.dart and package:ack/annotations.dart.
  • JsonMaybe<T> for PATCH-style tri-state presence.
  • @Schemable(schemas: [...]) and @AckKey('...') for custom schema registration and wire-name overrides.
  • Two-way string normalizers (.trim(), .toLowerCase(), .toUpperCase()) on StringSchema.
  • The complete JSON Schema Draft 2020-12 validation runtime in Ack.fromJsonSchema().
  • The generator emits one .g.dart part per library and applies scalar @Validate.* constraints to List/Set items.

Full notes are in each package's CHANGELOG.md under 2.0.0-alpha.1.