Skip to content

Commit

Permalink
Bumped minimum typescript version to 4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Colin McDonnell committed Jan 4, 2021
1 parent 796a61a commit e29c655
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ yarn add zod@next

#### Breaking changes in v3

- The minimum TypeScript version has increased from 3.7 to _4.1_. Several features have been rewritten to use [recursive conditional types](https://devblogs.microsoft.com/typescript/announcing-typescript-4-1/#recursive-conditional-types), an incredibly powerful new feature introduced in TS4.1.
- Transformer syntax. Previously transformers required an input, an output schema, and a function to tranform between them. You created transformers like `z.transform(A, B, func)`, where `A` and `B` are Zod schemas. This is no longer the case. Accordingly:

⚠️ The old syntax (`z.transformer(A, B, func)`) is no longer available.
Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@
"build:deno": "node ./deno/build.mjs",
"build": "yarn run clean && tsc --p tsconfig.cjs.json",
"build:esm": "tsc --p tsconfig.esm.json",
"buildall": "yarn add [email protected] && yarn build && yarn add [email protected] && yarn build && yarn add [email protected] && yarn build && yarn add [email protected] && yarn build && yarn add [email protected] && yarn build && yarn add [email protected] && yarn build && yarn add typescript@4 && yarn build && yarn add [email protected]",
"buildallv3": "yarn add [email protected] && yarn build && yarn add [email protected] && yarn build && yarn add [email protected] && yarn build && yarn add [email protected] && yarn build && yarn add [email protected]",
"test": "jest --coverage && yarn run badge",
"testone": "jest",
"badge": "make-coverage-badge --output-path ./coverage.svg",
Expand All @@ -68,7 +66,7 @@
"prettier": "^2.2.1",
"ts-jest": "^26.4.4",
"ts-node": "^9.1.0",
"typescript": "3.8"
"typescript": "4.1"
},
"husky": {
"hooks": {
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5271,10 +5271,10 @@ typedarray-to-buffer@^3.1.5:
dependencies:
is-typedarray "^1.0.0"

typescript@3.8:
version "3.8.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.3.tgz#409eb8544ea0335711205869ec458ab109ee1061"
integrity sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w==
typescript@4.1:
version "4.1.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.3.tgz#519d582bd94cba0cf8934c7d8e8467e473f53bb7"
integrity sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg==

uglify-js@^3.1.4:
version "3.12.1"
Expand Down

0 comments on commit e29c655

Please sign in to comment.