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