dry-types 1.8.2 → 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,27 +1,96 @@
1
- <!--- DO NOT EDIT THIS FILE - IT'S AUTOMATICALLY GENERATED VIA DEVTOOLS --->
1
+ # Changelog
2
2
 
3
- ## 1.8.2 2025-01-31
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
- - Syntax errors on 3.3.0 (@flash-gordon, see #478)
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.1...v1.8.2](https://github.com/dry-rb/dry-types/compare/v1.8.1...v1.8.2)
26
+ ### Added
12
27
 
13
- ## 1.8.1 2025-01-21
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
- - Warnings about unused block arguments (@flash-gordon, #477)
47
+ - Fix `Constructor#primitive?` delegation for sum types. (@baweaver in #484)
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)
58
+
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
+ ```
66
+
67
+ [1.9.0]: https://github.com/dry-rb/dry-types/compare/v1.8.3...v1.9.0
68
+
69
+ ## [1.8.3] - 2025-06-09
70
+
71
+ ### Fixed
19
72
 
73
+ - Raise error on passing a non-module object to Instance (ref #480) (@flash-gordon)
20
74
 
21
- [Compare v1.8.0...v1.8.1](https://github.com/dry-rb/dry-types/compare/v1.8.0...v1.8.1)
75
+ [1.8.3]: https://github.com/dry-rb/dry-types/compare/v1.8.2...v1.8.3
22
76
 
23
- ## 1.8.0 2025-01-06
77
+ ## [1.8.2] - 2025-01-31
24
78
 
79
+ ### Fixed
80
+
81
+ - Syntax errors on 3.3.0 (@flash-gordon, see #478)
82
+
83
+ [1.8.2]: https://github.com/dry-rb/dry-types/compare/v1.8.1...v1.8.2
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
25
94
 
26
95
  ### Added
27
96
 
@@ -36,30 +105,25 @@
36
105
  - Set min Ruby version to 3.1 (@flash-gordon)
37
106
  - Better representation of Enum types (@flash-gordon, see #460)
38
107
 
39
- [Compare v1.7.2...v1.8.0](https://github.com/dry-rb/dry-types/compare/v1.7.2...v1.8.0)
40
-
41
- ## 1.7.2 2024-01-05
108
+ [1.8.0]: https://github.com/dry-rb/dry-types/compare/v1.7.2...v1.8.0
42
109
 
110
+ ## [1.7.2] - 2024-01-05
43
111
 
44
112
  ### Fixed
45
113
 
46
114
  - Fixed BigDecimal warning due to not being required in gemspec (@bkuhlmann in #464)
47
115
 
116
+ [1.7.2]: https://github.com/dry-rb/dry-types/compare/v1.7.1...v1.7.2
48
117
 
49
- [Compare v1.7.1...v1.7.2](https://github.com/dry-rb/dry-types/compare/v1.7.1...v1.7.2)
50
-
51
- ## 1.7.1 2023-02-17
52
-
118
+ ## [1.7.1] - 2023-02-17
53
119
 
54
120
  ### Fixed
55
121
 
56
122
  - Warning from jruby about overwritten keyword (@flash-gordon + @klobuczek in #454)
57
123
 
124
+ [1.7.1]: https://github.com/dry-rb/dry-types/compare/v1.7.0...v1.7.1
58
125
 
59
- [Compare v1.7.0...v1.7.1](https://github.com/dry-rb/dry-types/compare/v1.7.0...v1.7.1)
60
-
61
- ## 1.7.0 2022-11-04
62
-
126
+ ## [1.7.0] - 2022-11-04
63
127
 
64
128
  ### Changed
65
129
 
@@ -67,39 +131,34 @@
67
131
  - Updated to dry-core 1.0 (@flash-gordon + @solnic)
68
132
  - Dependency on dry-container was dropped (@flash-gordon)
69
133
 
70
- [Compare v1.6.1...v1.7.0](https://github.com/dry-rb/dry-types/compare/v1.6.1...v1.7.0)
71
-
72
- ## 1.6.1 2022-10-15
134
+ [1.7.0]: https://github.com/dry-rb/dry-types/compare/v1.6.1...v1.7.0
73
135
 
136
+ ## [1.6.1] - 2022-10-15
74
137
 
75
138
  ### Changed
76
139
 
77
140
  - Fix issues with internal const_missing and Inflector/Module constants (@flash-gordon + @solnic)
78
141
 
79
- [Compare v1.6.0...v1.6.1](https://github.com/dry-rb/dry-types/compare/v1.6.0...v1.6.1)
80
-
81
- ## 1.6.0 2022-10-15
142
+ [1.6.1]: https://github.com/dry-rb/dry-types/compare/v1.6.0...v1.6.1
82
143
 
144
+ ## [1.6.0] - 2022-10-15
83
145
 
84
146
  ### Changed
85
147
 
86
148
  - Optimize `PredicateRegistry` for Ruby 2.7+ (see #420 for more details) (@casperisfine)
87
149
  - Use zeitwerk for auto-loading (@flash-gordon)
88
150
 
89
- [Compare v1.5.1...v1.6.0](https://github.com/dry-rb/dry-types/compare/v1.5.1...v1.6.0)
90
-
91
- ## 1.5.1 2021-02-16
151
+ [1.6.0]: https://github.com/dry-rb/dry-types/compare/v1.5.1...v1.6.0
92
152
 
153
+ ## [1.5.1] - 2021-02-16
93
154
 
94
155
  ### Fixed
95
156
 
96
157
  - Add missing requires for internal usage of `Dry::Equalizer` (@timriley in #418)
97
158
 
159
+ [1.5.1]: https://github.com/dry-rb/dry-types/compare/v1.5.0...v1.5.1
98
160
 
99
- [Compare v1.5.0...v1.5.1](https://github.com/dry-rb/dry-types/compare/v1.5.0...v1.5.1)
100
-
101
- ## 1.5.0 2021-01-21
102
-
161
+ ## [[1.5.0]] - - 2021-01-21
103
162
 
104
163
  ### Added
105
164
 
@@ -162,10 +221,9 @@
162
221
  Dry::Types::PredicateInferrer::Compiler.infer_predicate_by_class_name true
163
222
  ```
164
223
 
165
- [Compare v1.4.0...v1.5.0](https://github.com/dry-rb/dry-types/compare/v1.4.0...v1.5.0)
166
-
167
- ## 1.4.0 2020-03-09
224
+ [1.5.0]: https://github.com/dry-rb/dry-types/compare/v1.4.0...v1.5.0
168
225
 
226
+ ## [1.4.0] - 2020-03-09
169
227
 
170
228
  ### Fixed
171
229
 
@@ -173,20 +231,17 @@
173
231
  bug that for some reason remained unnoticed for years. Technically,
174
232
  this may be a breaking change for JSON schemas described with dry-schema (@flash-gordon)
175
233
 
234
+ [1.4.0]: https://github.com/dry-rb/dry-types/compare/v1.3.1...v1.4.0
176
235
 
177
- [Compare v1.3.1...v1.4.0](https://github.com/dry-rb/dry-types/compare/v1.3.1...v1.4.0)
178
-
179
- ## 1.3.1 2020-02-17
180
-
236
+ ## [1.3.1] - 2020-02-17
181
237
 
182
238
  ### Changed
183
239
 
184
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)
185
241
 
186
- [Compare v1.3.0...v1.3.1](https://github.com/dry-rb/dry-types/compare/v1.3.0...v1.3.1)
187
-
188
- ## 1.3.0 2020-02-10
242
+ [1.3.1]: https://github.com/dry-rb/dry-types/compare/v1.3.0...v1.3.1
189
243
 
244
+ ## [1.3.0] - 2020-02-10
190
245
 
191
246
  ### Added
192
247
 
@@ -204,11 +259,9 @@ this may be a breaking change for JSON schemas described with dry-schema (@flash
204
259
  - `Schema::Key#optional` returns an instance of `Schema::Key` as it should have done
205
260
  - Composition with function handling exceptions. This could occasionally lead to unexpected exceptions (@flash-gordon)
206
261
 
262
+ [1.3.0]: https://github.com/dry-rb/dry-types/compare/v1.2.2...v1.3.0
207
263
 
208
- [Compare v1.2.2...v1.3.0](https://github.com/dry-rb/dry-types/compare/v1.2.2...v1.3.0)
209
-
210
- ## 1.2.2 2019-12-14
211
-
264
+ ## [1.2.2] - 2019-12-14
212
265
 
213
266
  ### Fixed
214
267
 
@@ -220,21 +273,18 @@ this may be a breaking change for JSON schemas described with dry-schema (@flash
220
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)
221
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)
222
275
 
223
- [Compare v1.2.1...v1.2.2](https://github.com/dry-rb/dry-types/compare/v1.2.1...v1.2.2)
224
-
225
- ## 1.2.1 2019-11-07
276
+ [1.2.2]: https://github.com/dry-rb/dry-types/compare/v1.2.1...v1.2.2
226
277
 
278
+ ## [1.2.1] - 2019-11-07
227
279
 
228
280
  ### Fixed
229
281
 
230
282
  - Fix keyword warnings reported by Ruby 2.7 (flash-gordon)
231
283
  - Error type in failing case in `Array::Member` (esparta)
232
284
 
285
+ [1.2.1]: https://github.com/dry-rb/dry-types/compare/v1.2.0...v1.2.1
233
286
 
234
- [Compare v1.2.0...v1.2.1](https://github.com/dry-rb/dry-types/compare/v1.2.0...v1.2.1)
235
-
236
- ## 1.2.0 2019-10-06
237
-
287
+ ## [1.2.0] - 2019-10-06
238
288
 
239
289
  ### Added
240
290
 
@@ -292,20 +342,17 @@ this may be a breaking change for JSON schemas described with dry-schema (@flash
292
342
 
293
343
  - `Dry::Types.[]` used to work with classes, now it's deprecated (flash-gordon)
294
344
 
295
- [Compare v1.1.1...v1.2.0](https://github.com/dry-rb/dry-types/compare/v1.1.1...v1.2.0)
296
-
297
- ## 1.1.1 2019-07-26
345
+ [1.2.0]: https://github.com/dry-rb/dry-types/compare/v1.1.1...v1.2.0
298
346
 
347
+ ## [1.1.1] - 2019-07-26
299
348
 
300
349
  ### Fixed
301
350
 
302
351
  - A bug where meta was lost for lax array types (flash-gordon)
303
352
 
353
+ [1.1.1]: https://github.com/dry-rb/dry-types/compare/v1.1.0...v1.1.1
304
354
 
305
- [Compare v1.1.0...v1.1.1](https://github.com/dry-rb/dry-types/compare/v1.1.0...v1.1.1)
306
-
307
- ## 1.1.0 2019-07-02
308
-
355
+ ## [1.1.0] - 2019-07-02
309
356
 
310
357
  ### Added
311
358
 
@@ -325,11 +372,9 @@ this may be a breaking change for JSON schemas described with dry-schema (@flash
325
372
  - Using `meta(omittable: true)` within `transform_types` works again but produces a warning, please migrate to `.omittable` or `.required(false)` (flash-gordon)
326
373
  - Bug with a constructror defined on top of enum (flash-gordon)
327
374
 
375
+ [1.1.0]: https://github.com/dry-rb/dry-types/compare/v1.0.1...v1.1.0
328
376
 
329
- [Compare v1.0.1...v1.1.0](https://github.com/dry-rb/dry-types/compare/v1.0.1...v1.1.0)
330
-
331
- ## 1.0.1 2019-06-04
332
-
377
+ ## [1.0.1] - 2019-06-04
333
378
 
334
379
  ### Added
335
380
 
@@ -344,11 +389,9 @@ this may be a breaking change for JSON schemas described with dry-schema (@flash
344
389
  ```
345
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)
346
391
 
392
+ [1.0.1]: https://github.com/dry-rb/dry-types/compare/v1.0.0...v1.0.1
347
393
 
348
- [Compare v1.0.0...v1.0.1](https://github.com/dry-rb/dry-types/compare/v1.0.0...v1.0.1)
349
-
350
- ## 1.0.0 2019-04-23
351
-
394
+ ## [1.0.0] - 2019-04-23
352
395
 
353
396
  ### Added
354
397
 
@@ -404,13 +447,14 @@ this may be a breaking change for JSON schemas described with dry-schema (@flash
404
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)
405
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)
406
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)
407
- - ## Performance improvements
408
- - 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)
409
450
 
410
- [Compare v0.15.0...v1.0.0](https://github.com/dry-rb/dry-types/compare/v0.15.0...v1.0.0)
451
+ ### Performance improvements
452
+
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)
411
454
 
412
- ## 0.15.0 2019-03-22
455
+ [1.0.0]: https://github.com/dry-rb/dry-types/compare/v0.15.0...v1.0.0
413
456
 
457
+ ## [0.15.0] - 2019-03-22
414
458
 
415
459
  ### Added
416
460
 
@@ -528,20 +572,16 @@ this may be a breaking change for JSON schemas described with dry-schema (@flash
528
572
  - `params.integer` now always converts strings to decimal numbers, this means `09` will be coerced to `9` (threw an error before) (skryukov)
529
573
  - Ruby 2.3 is EOL and not officially supported. It may work but we don't test it.
530
574
 
531
- [Compare v0.14.1...v0.15.0](https://github.com/dry-rb/dry-types/compare/v0.14.1...v0.15.0)
532
-
533
- ## 0.14.1 2019-03-25
575
+ [0.15.0]: https://github.com/dry-rb/dry-types/compare/v0.14.1...v0.15.0
534
576
 
577
+ ## [0.14.1] - 2019-03-25
535
578
 
536
579
  ### Fixed
537
580
 
538
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
539
583
 
540
-
541
- [Compare v0.14.0...v0.14.1](https://github.com/dry-rb/dry-types/compare/v0.14.0...v0.14.1)
542
-
543
- ## 0.14.0 2019-01-29
544
-
584
+ ## [0.14.0] - 2019-01-29
545
585
 
546
586
  ### Fixed
547
587
 
@@ -552,41 +592,31 @@ this may be a breaking change for JSON schemas described with dry-schema (@flash
552
592
  - [BREAKING] Support for Ruby 2.2 was dropped. It reached EOL on March 31, 2018.
553
593
  - `dry-logic` was updated to `~> 0.5` (solnic)
554
594
 
555
- [Compare v0.13.4...v0.14.0](https://github.com/dry-rb/dry-types/compare/v0.13.4...v0.14.0)
556
-
557
- ## 0.13.4 2018-12-21
595
+ [0.14.0]: https://github.com/dry-rb/dry-types/compare/v0.13.4...v0.14.0
558
596
 
597
+ ## [0.13.4] - 2018-12-21
559
598
 
560
599
  ### Fixed
561
600
 
562
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
563
603
 
564
-
565
- [Compare v0.13.3...v0.13.4](https://github.com/dry-rb/dry-types/compare/v0.13.3...v0.13.4)
566
-
567
- ## 0.13.3 2018-11-25
568
-
604
+ ## [0.13.3] - 2018-11-25
569
605
 
570
606
  ### Fixed
571
607
 
572
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
573
610
 
574
-
575
- [Compare v0.13.2...v0.13.3](https://github.com/dry-rb/dry-types/compare/v0.13.2...v0.13.3)
576
-
577
- ## 0.13.2 2018-05-30
578
-
611
+ ## [0.13.2] - 2018-05-30
579
612
 
580
613
  ### Fixed
581
614
 
582
615
  - `Defaults#valid?` now works fine when passing `Dry::Core::Constans::Undefined` as value (GustavoCaso)
583
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
584
618
 
585
-
586
- [Compare v0.13.1...v0.13.2](https://github.com/dry-rb/dry-types/compare/v0.13.1...v0.13.2)
587
-
588
- ## 0.13.1 2018-05-28
589
-
619
+ ## [0.13.1] - 2018-05-28
590
620
 
591
621
  ### Added
592
622
 
@@ -596,12 +626,9 @@ this may be a breaking change for JSON schemas described with dry-schema (@flash
596
626
 
597
627
  - Defaults now works fine with meta (GustavoCaso)
598
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
599
630
 
600
-
601
- [Compare v0.13.0...v0.13.1](https://github.com/dry-rb/dry-types/compare/v0.13.0...v0.13.1)
602
-
603
- ## 0.13.0 2018-05-03
604
-
631
+ ## [0.13.0] - 2018-05-03
605
632
 
606
633
  ### Added
607
634
 
@@ -692,10 +719,9 @@ this may be a breaking change for JSON schemas described with dry-schema (@flash
692
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)
693
720
  - [BREAKING] Enum types don't accept value index anymore. Instead, explicit mapping is supported, see below (flash-gordon)
694
721
 
695
- [Compare v0.12.2...v0.13.0](https://github.com/dry-rb/dry-types/compare/v0.12.2...v0.13.0)
696
-
697
- ## 0.12.2 2017-11-04
722
+ [0.13.0]: https://github.com/dry-rb/dry-types/compare/v0.12.2...v0.13.0
698
723
 
724
+ ## [0.12.2] - 2017-11-04
699
725
 
700
726
  ### Fixed
701
727
 
@@ -703,12 +729,9 @@ this may be a breaking change for JSON schemas described with dry-schema (@flash
703
729
  - Fixed an error on `Dry::Types['json.decimal'].try(nil)` (nesaulov)
704
730
  - Fixed an error on calling `try` on an array type built of constrained types (flash-gordon)
705
731
  - Implemented `===` for enum types (GustavoCaso)
732
+ [0.12.2]: https://github.com/dry-rb/dry-types/compare/v0.12.1...v0.12.2
706
733
 
707
-
708
- [Compare v0.12.1...v0.12.2](https://github.com/dry-rb/dry-types/compare/v0.12.1...v0.12.2)
709
-
710
- ## 0.12.1 2017-10-11
711
-
734
+ ## [0.12.1] - 2017-10-11
712
735
 
713
736
  ### Fixed
714
737
 
@@ -716,24 +739,18 @@ this may be a breaking change for JSON schemas described with dry-schema (@flash
716
739
  - `#constructor` works correctly for default and enum types (solnic)
717
740
  - Optional sum types work correctly in `safe` mode (GustavoCaso)
718
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
719
743
 
720
-
721
- [Compare v0.12.0...v0.12.1](https://github.com/dry-rb/dry-types/compare/v0.12.0...v0.12.1)
722
-
723
- ## 0.12.0 2017-09-15
724
-
744
+ ## [0.12.0] - 2017-09-15
725
745
 
726
746
  ### Added
727
747
 
728
748
  - A bunch of shortcut methods for constructing types to the autogenerated module, e.g. `Types.Constructor(String, &:to_s)` (flash-gordon)
729
749
  - ## Deprecated
730
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
731
752
 
732
-
733
- [Compare v0.11.1...v0.12.0](https://github.com/dry-rb/dry-types/compare/v0.11.1...v0.12.0)
734
-
735
- ## 0.11.1 2017-08-14
736
-
753
+ ## [0.11.1] - 2017-08-14
737
754
 
738
755
  ### Fixed
739
756
 
@@ -743,42 +760,32 @@ this may be a breaking change for JSON schemas described with dry-schema (@flash
743
760
 
744
761
  - Constructors are now equalized using `fn` and `meta` too (flash-gordon)
745
762
 
746
- [Compare v0.11.0...v0.11.1](https://github.com/dry-rb/dry-types/compare/v0.11.0...v0.11.1)
747
-
748
- ## 0.11.0 2017-06-30
763
+ [0.11.1]: https://github.com/dry-rb/dry-types/compare/v0.11.0...v0.11.1
749
764
 
765
+ ## [0.11.0] - 2017-06-30
750
766
 
751
767
  ### Added
752
768
 
753
769
  - `#to_ast` available for all type objects (GustavoCaso)
754
770
  - `Types::Array#of` as an alias for `#member` (maliqq)
755
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
756
773
 
757
-
758
- [Compare v0.10.3...v0.11.0](https://github.com/dry-rb/dry-types/compare/v0.10.3...v0.11.0)
759
-
760
- ## 0.10.3 2017-05-06
761
-
774
+ ## [0.10.3] - 2017-05-06
762
775
 
763
776
  ### Added
764
777
 
765
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
766
780
 
767
-
768
- [Compare v0.10.2...v0.10.3](https://github.com/dry-rb/dry-types/compare/v0.10.2...v0.10.3)
769
-
770
- ## 0.10.2 2017-04-28
771
-
781
+ ## [0.10.2] - 2017-04-28
772
782
 
773
783
  ### Fixed
774
784
 
775
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
776
787
 
777
-
778
- [Compare v0.10.1...v0.10.2](https://github.com/dry-rb/dry-types/compare/v0.10.1...v0.10.2)
779
-
780
- ## 0.10.1 2017-04-28
781
-
788
+ ## [0.10.1] - 2017-04-28
782
789
 
783
790
  ### Added
784
791
 
@@ -789,12 +796,9 @@ this may be a breaking change for JSON schemas described with dry-schema (@flash
789
796
 
790
797
  - `meta` is used in type equality again (solnic)
791
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
792
800
 
793
-
794
- [Compare v0.10.0...v0.10.1](https://github.com/dry-rb/dry-types/compare/v0.10.0...v0.10.1)
795
-
796
- ## 0.10.0 2017-04-26
797
-
801
+ ## [0.10.0] - 2017-04-26
798
802
 
799
803
  ### Added
800
804
 
@@ -809,30 +813,23 @@ this may be a breaking change for JSON schemas described with dry-schema (@flash
809
813
  - Meta data are now stored separately from options (flash-gordon)
810
814
  - `Types::Object` was renamed to `Types::Any` (flash-gordon)
811
815
 
812
- [Compare v0.9.4...v0.10.0](https://github.com/dry-rb/dry-types/compare/v0.9.4...v0.10.0)
813
-
814
- ## 0.9.4 2017-01-24
816
+ [0.10.0]: https://github.com/dry-rb/dry-types/compare/v0.9.4...v0.10.0
815
817
 
818
+ ## [0.9.4] - 2017-01-24
816
819
 
817
820
  ### Added
818
821
 
819
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
820
824
 
821
-
822
- [Compare v0.9.3...v0.9.4](https://github.com/dry-rb/dry-types/compare/v0.9.3...v0.9.4)
823
-
824
- ## 0.9.3 2016-12-03
825
-
825
+ ## [0.9.3] - 2016-12-03
826
826
 
827
827
  ### Fixed
828
828
 
829
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
830
831
 
831
-
832
- [Compare v0.9.2...v0.9.3](https://github.com/dry-rb/dry-types/compare/v0.9.2...v0.9.3)
833
-
834
- ## 0.9.2 2016-11-13
835
-
832
+ ## [0.9.2] - 2016-11-13
836
833
 
837
834
  ### Added
838
835
 
@@ -842,10 +839,9 @@ this may be a breaking change for JSON schemas described with dry-schema (@flash
842
839
 
843
840
  - Optimized object allocation in hash schemas, resulting in up to 25% speed boost (davydovanton)
844
841
 
845
- [Compare v0.9.1...v0.9.2](https://github.com/dry-rb/dry-types/compare/v0.9.1...v0.9.2)
846
-
847
- ## 0.9.1 2016-11-04
842
+ [0.9.2]: https://github.com/dry-rb/dry-types/compare/v0.9.1...v0.9.2
848
843
 
844
+ ## [0.9.1] - 2016-11-04
849
845
 
850
846
  ### Fixed
851
847
 
@@ -855,10 +851,9 @@ this may be a breaking change for JSON schemas described with dry-schema (@flash
855
851
 
856
852
  - `Hash#weak` accepts Hash-descendants again (solnic)
857
853
 
858
- [Compare v0.9.0...v0.9.1](https://github.com/dry-rb/dry-types/compare/v0.9.0...v0.9.1)
859
-
860
- ## 0.9.0 2016-09-21
854
+ [0.9.1]: https://github.com/dry-rb/dry-types/compare/v0.9.0...v0.9.1
861
855
 
856
+ ## [0.9.0] - 2016-09-21
862
857
 
863
858
  ### Added
864
859
 
@@ -880,21 +875,17 @@ this may be a breaking change for JSON schemas described with dry-schema (@flash
880
875
  - `Types::Form::{Date,DateTime,Time}` fail gracefully for invalid input (padde)
881
876
  - ice_nine dependency has been dropped as it was required by Struct only (flash-gordon)
882
877
 
883
- [Compare v0.8.1...v0.9.0](https://github.com/dry-rb/dry-types/compare/v0.8.1...v0.9.0)
884
-
885
- ## 0.8.1 2016-07-13
878
+ [0.9.0]: https://github.com/dry-rb/dry-types/compare/v0.8.1...v0.9.0
886
879
 
880
+ ## [0.8.1] - 2016-07-13
887
881
 
888
882
  ### Fixed
889
883
 
890
884
  - Compiler no longer chokes on type nodes without args (solnic)
891
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
892
887
 
893
-
894
- [Compare v0.8.0...v0.8.1](https://github.com/dry-rb/dry-types/compare/v0.8.0...v0.8.1)
895
-
896
- ## 0.8.0 2016-07-01
897
-
888
+ ## [0.8.0] - 2016-07-01
898
889
 
899
890
  ### Added
900
891
 
@@ -912,10 +903,9 @@ this may be a breaking change for JSON schemas described with dry-schema (@flash
912
903
  - `:symbolized` hash schema is now based on `:weak` schema (solnic)
913
904
  - `Struct::Value` instances are now **deeply frozen** via ice_nine (backus)
914
905
 
915
- [Compare v0.7.2...v0.8.0](https://github.com/dry-rb/dry-types/compare/v0.7.2...v0.8.0)
916
-
917
- ## 0.7.2 2016-05-11
906
+ [0.8.0]: https://github.com/dry-rb/dry-types/compare/v0.7.2...v0.8.0
918
907
 
908
+ ## [0.7.2] - 2016-05-11
919
909
 
920
910
  ### Fixed
921
911
 
@@ -932,10 +922,9 @@ this may be a breaking change for JSON schemas described with dry-schema (@flash
932
922
  - Coerce empty strings in form posts to blank arrays and hashes (timriley)
933
923
  - update to use dry-logic v0.2.3 (fran-worley)
934
924
 
935
- [Compare v0.7.1...v0.7.2](https://github.com/dry-rb/dry-types/compare/v0.7.1...v0.7.2)
936
-
937
- ## 0.7.1 2016-04-06
925
+ [0.7.2]: https://github.com/dry-rb/dry-types/compare/v0.7.1...v0.7.2
938
926
 
927
+ ## [0.7.1] - 2016-04-06
939
928
 
940
929
  ### Added
941
930
 
@@ -945,11 +934,9 @@ this may be a breaking change for JSON schemas described with dry-schema (@flash
945
934
 
946
935
  - Schema is properly inherited in Struct (backus)
947
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
948
938
 
949
-
950
- [Compare v0.7.0...v0.7.1](https://github.com/dry-rb/dry-types/compare/v0.7.0...v0.7.1)
951
-
952
- ## 0.7.0 2016-03-30
939
+ ## [0.7.0] - 2016-03-30
953
940
 
954
941
  Major focus of this release is to make complex type composition possible and improving constraint errors to be more meaningful.
955
942
 
@@ -981,9 +968,9 @@ Major focus of this release is to make complex type composition possible and imp
981
968
  - `Type#default` will raise if `nil` was passed for `Maybe` type (solnic)
982
969
  - `Hash` with a schema will set maybe values for missing keys or nils (flash-gordon)
983
970
 
984
- [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
985
972
 
986
- ## 0.6.0 2016-03-16
973
+ ## [0.6.0] - 2016-03-16
987
974
 
988
975
  Renamed from `dry-data` to `dry-types` and:
989
976
 
@@ -1016,22 +1003,18 @@ Renamed from `dry-data` to `dry-types` and:
1016
1003
  - `Dry::Types::Definition` is now the base type definition object (solnic)
1017
1004
  - `Dry::Types::Constructor` is now a type definition with a constructor function (solnic)
1018
1005
 
1019
- [Compare v0.5.1...v0.6.0](https://github.com/dry-rb/dry-types/compare/v0.5.1...v0.6.0)
1020
-
1021
- ## 0.5.1 2016-01-11
1006
+ [0.6.0]: https://github.com/dry-rb/dry-types/compare/v0.5.1...v0.6.0
1022
1007
 
1008
+ ## [0.5.1] - 2016-01-11
1023
1009
 
1024
1010
  ### Added
1025
1011
 
1026
1012
  - `Dry::Data::Type#safe` for types which can skip constructor when primitive does
1027
1013
  not match input's class (solnic)
1028
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
1029
1016
 
1030
-
1031
- [Compare v0.5.0...v0.5.1](https://github.com/dry-rb/dry-types/compare/v0.5.0...v0.5.1)
1032
-
1033
- ## 0.5.0 2016-01-11
1034
-
1017
+ ## [0.5.0] - 2016-01-11
1035
1018
 
1036
1019
  ### Added
1037
1020
 
@@ -1050,10 +1033,9 @@ Renamed from `dry-data` to `dry-types` and:
1050
1033
  - `strict.*` category uses constrained types with `:type?` predicate (solnic)
1051
1034
  - `SumType#call` no longer needs to rescue from `TypeError` (solnic)
1052
1035
 
1053
- [Compare v0.4.2...v0.5.0](https://github.com/dry-rb/dry-types/compare/v0.4.2...v0.5.0)
1054
-
1055
- ## 0.4.2 2015-12-27
1036
+ [0.5.0]: https://github.com/dry-rb/dry-types/compare/v0.4.2...v0.5.0
1056
1037
 
1038
+ ## [0.4.2] - 2015-12-27
1057
1039
 
1058
1040
  ### Added
1059
1041
 
@@ -1063,10 +1045,9 @@ Renamed from `dry-data` to `dry-types` and:
1063
1045
 
1064
1046
  - Array member uses type objects now rather than just their constructors (solnic)
1065
1047
 
1066
- [Compare v0.4.0...v0.4.2](https://github.com/dry-rb/dry-types/compare/v0.4.0...v0.4.2)
1067
-
1068
- ## 0.4.0 2015-12-11
1048
+ [0.4.2]: https://github.com/dry-rb/dry-types/compare/v0.4.0...v0.4.2
1069
1049
 
1050
+ ## [0.4.0] - 2015-12-11
1070
1051
 
1071
1052
  ### Added
1072
1053
 
@@ -1077,10 +1058,9 @@ Renamed from `dry-data` to `dry-types` and:
1077
1058
 
1078
1059
  - `Dry::Data['optional']` was **removed** in favor of `Dry::Data::Type#optional` (solnic)
1079
1060
 
1080
- [Compare v0.3.2...v0.4.0](https://github.com/dry-rb/dry-types/compare/v0.3.2...v0.4.0)
1081
-
1082
- ## 0.3.2 2015-12-10
1061
+ [0.4.0]: https://github.com/dry-rb/dry-types/compare/v0.3.2...v0.4.0
1083
1062
 
1063
+ ## [0.3.2] - 2015-12-10
1084
1064
 
1085
1065
  ### Added
1086
1066
 
@@ -1089,21 +1069,17 @@ Renamed from `dry-data` to `dry-types` and:
1089
1069
  ### Fixed
1090
1070
 
1091
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
1092
1073
 
1093
-
1094
- [Compare v0.3.1...v0.3.2](https://github.com/dry-rb/dry-types/compare/v0.3.1...v0.3.2)
1095
-
1096
- ## 0.3.1 2015-12-09
1097
-
1074
+ ## [0.3.1] - 2015-12-09
1098
1075
 
1099
1076
  ### Changed
1100
1077
 
1101
1078
  - Removed require of constrained type and make it optional (solnic)
1102
1079
 
1103
- [Compare v0.3.0...v0.3.1](https://github.com/dry-rb/dry-types/compare/v0.3.0...v0.3.1)
1104
-
1105
- ## 0.3.0 2015-12-09
1080
+ [0.3.1]: https://github.com/dry-rb/dry-types/compare/v0.3.0...v0.3.1
1106
1081
 
1082
+ ## [0.3.0] - 2015-12-09
1107
1083
 
1108
1084
  ### Added
1109
1085
 
@@ -1112,12 +1088,9 @@ Renamed from `dry-data` to `dry-types` and:
1112
1088
  - `Dry::Data.finalize` can be used to define types as constants under configured namespace (solnic)
1113
1089
  - `Dry::Data::Type#enum` for defining an enum from a specific type (solnic)
1114
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
1115
1092
 
1116
-
1117
- [Compare v0.2.1...v0.3.0](https://github.com/dry-rb/dry-types/compare/v0.2.1...v0.3.0)
1118
-
1119
- ## 0.2.1 2015-11-30
1120
-
1093
+ ## [0.2.1] - 2015-11-30
1121
1094
 
1122
1095
  ### Added
1123
1096
 
@@ -1131,10 +1104,9 @@ Renamed from `dry-data` to `dry-types` and:
1131
1104
 
1132
1105
  - Improved structure of the ast (solnic)
1133
1106
 
1134
- [Compare v0.2.0...v0.2.1](https://github.com/dry-rb/dry-types/compare/v0.2.0...v0.2.1)
1135
-
1136
- ## 0.2.0 2015-11-29
1107
+ [0.2.1]: https://github.com/dry-rb/dry-types/compare/v0.2.0...v0.2.1
1137
1108
 
1109
+ ## [0.2.0] - 2015-11-29
1138
1110
 
1139
1111
  ### Added
1140
1112
 
@@ -1146,10 +1118,9 @@ Renamed from `dry-data` to `dry-types` and:
1146
1118
 
1147
1119
  - Constructing optional types uses the new `Dry::Data["optional"]` built-in type (solnic)
1148
1120
 
1149
- [Compare v0.1.0...v0.2.0](https://github.com/dry-rb/dry-types/compare/v0.1.0...v0.2.0)
1150
-
1151
- ## 0.1.0 2015-11-27
1121
+ [0.2.0]: https://github.com/dry-rb/dry-types/compare/v0.1.0...v0.2.0
1152
1122
 
1123
+ ## [0.1.0] - 2015-11-27
1153
1124
 
1154
1125
  ### Added
1155
1126
 
@@ -1159,10 +1130,8 @@ Renamed from `dry-data` to `dry-types` and:
1159
1130
  - `Dry::Data.register_class` short-cut interface for registering a class and
1160
1131
  setting its `.new` method as the constructor (solnic)
1161
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
1162
1134
 
1163
-
1164
- [Compare v0.0.1...v0.1.0](https://github.com/dry-rb/dry-types/compare/v0.0.1...v0.1.0)
1165
-
1166
- ## 0.0.1 2015-10-05
1135
+ ## [0.0.1] - 2015-10-05
1167
1136
 
1168
1137
  First public release