UNPKG

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