UNPKG

22 kBMarkdownView Raw
1# Changelog
2
3> **Tags:**
4>
5> - [New Feature]
6> - [Bug Fix]
7> - [Breaking Change]
8> - [Documentation]
9> - [Internal]
10> - [Polish]
11> - [Experimental]
12> - [Deprecation]
13
14**Note**: Gaps between patch versions are faulty/broken releases.
15**Note**: A feature tagged as Experimental is in a high state of flux, you're at risk of it changing without notice.
16
17# 2.2.15
18
19- **Experimental**
20 - `Schemable`
21 - (\*) add `readonly` combinator (@gcanti)
22 - (\*) add `struct` combinator (@gcanti)
23 - deprecate `type` in favour of `struct` (@gcanti)
24 - deprecate `fromType` in favour of `fromStruct` (@gcanti)
25
26(\*) breaking change
27
28# 2.2.14
29
30- **Experimental**
31 - `Guard`
32 - relax `UnknownRecord` check, closes #559 (@waynevanson)
33
34# 2.2.13
35
36- **Bug Fix**
37 - improve internal `mergeAll` function, closes #532 (@gcanti)
38
39# 2.2.12
40
41- **Experimental**
42 - (\*) make `sum` safer, closes #523 (@gcanti)
43
44(\*) breaking change
45
46In case of non-`string` tag values, the respective key must be enclosed in brackets
47
48```ts
49export const MySum: D.Decoder<
50 unknown,
51 | {
52 type: 1 // non-`string` tag value
53 a: string
54 }
55 | {
56 type: 2 // non-`string` tag value
57 b: number
58 }
59> = D.sum('type')({
60 [1]: D.type({ type: D.literal(1), a: D.string }),
61 [2]: D.type({ type: D.literal(2), b: D.number })
62})
63```
64
65# 2.2.11
66
67- **Experimental**
68 - `Decoder`
69 - make `toForest` stack-safe, #520 (@safareli)
70
71# 2.2.10
72
73- **Polish**
74 - expose modules without lib/es6 prefix, #507 (@osdiab)
75
76# 2.2.9
77
78- **Polish**
79 - remove `Object.freeze` calls, closes #497 (@gcanti)
80- **Experimental**
81 - `DecodeError`
82 - add `Wrap` member (@gcanti)
83 - `Decoder`
84 - add `withMessage` combinator (@gcanti)
85 - `TaskDecoder`
86 - add `withMessage` combinator (@gcanti)
87
88# 2.2.8
89
90- **Experimental**
91 - (\*) remove `KleisliDecoder` module (@gcanti)
92 - (\*) remove `KleisliTaskDecoder` module (@gcanti)
93 - (\*) remove `JsonCodec` module (@gcanti)
94 - (\*) remove `JsonEncoder` module (@gcanti)
95 - `Codec`
96 - (\*) make `Codec` more general by adding a `I` type parameter (@gcanti)
97 - add `fromType` function (@gcanti)
98 - add `fromPartial` function (@gcanti)
99 - add `fromArray` function (@gcanti)
100 - add `fromRecord` function (@gcanti)
101 - add `fromTuple` function (@gcanti)
102 - add `fromSum` function (@gcanti)
103 - add `compose` function (@gcanti)
104 - `Decoder`
105 - (\*) make `Decoder` more general by adding a `I` type parameter (@gcanti)
106 - add `fromRefinement` function (@gcanti)
107 - change `fromGuard` signature (@gcanti)
108 - add `fromType` function (@gcanti)
109 - add `fromPartial` function (@gcanti)
110 - add `fromArray` function (@gcanti)
111 - add `fromRecord` function (@gcanti)
112 - add `fromTuple` function (@gcanti)
113 - add `fromSum` function (@gcanti)
114 - add `compose` function (@gcanti)
115 - add `id` function (@gcanti)
116 - (\*) rename `functorDecoder` instance to `Functor` (@gcanti)
117 - (\*) rename `altDecoder` instance to `Alt` (@gcanti)
118 - (\*) rename and split `schemableDecoder` (@gcanti)
119 - add `Category` instance (@gcanti)
120 - add `InputOf` type (@gcanti)
121 - `TaskDecoder`
122 - (\*) make `TaskDecoder` more general by adding a `I` type parameter (@gcanti)
123 - add `fromRefinement` function (@gcanti)
124 - change `fromDecoder` signature (@gcanti)
125 - add `fromType` function (@gcanti)
126 - add `fromPartial` function (@gcanti)
127 - add `fromArray` function (@gcanti)
128 - add `fromRecord` function (@gcanti)
129 - add `fromTuple` function (@gcanti)
130 - add `fromSum` function (@gcanti)
131 - add `compose` function (@gcanti)
132 - add `id` function (@gcanti)
133 - (\*) rename `functorTaskDecoder` instance to `Functor` (@gcanti)
134 - (\*) rename `altTaskDecoder` instance to `Alt` (@gcanti)
135 - (\*) rename and split `schemableTaskDecoder` (@gcanti)
136 - add `Category` instance (@gcanti)
137 - add `InputOf` type (@gcanti)
138 - `Guard`
139 - (\*) make `Guard` more general by adding a `I` type parameter (@gcanti)
140 - (\*) rename `schemableGuard` (@gcanti)
141 - add `InputOf` type (@gcanti)
142 - add `alt` function (@gcanti)
143 - add `zero` function (@gcanti)
144 - add `compose` function (@gcanti)
145 - add `id` function (@gcanti)
146 - `Codec`
147 - (\*) rename `invariantCodec` to `Invariant` (@gcanti)
148 - `Encoder`
149 - (\*) rename `contravariantEncoder` to `Contravariant` (@gcanti)
150 - (\*) rename `categoryEncoder` to `Category` (@gcanti)
151 - `Eq`
152 - (\*) rename and split `schemableEq` (@gcanti)
153 - `Kleisli`
154 - add `id` (@gcanti)
155 - rename `type` to `fromType` (@gcanti)
156 - rename `partial` to `fromPartial` (@gcanti)
157 - rename `array` to `fromArray` (@gcanti)
158 - rename `record` to `fromRecord` (@gcanti)
159 - rename `tuple` to `fromTuple` (@gcanti)
160 - rename `sum` to `fromSum` (@gcanti)
161 - `Schemable`
162 - add `Schemable2C`, `WithUnknownContainers2C`, `WithUnion2C`, `WithRefine2C` (@gcanti)
163 - `Type`
164 - (\*) rename and split `schemableType` (@gcanti)
165
166(\*) breaking change
167
168# 2.2.7
169
170- **Experimental**
171 - add `DecodeError` module (@gcanti)
172 - add `FreeSemigroup` module (@gcanti)
173 - add `TaskDecoder` module (@gcanti)
174 - add `Kleisli` module (@gcanti)
175 - add `KleisliDecoder` module (@gcanti)
176 - add `KleisliTaskDecoder` module (@gcanti)
177 - (\*) remove `NaN` from `number` instances (@gcanti)
178 - (\*) remove `Tree` module (@gcanti)
179 - (\*) make `Json` type immutable (@gcanti)
180 - `Decoder`
181 - (\*) remove `never` (@gcanti)
182 - (\*) make `parse` pipeable and change its `parser` argument (@gcanti)
183 - (\*) change `DecoderError` (@gcanti)
184 - (\*) remove `withExpected` in favour of `mapLeftWithInput` (@gcanti)
185 - `Guard`
186 - (\*) remove `never` (@gcanti)
187 - `Schemable`
188 - (\*) better `literal` signature (@gcanti)
189 - (\*) better `union` signature (@gcanti)
190 - (\*) make intersections pipeables (@gcanti)
191 - (\*) make refinements pipeables (@gcanti)
192
193(\*) breaking change
194
195# 2.2.6
196
197- **Experimental**
198 - `Decoder`
199 - add support for non-`string` tag values to `sum`, closes #481 (@gcanti)
200 - `intersection` should accumulate all errors (@gcanti)
201
202# 2.2.5
203
204- **Experimental**
205 - fix type information lost from nested decoder types, #479 (@gcanti)
206 - `JsonEncoder`
207 - change `id` signature (@gcanti)
208
209# 2.2.4
210
211- **Polish**
212 - remove the dependency on the `either` instance as a mean of improving tree shaking (@gcanti)
213
214# 2.2.3
215
216- **Polish**
217 - use the built-in `Readonly` type in `readonly` combinator, closes #472 (@gcanti)
218- **Experimental**
219 - split instances (@gcanti)
220 - add `Type` experimental module, #464 (@gcanti)
221 - restore the `O` type parameter to `Encoder`, #469 (@gcanti)
222 - add the `O` type parameter to `Codec` (@gcanti)
223 - add `JsonCodec` experimental module (@gcanti)
224 - add `JsonEncoder` experimental module (@gcanti)
225 - `Schemable`
226 - rename `Schemable` interface to `Schemable1` (@gcanti)
227 - rename `WithUnion` interface to `WithUnion1` (@gcanti)
228 - add `Schemable` interface (@gcanti)
229 - add `WithUnion` interface (@gcanti)
230 - add `WithRefinement` / `WithRefinement1` interfaces (@gcanti)
231 - add `WithUnknownContainers` / `WithUnknownContainers1` interfaces (@gcanti)
232 - move `UnknownArray` and `UnknownRecord` to `WithUnknownContainers` (@gcanti)
233 - `Schema`
234 - refactoring with the new `Schemable` interface (@gcanti)
235 - add `interpreter` function (@gcanti)
236- **Internal**
237 - upgrade to `typescript@3.9.3` (@gcanti)
238
239# 2.2.2
240
241- **Experimental**
242 - add `Eq` module (@gcanti)
243 - `Codec`
244 - add `TypeOf` operator (@gcanti)
245 - `Decoder`
246 - add `DecodeError` interface (@gcanti)
247 - `Encoder`
248 - add `TypeOf` operator (@gcanti)
249 - `Guard`
250 - add `TypeOf` operator (@gcanti)
251
252# 2.2.1
253
254- **Experimental**
255 - `Decoder`
256 - collect all errors while decoding, closes #449 (@gcanti)
257
258# 2.2.0
259
260- **Experimental**
261 - add `Codec`, `Decoder`, `Encoder`, `Guard`, `Schema`, `Schemable`, `Tree` modules (@gcanti)
262
263# 2.1.3
264
265- **Polish**
266 - remove useless `hasOwnProperty` calls, closes #423 (@gcanti)
267
268# 2.1.1
269
270- **Bug Fix**
271 - fix `record` domain handling, closes #391 (@gcanti)
272
273# 2.1.0
274
275- **New Feature**
276 - add `bigint` codec (@mixedCase)
277
278# 2.0.6
279
280- **Bug Fix**
281 - whitelist `window` in `UnknownRecord`, fix #413 (@gcanti)
282
283# 2.0.5
284
285- **Bug Fix**
286 - `partial` shouldn't allow arrays, fix #407 (@gcanti)
287
288# 2.0.4
289
290- **Bug Fix**
291 - remove getters, fix #404 (@gcanti)
292
293# 2.0.3
294
295- **Bug Fix**
296 - rewrite es6 imports (@gcanti)
297
298# 2.0.2
299
300- **Bug Fix**
301 - fix #397 (@gcanti)
302
303# 2.0.1
304
305- **Bug Fix**
306 - fix `getTags` algorithm for mutually recursive codecs, closes #354 (@gcanti)
307
308# 2.0.0
309
310- **Breaking Change**
311 - upgrade to `fp-ts@2.x` (@gcanti)
312 - move `fp-ts` to `peerDependencies` (@gcanti)
313
314# 1.10.4
315
316- **Polish**
317 - remove unneeded internal code (@gcanti)
318
319# 1.10.3
320
321- **Bug Fix**
322 - revert `1.10.0` compatibility, fix #344 (@gcanti)
323
324# 1.10.2
325
326- **Bug Fix**
327 - move `fp-ts` back to dependencies (@gcanti)
328
329# 1.10.1
330
331- **Bug Fix**
332 - handle `strict`, `exact` and `refinement` codecs when optimizing tagged unions, fix #339 (@gcanti)
333
334# 1.10.0
335
336- **New Feature**
337 - make `io-ts` compatible with both `fp-ts@1.x`, `fp-ts@2.x` (@gcanti)
338
339# 1.9.0
340
341- **New Feature**
342 - `union` is now able to detect and optimize tagged unions (@gcanti)
343- **Deprecation**
344 - deprecate `taggedUnion` in favour of `union` (@gcanti)
345
346# 1.8.6
347
348output ES modules to better support tree-shaking, closes #326 (@gcanti)
349
350# 1.8.5
351
352- **Bug Fix**
353 - change how types and output types are retrieved in `IntersectionC` and `TupleC`, fix #315 (@gcanti)
354
355# 1.8.4
356
357- **Polish**
358 - autobind `decode` method (@gcanti)
359
360# 1.8.3
361
362- **Polish**
363 - add `stripInternal` flag to `tsconfig.json` (@gcanti)
364 - handle `NaN` in `PathReporter` (@gcanti)
365 - throw if union encoding doesn't find a usable codec (@leemhenson)
366- **Deprecation**
367 - deprecate `NeverType` (@gcanti)
368 - deprecate `FunctionType` (@gcanti)
369
370# 1.8.2
371
372- **Bug Fix**
373 - align the runtime behavior of `Exact.is` with the type system, fix #288 (@gcanti)
374
375# 1.8.1
376
377- **New Feature**
378 - add `brand` combinator (@gcanti, @lostintime)
379 - add `Int` codec (@gcanti)
380 - `exact` strips additional properties while decoding / encoding (@gcanti)
381 - un-deprecate `strict` combinator, is now an alias of `exact(type(...))` (@gcanti)
382- **Bug Fix**
383 - fix wrong context keys for tagged unions (@gcanti)
384- **Deprecation**
385 - deprecate `refinement` combinator in favour of `brand` (@gcanti)
386 - deprecate `Integer` codec in favour of `Int` (@gcanti)
387 - deprecate `StrictType` class (@gcanti)
388 - deprecate `StrictC` interface (@gcanti)
389- **Polish**
390 - modify the implementation of `intersection` in order to support combinators that strip additional properties (@gcanti)
391 - do not validate the codomain of a key of a record if its domain in invalid (@gcanti)
392 - normalize missing `message` field in `ValidationError` (@gcanti)
393 - fix name of recursive codec definitions (@gcanti)
394 - remove unexpected validation path from partial type, closes #195 (@gcanti)
395 - do not leak taggedUnion implementation when tag validation fails (@gcanti)
396 - add `actual` value to all context entries (@gcanti)
397 - `exact` now bails out when the value is not an `UnknownRecord` (@gcanti)
398 - `tuple` should not leak the implementation (`never` usage) (@gcanti)
399 - `exact` should not leak the implementation (`never` usage) (@gcanti)
400 - use `Number.isInteger` in `Integer` implementation (@gcanti)
401 - use the Flow convention to name `exact` codecs (@gcanti)
402
403# 1.7.1
404
405- **Deprecation**
406 - deprecate `any` (@gcanti)
407 - deprecate `object` (@gcanti)
408 - deprecate `Dictionary` in favour of `UnknownRecord` (@gcanti)
409 - deprecate `Array` in favour of `UnknownArray` (@gcanti)
410 - deprecate `dictionary` in favour of `record` (@gcanti)
411
412# 1.7.0
413
414- **New Feature**
415 - better support for custom messages, closes #148 (@gcanti)
416 - add optional message field to `ValidationError`
417 - add `message` argument to `failure`
418 - `PathReporter` should account for the new field
419 - add `actual` optional field to `ContextEntry`, closes #194 (@gcanti)
420- **Deprecation**
421 - deprecate `getValidationError` (@gcanti)
422 - deprecate `getDefaultContext` (@gcanti)
423
424# 1.6.4
425
426- **Bug Fix**
427 - `getIndexRecord`: getIndexRecord: handle conflicting tags in different positions, ref #263 (@gcanti)
428- **Experimental**
429 - added a warning to the console if a tagged union cannot be created (@gcanti)
430 - revert `union` optimization, needs more work to make it happen (@gcanti)
431
432# 1.6.3
433
434- **Bug Fix**
435 - prevent maximum call stack size exceeded when indexing recursive codecs, closes #259 (@gcanti)
436
437# 1.6.2
438
439- **Polish**
440 - make `isIndexableCodec` more strict (@gcanti)
441
442# 1.6.1
443
444- **Bug Fix**
445 - `taggedUnion` should handle sub unions / tagged unions correctly, closes #257 (@gcanti)
446- **Experimental**
447 - optimize `union` with the same algorithm used in `taggedUnion` (@gcanti)
448
449# 1.6.0
450
451**Important**. This version requires `typescript@3.2.2+`
452
453- **New Feature**
454 - leverage `typescript@3.2.2` (@gcanti)
455 - `TypeC`
456 - `PartialC`
457 - `RecordC`
458 - `UnionC`
459 - `ReadonlyC`
460 - `StrictC`
461 - `TaggedUnionC`
462
463# 1.5.3
464
465- **Bug Fix**
466 - missing context info while decoding an intersection, fix #246 (@gcanti)
467- **Experimental**
468 - add intermediary interfaces, closes #165 (@gcanti)
469 - `NullC`
470 - `UndefinedC`
471 - `VoidC`
472 - `AnyC`
473 - `UnknownC`
474 - `NeverC`
475 - `StringC`
476 - `NumberC`
477 - `BooleanC`
478 - `UnknownArrayC`
479 - `UnknownRecordC`
480 - `ObjectC`
481 - `FunctionC`
482 - `RefinementC`
483 - `LiteralC`
484 - `KeyofC`
485 - `ArrayC`
486 - `TypeC`
487 - `PartialC`
488 - `RecordC`
489 - `UnionC`
490 - `IntersectionC`
491 - `TupleC`
492 - `ReadonlyC`
493 - `ReadonlyArrayC`
494 - `StrictC`
495 - `TaggedUnionC`
496 - `ExactC`
497- **Polishs**
498 - use rest elements in tuple types (`typescript@3.0.1` feature) (@gcanti)
499 - `union` should handle zero types (@gcanti)
500 - `intersection` should handle zero / one types (@gcanti)
501- **Deprecation**
502 - deprecate `clean` (@gcanti)
503 - deprecate `alias` (@gcanti)
504 - deprecate `PropsOf` type (@gcanti)
505 - deprecate `Exact` type (@gcanti)
506
507# 1.5.2
508
509- **Deprecation**
510 - deprecate `Compact` type (@gcanti)
511
512# 1.5.1
513
514- **Polish**
515 - remove useless module augmentation of `Array` (@gcanti)
516
517# 1.5.0
518
519- **New Feature**
520 - add `UnknownType`, closes #238 (@gcanti)
521- **Deprecation**
522 - `ThrowReporter` is now deprecated (@gcanti)
523
524# 1.4.2
525
526use `Compact` in `intersection` signatures as a workaround for #234 (@sledorze)
527
528# 1.4.1
529
530- **Polish**
531 - `Type.prototype.pipe` now allows more types as input, #231 #232 (@sledorze)
532
533# 1.4.0
534
535- **New Feature**
536 - use `unknown` as `mixed` (@gcanti)
537
538# 1.3.4
539
540- **Bug Fix**
541 - should emit expected keys while decoding, fix #214 (@gcanti)
542
543# 1.3.3
544
545- **Bug Fix**
546 - align `TaggedExact` definition with siblings, fix #223 (@gcanti)
547
548# 1.3.2
549
550- **Bug Fix**
551 - dictionary type should not allow arrays, fix #218 (@gcanti)
552
553# 1.3.1
554
555- **Polish**
556 - use interface instead of type alias (@gcanti)
557 - `Context`
558 - `Errors`
559 - `Any`
560 - `Mixed`
561
562# 1.3.0
563
564- **New Feature**
565 - add `TaggedUnionType` (@gcanti)
566
567# 1.2.1
568
569- **Polish**
570 - allow recursive types in tagged unions (@gcanti)
571
572# 1.2.0
573
574- **New Feature**
575 - add `void` runtime type (@gcanti)
576
577# 1.1.5
578
579- **Bug Fix**
580 - partial combinator should preserve additional properties while encoding, fixes #179 (@gcanti)
581- **Polish**
582 - use `useIdentity` when possible (@gcanti)
583
584# 1.1.4
585
586- **Internal**
587 - fix broken build with `typescript@2.9.1`, closes #174 (@gcanti)
588
589# 1.1.3
590
591- **Internal**
592 - upgrade to `typings-checker@2.0.0` (@gcanti)
593
594# 1.1.2
595
596- **Bug Fix**
597 - fix `alias` implementation (@gcanti)
598 - handle exact types in `isTagged` (@gcanti)
599
600# 1.1.1
601
602- **Experimental**
603 - add `clean` / `alias` functions, closes #149 (@gcanti)
604 - add `exact` combinator (@gcanti)
605 - the `strict` combinator is deprecated
606 - remove `optional` combinator (@gcanti)
607 - it doesn't play well with advanced combinators, see [here](https://github.com/gcanti/io-ts/issues/140) for a discussion
608
609# 1.0.6
610
611- **Bug Fix**
612 - `taggedUnion` fails to decode when tag values are not string literals, fix #161 (@gcanti)
613
614# 1.0.5
615
616- **Bug Fix**
617 - workaround for upstream TypeScript bug 14041 (wrong generated declarations) (@gcanti)
618- **Internal**
619 - optimize InterfaceType.encode (@gcanti)
620 - use definite assignment assertion for phantom fields (@gcanti)
621
622# 1.0.4
623
624- **Bug Fix**
625 - make `Context` readonly (@gcanti)
626- **Internal**
627 - optimizations, #137 (@gcanti, @sledorze)
628
629# 1.0.3
630
631- **Internal**
632 - optimizations, #134 (@gcanti, @sledorze)
633
634# 1.0.2
635
636- **Bug Fix**
637 - fix `OutputOfPartialProps` name (@gcanti)
638
639# 1.0.1
640
641- **Bug Fix**
642 - fix `AnyType` by extending `Type<any>` (@gcanti)
643
644# 1.0.0
645
646- **Breaking Change**
647 - upgrade to `fp-ts@1.0.0`
648 - see https://github.com/gcanti/io-ts/pull/112 (@gcanti)
649
650# 0.9.8
651
652- **New Feature**
653 - add decode and deprecate top level validate (@gcanti)
654- **Internal**
655 - when checking validations use methods instead of top level functions (@gcanti)
656
657# 0.9.7
658
659- **New Feature**
660 - add `taggedUnion` combinator (@gcanti, @sledorze)
661
662# 0.9.6
663
664- **New Feature**
665 - `recursive` combinator
666 - add support for mutually recursive types, closes #114 (@gcanti)
667 - make it safer: `RT` now must extend `Type<mixed, A>` (@gcanti)
668
669# 0.9.5
670
671- **New Feature**
672 - add `mixed` type (@gcanti)
673 - replace `any` with `mixed` in all input type parameters (@gcanti)
674 ```diff
675 -export class StringType extends Type<any, string> {
676 +export class StringType extends Type<mixed, string> {
677 }
678 ```
679
680# 0.9.4
681
682- **Bug Fix**
683 - strict: should succeed validating an undefined field, closes #106 (@gcanti)
684
685# 0.9.3
686
687- **Bug Fix**
688 - revert 37c74a5e2038de063a950f9ba8d18b1f132ef450, closes #8 (@gcanti)
689
690# 0.9.2
691
692- **New Feature**
693 - add `Decoder` / `Encoder` interfaces (@sledorze, @gcanti)
694- **Internal**
695 - perf optimizations (@sledorze, @gcanti)
696
697# 0.9.1
698
699- **Bug Fix**
700 - make all classes "dumb", fix #95 (@gcanti)
701
702# 0.9.0
703
704- **Breaking Change**
705 - remove `t.map` and `t.mapWithName` (in general doesn't look serializable, needs more investigation)
706 - remove `t.prism` (in general doesn't look serializable, needs more investigation)
707 - change `Type` from interface to class and add `S` type parameter
708 - remove `t._A`
709 - add `Type#serialize`
710 - add `Type#is` (in order to serialize unions and while we're at it, looks useful anyway)
711 - remove `t.is` (now that there's `Type#is` is misleading)
712- **Experimental**
713 - add Flowtype support (@gcanti)
714
715# 0.8.2
716
717- **New Feature**
718 - add `object` type, closes #86 (@gcanti)
719
720# 0.8.1
721
722- **New Feature**
723 - add `strict` combinator, closes #84 (@phiresky, @gcanti)
724
725# 0.8.0
726
727- **Breaking Change**
728 - upgrade `fp-ts` dependency (@gcanti)
729
730# 0.7.2
731
732- **Bug Fix**
733 - tag recursive types, fix #80 (@gcanti)
734
735# 0.7.1
736
737- **Bug Fix**
738 - incorrect compile time type for dictionary, fix #75 (@gcanti)
739
740# 0.7.0
741
742- **Breaking Change**
743 - upgrade to latest fp-ts (0.5.1) (@gcanti)
744
745# 0.6.2
746
747- **New Feature**
748 - add aliases for `null` and `interface`, closes #63 (@gcanti)
749
750# 0.6.1
751
752- **Internal**
753 - handle latest fp-ts (0.4.3) (@gcanti)
754
755# 0.6.0
756
757- **Breaking Change**
758 - upgrade to latest fp-ts (0.4.0) (@gcanti)
759- **Internal**
760 - allow for infinite unions (@gcanti)
761
762# 0.5.1
763
764- **Bug Fix**
765 - export and rename `interfaceType` to `_interface`, fix #57 (@gcanti)
766
767# 0.5.0
768
769- **Breaking Change**
770 - `Type` is now an interface
771 - types no more own a `is` method, use `t.is` instead
772 - unions no more own a `fold` method
773 - `Reporter`, `PathReporter`, `ThrowReporter` are now top level modules
774
775# 0.4.0
776
777- **Breaking Change**
778 - upgrade to latest `fp-ts` (`io-ts` APIs are not changed though) (@gcanti)
779 - drop `lib-jsnext` folder
780
781# 0.3.2
782
783- **Bug Fix**
784 - remove excess overloadings, fix #43 (@gcanti)
785
786# 0.3.1
787
788- **New Feature**
789 - add mapWithName and Functor instance, fix #37 (@gcanti)
790 - add prism combinator, fix #41 (@gcanti)
791
792# 0.3.0
793
794This is a breaking change _only_ if you are using fp-ts APIs
795
796- **Breaking Change**
797 - upgrade to latest fp-ts v0.2 (@gcanti)
798
799# 0.2.3
800
801- **Internal**
802 - upgrade to fp-ts v0.1 (@gcanti)
803
804# 0.2.2
805
806- **New Feature**
807 - add `partial` combinator (makes optional props possible)
808 - add `readonly` combinator (values are not frozen in production)
809 - add `readonlyArray` combinator (values are not frozen in production)
810 - add `never` type
811- **Breaking Changes**
812 - remove `maybe` combinator, can be defined in userland as
813 ```ts
814 export function maybe<RT extends t.Any>(
815 type: RT,
816 name?: string
817 ): t.UnionType<[RT, typeof t.null], t.TypeOf<RT> | null> {
818 return t.union([type, t.null], name)
819 }
820 ```
821- **Polish**
822 - export `pathReporterFailure` function from default reporters
823- **Bug Fix**
824 - revert pruning excess properties (see https://github.com/gcanti/io-ts/pull/27 for context)
825 - revert `intersection` combinator accepting only `InterfaceType`s
826- **Experimental**
827 - Pattern matching / catamorphism for unions
828
829# 0.1.0
830
831- **New Feature**
832
833 - add support for jsnext
834 - add `Integer` type
835
836- **Breaking Changes**
837 - `t.Object` type. Renamed to `t.Dictionary`, now accepts arrays so is fully equivalent to `{ [key: string]: any }`.
838 - `t.instanceOf` combinator. Removed.
839 - `t.object` combinator. Renamed to `t.interface`. `ObjectType` to `InterfaceType`. Excess properties are now pruned.
840 - `mapping` combinator. Renamed to `dictionary`. `MappingType` to `DictionaryType`.
841 - `intersection` combinator. Due to the new excess property pruning in `t.interface` now only accept `InterfaceType`s.
842 - API `isSuccess` removed, use `either.isRight` instead
843 - API `isFailure` removed, use `either.isLeft` instead
844 - API `fromValidation` removed
845
846# 0.0.2
847
848- **Bug Fix**
849 - reverse overloading definitions for unions, intersections and tuples, fix inference bug
850
851# 0.0.1
852
853Initial release