Skip to content

Commit 54ce32b

Browse files
renovate[bot]github-actions[bot]ardatan
committed
fix(deps): update dependency @sinclair/typebox to ^0.32.0 (#977)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Arda TANRIKULU <[email protected]>
1 parent 835949c commit 54ce32b

File tree

5 files changed

+21
-11
lines changed

5 files changed

+21
-11
lines changed

.changeset/fets-977-dependencies.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"fets": patch
3+
---
4+
dependencies updates:
5+
- Updated dependency [`@sinclair/typebox@^0.32.0` ↗︎](https://www.npmjs.com/package/@sinclair/typebox/v/0.32.0) (from `^0.31.23`, in `dependencies`)

.changeset/soft-readers-hear.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"fets": minor
3+
---
4+
5+
Update typebox

packages/fets/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
},
3535
"typings": "dist/typings/index.d.ts",
3636
"dependencies": {
37-
"@sinclair/typebox": "^0.31.23",
37+
"@sinclair/typebox": "^0.32.0",
3838
"@whatwg-node/cookie-store": "^0.2.0",
3939
"@whatwg-node/fetch": "^0.9.4",
4040
"@whatwg-node/server": "^0.9.15",

packages/fets/src/plugins/typebox.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { TSchema, TypeGuard } from '@sinclair/typebox';
1+
import { TypeGuard, type TSchema } from '@sinclair/typebox';
22
import { TypeCompiler, ValueError, ValueErrorIterator } from '@sinclair/typebox/compiler';
33
import { Value } from '@sinclair/typebox/value';
44
import { HTTPError } from '@whatwg-node/server';
@@ -47,7 +47,7 @@ export function useTypeBox<TServerContext, TComponents extends RouterComponentsB
4747
}
4848
return {
4949
onRouteHandle({ route: { schemas }, request }) {
50-
if (schemas?.request?.headers && TypeGuard.TSchema(schemas.request.headers)) {
50+
if (schemas?.request?.headers && TypeGuard.IsSchema(schemas.request.headers)) {
5151
const validateFn = getValidateFn(schemas.request.headers);
5252
const headersObj = getHeadersObj(request.headers as any);
5353
const errors = [...validateFn(headersObj)].map(error => sanitizeError(error, 'headers'));
@@ -64,7 +64,7 @@ export function useTypeBox<TServerContext, TComponents extends RouterComponentsB
6464
);
6565
}
6666
}
67-
if (schemas?.request?.params && TypeGuard.TSchema(schemas.request.params)) {
67+
if (schemas?.request?.params && TypeGuard.IsSchema(schemas.request.params)) {
6868
const validateFn = getValidateFn(schemas.request.params);
6969
const errors = [...validateFn(request.params)].map(error => sanitizeError(error, 'params'));
7070
if (errors.length) {
@@ -80,7 +80,7 @@ export function useTypeBox<TServerContext, TComponents extends RouterComponentsB
8080
);
8181
}
8282
}
83-
if (schemas?.request?.query && TypeGuard.TSchema(schemas.request.query)) {
83+
if (schemas?.request?.query && TypeGuard.IsSchema(schemas.request.query)) {
8484
const validateFn = getValidateFn(schemas.request.query);
8585
const errors = [...validateFn(request.query)].map(error => sanitizeError(error, 'query'));
8686
if (errors.length) {
@@ -96,7 +96,7 @@ export function useTypeBox<TServerContext, TComponents extends RouterComponentsB
9696
);
9797
}
9898
}
99-
if (schemas?.request?.json && TypeGuard.TSchema(schemas.request.json)) {
99+
if (schemas?.request?.json && TypeGuard.IsSchema(schemas.request.json)) {
100100
const validateFn = getValidateFn(schemas.request.json);
101101
const origReqJsonMethod = request.json.bind(request);
102102
Object.defineProperty(request, 'json', {
@@ -123,7 +123,7 @@ export function useTypeBox<TServerContext, TComponents extends RouterComponentsB
123123
configurable: true,
124124
});
125125
}
126-
if (schemas?.request?.formData && TypeGuard.TSchema(schemas.request.formData)) {
126+
if (schemas?.request?.formData && TypeGuard.IsSchema(schemas.request.formData)) {
127127
const validateFn = getValidateFn(schemas.request.formData);
128128
const origMethod = request.formData.bind(request);
129129
Object.defineProperty(request, 'formData', {

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2766,10 +2766,10 @@
27662766
resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e"
27672767
integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==
27682768

2769-
"@sinclair/typebox@^0.31.23":
2770-
version "0.31.28"
2771-
resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.31.28.tgz#b68831e7bc7d09daac26968ea32f42bedc968ede"
2772-
integrity sha512-/s55Jujywdw/Jpan+vsy6JZs1z2ZTGxTmbZTPiuSL2wz9mfzA2gN1zzaqmvfi4pq+uOt7Du85fkiwv5ymW84aQ==
2769+
"@sinclair/typebox@^0.32.0":
2770+
version "0.32.0"
2771+
resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.32.0.tgz#17b6003a99f34686cc28d50c3ee2a68c9b3d6099"
2772+
integrity sha512-FdBgO+ib0JCSPtq55cDva/5xd55vfAAyTXWVLCaTAFzNjVPaR5lNRKoEzMHTtArELEaHNs4E6WmdNJIY+gUoZw==
27732773

27742774
"@sinonjs/commons@^3.0.0":
27752775
version "3.0.0"

0 commit comments

Comments
 (0)