diff --git a/.changeset/chilled-seahorses-serve.md b/.changeset/chilled-seahorses-serve.md deleted file mode 100644 index 54f52c2..0000000 --- a/.changeset/chilled-seahorses-serve.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -"ajv-ts": minor ---- - -Make [strict numbers](#strict-numbers) - -### Strict numbers - -We make validation for number `type`, `format`, `minValue` and `maxValue` fields. That means we handle it in our side so you get an error for invalid values. - -Examples: - -```ts -s.number().format('float').int() // error in type! -s.int().const(3.4) // error in type! -s.number().int().format('float') // error in format! -s.number().int().format('double') // error in format! - -// ranges are also check for possibility - -s.number().min(5).max(3) // error in range! -s.number().min(3).max(5).const(10) // error in constant - out of range! -``` - -## 🏡 Chore/Infra - -- add [type-fest](https://www.npmjs.com/package/type-fest) library for correct type checking -- add [tsx](https://www.npmjs.com/package/tsx) package -- add minified files for cjs and esm modules in `dist` folder -- remove `bun-types` dependency diff --git a/.changeset/fair-dolls-lick.md b/.changeset/fair-dolls-lick.md deleted file mode 100644 index 7cac892..0000000 --- a/.changeset/fair-dolls-lick.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"ajv-ts": patch ---- - -fix #61 diff --git a/.changeset/green-impalas-occur.md b/.changeset/green-impalas-occur.md deleted file mode 100644 index 21cfca9..0000000 --- a/.changeset/green-impalas-occur.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"ajv-ts": patch ---- - -add example in meta object. Closes #64 diff --git a/CHANGELOG.md b/CHANGELOG.md index 3adca71..9016b43 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,41 @@ # ajv-ts +## 0.8.0 + +### Minor Changes + +- 9a62d94: Make [strict numbers](#strict-numbers) + + ### Strict numbers + + We make validation for number `type`, `format`, `minValue` and `maxValue` fields. That means we handle it in our side so you get an error for invalid values. + + Examples: + + ```ts + s.number().format("float").int(); // error in type! + s.int().const(3.4); // error in type! + s.number().int().format("float"); // error in format! + s.number().int().format("double"); // error in format! + + // ranges are also check for possibility + + s.number().min(5).max(3); // error in range! + s.number().min(3).max(5).const(10); // error in constant - out of range! + ``` + + ## 🏡 Chore/Infra + + - add [type-fest](https://www.npmjs.com/package/type-fest) library for correct type checking + - add [tsx](https://www.npmjs.com/package/tsx) package + - add minified files for cjs and esm modules in `dist` folder + - remove `bun-types` dependency + +### Patch Changes + +- 37a7b1d: fix #61 +- 0f787a7: add example in meta object. Closes #64 + ## 0.7.1 ### Patch Changes diff --git a/package.json b/package.json index 1e7e898..1217752 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ajv-ts", "description": "JSON-schema builder with typescript safety", - "version": "0.7.1", + "version": "0.8.0", "main": "dist/index.cjs", "module": "dist/index.mjs", "types": "dist/index.d.ts",