dry-types 1.8.3 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGELOG.md CHANGED
@@ -1,37 +1,96 @@
1
- <!--- DO NOT EDIT THIS FILE - IT'S AUTOMATICALLY GENERATED VIA DEVTOOLS --->
1
+ # Changelog
2
2
 
3
- ## 1.8.3 2025-06-09
3
+ All notable changes to this project will be documented in this file.
4
4
 
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Break Versioning](https://www.taoensso.com/break-versioning).
7
+
8
+ ## [Unreleased]
9
+
10
+ ### Added
11
+
12
+ ### Changed
13
+
14
+ ### Deprecated
15
+
16
+ ### Removed
5
17
 
6
18
  ### Fixed
7
19
 
8
- - Raise error on passing a non-module object to Instance (ref #480) (@flash-gordon)
20
+ ### Security
21
+
22
+ [Unreleased]: https://github.com/dry-rb/dry-types/compare/v1.9.0...main
9
23
 
24
+ ## [1.9.0] - 2026-01-09
10
25
 
11
- [Compare v1.8.2...v1.8.3](https://github.com/dry-rb/dry-types/compare/v1.8.2...v1.8.3)
26
+ ### Added
12
27
 
13
- ## 1.8.2 2025-01-31
28
+ - `params.*` with `.optional` can now handle empty strings consistently with `optional.params.*` by returning `nil` instead of raising an error. (@baweaver in #487, @flash-gordon in #490)
14
29
 
30
+ This behavior is not enabled by default because it's a breaking change. Set `Dry::Types.use_namespaced_optionals(true)` to enable it.
31
+
32
+ ```ruby
33
+ Dry::Types["params.integer"].optional.("") # => CoercionError
34
+ # Activate namespaced optionals
35
+ Dry::Types.use_namespaced_optionals true
36
+ Dry::Types["params.integer"].optional.("") # => nil
37
+ ```
38
+
39
+ ### Changed
40
+
41
+ - Require Ruby 3.2 or later.
42
+ - Support bigdecimal version 4.0 as well as 3.0, improving compatibility with other gems that require 4.0 only. (@rus-max in #492)
43
+ - Improve sum type error handling documentation. (@baweaver in #486)
15
44
 
16
45
  ### Fixed
17
46
 
18
- - Syntax errors on 3.3.0 (@flash-gordon, see #478)
47
+ - Fix `Constructor#primitive?` delegation for sum types. (@baweaver in #484)
19
48
 
49
+ This now works without error:
50
+ ```ruby
51
+ a = Types::String.constrained(size: 2) | Types::Hash
52
+ b = Types::String.constrained(size: 1) | Types::Hash
53
+
54
+ c = (a.constructor { |x| x.is_a?(Hash) ? x : x.downcase }) |
55
+ (b.constructor { |x| x.is_a?(Hash) ? x : x.upcase })
56
+ ```
57
+ - Fix Sum type `to_s` with Dry::Struct types. (@baweaver in #485)
20
58
 
21
- [Compare v1.8.1...v1.8.2](https://github.com/dry-rb/dry-types/compare/v1.8.1...v1.8.2)
59
+ This now works without error:
60
+ ```ruby
61
+ class A < Dry::Struct; end
62
+ class B < Dry::Struct; end
63
+
64
+ (A | B).to_s
65
+ ```
22
66
 
23
- ## 1.8.1 2025-01-21
67
+ [1.9.0]: https://github.com/dry-rb/dry-types/compare/v1.8.3...v1.9.0
24
68
 
69
+ ## [1.8.3] - 2025-06-09
25
70
 
26
71
  ### Fixed
27
72
 
28
- - Warnings about unused block arguments (@flash-gordon, #477)
73
+ - Raise error on passing a non-module object to Instance (ref #480) (@flash-gordon)
29
74
 
75
+ [1.8.3]: https://github.com/dry-rb/dry-types/compare/v1.8.2...v1.8.3
30
76
 
31
- [Compare v1.8.0...v1.8.1](https://github.com/dry-rb/dry-types/compare/v1.8.0...v1.8.1)
77
+ ## [1.8.2] - 2025-01-31
78
+
79
+ ### Fixed
80
+
81
+ - Syntax errors on 3.3.0 (@flash-gordon, see #478)
32
82
 
33
- ## 1.8.0 2025-01-06
83
+ [1.8.2]: https://github.com/dry-rb/dry-types/compare/v1.8.1...v1.8.2
34
84
 
85
+ ## [1.8.1] - 2025-01-21
86
+
87
+ ### Fixed
88
+
89
+ - Warnings about unused block arguments (@flash-gordon, #477)
90
+
91
+ [1.8.1]: https://github.com/dry-rb/dry-types/compare/v1.8.0...v1.8.1
92
+
93
+ ## [1.8.0] - 2025-01-06
35
94
 
36
95
  ### Added
37
96
 
@@ -46,30 +105,25 @@
46
105
  - Set min Ruby version to 3.1 (@flash-gordon)
47
106
  - Better representation of Enum types (@flash-gordon, see #460)
48
107
 
49
- [Compare v1.7.2...v1.8.0](https://github.com/dry-rb/dry-types/compare/v1.7.2...v1.8.0)
50
-
51
- ## 1.7.2 2024-01-05
108
+ [1.8.0]: https://github.com/dry-rb/dry-types/compare/v1.7.2...v1.8.0
52
109
 
110
+ ## [1.7.2] - 2024-01-05
53
111
 
54
112
  ### Fixed
55
113
 
56
114
  - Fixed BigDecimal warning due to not being required in gemspec (@bkuhlmann in #464)
57
115
 
116
+ [1.7.2]: https://github.com/dry-rb/dry-types/compare/v1.7.1...v1.7.2
58
117
 
59
- [Compare v1.7.1...v1.7.2](https://github.com/dry-rb/dry-types/compare/v1.7.1...v1.7.2)
60
-
61
- ## 1.7.1 2023-02-17
62
-
118
+ ## [1.7.1] - 2023-02-17
63
119
 
64
120
  ### Fixed
65
121
 
66
122
  - Warning from jruby about overwritten keyword (@flash-gordon + @klobuczek in #454)
67
123
 
124
+ [1.7.1]: https://github.com/dry-rb/dry-types/compare/v1.7.0...v1.7.1
68
125
 
69
- [Compare v1.7.0...v1.7.1](https://github.com/dry-rb/dry-types/compare/v1.7.0...v1.7.1)
70
-
71
- ## 1.7.0 2022-11-04
72
-
126
+ ## [1.7.0] - 2022-11-04
73
127
 
74
128
  ### Changed
75
129
 
@@ -77,39 +131,34 @@
77
131
  - Updated to dry-core 1.0 (@flash-gordon + @solnic)
78
132
  - Dependency on dry-container was dropped (@flash-gordon)
79
133
 
80
- [Compare v1.6.1...v1.7.0](https://github.com/dry-rb/dry-types/compare/v1.6.1...v1.7.0)
81
-
82
- ## 1.6.1 2022-10-15
134
+ [1.7.0]: https://github.com/dry-rb/dry-types/compare/v1.6.1...v1.7.0
83
135
 
136
+ ## [1.6.1] - 2022-10-15
84
137
 
85
138
  ### Changed
86
139
 
87
140
  - Fix issues with internal const_missing and Inflector/Module constants (@flash-gordon + @solnic)
88
141
 
89
- [Compare v1.6.0...v1.6.1](https://github.com/dry-rb/dry-types/compare/v1.6.0...v1.6.1)
90
-
91
- ## 1.6.0 2022-10-15
142
+ [1.6.1]: https://github.com/dry-rb/dry-types/compare/v1.6.0...v1.6.1
92
143
 
144
+ ## [1.6.0] - 2022-10-15
93
145
 
94
146
  ### Changed
95
147
 
96
148
  - Optimize `PredicateRegistry` for Ruby 2.7+ (see #420 for more details) (@casperisfine)
97
149
  - Use zeitwerk for auto-loading (@flash-gordon)
98
150
 
99
- [Compare v1.5.1...v1.6.0](https://github.com/dry-rb/dry-types/compare/v1.5.1...v1.6.0)
100
-
101
- ## 1.5.1 2021-02-16
151
+ [1.6.0]: https://github.com/dry-rb/dry-types/compare/v1.5.1...v1.6.0
102
152
 
153
+ ## [1.5.1] - 2021-02-16
103
154
 
104
155
  ### Fixed
105
156
 
106
157
  - Add missing requires for internal usage of `Dry::Equalizer` (@timriley in #418)
107
158
 
159
+ [1.5.1]: https://github.com/dry-rb/dry-types/compare/v1.5.0...v1.5.1
108
160
 
109
- [Compare v1.5.0...v1.5.1](https://github.com/dry-rb/dry-types/compare/v1.5.0...v1.5.1)
110
-
111
- ## 1.5.0 2021-01-21
112
-
161
+ ## [[1.5.0]] - - 2021-01-21
113
162
 
114
163
  ### Added
115
164
 
@@ -172,10 +221,9 @@
172
221
  Dry::Types::PredicateInferrer::Compiler.infer_predicate_by_class_name true
173
222
  ```
174
223
 
175
- [Compare v1.4.0...v1.5.0](https://github.com/dry-rb/dry-types/compare/v1.4.0...v1.5.0)
176
-
177
- ## 1.4.0 2020-03-09
224
+ [1.5.0]: https://github.com/dry-rb/dry-types/compare/v1.4.0...v1.5.0
178
225
 
226
+ ## [1.4.0] - 2020-03-09
179
227
 
180
228
  ### Fixed
181
229
 
@@ -183,20 +231,17 @@
183
231
  bug that for some reason remained unnoticed for years. Technically,
184
232
  this may be a breaking change for JSON schemas described with dry-schema (@flash-gordon)
185
233
 
234
+ [1.4.0]: https://github.com/dry-rb/dry-types/compare/v1.3.1...v1.4.0
186
235
 
187
- [Compare v1.3.1...v1.4.0](https://github.com/dry-rb/dry-types/compare/v1.3.1...v1.4.0)
188
-
189
- ## 1.3.1 2020-02-17
190
-
236
+ ## [1.3.1] - 2020-02-17
191
237
 
192
238
  ### Changed
193
239
 
194
240
  - Predicate inferrer now returns `hash?` for hash schemas. Note, it doesn't spit more complex preds because we have different plans for dry-schema (@flash-gordon)
195
241
 
196
- [Compare v1.3.0...v1.3.1](https://github.com/dry-rb/dry-types/compare/v1.3.0...v1.3.1)
197
-
198
- ## 1.3.0 2020-02-10
242
+ [1.3.1]: https://github.com/dry-rb/dry-types/compare/v1.3.0...v1.3.1
199
243
 
244
+ ## [1.3.0] - 2020-02-10
200
245
 
201
246
  ### Added
202
247
 
@@ -214,11 +259,9 @@ this may be a breaking change for JSON schemas described with dry-schema (@flash
214
259
  - `Schema::Key#optional` returns an instance of `Schema::Key` as it should have done
215
260
  - Composition with function handling exceptions. This could occasionally lead to unexpected exceptions (@flash-gordon)
216
261
 
262
+ [1.3.0]: https://github.com/dry-rb/dry-types/compare/v1.2.2...v1.3.0
217
263
 
218
- [Compare v1.2.2...v1.3.0](https://github.com/dry-rb/dry-types/compare/v1.2.2...v1.3.0)
219
-
220
- ## 1.2.2 2019-12-14
221
-
264
+ ## [1.2.2] - 2019-12-14
222
265
 
223
266
  ### Fixed
224
267
 
@@ -230,21 +273,18 @@ this may be a breaking change for JSON schemas described with dry-schema (@flash
230
273
  - Attempting to use non-symbol keys in hash schemas raises an error. We always supported only symbols as keys but there was no check, now it'll throw an argument error. If you want to convert strings to symbols, use `Hash#with_key_transform` (flash-gordon)
231
274
  - Params and JSON types accept Time/Date/Datetime instances and boolean values. This can be useful in tests but we discourage you from relying on this behavior in production code. For example, building structs with `Params` types is considered a smell. There are dedicated tools for coercion, namely dry-schema and dry-validation. Be responsible user of dry-types! ❤ (flash-gordon)
232
275
 
233
- [Compare v1.2.1...v1.2.2](https://github.com/dry-rb/dry-types/compare/v1.2.1...v1.2.2)
234
-
235
- ## 1.2.1 2019-11-07
276
+ [1.2.2]: https://github.com/dry-rb/dry-types/compare/v1.2.1...v1.2.2
236
277
 
278
+ ## [1.2.1] - 2019-11-07
237
279
 
238
280
  ### Fixed
239
281
 
240
282
  - Fix keyword warnings reported by Ruby 2.7 (flash-gordon)
241
283
  - Error type in failing case in `Array::Member` (esparta)
242
284
 
285
+ [1.2.1]: https://github.com/dry-rb/dry-types/compare/v1.2.0...v1.2.1
243
286
 
244
- [Compare v1.2.0...v1.2.1](https://github.com/dry-rb/dry-types/compare/v1.2.0...v1.2.1)
245
-
246
- ## 1.2.0 2019-10-06
247
-
287
+ ## [1.2.0] - 2019-10-06
248
288
 
249
289
  ### Added
250
290
 
@@ -302,20 +342,17 @@ this may be a breaking change for JSON schemas described with dry-schema (@flash
302
342
 
303
343
  - `Dry::Types.[]` used to work with classes, now it's deprecated (flash-gordon)
304
344
 
305
- [Compare v1.1.1...v1.2.0](https://github.com/dry-rb/dry-types/compare/v1.1.1...v1.2.0)
306
-
307
- ## 1.1.1 2019-07-26
345
+ [1.2.0]: https://github.com/dry-rb/dry-types/compare/v1.1.1...v1.2.0
308
346
 
347
+ ## [1.1.1] - 2019-07-26
309
348
 
310
349
  ### Fixed
311
350
 
312
351
  - A bug where meta was lost for lax array types (flash-gordon)
313
352
 
353
+ [1.1.1]: https://github.com/dry-rb/dry-types/compare/v1.1.0...v1.1.1
314
354
 
315
- [Compare v1.1.0...v1.1.1](https://github.com/dry-rb/dry-types/compare/v1.1.0...v1.1.1)
316
-
317
- ## 1.1.0 2019-07-02
318
-
355
+ ## [1.1.0] - 2019-07-02
319
356
 
320
357
  ### Added
321
358
 
@@ -335,11 +372,9 @@ this may be a breaking change for JSON schemas described with dry-schema (@flash
335
372
  - Using `meta(omittable: true)` within `transform_types` works again but produces a warning, please migrate to `.omittable` or `.required(false)` (flash-gordon)
336
373
  - Bug with a constructror defined on top of enum (flash-gordon)
337
374
 
375
+ [1.1.0]: https://github.com/dry-rb/dry-types/compare/v1.0.1...v1.1.0
338
376
 
339
- [Compare v1.0.1...v1.1.0](https://github.com/dry-rb/dry-types/compare/v1.0.1...v1.1.0)
340
-
341
- ## 1.0.1 2019-06-04
342
-
377
+ ## [1.0.1] - 2019-06-04
343
378
 
344
379
  ### Added
345
380
 
@@ -354,11 +389,9 @@ this may be a breaking change for JSON schemas described with dry-schema (@flash
354
389
  ```
355
390
  - `Schema#strict` now accepts an boolean argument. If `fales` is passed this will turn a strict schema into a non-strict one (flash-gordon)
356
391
 
392
+ [1.0.1]: https://github.com/dry-rb/dry-types/compare/v1.0.0...v1.0.1
357
393
 
358
- [Compare v1.0.0...v1.0.1](https://github.com/dry-rb/dry-types/compare/v1.0.0...v1.0.1)
359
-
360
- ## 1.0.0 2019-04-23
361
-
394
+ ## [1.0.0] - 2019-04-23
362
395
 
363
396
  ### Added
364
397
 
@@ -414,13 +447,14 @@ this may be a breaking change for JSON schemas described with dry-schema (@flash
414
447
  - [BREAKING] Safe types were renamed to Lax, this name better serves their purpose. The previous name is available but prints a warning (flash-gordon)
415
448
  - [BREAKING] Metadata is now pushed down to the decorated type. It is not likely you will notice a difference but this a breaking change that enables some use cases in rom related to the usage of default types in relations (flash-gordon)
416
449
  - Nominal types are now completely unconstrained. This fixes some inconsistencies when using them with constraints. `Nominal#try` will always return a successful result, for the previous behavior use `Nominal#try_coerce` or switch to strict types with passing a block to `#call` (flash-gordon)
417
- - ## Performance improvements
418
- - During the work on this release, a lot of performance improvements were made. dry-types 1.0 combined with dry-logic 1.0 are multiple times faster than dry-types 0.15 and dry-logic 0.5 for common cases including constraints checking and coercion (flash-gordon)
419
450
 
420
- [Compare v0.15.0...v1.0.0](https://github.com/dry-rb/dry-types/compare/v0.15.0...v1.0.0)
451
+ ### Performance improvements
421
452
 
422
- ## 0.15.0 2019-03-22
453
+ - During the work on this release, a lot of performance improvements were made. dry-types 1.0 combined with dry-logic 1.0 are multiple times faster than dry-types 0.15 and dry-logic 0.5 for common cases including constraints checking and coercion (flash-gordon)
423
454
 
455
+ [1.0.0]: https://github.com/dry-rb/dry-types/compare/v0.15.0...v1.0.0
456
+
457
+ ## [0.15.0] - 2019-03-22
424
458
 
425
459
  ### Added
426
460
 
@@ -538,20 +572,16 @@ this may be a breaking change for JSON schemas described with dry-schema (@flash
538
572
  - `params.integer` now always converts strings to decimal numbers, this means `09` will be coerced to `9` (threw an error before) (skryukov)
539
573
  - Ruby 2.3 is EOL and not officially supported. It may work but we don't test it.
540
574
 
541
- [Compare v0.14.1...v0.15.0](https://github.com/dry-rb/dry-types/compare/v0.14.1...v0.15.0)
542
-
543
- ## 0.14.1 2019-03-25
575
+ [0.15.0]: https://github.com/dry-rb/dry-types/compare/v0.14.1...v0.15.0
544
576
 
577
+ ## [0.14.1] - 2019-03-25
545
578
 
546
579
  ### Fixed
547
580
 
548
581
  - `coercible.integer` now doesn't blow up on invalid strings (exterm)
582
+ [0.14.1]: https://github.com/dry-rb/dry-types/compare/v0.14.0...v0.14.1
549
583
 
550
-
551
- [Compare v0.14.0...v0.14.1](https://github.com/dry-rb/dry-types/compare/v0.14.0...v0.14.1)
552
-
553
- ## 0.14.0 2019-01-29
554
-
584
+ ## [0.14.0] - 2019-01-29
555
585
 
556
586
  ### Fixed
557
587
 
@@ -562,41 +592,31 @@ this may be a breaking change for JSON schemas described with dry-schema (@flash
562
592
  - [BREAKING] Support for Ruby 2.2 was dropped. It reached EOL on March 31, 2018.
563
593
  - `dry-logic` was updated to `~> 0.5` (solnic)
564
594
 
565
- [Compare v0.13.4...v0.14.0](https://github.com/dry-rb/dry-types/compare/v0.13.4...v0.14.0)
566
-
567
- ## 0.13.4 2018-12-21
595
+ [0.14.0]: https://github.com/dry-rb/dry-types/compare/v0.13.4...v0.14.0
568
596
 
597
+ ## [0.13.4] - 2018-12-21
569
598
 
570
599
  ### Fixed
571
600
 
572
601
  - Fixed warnings about keyword arguments from Ruby 2.6. See https://bugs.ruby-lang.org/issues/14183 for all the details (flash-gordon)
602
+ [0.13.4]: https://github.com/dry-rb/dry-types/compare/v0.13.3...v0.13.4
573
603
 
574
-
575
- [Compare v0.13.3...v0.13.4](https://github.com/dry-rb/dry-types/compare/v0.13.3...v0.13.4)
576
-
577
- ## 0.13.3 2018-11-25
578
-
604
+ ## [0.13.3] - 2018-11-25
579
605
 
580
606
  ### Fixed
581
607
 
582
608
  - `Dry::Types::Hash#try` returns `Failure` instead of throwing an exception on missing keys (GustavoCaso)
609
+ [0.13.3]: https://github.com/dry-rb/dry-types/compare/v0.13.2...v0.13.3
583
610
 
584
-
585
- [Compare v0.13.2...v0.13.3](https://github.com/dry-rb/dry-types/compare/v0.13.2...v0.13.3)
586
-
587
- ## 0.13.2 2018-05-30
588
-
611
+ ## [0.13.2] - 2018-05-30
589
612
 
590
613
  ### Fixed
591
614
 
592
615
  - `Defaults#valid?` now works fine when passing `Dry::Core::Constans::Undefined` as value (GustavoCaso)
593
616
  - `valid?` for constructor types wrapping `Sum`s (GustavoCaso)
617
+ [0.13.2]: https://github.com/dry-rb/dry-types/compare/v0.13.1...v0.13.2
594
618
 
595
-
596
- [Compare v0.13.1...v0.13.2](https://github.com/dry-rb/dry-types/compare/v0.13.1...v0.13.2)
597
-
598
- ## 0.13.1 2018-05-28
599
-
619
+ ## [0.13.1] - 2018-05-28
600
620
 
601
621
  ### Added
602
622
 
@@ -606,12 +626,9 @@ this may be a breaking change for JSON schemas described with dry-schema (@flash
606
626
 
607
627
  - Defaults now works fine with meta (GustavoCaso)
608
628
  - Defaults are now re-decorated properly (flash-gordon)
629
+ [0.13.1]: https://github.com/dry-rb/dry-types/compare/v0.13.0...v0.13.1
609
630
 
610
-
611
- [Compare v0.13.0...v0.13.1](https://github.com/dry-rb/dry-types/compare/v0.13.0...v0.13.1)
612
-
613
- ## 0.13.0 2018-05-03
614
-
631
+ ## [0.13.0] - 2018-05-03
615
632
 
616
633
  ### Added
617
634
 
@@ -702,10 +719,9 @@ this may be a breaking change for JSON schemas described with dry-schema (@flash
702
719
  - [BREAKING] `Dry::Types.register_class` was removed, `Dry::Types.register` was made private API, do not register your types in the global `dry-types` container, use a module instead, e.g. `Types` (flash-gordon)
703
720
  - [BREAKING] Enum types don't accept value index anymore. Instead, explicit mapping is supported, see below (flash-gordon)
704
721
 
705
- [Compare v0.12.2...v0.13.0](https://github.com/dry-rb/dry-types/compare/v0.12.2...v0.13.0)
706
-
707
- ## 0.12.2 2017-11-04
722
+ [0.13.0]: https://github.com/dry-rb/dry-types/compare/v0.12.2...v0.13.0
708
723
 
724
+ ## [0.12.2] - 2017-11-04
709
725
 
710
726
  ### Fixed
711
727
 
@@ -713,12 +729,9 @@ this may be a breaking change for JSON schemas described with dry-schema (@flash
713
729
  - Fixed an error on `Dry::Types['json.decimal'].try(nil)` (nesaulov)
714
730
  - Fixed an error on calling `try` on an array type built of constrained types (flash-gordon)
715
731
  - Implemented `===` for enum types (GustavoCaso)
732
+ [0.12.2]: https://github.com/dry-rb/dry-types/compare/v0.12.1...v0.12.2
716
733
 
717
-
718
- [Compare v0.12.1...v0.12.2](https://github.com/dry-rb/dry-types/compare/v0.12.1...v0.12.2)
719
-
720
- ## 0.12.1 2017-10-11
721
-
734
+ ## [0.12.1] - 2017-10-11
722
735
 
723
736
  ### Fixed
724
737
 
@@ -726,24 +739,18 @@ this may be a breaking change for JSON schemas described with dry-schema (@flash
726
739
  - `#constructor` works correctly for default and enum types (solnic)
727
740
  - Optional sum types work correctly in `safe` mode (GustavoCaso)
728
741
  - The equalizer of constrained types respects meta (flash-gordon)
742
+ [0.12.1]: https://github.com/dry-rb/dry-types/compare/v0.12.0...v0.12.1
729
743
 
730
-
731
- [Compare v0.12.0...v0.12.1](https://github.com/dry-rb/dry-types/compare/v0.12.0...v0.12.1)
732
-
733
- ## 0.12.0 2017-09-15
734
-
744
+ ## [0.12.0] - 2017-09-15
735
745
 
736
746
  ### Added
737
747
 
738
748
  - A bunch of shortcut methods for constructing types to the autogenerated module, e.g. `Types.Constructor(String, &:to_s)` (flash-gordon)
739
749
  - ## Deprecated
740
750
  - `Types::Array#member` was deprecated in favor of `Types::Array#of` (flash-gordon)
751
+ [0.12.0]: https://github.com/dry-rb/dry-types/compare/v0.11.1...v0.12.0
741
752
 
742
-
743
- [Compare v0.11.1...v0.12.0](https://github.com/dry-rb/dry-types/compare/v0.11.1...v0.12.0)
744
-
745
- ## 0.11.1 2017-08-14
746
-
753
+ ## [0.11.1] - 2017-08-14
747
754
 
748
755
  ### Fixed
749
756
 
@@ -753,42 +760,32 @@ this may be a breaking change for JSON schemas described with dry-schema (@flash
753
760
 
754
761
  - Constructors are now equalized using `fn` and `meta` too (flash-gordon)
755
762
 
756
- [Compare v0.11.0...v0.11.1](https://github.com/dry-rb/dry-types/compare/v0.11.0...v0.11.1)
757
-
758
- ## 0.11.0 2017-06-30
763
+ [0.11.1]: https://github.com/dry-rb/dry-types/compare/v0.11.0...v0.11.1
759
764
 
765
+ ## [0.11.0] - 2017-06-30
760
766
 
761
767
  ### Added
762
768
 
763
769
  - `#to_ast` available for all type objects (GustavoCaso)
764
770
  - `Types::Array#of` as an alias for `#member` (maliqq)
765
771
  - Detailed failure objects are passed to results which improves constraint violation messages (GustavoCaso)
772
+ [0.11.0]: https://github.com/dry-rb/dry-types/compare/v0.10.3...v0.11.0
766
773
 
767
-
768
- [Compare v0.10.3...v0.11.0](https://github.com/dry-rb/dry-types/compare/v0.10.3...v0.11.0)
769
-
770
- ## 0.10.3 2017-05-06
771
-
774
+ ## [0.10.3] - 2017-05-06
772
775
 
773
776
  ### Added
774
777
 
775
778
  - Callable defaults accept the underlying type (v-kolesnikov)
779
+ [0.10.3]: https://github.com/dry-rb/dry-types/compare/v0.10.2...v0.10.3
776
780
 
777
-
778
- [Compare v0.10.2...v0.10.3](https://github.com/dry-rb/dry-types/compare/v0.10.2...v0.10.3)
779
-
780
- ## 0.10.2 2017-04-28
781
-
781
+ ## [0.10.2] - 2017-04-28
782
782
 
783
783
  ### Fixed
784
784
 
785
785
  - Fixed `Type#optional?` for sum types (flash-gordon)
786
+ [0.10.2]: https://github.com/dry-rb/dry-types/compare/v0.10.1...v0.10.2
786
787
 
787
-
788
- [Compare v0.10.1...v0.10.2](https://github.com/dry-rb/dry-types/compare/v0.10.1...v0.10.2)
789
-
790
- ## 0.10.1 2017-04-28
791
-
788
+ ## [0.10.1] - 2017-04-28
792
789
 
793
790
  ### Added
794
791
 
@@ -799,12 +796,9 @@ this may be a breaking change for JSON schemas described with dry-schema (@flash
799
796
 
800
797
  - `meta` is used in type equality again (solnic)
801
798
  - `Any` works correctly with meta again (flash-gordon)
799
+ [0.10.1]: https://github.com/dry-rb/dry-types/compare/v0.10.0...v0.10.1
802
800
 
803
-
804
- [Compare v0.10.0...v0.10.1](https://github.com/dry-rb/dry-types/compare/v0.10.0...v0.10.1)
805
-
806
- ## 0.10.0 2017-04-26
807
-
801
+ ## [0.10.0] - 2017-04-26
808
802
 
809
803
  ### Added
810
804
 
@@ -819,30 +813,23 @@ this may be a breaking change for JSON schemas described with dry-schema (@flash
819
813
  - Meta data are now stored separately from options (flash-gordon)
820
814
  - `Types::Object` was renamed to `Types::Any` (flash-gordon)
821
815
 
822
- [Compare v0.9.4...v0.10.0](https://github.com/dry-rb/dry-types/compare/v0.9.4...v0.10.0)
823
-
824
- ## 0.9.4 2017-01-24
816
+ [0.10.0]: https://github.com/dry-rb/dry-types/compare/v0.9.4...v0.10.0
825
817
 
818
+ ## [0.9.4] - 2017-01-24
826
819
 
827
820
  ### Added
828
821
 
829
822
  - Added `Types::Object` which passes an object of any type (flash-gordon)
823
+ [0.9.4]: https://github.com/dry-rb/dry-types/compare/v0.9.3...v0.9.4
830
824
 
831
-
832
- [Compare v0.9.3...v0.9.4](https://github.com/dry-rb/dry-types/compare/v0.9.3...v0.9.4)
833
-
834
- ## 0.9.3 2016-12-03
835
-
825
+ ## [0.9.3] - 2016-12-03
836
826
 
837
827
  ### Fixed
838
828
 
839
829
  - Updated to dry-core >= 0.2.1 (ruby warnings are gone) (flash-gordon)
830
+ [0.9.3]: https://github.com/dry-rb/dry-types/compare/v0.9.2...v0.9.3
840
831
 
841
-
842
- [Compare v0.9.2...v0.9.3](https://github.com/dry-rb/dry-types/compare/v0.9.2...v0.9.3)
843
-
844
- ## 0.9.2 2016-11-13
845
-
832
+ ## [0.9.2] - 2016-11-13
846
833
 
847
834
  ### Added
848
835
 
@@ -852,10 +839,9 @@ this may be a breaking change for JSON schemas described with dry-schema (@flash
852
839
 
853
840
  - Optimized object allocation in hash schemas, resulting in up to 25% speed boost (davydovanton)
854
841
 
855
- [Compare v0.9.1...v0.9.2](https://github.com/dry-rb/dry-types/compare/v0.9.1...v0.9.2)
856
-
857
- ## 0.9.1 2016-11-04
842
+ [0.9.2]: https://github.com/dry-rb/dry-types/compare/v0.9.1...v0.9.2
858
843
 
844
+ ## [0.9.1] - 2016-11-04
859
845
 
860
846
  ### Fixed
861
847
 
@@ -865,10 +851,9 @@ this may be a breaking change for JSON schemas described with dry-schema (@flash
865
851
 
866
852
  - `Hash#weak` accepts Hash-descendants again (solnic)
867
853
 
868
- [Compare v0.9.0...v0.9.1](https://github.com/dry-rb/dry-types/compare/v0.9.0...v0.9.1)
869
-
870
- ## 0.9.0 2016-09-21
854
+ [0.9.1]: https://github.com/dry-rb/dry-types/compare/v0.9.0...v0.9.1
871
855
 
856
+ ## [0.9.0] - 2016-09-21
872
857
 
873
858
  ### Added
874
859
 
@@ -890,21 +875,17 @@ this may be a breaking change for JSON schemas described with dry-schema (@flash
890
875
  - `Types::Form::{Date,DateTime,Time}` fail gracefully for invalid input (padde)
891
876
  - ice_nine dependency has been dropped as it was required by Struct only (flash-gordon)
892
877
 
893
- [Compare v0.8.1...v0.9.0](https://github.com/dry-rb/dry-types/compare/v0.8.1...v0.9.0)
894
-
895
- ## 0.8.1 2016-07-13
878
+ [0.9.0]: https://github.com/dry-rb/dry-types/compare/v0.8.1...v0.9.0
896
879
 
880
+ ## [0.8.1] - 2016-07-13
897
881
 
898
882
  ### Fixed
899
883
 
900
884
  - Compiler no longer chokes on type nodes without args (solnic)
901
885
  - Removed `bin/console` from gem package (solnic)
886
+ [0.8.1]: https://github.com/dry-rb/dry-types/compare/v0.8.0...v0.8.1
902
887
 
903
-
904
- [Compare v0.8.0...v0.8.1](https://github.com/dry-rb/dry-types/compare/v0.8.0...v0.8.1)
905
-
906
- ## 0.8.0 2016-07-01
907
-
888
+ ## [0.8.0] - 2016-07-01
908
889
 
909
890
  ### Added
910
891
 
@@ -922,10 +903,9 @@ this may be a breaking change for JSON schemas described with dry-schema (@flash
922
903
  - `:symbolized` hash schema is now based on `:weak` schema (solnic)
923
904
  - `Struct::Value` instances are now **deeply frozen** via ice_nine (backus)
924
905
 
925
- [Compare v0.7.2...v0.8.0](https://github.com/dry-rb/dry-types/compare/v0.7.2...v0.8.0)
926
-
927
- ## 0.7.2 2016-05-11
906
+ [0.8.0]: https://github.com/dry-rb/dry-types/compare/v0.7.2...v0.8.0
928
907
 
908
+ ## [0.7.2] - 2016-05-11
929
909
 
930
910
  ### Fixed
931
911
 
@@ -942,10 +922,9 @@ this may be a breaking change for JSON schemas described with dry-schema (@flash
942
922
  - Coerce empty strings in form posts to blank arrays and hashes (timriley)
943
923
  - update to use dry-logic v0.2.3 (fran-worley)
944
924
 
945
- [Compare v0.7.1...v0.7.2](https://github.com/dry-rb/dry-types/compare/v0.7.1...v0.7.2)
946
-
947
- ## 0.7.1 2016-04-06
925
+ [0.7.2]: https://github.com/dry-rb/dry-types/compare/v0.7.1...v0.7.2
948
926
 
927
+ ## [0.7.1] - 2016-04-06
949
928
 
950
929
  ### Added
951
930
 
@@ -955,11 +934,9 @@ this may be a breaking change for JSON schemas described with dry-schema (@flash
955
934
 
956
935
  - Schema is properly inherited in Struct (backus)
957
936
  - `constructor_type` is properly inherited in Struct (fbernier)
937
+ [0.7.1]: https://github.com/dry-rb/dry-types/compare/v0.7.0...v0.7.1
958
938
 
959
-
960
- [Compare v0.7.0...v0.7.1](https://github.com/dry-rb/dry-types/compare/v0.7.0...v0.7.1)
961
-
962
- ## 0.7.0 2016-03-30
939
+ ## [0.7.0] - 2016-03-30
963
940
 
964
941
  Major focus of this release is to make complex type composition possible and improving constraint errors to be more meaningful.
965
942
 
@@ -991,9 +968,9 @@ Major focus of this release is to make complex type composition possible and imp
991
968
  - `Type#default` will raise if `nil` was passed for `Maybe` type (solnic)
992
969
  - `Hash` with a schema will set maybe values for missing keys or nils (flash-gordon)
993
970
 
994
- [Compare v0.6.0...v0.7.0](https://github.com/dry-rb/dry-types/compare/v0.6.0...v0.7.0)
971
+ [0.7.0]: https://github.com/dry-rb/dry-types/compare/v0.6.0...v0.7.0
995
972
 
996
- ## 0.6.0 2016-03-16
973
+ ## [0.6.0] - 2016-03-16
997
974
 
998
975
  Renamed from `dry-data` to `dry-types` and:
999
976
 
@@ -1026,22 +1003,18 @@ Renamed from `dry-data` to `dry-types` and:
1026
1003
  - `Dry::Types::Definition` is now the base type definition object (solnic)
1027
1004
  - `Dry::Types::Constructor` is now a type definition with a constructor function (solnic)
1028
1005
 
1029
- [Compare v0.5.1...v0.6.0](https://github.com/dry-rb/dry-types/compare/v0.5.1...v0.6.0)
1030
-
1031
- ## 0.5.1 2016-01-11
1006
+ [0.6.0]: https://github.com/dry-rb/dry-types/compare/v0.5.1...v0.6.0
1032
1007
 
1008
+ ## [0.5.1] - 2016-01-11
1033
1009
 
1034
1010
  ### Added
1035
1011
 
1036
1012
  - `Dry::Data::Type#safe` for types which can skip constructor when primitive does
1037
1013
  not match input's class (solnic)
1038
1014
  - `form.array` and `form.hash` safe types (solnic)
1015
+ [0.5.1]: https://github.com/dry-rb/dry-types/compare/v0.5.0...v0.5.1
1039
1016
 
1040
-
1041
- [Compare v0.5.0...v0.5.1](https://github.com/dry-rb/dry-types/compare/v0.5.0...v0.5.1)
1042
-
1043
- ## 0.5.0 2016-01-11
1044
-
1017
+ ## [0.5.0] - 2016-01-11
1045
1018
 
1046
1019
  ### Added
1047
1020
 
@@ -1060,10 +1033,9 @@ Renamed from `dry-data` to `dry-types` and:
1060
1033
  - `strict.*` category uses constrained types with `:type?` predicate (solnic)
1061
1034
  - `SumType#call` no longer needs to rescue from `TypeError` (solnic)
1062
1035
 
1063
- [Compare v0.4.2...v0.5.0](https://github.com/dry-rb/dry-types/compare/v0.4.2...v0.5.0)
1064
-
1065
- ## 0.4.2 2015-12-27
1036
+ [0.5.0]: https://github.com/dry-rb/dry-types/compare/v0.4.2...v0.5.0
1066
1037
 
1038
+ ## [0.4.2] - 2015-12-27
1067
1039
 
1068
1040
  ### Added
1069
1041
 
@@ -1073,10 +1045,9 @@ Renamed from `dry-data` to `dry-types` and:
1073
1045
 
1074
1046
  - Array member uses type objects now rather than just their constructors (solnic)
1075
1047
 
1076
- [Compare v0.4.0...v0.4.2](https://github.com/dry-rb/dry-types/compare/v0.4.0...v0.4.2)
1077
-
1078
- ## 0.4.0 2015-12-11
1048
+ [0.4.2]: https://github.com/dry-rb/dry-types/compare/v0.4.0...v0.4.2
1079
1049
 
1050
+ ## [0.4.0] - 2015-12-11
1080
1051
 
1081
1052
  ### Added
1082
1053
 
@@ -1087,10 +1058,9 @@ Renamed from `dry-data` to `dry-types` and:
1087
1058
 
1088
1059
  - `Dry::Data['optional']` was **removed** in favor of `Dry::Data::Type#optional` (solnic)
1089
1060
 
1090
- [Compare v0.3.2...v0.4.0](https://github.com/dry-rb/dry-types/compare/v0.3.2...v0.4.0)
1091
-
1092
- ## 0.3.2 2015-12-10
1061
+ [0.4.0]: https://github.com/dry-rb/dry-types/compare/v0.3.2...v0.4.0
1093
1062
 
1063
+ ## [0.3.2] - 2015-12-10
1094
1064
 
1095
1065
  ### Added
1096
1066
 
@@ -1099,21 +1069,17 @@ Renamed from `dry-data` to `dry-types` and:
1099
1069
  ### Fixed
1100
1070
 
1101
1071
  - Added missing require for `dry-equalizer` (solnic)
1072
+ [0.3.2]: https://github.com/dry-rb/dry-types/compare/v0.3.1...v0.3.2
1102
1073
 
1103
-
1104
- [Compare v0.3.1...v0.3.2](https://github.com/dry-rb/dry-types/compare/v0.3.1...v0.3.2)
1105
-
1106
- ## 0.3.1 2015-12-09
1107
-
1074
+ ## [0.3.1] - 2015-12-09
1108
1075
 
1109
1076
  ### Changed
1110
1077
 
1111
1078
  - Removed require of constrained type and make it optional (solnic)
1112
1079
 
1113
- [Compare v0.3.0...v0.3.1](https://github.com/dry-rb/dry-types/compare/v0.3.0...v0.3.1)
1114
-
1115
- ## 0.3.0 2015-12-09
1080
+ [0.3.1]: https://github.com/dry-rb/dry-types/compare/v0.3.0...v0.3.1
1116
1081
 
1082
+ ## [0.3.0] - 2015-12-09
1117
1083
 
1118
1084
  ### Added
1119
1085
 
@@ -1122,12 +1088,9 @@ Renamed from `dry-data` to `dry-types` and:
1122
1088
  - `Dry::Data.finalize` can be used to define types as constants under configured namespace (solnic)
1123
1089
  - `Dry::Data::Type#enum` for defining an enum from a specific type (solnic)
1124
1090
  - New types: `symbol` and `class` along with their `strict` versions (solnic)
1091
+ [0.3.0]: https://github.com/dry-rb/dry-types/compare/v0.2.1...v0.3.0
1125
1092
 
1126
-
1127
- [Compare v0.2.1...v0.3.0](https://github.com/dry-rb/dry-types/compare/v0.2.1...v0.3.0)
1128
-
1129
- ## 0.2.1 2015-11-30
1130
-
1093
+ ## [0.2.1] - 2015-11-30
1131
1094
 
1132
1095
  ### Added
1133
1096
 
@@ -1141,10 +1104,9 @@ Renamed from `dry-data` to `dry-types` and:
1141
1104
 
1142
1105
  - Improved structure of the ast (solnic)
1143
1106
 
1144
- [Compare v0.2.0...v0.2.1](https://github.com/dry-rb/dry-types/compare/v0.2.0...v0.2.1)
1145
-
1146
- ## 0.2.0 2015-11-29
1107
+ [0.2.1]: https://github.com/dry-rb/dry-types/compare/v0.2.0...v0.2.1
1147
1108
 
1109
+ ## [0.2.0] - 2015-11-29
1148
1110
 
1149
1111
  ### Added
1150
1112
 
@@ -1156,10 +1118,9 @@ Renamed from `dry-data` to `dry-types` and:
1156
1118
 
1157
1119
  - Constructing optional types uses the new `Dry::Data["optional"]` built-in type (solnic)
1158
1120
 
1159
- [Compare v0.1.0...v0.2.0](https://github.com/dry-rb/dry-types/compare/v0.1.0...v0.2.0)
1160
-
1161
- ## 0.1.0 2015-11-27
1121
+ [0.2.0]: https://github.com/dry-rb/dry-types/compare/v0.1.0...v0.2.0
1162
1122
 
1123
+ ## [0.1.0] - 2015-11-27
1163
1124
 
1164
1125
  ### Added
1165
1126
 
@@ -1169,10 +1130,8 @@ Renamed from `dry-data` to `dry-types` and:
1169
1130
  - `Dry::Data.register_class` short-cut interface for registering a class and
1170
1131
  setting its `.new` method as the constructor (solnic)
1171
1132
  - `Dry::Data::Compiler` for building a type from a simple ast (solnic)
1133
+ [0.1.0]: https://github.com/dry-rb/dry-types/compare/v0.0.1...v0.1.0
1172
1134
 
1173
-
1174
- [Compare v0.0.1...v0.1.0](https://github.com/dry-rb/dry-types/compare/v0.0.1...v0.1.0)
1175
-
1176
- ## 0.0.1 2015-10-05
1135
+ ## [0.0.1] - 2015-10-05
1177
1136
 
1178
1137
  First public release