From 2ecac6b5bfb24f1cb4af7a9b09a9c0fc46d1c3d1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 27 Nov 2024 10:01:03 +0300 Subject: [PATCH 1/4] Bump the turbo group with 2 updates (#882) Bumps the turbo group with 2 updates: [turbo](https://github.com/vercel/turborepo) and [eslint-config-turbo](https://github.com/vercel/turborepo/tree/HEAD/packages/eslint-config-turbo). Updates `turbo` from 2.3.1 to 2.3.2 - [Release notes](https://github.com/vercel/turborepo/releases) - [Changelog](https://github.com/vercel/turborepo/blob/main/release.md) - [Commits](https://github.com/vercel/turborepo/compare/v2.3.1...v2.3.2) Updates `eslint-config-turbo` from 2.3.1 to 2.3.2 - [Release notes](https://github.com/vercel/turborepo/releases) - [Changelog](https://github.com/vercel/turborepo/blob/main/release.md) - [Commits](https://github.com/vercel/turborepo/commits/v2.3.2/packages/eslint-config-turbo) --- updated-dependencies: - dependency-name: turbo dependency-type: direct:development update-type: version-update:semver-patch dependency-group: turbo - dependency-name: eslint-config-turbo dependency-type: direct:development update-type: version-update:semver-patch dependency-group: turbo ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- internal/eslint-config/package.json | 2 +- package-lock.json | 74 ++++++++++++++--------------- package.json | 2 +- 3 files changed, 39 insertions(+), 39 deletions(-) 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..74c5bad7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,7 +25,7 @@ "glob": "11.0.0", "prettier": "3.3.3", "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" @@ -16086,26 +16086,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 +16116,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 +16129,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 +16142,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 +16155,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 +16168,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 +17129,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..508dbda3 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "glob": "11.0.0", "prettier": "3.3.3", "rimraf": "6.0.1", - "turbo": "2.3.1" + "turbo": "2.3.2" }, "packageManager": "npm@10.7.0", "engines": { From 88010c21bb7f4a3680cc571cf500cb01747408f9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 27 Nov 2024 10:14:12 +0300 Subject: [PATCH 2/4] Bump prettier from 3.3.3 to 3.4.1 (#883) Bumps [prettier](https://github.com/prettier/prettier) from 3.3.3 to 3.4.1. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/3.3.3...3.4.1) --- updated-dependencies: - dependency-name: prettier dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 9 ++++----- package.json | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 74c5bad7..bd135685 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,7 @@ "@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.2" }, @@ -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" }, diff --git a/package.json b/package.json index 508dbda3..0b3ad8a2 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "@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.2" }, From 79622eb7e47f5873f5efa51c8bea01083246ccff Mon Sep 17 00:00:00 2001 From: Paul TGnkin Date: Sat, 30 Nov 2024 22:23:46 +0300 Subject: [PATCH 3/4] fixing eslint error in .js files --- .gitignore | 5 ++++- apps/cache-testing/.eslintrc.js | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) 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'], }; From a22bc528d6544d688e7b37ba8bb3baa53f0ff335 Mon Sep 17 00:00:00 2001 From: Paul TGnkin Date: Sat, 30 Nov 2024 22:52:01 +0300 Subject: [PATCH 4/4] improved docs for nesh cache and refactored try catch block --- .../cache-handler/src/functions/nesh-cache.ts | 31 +++++++------------ .../src/functions/nesh-classic-cache.ts | 14 ++++----- 2 files changed, 19 insertions(+), 26 deletions(-) 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.