Skip to content

Commit

Permalink
Merge branch 'toiroakr:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisBessa authored Jan 9, 2025
2 parents fdada69 + dbf1b91 commit 1e70542
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/biome.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
pull_request:
branches: ["main"]

permissions:
contents: read

jobs:
check:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
pull_request:
branches: ["main"]

permissions:
contents: read
pull-requests: write

jobs:
test:
runs-on: ubuntu-latest
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [1.3.2](https://github.com/toiroakr/zod-empty/compare/v1.3.1...v1.3.2) (2025-01-08)


### Bug Fixes

* empty effect ([7742b63](https://github.com/toiroakr/zod-empty/commit/7742b63b90c65d20f5b10da80428e0cbc48c5939))

## [1.3.1](https://github.com/toiroakr/zod-empty/compare/v1.3.0...v1.3.1) (2025-01-06)


Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zod-empty",
"version": "1.3.1",
"version": "1.3.2",
"description": "generate minimum data from zod schema.",
"types": "./cjs/index.d.ts",
"main": "./cjs/index.cjs",
Expand Down
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ export function empty<T extends ZodTypeAny>(schema: T): input<T> {
case "ZodNullable":
case "ZodOptional":
return empty(def.innerType);
case "ZodEffects":
return empty(def.schema);
case "ZodLiteral":
return def.value;
case "ZodNaN":
Expand Down

0 comments on commit 1e70542

Please sign in to comment.