From eab5750d1f30b8e1d414742fe314ff1f800d4b70 Mon Sep 17 00:00:00 2001 From: Alexander Ryzhikov Date: Sat, 30 Jul 2022 18:06:34 +0300 Subject: [PATCH] fix!: bump fastify and fix types --- package.json | 12 +- src/typed-fastify.ts | 18 ++- .../test/integration.test.ts.test.cjs | 34 +---- test/integration.test.ts | 13 +- test/test_schema.gen.json | 2 +- test/typed-fastify.test-d.ts | 16 ++- yarn.lock | 131 ++++++++---------- 7 files changed, 107 insertions(+), 119 deletions(-) diff --git a/package.json b/package.json index abb6b04..3e4686d 100644 --- a/package.json +++ b/package.json @@ -12,19 +12,19 @@ "glob": "^8.0.3", "json-schema-merge-allof": "^0.8.1", "json-schema-traverse": "^1.0.0", - "typescript-json-schema": "^0.53.1", + "typescript-json-schema": "^0.54.0", "yargs": "^17.5.1" }, "devDependencies": { "@types/crypto-js": "^4.1.1", "@types/glob": "^7.2.0", "@types/json-schema-merge-allof": "^0.6.1", - "@types/node": "^18.0.0", - "@types/prettier": "^2.6.3", + "@types/node": "^18.6.2", + "@types/prettier": "^2.6.4", "@types/split2": "^3.2.1", "@types/tap": "^15.0.7", "@types/yargs": "^17.0.10", - "fastify": "^4.1.0", + "fastify": "^4.3.0", "husky": "^8.0.1", "lint-staged": "^13.0.3", "pinst": "^3.0.0", @@ -33,8 +33,8 @@ "syncpack": "^8.2.4", "tap": "^16.3.0", "ts-node-dev": "^2.0.0", - "tsd": "^0.21.0", - "type-fest": "^2.14.0", + "tsd": "^0.22.0", + "type-fest": "^2.17.0", "typescript": "^4.7.4" }, "directories": { diff --git a/src/typed-fastify.ts b/src/typed-fastify.ts index b639440..9c0bba8 100644 --- a/src/typed-fastify.ts +++ b/src/typed-fastify.ts @@ -34,7 +34,11 @@ const addSchema = < fastify.decorateReply('matches', function (this: F.FastifyReply, routeWithMethod: string) { return `${this.request.method} ${this.request.routerPath}` === routeWithMethod; }); - + fastify.decorateRequest('operationPath', null); + fastify.addHook('onRequest', function (req, reply, done) { + (req as {} as { operationPath: string }).operationPath = `${req.method} ${req.routerPath}`; + done(); + }); fastify.decorateReply('asReply', function (this: F.FastifyReply) { return this; }); @@ -298,11 +302,12 @@ interface Request< SchemaCompiler, TypeProvider, ContextConfig, - RequestType, - Logger + Logger, + RequestType >, 'headers' | 'method' | 'routerMethod' | 'routerPath' > { + readonly operationPath: Path; readonly method: MP[0]; // A payload within a GET request message has no defined semantics; sending a payload body on a GET request might cause some existing implementations to reject the request. readonly body: MP[0] extends 'GET' ? never : Get; @@ -360,7 +365,7 @@ type Handler< RequestType, Logger >, - reply: Reply & { + reply: Reply & { readonly __unknownReply: unique symbol; M: MP[0]; }, @@ -387,7 +392,6 @@ type HandlerObj< ContextConfig, SchemaCompiler, TypeProvider, - RequestType, Logger > & { handler: Handler; @@ -485,8 +489,8 @@ export type RequestHandler< SchemaCompiler, TypeProvider, ContextConfig, - ResolveFastifyRequestType>, - Logger + Logger, + ResolveFastifyRequestType> > : never; Reply: Parameters[1]; diff --git a/tap-snapshots/test/integration.test.ts.test.cjs b/tap-snapshots/test/integration.test.ts.test.cjs index 87a34e5..71824ee 100644 --- a/tap-snapshots/test/integration.test.ts.test.cjs +++ b/tap-snapshots/test/integration.test.ts.test.cjs @@ -81,6 +81,7 @@ Object { exports[`test/integration.test.ts TAP POST / rejects invalid payload > error logs 1`] = ` Error: body/user/name must be string { + "statusCode": 400, "validation": Array [ Object { "instancePath": "/user/name", @@ -136,15 +137,7 @@ Object { "type": "string", }, "user": Object { - "properties": Object { - "name": Object { - "type": "string", - }, - }, - "required": Array [ - "name", - ], - "type": "object", + "$ref": "test_schema#/definitions/User", }, }, "required": Array [ @@ -218,15 +211,7 @@ Object { "type": "string", }, "user": Object { - "properties": Object { - "name": Object { - "type": "string", - }, - }, - "required": Array [ - "name", - ], - "type": "object", + "$ref": "test_schema#/definitions/User", }, }, "required": Array [ @@ -301,15 +286,7 @@ Object { "type": "string", }, "user": Object { - "properties": Object { - "name": Object { - "type": "string", - }, - }, - "required": Array [ - "name", - ], - "type": "object", + "$ref": "test_schema#/definitions/User", }, }, "required": Array [ @@ -624,6 +601,7 @@ Object { exports[`test/integration.test.ts TAP it validates get query param against schema > error logs 1`] = ` Error: querystring/getQueryParam must be boolean { + "statusCode": 400, "validation": Array [ Object { "instancePath": "/getQueryParam", @@ -714,6 +692,7 @@ Object { exports[`test/integration.test.ts TAP it validates headers > error logs 1`] = ` Error: headers must have required property 'authorization' { + "statusCode": 400, "validation": Array [ Object { "instancePath": "", @@ -731,6 +710,7 @@ Error: headers must have required property 'authorization' { exports[`test/integration.test.ts TAP it validates headers > error logs 2`] = ` Error: headers must have required property 'getheader' { + "statusCode": 400, "validation": Array [ Object { "instancePath": "", diff --git a/test/integration.test.ts b/test/integration.test.ts index 6a35b58..d10a389 100644 --- a/test/integration.test.ts +++ b/test/integration.test.ts @@ -5,16 +5,25 @@ import addSchema, { Service } from '../src'; import { TestSchema } from './test_schema'; import jsonSchema from './test_schema.gen.json'; import split from 'split2'; + type Test = typeof tap['Test']['prototype']; + t.cleanSnapshot = (s) => { return s.replace(/"date": ".* GMT"+/gim, '"date": "dateString"').replace(/"Date: .* GMT"+/gim, '"Date: dateString"'); }; const defaultService: Service = { 'GET /': (req, reply) => { + console.log('get'); + if (req.operationPath !== 'GET /') { + throw new Error('Should never happen'); + } return reply.status(200).headers({ 'x-custom': '1' }).send({ name: 'hello' }); }, 'POST /': (req, reply) => { + if (req.operationPath !== 'POST /') { + throw new Error('Should never happen'); + } const { user: userData } = req.body; return reply.status(200).send({ user: userData, @@ -31,7 +40,6 @@ const defaultService: Service = { 'POST /params/:id/:subid': (req, reply) => { return reply.status(200).send(); }, - //@ts-ignore 'GET /inferredParams/:id/:castedToNumber': (req, reply) => { const payload = `id type is ${typeof req.params.id} and castedToNumber type is ${typeof req.params.castedToNumber}`; return reply.status(200).send(payload); @@ -51,8 +59,7 @@ const buildApp = async (t: Test, service?: Service) => { const app = fastify({ logger: { - // @ts-ignore - stream: stream, + stream, serializers: { req: (req) => { t.matchSnapshot( diff --git a/test/test_schema.gen.json b/test/test_schema.gen.json index 7f9d72d..040f473 100644 --- a/test/test_schema.gen.json +++ b/test/test_schema.gen.json @@ -257,5 +257,5 @@ } } }, - "$hash": "c0e0481a3e03369a96f41b124dd2d9ad3fa1efd144dd9bf45a4c4fac7a15820b__v0.7.0" + "$hash": "c0e0481a3e03369a96f41b124dd2d9ad3fa1efd144dd9bf45a4c4fac7a15820b__v0.8.0" } \ No newline at end of file diff --git a/test/typed-fastify.test-d.ts b/test/typed-fastify.test-d.ts index 3e40ee3..707c771 100644 --- a/test/typed-fastify.test-d.ts +++ b/test/typed-fastify.test-d.ts @@ -240,16 +240,24 @@ const complexHandlers = ( req: ComplexHandlers['Request'], reply: ComplexHandlers['Reply'], ): ComplexHandlers['Return'] => { - if ('getQueryParam' in reply.request.query) { + if (req.operationPath === 'GET /') { //@ts-expect-error - reply.request.query.postQueryParam; - reply.request.query.getQueryParam; + req.query.postQueryParam; + req.query.getQueryParam; //@ts-expect-error reply.status(200); - } else if ('postQueryParam' in req.query) { + } else if (req.operationPath === 'POST /') { req.query.postQueryParam; //@ts-expect-error req.query.getQueryParam; + } else if (req.operationPath === 'PATCH /') { + req.method === 'PATCH'; + } else if (req.operationPath === 'PUT /other') { + req.query.getQueryParam; + } else if (req.operationPath === 'PATCH /other' || req.operationPath === 'PATCH /other_empty') { + req.method === 'PATCH'; + } else { + never(req); } function testHeaders(headers: typeof req['headers'] | typeof reply['request']['headers']) { diff --git a/yarn.lock b/yarn.lock index 1e5d805..7d0ef01 100644 --- a/yarn.lock +++ b/yarn.lock @@ -454,26 +454,31 @@ dependencies: "@jridgewell/trace-mapping" "0.3.9" -"@fastify/ajv-compiler@^3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@fastify/ajv-compiler/-/ajv-compiler-3.1.0.tgz#7ccae63da5a115f583ae6cc68173dbc3c1f34405" - integrity sha512-+hRMMxcUmdqtnCGPwrI2yczFdlgp3IBR88WlPLimXlgRb8vHBTXz38I17R/9ui+hIt9jx0uOdZKOis77VooHfA== +"@fastify/ajv-compiler@^3.1.1": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@fastify/ajv-compiler/-/ajv-compiler-3.1.2.tgz#9b3c4ae0f5feeb2a90ee797cff6dc26e1831795b" + integrity sha512-m2nzzQJeuVmeGOB9rnII9sZiY8AZ02a9WMQfMBfK1jxdFnxm3FPYKGbYpPjODj4halNogwpolyugbTNpnDCi0A== dependencies: ajv "^8.10.0" ajv-formats "^2.1.1" - fast-uri "^1.0.1" + fast-uri "^2.0.0" + +"@fastify/deepmerge@^1.0.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@fastify/deepmerge/-/deepmerge-1.1.0.tgz#91f0a5a27034ff76b7bece63a5906894940ace82" + integrity sha512-E8Hfdvs1bG6u0N4vN5Nty6JONUfTdOciyD5rn8KnEsLKIenvOVcr210BQR9t34PRkNyjqnMLGk3e0BsaxRdL+g== "@fastify/error@^3.0.0": version "3.0.0" resolved "https://registry.yarnpkg.com/@fastify/error/-/error-3.0.0.tgz#bfcb7b33cec0196413083a91ef2edc7b2c88455b" integrity sha512-dPRyT40GiHRzSCll3/Jn2nPe25+E1VXc9tDwRAIKwFCxd5Np5wzgz1tmooWG3sV0qKgrBibihVoCna2ru4SEFg== -"@fastify/fast-json-stringify-compiler@^3.0.1": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@fastify/fast-json-stringify-compiler/-/fast-json-stringify-compiler-3.0.1.tgz#78dfd3989f1e991a2fed1b0abfe1ffb29fcc3fe8" - integrity sha512-X9BL9/N7827M9UTBVsa5G3xOoD3MQ6EqX+D6EyJyF8LdvWTHQJ//BDN4FAEaGZUA2sL+GEMC6+KNjHESnPwQuw== +"@fastify/fast-json-stringify-compiler@^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@fastify/fast-json-stringify-compiler/-/fast-json-stringify-compiler-4.0.0.tgz#444139d0a12b3e3a8fcdda29da7e9a6c72c8e404" + integrity sha512-9pCi6c6tmGt/qfuf2koZQuSIG6ckP9q3mz+JoMmAq9eQ4EtA92sWoK7E0LJUn2FFTS/hp5kag+4+dWsV5ZfcXg== dependencies: - fast-json-stringify "^4.2.0" + fast-json-stringify "^5.0.0" "@isaacs/import-jsx@^4.0.1": version "4.0.1" @@ -565,7 +570,7 @@ resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.2.tgz#423c77877d0569db20e1fc80885ac4118314010e" integrity sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA== -"@tsd/typescript@~4.7.3": +"@tsd/typescript@~4.7.4": version "4.7.4" resolved "https://registry.yarnpkg.com/@tsd/typescript/-/typescript-4.7.4.tgz#f1e4e6c3099a174a0cb7aa51cf53f34f6494e528" integrity sha512-jbtC+RgKZ9Kk65zuRZbKLTACf+tvFW4Rfq0JEMXrlmV3P3yme+Hm+pnb5fJRyt61SjIitcrC810wj7+1tgsEmg== @@ -633,10 +638,10 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.18.tgz#39ed7c52943b0cee6d7299b717707bd51b1f90b9" integrity sha512-7N8AOYWWYuw0g+K+GKCmIwfU1VMHcexYNpLPYzFZ4Uq2W6C/ptfeC7XhXgy/4pcwhz/9KoS5yijMfnYQ0u0Udw== -"@types/node@^18.0.0": - version "18.0.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.0.0.tgz#67c7b724e1bcdd7a8821ce0d5ee184d3b4dd525a" - integrity sha512-cHlGmko4gWLVI27cGJntjs/Sj8th9aYwplmZFwmmgYQQvL5NUsgVJG7OddLvNfLqYS31KFN0s3qlaD9qCaxACA== +"@types/node@^18.6.2": + version "18.6.2" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.6.2.tgz#ffc5f0f099d27887c8d9067b54e55090fcd54126" + integrity sha512-KcfkBq9H4PI6Vpu5B/KoPeuVDAbmi+2mDBqGPGUgoL7yXQtcWGu2vJWmmRkneWK3Rh0nIAX192Aa87AqKHYChQ== "@types/normalize-package-data@^2.4.0": version "2.4.0" @@ -648,10 +653,10 @@ resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== -"@types/prettier@^2.6.3": - version "2.6.3" - resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.6.3.tgz#68ada76827b0010d0db071f739314fa429943d0a" - integrity sha512-ymZk3LEC/fsut+/Q5qejp6R9O1rMxz3XaRHDV6kX8MrGAhOSPqVARbDi+EZvInBpw+BnCX3TD240byVkOfQsHg== +"@types/prettier@^2.6.4": + version "2.6.4" + resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.6.4.tgz#ad899dad022bab6b5a9f0a0fe67c2f7a4a8950ed" + integrity sha512-fOwvpvQYStpb/zHMx0Cauwywu9yLDmzWiiQBC7gJyq5tYLUXFZvDG7VK1B7WBxxjBJNKFOZ0zLoOQn8vmATbhw== "@types/prop-types@*": version "15.7.3" @@ -1288,11 +1293,6 @@ decamelize@^1.1.0, decamelize@^1.2.0: resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= -deepmerge@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" - integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== - default-require-extensions@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-3.0.0.tgz#e03f93aac9b2b6443fc52e5e4a37b3ad9ad8df96" @@ -1437,44 +1437,38 @@ fast-glob@^3.1.1: micromatch "^4.0.2" picomatch "^2.2.1" -fast-json-stringify@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/fast-json-stringify/-/fast-json-stringify-4.2.0.tgz#eb49243c79d1deca85eeb488caf69007b7336c7c" - integrity sha512-9RWBl82H7jwnPlkZ/ghi0VD5OFZVdwgwVui0nYzjnXbPQxJ3ES1+SQcWIoeCJOgrY7JkBkY/69UNZSroFPDRdQ== +fast-json-stringify@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stringify/-/fast-json-stringify-5.1.0.tgz#dc184049d7eed4f61e34f65e97c0763fd043977f" + integrity sha512-IybGfbUc1DQgyrp9Myhwlr1Z5vjV37mBkdgcbuvsvUxv5fayG+cHlTQQpXH9nMwUPgp+5Y3RT7QDgx5zJ9NS3A== dependencies: + "@fastify/deepmerge" "^1.0.0" ajv "^8.10.0" ajv-formats "^2.1.1" - deepmerge "^4.2.2" - fast-uri "^2.0.0" + fast-uri "^2.1.0" rfdc "^1.2.0" - string-similarity "^4.0.1" fast-redact@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/fast-redact/-/fast-redact-3.1.1.tgz#790fcff8f808c2e12fabbfb2be5cb2deda448fa0" integrity sha512-odVmjC8x8jNeMZ3C+rPMESzXVSEU8tSWSHv9HFxP2mm89G/1WwqhrerJDQm9Zus8X6aoRgQDThKqptdNA6bt+A== -fast-uri@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-1.0.1.tgz#dd637f093bccf17ebea58a70c178ee8a70b5aa45" - integrity sha512-dbO/+ny6lX4tt7pvfPMTiHfQVR5igYKFa5BJ2a21TWuOgd2ySp5DYswsEGuMcJZLL3/eJ/MQJ5KNcXyNUvDt8w== - -fast-uri@^2.0.0: +fast-uri@^2.0.0, fast-uri@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-2.1.0.tgz#9279432d6b53675c90116b947ed2bbba582d6fb5" integrity sha512-qKRta6N7BWEFVlyonVY/V+BMLgFqktCUV0QjT259ekAIlbVrMaFnFLxJ4s/JPl4tou56S1BzPufI60bLe29fHA== -fastify@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/fastify/-/fastify-4.1.0.tgz#c5b7c03eff57233c2108e52c75559ede8e59eec8" - integrity sha512-nze95u3wpVIsOXMmSi5kgUaEIZq2HJmerk/+ivFBPtYozAydoDg92BcsxDtO4cb8vW4RBkahx8zL5PgH9YulCw== +fastify@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/fastify/-/fastify-4.3.0.tgz#f5ed96a3fc533b92018c3968340897badf036eb8" + integrity sha512-9q5Ron8jWmX6ElFkgZH4zmIIXdnkGIu16JozWG2ohcs7th5rAo1ymNi+rn6xCmbWc6jl9lf+9OxVe93LOg6/2w== dependencies: - "@fastify/ajv-compiler" "^3.1.0" + "@fastify/ajv-compiler" "^3.1.1" "@fastify/error" "^3.0.0" - "@fastify/fast-json-stringify-compiler" "^3.0.1" + "@fastify/fast-json-stringify-compiler" "^4.0.0" abstract-logging "^2.0.1" avvio "^8.1.3" - find-my-way "^6.3.0" + find-my-way "^7.0.0" light-my-request "^5.0.0" pino "^8.0.0" process-warning "^2.0.0" @@ -1507,10 +1501,10 @@ find-cache-dir@^3.2.0: make-dir "^3.0.2" pkg-dir "^4.1.0" -find-my-way@^6.3.0: - version "6.4.0" - resolved "https://registry.yarnpkg.com/find-my-way/-/find-my-way-6.4.0.tgz#2c25558878dfc1875beea6925e6c74ccc37b8c5c" - integrity sha512-OAxMF75jKPpy8jUb29WupNfypFAzBuAiPM6xS17twiP07hJb0tKkD6Fy8dy8pN14AD8hMlc0jA6q0d+Dg5reUQ== +find-my-way@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/find-my-way/-/find-my-way-7.0.0.tgz#8e79fde2606624af61775e3d097da4f1872e58d9" + integrity sha512-NHVohYPYRXgj6jxXVRwm4iMQjA2ggJpyewHz7Nq7hvBnHoYJJIyHuxNzs8QLPTLQfoqxZzls2g6Zm79XMbhXjA== dependencies: fast-deep-equal "^3.1.3" safe-regex2 "^2.0.0" @@ -2477,10 +2471,10 @@ patch-console@^1.0.0: resolved "https://registry.yarnpkg.com/patch-console/-/patch-console-1.0.0.tgz#19b9f028713feb8a3c023702a8cc8cb9f7466f9d" integrity sha512-nxl9nrnLQmh64iTzMfyylSlRozL7kAXIaxw1fVcLYdyhNkJCRUzirRZTikXGJsg+hc4fqpneTK6iU2H1Q8THSA== -path-equal@1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/path-equal/-/path-equal-1.1.2.tgz#260e7c449c4c2022f68cc5fa6e617e892858250d" - integrity sha512-p5kxPPwCdbf5AdXzT1bUBJomhgBlEjRBavYNr1XUpMFIE4Hnf2roueCMXudZK5tnaAu1tTmp3GPzqwJK45IHEA== +path-equal@^1.1.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/path-equal/-/path-equal-1.2.2.tgz#fa2997f0a829de22ec8f5f86461ca5590d49b832" + integrity sha512-AUJvbcle1Zgb1TgtftHYknlrgrSYyI1ytrYgSbKUHSybwqUDnbD2cw9PIWivuMvsN+GTXmr/DRN4VBXpHG6aGg== path-exists@^4.0.0: version "4.0.0" @@ -3027,11 +3021,6 @@ string-argv@^0.3.1: resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.1.tgz#95e2fbec0427ae19184935f816d74aaa4c5c19da" integrity sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg== -string-similarity@^4.0.1: - version "4.0.4" - resolved "https://registry.yarnpkg.com/string-similarity/-/string-similarity-4.0.4.tgz#42d01ab0b34660ea8a018da8f56a3309bb8b2a5b" - integrity sha512-/q/8Q4Bl4ZKAPjj8WerIBJWALKkaPRfrvhfF8k/B23i4nzrlRj2/go1m90In7nG/3XDSbOo0+pu6RvCTM9RGMQ== - string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5" @@ -3357,12 +3346,12 @@ tsconfig@^7.0.0: strip-bom "^3.0.0" strip-json-comments "^2.0.0" -tsd@^0.21.0: - version "0.21.0" - resolved "https://registry.yarnpkg.com/tsd/-/tsd-0.21.0.tgz#fb1a1aa022cfb4a6d1065bb569687e8ac8f72daf" - integrity sha512-6DugCw1Q4H8HYwDT3itzgALjeDxN4RO3iqu7gRdC/YNVSCRSGXRGQRRasftL1uKDuKxlFffYKHv5j5G7YnKGxQ== +tsd@^0.22.0: + version "0.22.0" + resolved "https://registry.yarnpkg.com/tsd/-/tsd-0.22.0.tgz#2ff75cf3adff5136896abee1f2c5540497bf3b54" + integrity sha512-NH+tfEDQ0Ze8gH7TorB6IxYybD+M68EYawe45YNVrbQcydNBfdQHP9IiD0QbnqmwNXrv+l9GAiULT68mo4q/xA== dependencies: - "@tsd/typescript" "~4.7.3" + "@tsd/typescript" "~4.7.4" eslint-formatter-pretty "^4.1.0" globby "^11.0.1" meow "^9.0.0" @@ -3399,10 +3388,10 @@ type-fest@^0.8.0, type-fest@^0.8.1: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== -type-fest@^2.14.0: - version "2.14.0" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-2.14.0.tgz#f990e19169517d689c98e16d128b231022b27e12" - integrity sha512-hQnTQkFjL5ik6HF2fTAM8ycbr94UbQXK364wF930VHb0dfBJ5JBP8qwrR8TaK9zwUEk7meruo2JAUDMwvuxd/w== +type-fest@^2.17.0: + version "2.17.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-2.17.0.tgz#c677030ce61e5be0c90c077d52571eb73c506ea9" + integrity sha512-U+g3/JVXnOki1kLSc+xZGPRll3Ah9u2VIG6Sn9iH9YX6UkPERmt6O/0fIyTgsd2/whV0+gAaHAg8fz6sG1QzMA== typedarray-to-buffer@^3.1.5: version "3.1.5" @@ -3411,15 +3400,15 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" -typescript-json-schema@^0.53.1: - version "0.53.1" - resolved "https://registry.yarnpkg.com/typescript-json-schema/-/typescript-json-schema-0.53.1.tgz#9204547f3e145169b40928998366ff6d28b81d32" - integrity sha512-Hg+RnOKUd38MOzC0rDft03a8xvwO+gCcj1F77smw2tCoZYQpFoLtrXWBGdvCX+REliko5WYel2kux17HPFqjLQ== +typescript-json-schema@^0.54.0: + version "0.54.0" + resolved "https://registry.yarnpkg.com/typescript-json-schema/-/typescript-json-schema-0.54.0.tgz#b3fc42ad90df6a0f6ab57571ebc8b4d41125df4f" + integrity sha512-/MNhm1pjdxXiVspjjyRCrQAA1B768cRzHU83aIqN5vQqQEW2NgyyKOfcguiRIMM64lseIZIelegnHOHEu7YDCg== dependencies: "@types/json-schema" "^7.0.9" "@types/node" "^16.9.2" glob "^7.1.7" - path-equal "1.1.2" + path-equal "^1.1.2" safe-stable-stringify "^2.2.0" ts-node "^10.2.1" typescript "~4.6.0"