Releases: joeldrapper/literal
Releases Β· joeldrapper/literal
1.4.0
Whatβs Changed
- Fixed an issue that meant you couldnβt have a property named
property
. - Fixed an issue when subclassing
Literal::Data
classes. Previously if you defined a property in the subclass, you would lose all the properties in the parent class. Literal::Enum#to_h
now yields the member when passed a block. When called without a block, it now returns a Hash from member to value.Literal::Enum
objects must be unique by value.Literal::Data
no longer duplicates and freezes its properties β this caused compatibility issues with certain objects. We cannot considerLiteral::Data
to be deeply frozen going forward.- Various improvements to
Literal::Array
, which is still experimental and incomplete. - Introduced
Literal::Tuple
, which is still experimental and incomplete.Literal::Array#product
now returns aLiteral::Tuple
in some situations.
Full Changelog: 1.3.0...1.4.0
1.3.0
Weβve tagged this as a minor update, which means it could include breaking changes. However, in this case, these changes are very unlikely to be breaking for you. Some error messages and inspect output will be different, if you depended on that.
Whatβs Changed
- Fixed an issue that occurred when creating a property called
property
withprop
. - Improved error output for the
_Map
type. - New
_Deferred
type now makes it possible to define recursive self-referencing types. - Simplified some equivalent types βΒ for example
_Callable
now returns_Interface(:call)
,_Not(_Not(true))
is now justtrue
. - All built in types are now comparable via
Literal.subtype?(a, of: b)
. For now, consider this method private β however it will be used to make the upcomingLiteral::Array
,Literal::Hash
andLiteral::Set
objects faster. - Various improvements to
Literal::Array
, which is still experimental - Various improvements to
Literal::Flags
, which is still experimental
New Contributors
- @alvitovitch made their first contribution in #231
Full Changelog: 1.2.0...1.3.0
1.2.0
What's Changed
- [BREAKING]
Literal::Data
no longer supports#[]
to be consistent with RubyβsData
- [FIX] Fixed an issue with
_Hash?(K, V)
and_Integer?(T)
- Various changes to experimental features:
Literal::Flags
,Literal::Array
,Literal::Set
,Literal::Hash
- Improved error messages for
_JSONData
,_Map(T)
,_Set(T)
, and_Union(*T)
New Contributors
- @phillipspc made their first contribution in #141
- @hslzr made their first contribution in #219
- @christopher-b made their first contribution in #143
- @f-mer made their first contribution in #227
Full Changelog: 1.1.0...1.2.0
1.1.0
What's Changed
- Better nested type errors β @segiddins in #132
- Experimental bit flags object β @joeldrapper in #99
Full Changelog: 1.0.0...1.1.0
1.0.0
First stable release of Literal. See documentation.
1.0.0.rc1
Literal 1.0 is almost here. Please try out this release candidate and let us know if you run into any issues.
0.1.0
Update README.md