Skip to content

Commit

Permalink
[ci] release (#23)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and github-actions[bot] authored Jan 16, 2024
1 parent 2b4dd9e commit 7c31815
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 35 deletions.
34 changes: 0 additions & 34 deletions .changeset/yellow-cooks-allow.md

This file was deleted.

35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,40 @@
# ajv-ts

## 0.4.0

### Minor Changes

- 2b4dd9e: # Description

Add support for custom error message for any error.

Example:

```ts
import s from "ajv-ts";

const num = s.number().error("cannot be not a number");

const res1 = num.safeParse("some random string");
const res2 = num.safeParse("1.2");
console.error(res1.error.message); // cannot be not a number
console.error(res2.error.message); // cannot be not a number

res1.error instanceof Error; // true
```

## What's new

new feature: add support custom error message

## Fixes

fix: issue with typescript [#21](https://github.com/vitalics/ajv-ts/issues/21)

## Thanks

[@rjvim](https://github.com/rjvim) for submitting the issue

## 0.3.1

### Patch Changes
Expand Down
Binary file modified bun.lockb
Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ajv-ts",
"description": "JSON-schema builder with typescript safety",
"version": "0.3.1",
"version": "0.4.0",
"main": "dist/index.cjs",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
Expand Down

0 comments on commit 7c31815

Please sign in to comment.