diff --git a/package.json b/package.json index 0e61508d..a999118c 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "dependencies": { "cache-parser": "1.2.0", "fast-defer": "^1.1.3", - "object-code": "^1.0.1" + "object-code": "^1.1.2" }, "resolutions": { "colors": "1.4.0" diff --git a/src/util/key-generator.ts b/src/util/key-generator.ts index ba415c95..c3b60ea3 100644 --- a/src/util/key-generator.ts +++ b/src/util/key-generator.ts @@ -1,5 +1,5 @@ import type { Method } from 'axios'; -import { code } from 'object-code'; +import { hashCode } from 'object-code'; import type { CacheRequestConfig } from '../cache/axios'; import type { KeyGenerator } from './types'; @@ -53,7 +53,7 @@ export function buildKeyGenerator( request.method && (request.method = request.method.toLowerCase() as Method); const result = generator(request) as string; - return hash ? code(result).toString() : result; + return hash ? hashCode(result).toString() : result; }; } diff --git a/yarn.lock b/yarn.lock index 6a097d7a..8cfb26aa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3183,10 +3183,10 @@ nwsapi@^2.2.0: resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.0.tgz#204879a9e3d068ff2a55139c2c772780681a38b7" integrity sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ== -object-code@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/object-code/-/object-code-1.0.1.tgz#57a6243fde3b47f0093fd71d5883e3335a297706" - integrity sha512-zt/mZJvjm3nyMH9BMcrV/NYgPrqKwno0sx2bdqD4juT2EWa7wxDPn5nQnYMIsfz4pIIDh6gupQ5bMJ+tTy1Kqw== +object-code@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/object-code/-/object-code-1.1.2.tgz#586f9bd51ceb2f9da91348ffe5f08e0b97b27134" + integrity sha512-b1cbP5l3wNfFbUUje7AbX9mlZ8G1XVSzzsjPdGp7+UHyg+PNvMlo+wmZq+/qYqeH7Me7hyrqKoKf6LNgzkIsjg== once@^1.3.0: version "1.4.0"