diff --git a/package.json b/package.json index 2915fc7..547ff38 100644 --- a/package.json +++ b/package.json @@ -24,9 +24,7 @@ }, "license": "MIT", "dependencies": { - "@types/lodash": "^4.17.5", "@types/request": "^2.48.12", - "lodash": "^4.17.21", "lru-cache": "^11.0.1", "pinejs-client-core": "^8.0.0", "request": "^2.88.2", diff --git a/request.ts b/request.ts index c6f28af..cd1d705 100644 --- a/request.ts +++ b/request.ts @@ -134,9 +134,7 @@ export class PinejsClientRequest< } this.cache.set(params.url, cached); - // eslint-disable-next-line @typescript-eslint/no-require-imports - const { cloneDeep } = require('lodash') as typeof import('lodash'); - return cloneDeep(cached.body); + return structuredClone(cached.body); } else { const { statusCode, body, headers } = await requestAsync(params); if (200 <= statusCode && statusCode < 300) {