From 44383ed6e296cd3dc2130307c4c9973a84ee9983 Mon Sep 17 00:00:00 2001 From: Simon Lydell Date: Sat, 14 Oct 2023 21:29:39 +0200 Subject: [PATCH] tiny-decoders v8.0.0 --- CHANGELOG.md | 22 ++++++++++++++++++++++ package-real.json | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e4418db..ebe610c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,25 @@ +Note: I’m currently working on several breaking changes to tiny-decoders, but I’m trying out releasing them piece by piece. The idea is that you can either upgrade version by version only having to deal with one or a few breaking changes at a time, or wait and do a bunch of them at the same time. + +### Version 8.0.0 (2023-10-14) + +Changed: `stringUnion` now takes an array instead of an object. + +Before: + +```ts +stringUnion({ green: null, red: null }); +``` + +After: + +```ts +stringUnion(["green", "red"]); +``` + +This is clearer, and made the implementation of `stringUnion` simpler. + +If you have an object and want to use its keys for a string union there’s an example of that in the [type inference file](examples/type-inference.test.ts). + ### Version 7.0.1 (2022-08-07) - Fixed: The TypeScript definitions can now be found if you use `"type": "module"` in your package.json and `"module": "Node16"` or `"module": "NodeNext"` in your tsconfig.json. diff --git a/package-real.json b/package-real.json index e4f5325..dd74231 100644 --- a/package-real.json +++ b/package-real.json @@ -1,6 +1,6 @@ { "name": "tiny-decoders", - "version": "7.0.1", + "version": "8.0.0", "license": "MIT", "author": "Simon Lydell", "repository": "lydell/tiny-decoders",