Skip to content

Latest commit

 

History

History
106 lines (87 loc) · 3.99 KB

File metadata and controls

106 lines (87 loc) · 3.99 KB

Changelog

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

[0.12.2] - 2026-02-18

  • Empty release for the gem republishing;

[0.12.1] - 2026-02-18

Fixed

  • Nested schemas requires :hash type for their schema key, but this type is resolved from the type alias, not from the type object.
    • Added an object reference to the hash primitive in type interop subsystem (interop + abstract factory);
    • each type system should provide hash type class:
      • smart-core provides/recognizes nested structures with SmartCore::Types::Hash;
      • dry-types provides/recognizes nested structures with Dry::Types['hash'];
# before:

require 'dry-types'
SmartCore::Schema::Configuration.configure { |c| c.type_system = :dry_types }

class MySchema < SmartCore::Schema
  schema do
    requried(:some_data) do # <- previously: failed on unrecognized type with :hash alias
      requireqd(:some_key).type(Dry::Types['string'])
    end
  end
end

[0.12.0] - 2026-02-17

Added

  • Plugin ecosystem;
  • Support for Ruby@4.x;
  • Support for dry-types type system;
  • An ability to chose the preferred type system (globally at the moment):
    • supports smart-types (by default);
    • supports dry-types (as a plugin);

Changed

  • Ruby@3.3 is a minimal ruby version at the moment;

[0.11.0] - 2022-11-25

Changed

  • Reduced object allocation count inside the type validation logic (updated smart_types to ~> 0.8);
  • Support for Ruby@2.5 and Ruby@2.6 has ended;
  • Updated development dependencies;

[0.10.0] - 2022-10-16

Changed

  • Updated smart_engine dependency with a SmartCore::Engine::ReadWriteLock fixes;

[0.9.0] - 2022-09-30

Changed

  • Reduced context switching count during lock operations (migrate from SmartCore::Engine::Lock to SmartCore::Engine::ReadWriteLock);

[0.8.0] - 2022-09-30

Changed

  • Reduced object allocations and mutex usage:
    • only one mutex of SmartCore::Schema::Checker instance is enough cuz this mutex covers the entire validation process;
    • more retained objects in SmartCore::Schema::Checker::Rules (cache layer for rule names);
  • Updated development dependencies;
  • Updated smart_engine dependency (~> 0.11 -> ~> 0.13);

[0.7.0] - 2022-09-28

Changed

  • Started the total code refactoring in order to decrease object and memory allocations:
    • Decreased object allocations in SmartCore::Schema::Checker::VerifiableHash#fetch(key)

[0.6.0] - 2022-09-27

Added

  • Now Forwardable module has explicit requiring in order to support Ruby@3.1 (lib/smart_core/smart_schema.rb#6);

[0.5.0] - 2021-01-18

Changed

  • Updated smart_types dependency (~> 0.4.0) to guarantee Ruby@3 compatability;

[0.4.0] - 2021-01-18

Added

  • Support for Ruby@3;

Changed

  • No more TravisCI (TODO: migrate to GitHub Actions);
  • Updated development dependencies;

[0.3.0] - 2020-12-03

Added

  • Support for strict and non-strict schemas;
    • strict! DSL directive marks your schema as a strict schema (your hash can not have extra keys);
    • non_strict! DSL directive marks your schema as non-strict schema (your hash can have extra keys);
    • use strict! in any schema's context place to mark your current schema context as a strict;
    • use non_strict in any schema's context place to mark your current schema context as a strict;
    • use schema(:strict) to globally define strict schema (default behavior);
    • use schema(:non_strict) to globally define non-strict schema;
    • nested schemas inherits strict behavior from outer schemas;
    • root schema is :strict by default;
    • schema reopening without mode attribute does not change original schema mode (you should manually pass a mode attribute to redefine already defined schema mode);

[0.2.0] - 2020-11-09

Added

  • #errors now includes #extra_keys too (:extra_key error code for each extra key);
  • Unfreezed SmartCore::Schema::Checker::Rules::TYPE_ALIASES for extendability (until smart_type-syste has been integrated);

[0.1.0] - 2020-08-25

  • Release :)