diff --git a/.gitignore b/.gitignore index d6f71a03..9a9d5f47 100644 --- a/.gitignore +++ b/.gitignore @@ -46,4 +46,7 @@ next-env.d.ts # act .actrc -.act.json \ No newline at end of file +.act.json + +# jetbrains +.idea \ No newline at end of file diff --git a/apps/cache-testing/.eslintrc.js b/apps/cache-testing/.eslintrc.js index 60546512..927df6b1 100644 --- a/apps/cache-testing/.eslintrc.js +++ b/apps/cache-testing/.eslintrc.js @@ -6,5 +6,5 @@ module.exports = { parserOptions: { project: true, }, - ignorePatterns: ['*.mjs'], + ignorePatterns: ['*.mjs', '*.js'], }; diff --git a/internal/eslint-config/package.json b/internal/eslint-config/package.json index 056b1539..626a9eef 100644 --- a/internal/eslint-config/package.json +++ b/internal/eslint-config/package.json @@ -10,7 +10,7 @@ "@typescript-eslint/parser": "7.18.0", "@vercel/style-guide": "6.0.0", "eslint-config-prettier": "9.1.0", - "eslint-config-turbo": "2.3.1", + "eslint-config-turbo": "2.3.2", "eslint-plugin-only-warn": "1.1.0", "typescript": "5.7.2" } diff --git a/package-lock.json b/package-lock.json index 0bfc0b21..bd135685 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,9 +23,9 @@ "@repo/prettier-config": "*", "@repo/typescript-config": "*", "glob": "11.0.0", - "prettier": "3.3.3", + "prettier": "3.4.1", "rimraf": "6.0.1", - "turbo": "2.3.1" + "turbo": "2.3.2" }, "engines": { "node": ">=20.9.0", @@ -108,7 +108,7 @@ "@typescript-eslint/parser": "7.18.0", "@vercel/style-guide": "6.0.0", "eslint-config-prettier": "9.1.0", - "eslint-config-turbo": "2.3.1", + "eslint-config-turbo": "2.3.2", "eslint-plugin-only-warn": "1.1.0", "typescript": "5.7.2" } @@ -6588,12 +6588,12 @@ } }, "node_modules/eslint-config-turbo": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/eslint-config-turbo/-/eslint-config-turbo-2.3.1.tgz", - "integrity": "sha512-pxxCLLgnZYCjJoGrzUu3jAcb67bKVykLblyMtgTzHN7DlNu6tnp89K3/5fznc6ALyXwXFp0K+nM+Sxst43oaoA==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/eslint-config-turbo/-/eslint-config-turbo-2.3.2.tgz", + "integrity": "sha512-gIH/BQdbfWNa9uw/Obo7PZa/NNilZNP8STD0ppVKd8ekSVFONm2GebvOxNiSr5zHregRzokfynnHjZfB5ngJig==", "dev": true, "dependencies": { - "eslint-plugin-turbo": "2.3.1" + "eslint-plugin-turbo": "2.3.2" }, "peerDependencies": { "eslint": ">6.6.0" @@ -7261,9 +7261,9 @@ } }, "node_modules/eslint-plugin-turbo": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-turbo/-/eslint-plugin-turbo-2.3.1.tgz", - "integrity": "sha512-M5MBYBkcQsv11MFHJ+6WpzLpiTBx0OApeUMAHlO4L0eHqQxY03GrmHXjXfozqB+9HwGrW9fqihBzVRllyixJDA==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-turbo/-/eslint-plugin-turbo-2.3.2.tgz", + "integrity": "sha512-NoGxnaFi/8KotvKdbwR+VJOB3nVvIOjS193qCjHz2eBKhnO+Wr3cFgw9IZvk1rBIqg3a6VtJQmxkwNIYo2yWOw==", "dev": true, "dependencies": { "dotenv": "16.0.3" @@ -12964,11 +12964,10 @@ } }, "node_modules/prettier": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", - "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.1.tgz", + "integrity": "sha512-G+YdqtITVZmOJje6QkXQWzl3fSfMxFwm1tjTyo9exhkmWSqC4Yhd1+lug++IlR2mvRVAxEDDWYkQdeSztajqgg==", "dev": true, - "license": "MIT", "bin": { "prettier": "bin/prettier.cjs" }, @@ -16086,26 +16085,26 @@ } }, "node_modules/turbo": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/turbo/-/turbo-2.3.1.tgz", - "integrity": "sha512-vHZe/e6k1HZVKiMQPQ1BWFn53vjVQDFKdkjUq/pBKlRWi1gw9LQO6ntH4qZCcHY1rH6TXgsRmexXdgWl96YvVQ==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/turbo/-/turbo-2.3.2.tgz", + "integrity": "sha512-vCJPoy8/3KkqY3W0cX2nrwhmtBQSZhEyrVgeJ4NlEXwGxu5vNRQDyV6se5VVAQMwfBsBJswlo87B7ai7Dr1MpQ==", "dev": true, "bin": { "turbo": "bin/turbo" }, "optionalDependencies": { - "turbo-darwin-64": "2.3.1", - "turbo-darwin-arm64": "2.3.1", - "turbo-linux-64": "2.3.1", - "turbo-linux-arm64": "2.3.1", - "turbo-windows-64": "2.3.1", - "turbo-windows-arm64": "2.3.1" + "turbo-darwin-64": "2.3.2", + "turbo-darwin-arm64": "2.3.2", + "turbo-linux-64": "2.3.2", + "turbo-linux-arm64": "2.3.2", + "turbo-windows-64": "2.3.2", + "turbo-windows-arm64": "2.3.2" } }, "node_modules/turbo-darwin-64": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/turbo-darwin-64/-/turbo-darwin-64-2.3.1.tgz", - "integrity": "sha512-tjHfjW/Gs8Q9IO+9gPdIsSStZ8I09QYDRT/SyhFTPLnc7O2ZlxHPBVFfjUkHUjanHNYO8CpRGt+zdp1PaMCruw==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/turbo-darwin-64/-/turbo-darwin-64-2.3.2.tgz", + "integrity": "sha512-B1lS/UqjXNsG+kx1uzJNwXMuw2i5wavcyNy8opvSLjfuECdsqQU9B1wPqkSTU+mZjFTJcEfiGKyJ/I2EVk8vdw==", "cpu": [ "x64" ], @@ -16116,9 +16115,9 @@ ] }, "node_modules/turbo-darwin-arm64": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/turbo-darwin-arm64/-/turbo-darwin-arm64-2.3.1.tgz", - "integrity": "sha512-At1WStnxCfrBQ4M2g6ynre8WsusGwA11okhVolBxyFUemYozDTtbZwelr+IqNggjT251vviokxOkcFzzogbiFw==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/turbo-darwin-arm64/-/turbo-darwin-arm64-2.3.2.tgz", + "integrity": "sha512-XHeuEdk9tHaw2Bsr3rTzFtZyldeSyagDZkOSPIJ1zioavMjWEFPA75vdgy4j8ns96EBpZMaPXVEnODuEHfiZfQ==", "cpu": [ "arm64" ], @@ -16129,9 +16128,9 @@ ] }, "node_modules/turbo-linux-64": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/turbo-linux-64/-/turbo-linux-64-2.3.1.tgz", - "integrity": "sha512-COwEev7s9fsxLM2eoRCyRLPj+BXvZjFIS+GxzdAubYhoSoZit8B8QGKczyDl6448xhuFEWKrpHhcR9aBuwB4ag==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/turbo-linux-64/-/turbo-linux-64-2.3.2.tgz", + "integrity": "sha512-oKDsO5+flqpPx5tNLFGVUYpJ/sBc3KvaGpyNzXl2u3epzyafgblFKWMG5YsSiU1ruouPpcC6YG5SN5chA7Abfg==", "cpu": [ "x64" ], @@ -16142,9 +16141,9 @@ ] }, "node_modules/turbo-linux-arm64": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/turbo-linux-arm64/-/turbo-linux-arm64-2.3.1.tgz", - "integrity": "sha512-AP0uE15Rhxza2Jl+Q3gxdXRA92IIeFAYaufz6CMcZuGy9yZsBlLt9w6T47H6g7XQPzWuw8pzfjM1omcTKkkDpQ==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/turbo-linux-arm64/-/turbo-linux-arm64-2.3.2.tgz", + "integrity": "sha512-luyvTl3wQ1hF+ljK7ljH4TL7rg4pmx5pQ2mzvfMvPo5eaLuKr/tImmbdH6/vr56iffUIISkIsLVhVxgZeAsUOw==", "cpu": [ "arm64" ], @@ -16155,9 +16154,9 @@ ] }, "node_modules/turbo-windows-64": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/turbo-windows-64/-/turbo-windows-64-2.3.1.tgz", - "integrity": "sha512-HDSneq0dNZYZch74c2eygq+OiJE/JYDs7OsGM0yRYVj336383xkUnxz6W2I7qiyMCQXzp4UVUDZXvZhUYcX3BA==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/turbo-windows-64/-/turbo-windows-64-2.3.2.tgz", + "integrity": "sha512-yw7BnTU5cE7GdUnZEW3jIAI98hh4dcWk+Jwza8X7CXpxpill2zteq7VPf+a/B3o/xm+oVXzLmP83YP91Bm0SaA==", "cpu": [ "x64" ], @@ -16168,9 +16167,9 @@ ] }, "node_modules/turbo-windows-arm64": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/turbo-windows-arm64/-/turbo-windows-arm64-2.3.1.tgz", - "integrity": "sha512-7/2/sJZiquwoT/jWBCfV0qKq4NarsJPmDRjMcR9dDMIwCYsGM8ljomkDRTCtkNeFcUvYw54MiRWHehWgbcRPsw==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/turbo-windows-arm64/-/turbo-windows-arm64-2.3.2.tgz", + "integrity": "sha512-Hgp6V7jaIYlDcy5xpKN+XXyYCf5afT690GmXcEsMoUawd5dStvZe0QHWcGxuqho497BAlx0XGAWftm0KelNePA==", "cpu": [ "arm64" ], @@ -17129,7 +17128,7 @@ }, "packages/cache-handler": { "name": "@neshca/cache-handler", - "version": "1.8.1", + "version": "1.9.0", "license": "MIT", "dependencies": { "cluster-key-slot": "1.1.2", diff --git a/package.json b/package.json index 3a9a671a..0b3ad8a2 100644 --- a/package.json +++ b/package.json @@ -39,9 +39,9 @@ "@repo/prettier-config": "*", "@repo/typescript-config": "*", "glob": "11.0.0", - "prettier": "3.3.3", + "prettier": "3.4.1", "rimraf": "6.0.1", - "turbo": "2.3.1" + "turbo": "2.3.2" }, "packageManager": "npm@10.7.0", "engines": { diff --git a/packages/cache-handler/src/functions/nesh-cache.ts b/packages/cache-handler/src/functions/nesh-cache.ts index b108639e..db04ba4d 100644 --- a/packages/cache-handler/src/functions/nesh-cache.ts +++ b/packages/cache-handler/src/functions/nesh-cache.ts @@ -170,22 +170,22 @@ type CommonNeshCacheOptions = Omit< * * @param callback - The callback function to be cached. * - * @param options - An object containing options for the cache. + * @param commonOptions - An object containing options for the cache. * - * @param options.tags - An array of tags to associate with the cached result. + * @param commonOptions.tags - An array of tags to associate with the cached result. * Tags are used to revalidate the cache using the `revalidateTag` function. * - * @param options.revalidate - The revalidation interval in seconds. + * @param commonOptions.revalidate - The revalidation interval in seconds. * Must be a positive integer or `false` to disable revalidation. * Defaults to `export const revalidate = time;` in the current route. * - * @param options.argumentsSerializer - A function that serializes the arguments passed to the callback function. + * @param commonOptions.argumentsSerializer - A function that serializes the arguments passed to the callback function. * Use it to create a cache key. Defaults to `JSON.stringify(args)`. * - * @param options.resultSerializer - A function that serializes the result of the callback function. + * @param commonOptions.resultSerializer - A function that serializes the result of the callback function. * Defaults to `Buffer.from(JSON.stringify(data)).toString('base64')`. * - * @param options.resultDeserializer - A function that deserializes the string representation of the result of the callback function. + * @param commonOptions.resultDeserializer - A function that deserializes the string representation of the result of the callback function. * Defaults to `JSON.parse(Buffer.from(data, 'base64').toString('utf-8'))`. * * @returns The callback wrapped in a caching function. @@ -269,6 +269,8 @@ export function neshCache = Omit< * * @param callback - The callback function to be cached. * - * @param options - An object containing options for the cache. + * @param commonOptions - An object containing options for the cache. * - * @param options.responseContext - The response context object. + * @param commonOptions.responseContext - The response context object. * It is used to set the cache headers. * - * @param options.tags - An array of tags to associate with the cached result. + * @param commonOptions.tags - An array of tags to associate with the cached result. * Tags are used to revalidate the cache using the `revalidateTag` function. * - * @param options.revalidate - The revalidation interval in seconds. + * @param commonOptions.revalidate - The revalidation interval in seconds. * Must be a positive integer or `false` to disable revalidation. * Defaults to `export const revalidate = time;` in the current route. * - * @param options.argumentsSerializer - A function that serializes the arguments passed to the callback function. + * @param commonOptions.argumentsSerializer - A function that serializes the arguments passed to the callback function. * Use it to create a cache key. Defaults to `JSON.stringify(args)`. * - * @param options.resultSerializer - A function that serializes the result of the callback function. + * @param commonOptions.resultSerializer - A function that serializes the result of the callback function. * Defaults to `Buffer.from(JSON.stringify(data)).toString('base64')`. * - * @param options.resultDeserializer - A function that deserializes the string representation of the result of the callback function. + * @param commonOptions.resultDeserializer - A function that deserializes the string representation of the result of the callback function. * Defaults to `JSON.parse(Buffer.from(data, 'base64').toString('utf-8'))`. * * @returns The callback wrapped in a caching function.