From 1bc6491a33b7c9b7749b4876511da6c67effee6e Mon Sep 17 00:00:00 2001 From: Daniil Zotov <142039751+zoto-ff@users.noreply.github.com> Date: Mon, 5 Aug 2024 06:57:29 +0300 Subject: [PATCH] remove lodash.clonedeep --- package.json | 2 -- src/utils.ts | 6 +----- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/package.json b/package.json index 9031870..ef27287 100644 --- a/package.json +++ b/package.json @@ -68,14 +68,12 @@ "@apidevtools/swagger-parser": "^10.1.0", "@scalar/api-reference": "^1.12.5", "@types/bun": "1.1.6", - "@types/lodash.clonedeep": "^4.5.9", "elysia": ">= 1.1.0-rc.2", "eslint": "9.6.0", "tsup": "^8.1.0", "typescript": "^5.5.3" }, "dependencies": { - "lodash.clonedeep": "^4.5.0", "openapi-types": "^12.1.3" } } \ No newline at end of file diff --git a/src/utils.ts b/src/utils.ts index cb55b24..bada473 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -6,8 +6,6 @@ import type { HTTPMethod, LocalHook } from 'elysia' import { Kind, type TSchema } from '@sinclair/typebox' import type { OpenAPIV3 } from 'openapi-types' -import deepClone from 'lodash.clonedeep' - export const toOpenAPIPath = (path: string) => path .split('/') @@ -116,9 +114,7 @@ export const registerSchemaPath = ({ method: HTTPMethod hook?: LocalHook models: Record -}) => { - if (hook) hook = deepClone(hook) - +}) => { const contentType = hook?.type ?? [ 'application/json', 'multipart/form-data',