From 980cc25b03ed5de6320761ecd9a079f160320d77 Mon Sep 17 00:00:00 2001 From: Dario Piotrowicz Date: Fri, 27 Sep 2024 13:04:44 +0100 Subject: [PATCH 01/10] add eslint to cloudflare package --- packages/cloudflare/eslint.config.mjs | 22 + packages/cloudflare/package.json | 5 + .../src/api/get-cloudflare-context.ts | 2 +- .../cloudflare/src/cli/build/build-worker.ts | 4 +- .../patches/to-investigate/wrangler-deps.ts | 4 +- packages/cloudflare/src/cli/cache-handler.ts | 3 +- packages/cloudflare/src/cli/config.ts | 6 +- .../src/cli/templates/shims/node-fs.ts | 2 +- .../cloudflare/src/cli/templates/worker.ts | 19 +- pnpm-lock.yaml | 520 +++++++++++------- pnpm-workspace.yaml | 5 +- 11 files changed, 385 insertions(+), 207 deletions(-) create mode 100644 packages/cloudflare/eslint.config.mjs diff --git a/packages/cloudflare/eslint.config.mjs b/packages/cloudflare/eslint.config.mjs new file mode 100644 index 00000000..1ba2803e --- /dev/null +++ b/packages/cloudflare/eslint.config.mjs @@ -0,0 +1,22 @@ +import globals from "globals"; +import pluginJs from "@eslint/js"; +import tseslint from "typescript-eslint"; + +export default [ + { + ignores: ["dist", "**/test-snapshots", "**/test-fixtures"] + }, + { + files: ["**/*.{js,mjs,cjs,ts}"], + }, + { + languageOptions: { globals: globals.node }, + }, + pluginJs.configs.recommended, + ...tseslint.configs.recommended, + { + "rules": { + "@typescript-eslint/ban-ts-comment": "off" + } + } +]; diff --git a/packages/cloudflare/package.json b/packages/cloudflare/package.json index a78d963d..d24351f4 100644 --- a/packages/cloudflare/package.json +++ b/packages/cloudflare/package.json @@ -5,6 +5,7 @@ "scripts": { "build": "tsup", "build:watch": "tsup --watch src", + "lint": "eslint", "test": "vitest --run", "test:watch": "vitest" }, @@ -38,12 +39,16 @@ "homepage": "https://github.com/opennextjs/opennextjs-cloudflare", "devDependencies": { "@cloudflare/workers-types": "catalog:", + "@eslint/js": "catalog:", "@types/node": "catalog:", "esbuild": "catalog:", + "eslint": "catalog:", "glob": "catalog:", + "globals": "catalog:", "next": "catalog:", "tsup": "catalog:", "typescript": "catalog:", + "typescript-eslint": "catalog:", "vitest": "catalog:" }, "dependencies": { diff --git a/packages/cloudflare/src/api/get-cloudflare-context.ts b/packages/cloudflare/src/api/get-cloudflare-context.ts index a2baac0d..27571dfc 100644 --- a/packages/cloudflare/src/api/get-cloudflare-context.ts +++ b/packages/cloudflare/src/api/get-cloudflare-context.ts @@ -1,7 +1,7 @@ import "server-only"; declare global { - // eslint-disable-next-line @typescript-eslint/no-empty-interface + // eslint-disable-next-line @typescript-eslint/no-empty-object-type interface CloudflareEnv {} } diff --git a/packages/cloudflare/src/cli/build/build-worker.ts b/packages/cloudflare/src/cli/build/build-worker.ts index 7ba17032..dca7175f 100644 --- a/packages/cloudflare/src/cli/build/build-worker.ts +++ b/packages/cloudflare/src/cli/build/build-worker.ts @@ -177,10 +177,10 @@ function createFixRequiresESBuildPlugin(templateDir: string): Plugin { name: "replaceRelative", setup(build) { // Note: we (empty) shim require-hook modules as they generate problematic code that uses requires - build.onResolve({ filter: /^\.\/require-hook$/ }, (args) => ({ + build.onResolve({ filter: /^\.\/require-hook$/ }, () => ({ path: path.join(templateDir, "shims", "empty.ts"), })); - build.onResolve({ filter: /\.\/lib\/node-fs-methods$/ }, (args) => ({ + build.onResolve({ filter: /\.\/lib\/node-fs-methods$/ }, () => ({ path: path.join(templateDir, "shims", "empty.ts"), })); }, diff --git a/packages/cloudflare/src/cli/build/patches/to-investigate/wrangler-deps.ts b/packages/cloudflare/src/cli/build/patches/to-investigate/wrangler-deps.ts index 7e2d38a2..1e168950 100644 --- a/packages/cloudflare/src/cli/build/patches/to-investigate/wrangler-deps.ts +++ b/packages/cloudflare/src/cli/build/patches/to-investigate/wrangler-deps.ts @@ -1,6 +1,6 @@ import path from "node:path"; import fs, { writeFileSync } from "node:fs"; -import { Config } from "../../../cli/config"; +import { Config } from "../../../config"; export function patchWranglerDeps(config: Config) { console.log("# patchWranglerDeps"); @@ -33,7 +33,7 @@ export function patchWranglerDeps(config: Config) { // Remove the need for an alias in wrangler.toml: // // [alias] - // # @opentelemetry/api is `require`d when running wrangler dev, so we need to stub it out + // # @opentelemetry/api is `require`d when running wrangler dev, so we need to stub it out // # IMPORTANT: we shim @opentelemetry/api to the throwing shim so that it will throw right away, this is so that we throw inside the // # try block here: https://github.com/vercel/next.js/blob/9e8266a7/packages/next/src/server/lib/trace/tracer.ts#L27-L31 // # causing the code to require the 'next/dist/compiled/@opentelemetry/api' module instead (which properly works) diff --git a/packages/cloudflare/src/cli/cache-handler.ts b/packages/cloudflare/src/cli/cache-handler.ts index b5df556e..38193444 100644 --- a/packages/cloudflare/src/cli/cache-handler.ts +++ b/packages/cloudflare/src/cli/cache-handler.ts @@ -25,7 +25,8 @@ export default class CfWorkersKvCacheHandler implements CacheHandler { async set( key: string, entry: IncrementalCacheValue | null, - ctx: { + // eslint-disable-next-line @typescript-eslint/no-unused-vars + _ctx: { revalidate?: number | false; fetchCache?: boolean; fetchUrl?: string; diff --git a/packages/cloudflare/src/cli/config.ts b/packages/cloudflare/src/cli/config.ts index 2bdbf084..f005ee2b 100644 --- a/packages/cloudflare/src/cli/config.ts +++ b/packages/cloudflare/src/cli/config.ts @@ -76,7 +76,7 @@ export function getConfig(appDir: string, outputDir: string): Config { export function containsDotNextDir(folder: string): boolean { try { return statSync(path.join(folder, ".next")).isDirectory(); - } catch (e) { + } catch { return false; } } @@ -105,7 +105,9 @@ function findServerParentPath(parentPath: string): string | undefined { if (statSync(path.join(parentPath, ".next", "server")).isDirectory()) { return parentPath; } - } catch {} + } catch { + /* empty */ + } const folders = readdirSync(parentPath); diff --git a/packages/cloudflare/src/cli/templates/shims/node-fs.ts b/packages/cloudflare/src/cli/templates/shims/node-fs.ts index 9ac156eb..feda0dbe 100644 --- a/packages/cloudflare/src/cli/templates/shims/node-fs.ts +++ b/packages/cloudflare/src/cli/templates/shims/node-fs.ts @@ -17,7 +17,7 @@ function existsSync(path: string) { return FILES.has(path); } -async function readFile(path: string, options: unknown): Promise { +async function readFile(path: string, options: unknown): Promise { console.log( "readFile", { path, options } diff --git a/packages/cloudflare/src/cli/templates/worker.ts b/packages/cloudflare/src/cli/templates/worker.ts index ebc2be0c..6f133cb0 100644 --- a/packages/cloudflare/src/cli/templates/worker.ts +++ b/packages/cloudflare/src/cli/templates/worker.ts @@ -12,6 +12,7 @@ const NON_BODY_RESPONSES = new Set([101, 204, 205, 304]); const cloudflareContextALS = new AsyncLocalStorage(); // Note: this symbol needs to be kept in sync with the one defined in `src/api/get-cloudflare-context.ts` +// eslint-disable-next-line @typescript-eslint/no-explicit-any (globalThis as any)[Symbol.for("__cloudflare-context__")] = new Proxy( {}, { @@ -29,6 +30,7 @@ const nextConfig: NextConfig = JSON.parse(process.env.__NEXT_PRIVATE_STANDALONE_ let requestHandler: NodeRequestHandler | null = null; export default { + // eslint-disable-next-line @typescript-eslint/no-explicit-any async fetch(request: Request & { cf: IncomingRequestCfProperties }, env: any, ctx: any) { return cloudflareContextALS.run({ env, ctx, cf: request.cf }, async () => { if (requestHandler == null) { @@ -45,12 +47,13 @@ export default { const url = new URL(request.url); if (url.pathname === "/_next/image") { - let imageUrl = + const imageUrl = url.searchParams.get("url") ?? "https://developers.cloudflare.com/_astro/logo.BU9hiExz.svg"; if (imageUrl.startsWith("/")) { return env.ASSETS.fetch(new URL(imageUrl, request.url)); } - return fetch(imageUrl, { cf: { cacheEverything: true } } as any); + // @ts-ignore + return fetch(imageUrl, { cf: { cacheEverything: true } } as unknown); } const { req, res, webResponse } = getWrappedStreams(request, ctx); @@ -62,12 +65,11 @@ export default { }, }; -function getWrappedStreams(request: Request, ctx: any) { +function getWrappedStreams(request: Request, ctx: ExecutionContext) { const url = new URL(request.url); - const req = ( - request.body ? Stream.Readable.fromWeb(request.body as any) : Stream.Readable.from([]) - ) as IncomingMessage; + const req = // eslint-disable-next-line @typescript-eslint/no-explicit-any + (request.body ? Stream.Readable.fromWeb(request.body as any) : Stream.Readable.from([])) as IncomingMessage; req.httpVersion = "1.0"; req.httpVersionMajor = 1; req.httpVersionMinor = 0; @@ -94,7 +96,7 @@ function getWrappedStreams(request: Request, ctx: any) { const res = new MockedResponse({ resWriter: (chunk) => { - resBodyWriter.write(typeof chunk === "string" ? Buffer.from(chunk) : chunk).catch((err: any) => { + resBodyWriter.write(typeof chunk === "string" ? Buffer.from(chunk) : chunk).catch((err) => { if ( err.message.includes("WritableStream has been closed") || err.message.includes("Network connection lost") @@ -110,6 +112,7 @@ function getWrappedStreams(request: Request, ctx: any) { }); // It's implemented as a no-op, but really it should mark the headers as done + // eslint-disable-next-line @typescript-eslint/no-explicit-any res.flushHeaders = () => (res as any).headPromiseResolve(); // Only allow statusCode to be modified if not sent @@ -127,6 +130,7 @@ function getWrappedStreams(request: Request, ctx: any) { }); // Make sure the writer is eventually closed + // eslint-disable-next-line @typescript-eslint/no-explicit-any ctx.waitUntil((res as any).hasStreamed.finally(() => resBodyWriter.close().catch(() => {}))); return { @@ -138,6 +142,7 @@ function getWrappedStreams(request: Request, ctx: any) { res.setHeader("content-encoding", "identity"); return new Response(NON_BODY_RESPONSES.has(res.statusCode) ? null : readable, { status: res.statusCode, + // eslint-disable-next-line @typescript-eslint/no-explicit-any headers: (res as any).headers, }); }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c26eb6fb..27aea872 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,6 +9,9 @@ catalogs: '@cloudflare/workers-types': specifier: ^4.20240925.0 version: 4.20240925.0 + '@eslint/js': + specifier: ^9.11.1 + version: 9.11.1 '@playwright/test': specifier: 1.47.0 version: 1.47.0 @@ -25,14 +28,17 @@ catalogs: specifier: ^0.23.0 version: 0.23.1 eslint: - specifier: ^8 - version: 8.57.0 + specifier: ^9.11.1 + version: 9.11.1 eslint-config-next: specifier: 14.2.11 version: 14.2.11 glob: specifier: ^11.0.0 version: 11.0.0 + globals: + specifier: ^15.9.0 + version: 15.9.0 next: specifier: 14.2.11 version: 14.2.11 @@ -51,6 +57,9 @@ catalogs: typescript: specifier: ^5.5.4 version: 5.5.4 + typescript-eslint: + specifier: ^8.7.0 + version: 8.7.0 vitest: specifier: ^2.1.1 version: 2.1.1 @@ -123,10 +132,10 @@ importers: version: 18.3.0 eslint: specifier: 'catalog:' - version: 8.57.0 + version: 9.11.1(jiti@1.21.6) eslint-config-next: specifier: 'catalog:' - version: 14.2.11(eslint@8.57.0)(typescript@5.5.4) + version: 14.2.11(eslint@9.11.1(jiti@1.21.6))(typescript@5.5.4) postcss: specifier: ^8 version: 8.4.31 @@ -152,15 +161,24 @@ importers: '@cloudflare/workers-types': specifier: 'catalog:' version: 4.20240925.0 + '@eslint/js': + specifier: 'catalog:' + version: 9.11.1 '@types/node': specifier: 'catalog:' version: 22.2.0 esbuild: specifier: 'catalog:' version: 0.23.1 + eslint: + specifier: 'catalog:' + version: 9.11.1(jiti@1.21.6) glob: specifier: 'catalog:' version: 11.0.0 + globals: + specifier: 'catalog:' + version: 15.9.0 next: specifier: 'catalog:' version: 14.2.11(@playwright/test@1.47.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -170,6 +188,9 @@ importers: typescript: specifier: 'catalog:' version: 5.5.4 + typescript-eslint: + specifier: 'catalog:' + version: 8.7.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.5.4) vitest: specifier: 'catalog:' version: 2.1.1(@types/node@22.2.0) @@ -659,30 +680,41 @@ packages: resolution: {integrity: sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint/eslintrc@2.1.4': - resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + '@eslint/config-array@0.18.0': + resolution: {integrity: sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/js@8.57.0': - resolution: {integrity: sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + '@eslint/core@0.6.0': + resolution: {integrity: sha512-8I2Q8ykA4J0x0o7cg67FPVnehcqWTBehu/lmY+bolPFHGjh49YzGBMXTvpqVgEbBdvNCSxj6iFgiIyHzf03lzg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/eslintrc@3.1.0': + resolution: {integrity: sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/js@9.11.1': + resolution: {integrity: sha512-/qu+TWz8WwPWc7/HcIJKi+c+MOm46GdVaSlTTQcaqaL53+GsoA6MxWp5PtTx48qbSP7ylM1Kn7nhvkugfJvRSA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/object-schema@2.1.4': + resolution: {integrity: sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/plugin-kit@0.2.0': + resolution: {integrity: sha512-vH9PiIMMwvhCx31Af3HiGzsVNULDbyVkHXwlemn/B0TFj/00ho3y55efXrUZTfQipxoHC5u4xq6zblww1zm1Ig==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@fastify/busboy@2.1.1': resolution: {integrity: sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==} engines: {node: '>=14'} - '@humanwhocodes/config-array@0.11.14': - resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} - engines: {node: '>=10.10.0'} - deprecated: Use @eslint/config-array instead - '@humanwhocodes/module-importer@1.0.1': resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} - '@humanwhocodes/object-schema@2.0.3': - resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} - deprecated: Use @eslint/object-schema instead + '@humanwhocodes/retry@0.3.0': + resolution: {integrity: sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==} + engines: {node: '>=18.18'} '@isaacs/cliui@8.0.2': resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} @@ -892,6 +924,9 @@ packages: '@types/estree@1.0.5': resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} + '@types/estree@1.0.6': + resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} + '@types/json-schema@7.0.15': resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} @@ -927,6 +962,17 @@ packages: typescript: optional: true + '@typescript-eslint/eslint-plugin@8.7.0': + resolution: {integrity: sha512-RIHOoznhA3CCfSTFiB6kBGLQtB/sox+pJ6jeFu6FxJvqL8qRxq/FfGO/UhsGgQM9oGdXkV4xUgli+dt26biB6A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 + eslint: ^8.57.0 || ^9.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + '@typescript-eslint/parser@7.2.0': resolution: {integrity: sha512-5FKsVcHTk6TafQKQbuIVkXq58Fnbkd2wDL4LB7AURN7RUOu1utVP+G8+6u3ZhEroW3DF6hyo3ZEXxgKgp4KeCg==} engines: {node: ^16.0.0 || >=18.0.0} @@ -937,10 +983,24 @@ packages: typescript: optional: true + '@typescript-eslint/parser@8.7.0': + resolution: {integrity: sha512-lN0btVpj2unxHlNYLI//BQ7nzbMJYBVQX5+pbNXvGYazdlgYonMn4AhhHifQ+J4fGRYA/m1DjaQjx+fDetqBOQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + '@typescript-eslint/scope-manager@7.2.0': resolution: {integrity: sha512-Qh976RbQM/fYtjx9hs4XkayYujB/aPwglw2choHmf3zBjB4qOywWSdt9+KLRdHubGcoSwBnXUH2sR3hkyaERRg==} engines: {node: ^16.0.0 || >=18.0.0} + '@typescript-eslint/scope-manager@8.7.0': + resolution: {integrity: sha512-87rC0k3ZlDOuz82zzXRtQ7Akv3GKhHs0ti4YcbAJtaomllXoSO8hi7Ix3ccEvCd824dy9aIX+j3d2UMAfCtVpg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/type-utils@7.2.0': resolution: {integrity: sha512-xHi51adBHo9O9330J8GQYQwrKBqbIPJGZZVQTHHmy200hvkLZFWJIFtAG/7IYTWUyun6DE6w5InDReePJYJlJA==} engines: {node: ^16.0.0 || >=18.0.0} @@ -951,10 +1011,23 @@ packages: typescript: optional: true + '@typescript-eslint/type-utils@8.7.0': + resolution: {integrity: sha512-tl0N0Mj3hMSkEYhLkjREp54OSb/FI6qyCzfiiclvJvOqre6hsZTGSnHtmFLDU8TIM62G7ygEa1bI08lcuRwEnQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + '@typescript-eslint/types@7.2.0': resolution: {integrity: sha512-XFtUHPI/abFhm4cbCDc5Ykc8npOKBSJePY3a3s+lwumt7XWJuzP5cZcfZ610MIPHjQjNsOLlYK8ASPaNG8UiyA==} engines: {node: ^16.0.0 || >=18.0.0} + '@typescript-eslint/types@8.7.0': + resolution: {integrity: sha512-LLt4BLHFwSfASHSF2K29SZ+ZCsbQOM+LuarPjRUuHm+Qd09hSe3GCeaQbcCr+Mik+0QFRmep/FyZBO6fJ64U3w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/typescript-estree@7.2.0': resolution: {integrity: sha512-cyxS5WQQCoBwSakpMrvMXuMDEbhOo9bNHHrNcEWis6XHx6KF518tkF1wBvKIn/tpq5ZpUYK7Bdklu8qY0MsFIA==} engines: {node: ^16.0.0 || >=18.0.0} @@ -964,18 +1037,34 @@ packages: typescript: optional: true + '@typescript-eslint/typescript-estree@8.7.0': + resolution: {integrity: sha512-MC8nmcGHsmfAKxwnluTQpNqceniT8SteVwd2voYlmiSWGOtjvGXdPl17dYu2797GVscK30Z04WRM28CrKS9WOg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + '@typescript-eslint/utils@7.2.0': resolution: {integrity: sha512-YfHpnMAGb1Eekpm3XRK8hcMwGLGsnT6L+7b2XyRv6ouDuJU1tZir1GS2i0+VXRatMwSI1/UfcyPe53ADkU+IuA==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^8.56.0 + '@typescript-eslint/utils@8.7.0': + resolution: {integrity: sha512-ZbdUdwsl2X/s3CiyAu3gOlfQzpbuG3nTWKPoIvAu1pu5r8viiJvv2NPN2AqArL35NCYtw/lrPPfM4gxrMLNLPw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + '@typescript-eslint/visitor-keys@7.2.0': resolution: {integrity: sha512-c6EIQRHhcpl6+tO8EMR+kjkkV+ugUNXOmeASA1rlzkd8EPIriavpWoiEz1HR/VLhbVIdhqnV6E7JZm00cBDx2A==} engines: {node: ^16.0.0 || >=18.0.0} - '@ungap/structured-clone@1.2.0': - resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} + '@typescript-eslint/visitor-keys@8.7.0': + resolution: {integrity: sha512-b1tx0orFCCh/THWPQa2ZwWzvOeyzzp36vkJYOpVg0u8UVOIsfVrnuC9FqAw9gRKn+rG2VmWQ/zDJZzkxUnj/XQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@vitest/expect@2.1.1': resolution: {integrity: sha512-YeueunS0HiHiQxk+KEOnq/QMzlUuOzbU1Go+PgAsHvvv3tUkJPm9xWt+6ITNTlzsMXUjmgm5T+U7KBPK2qQV6w==} @@ -1293,10 +1382,6 @@ packages: resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} engines: {node: '>=0.10.0'} - doctrine@3.0.0: - resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} - engines: {node: '>=6.0.0'} - eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} @@ -1437,22 +1522,31 @@ packages: peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7 - eslint-scope@7.2.2: - resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + eslint-scope@8.0.2: + resolution: {integrity: sha512-6E4xmrTw5wtxnLA5wYL3WDfhZ/1bUBGOXV0zQvVRDOtrR8D0p6W7fs3JweNYhwRYeGvd/1CKX2se0/2s7Q/nJA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} eslint-visitor-keys@3.4.3: resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - eslint@8.57.0: - resolution: {integrity: sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + eslint-visitor-keys@4.0.0: + resolution: {integrity: sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + eslint@9.11.1: + resolution: {integrity: sha512-MobhYKIoAO1s1e4VUrgx1l1Sk2JBR/Gqjjgw8+mfgoLE2xwsHur4gdfTxyTgShrhvdVFTaJSgMiQBl1jv/AWxg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true + peerDependencies: + jiti: '*' + peerDependenciesMeta: + jiti: + optional: true - espree@9.6.1: - resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + espree@10.1.0: + resolution: {integrity: sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} esquery@1.6.0: resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} @@ -1500,9 +1594,9 @@ packages: fastq@1.17.1: resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} - file-entry-cache@6.0.1: - resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} - engines: {node: ^10.12.0 || >=12.0.0} + file-entry-cache@8.0.0: + resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} + engines: {node: '>=16.0.0'} fill-range@7.1.1: resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} @@ -1512,9 +1606,9 @@ packages: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} engines: {node: '>=10'} - flat-cache@3.2.0: - resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} - engines: {node: ^10.12.0 || >=12.0.0} + flat-cache@4.0.1: + resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} + engines: {node: '>=16'} flatted@3.3.1: resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} @@ -1526,9 +1620,6 @@ packages: resolution: {integrity: sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==} engines: {node: '>=14'} - fs.realpath@1.0.0: - resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} - fsevents@2.3.2: resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} @@ -1595,13 +1686,13 @@ packages: engines: {node: 20 || >=22} hasBin: true - glob@7.2.3: - resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} - deprecated: Glob versions prior to v9 are no longer supported + globals@14.0.0: + resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} + engines: {node: '>=18'} - globals@13.24.0: - resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} - engines: {node: '>=8'} + globals@15.9.0: + resolution: {integrity: sha512-SmSKyLLKFbSr6rptvP8izbyxJL4ILwqO9Jg23UA0sDlGlu58V59D1//I3vlc0KJphVdUR7vMjHIplYnzBxorQA==} + engines: {node: '>=18'} globalthis@1.0.4: resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} @@ -1662,13 +1753,6 @@ packages: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} engines: {node: '>=0.8.19'} - inflight@1.0.6: - resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} - deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. - - inherits@2.0.4: - resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} - internal-slot@1.0.7: resolution: {integrity: sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==} engines: {node: '>= 0.4'} @@ -2047,9 +2131,6 @@ packages: ohash@1.1.4: resolution: {integrity: sha512-FlDryZAahJmEF3VR3w1KogSEdWX3WhA5GPakFx4J81kEAiHyLMpdLLElS8n8dfNadMgAne/MywcvmogzscVt4g==} - once@1.4.0: - resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} - onetime@5.1.2: resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} engines: {node: '>=6'} @@ -2080,10 +2161,6 @@ packages: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} - path-is-absolute@1.0.1: - resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} - engines: {node: '>=0.10.0'} - path-key@3.1.1: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} @@ -2284,11 +2361,6 @@ packages: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} - rimraf@3.0.2: - resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} - deprecated: Rimraf versions prior to v4 are no longer supported - hasBin: true - rollup-plugin-inject@3.0.2: resolution: {integrity: sha512-ptg9PQwzs3orn4jkgXJ74bfs5vYz1NCZlSQMBUA0wKcGp5i5pA1AO3fOUEte8enhGUC+iapTCzEWw2jEFFUO/w==} deprecated: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject. @@ -2575,10 +2647,6 @@ packages: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} - type-fest@0.20.2: - resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} - engines: {node: '>=10'} - typed-array-buffer@1.0.2: resolution: {integrity: sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==} engines: {node: '>= 0.4'} @@ -2595,6 +2663,15 @@ packages: resolution: {integrity: sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==} engines: {node: '>= 0.4'} + typescript-eslint@8.7.0: + resolution: {integrity: sha512-nEHbEYJyHwsuf7c3V3RS7Saq+1+la3i0ieR3qP0yjqWSzVmh8Drp47uOl9LjbPANac4S7EFSqvcYIKXUUwIfIQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + typescript@5.5.4: resolution: {integrity: sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==} engines: {node: '>=14.17'} @@ -2741,9 +2818,6 @@ packages: resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} engines: {node: '>=12'} - wrappy@1.0.2: - resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} - ws@8.18.0: resolution: {integrity: sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==} engines: {node: '>=10.0.0'} @@ -3025,19 +3099,29 @@ snapshots: '@esbuild/win32-x64@0.23.1': optional: true - '@eslint-community/eslint-utils@4.4.0(eslint@8.57.0)': + '@eslint-community/eslint-utils@4.4.0(eslint@9.11.1(jiti@1.21.6))': dependencies: - eslint: 8.57.0 + eslint: 9.11.1(jiti@1.21.6) eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.11.0': {} - '@eslint/eslintrc@2.1.4': + '@eslint/config-array@0.18.0': + dependencies: + '@eslint/object-schema': 2.1.4 + debug: 4.3.6 + minimatch: 3.1.2 + transitivePeerDependencies: + - supports-color + + '@eslint/core@0.6.0': {} + + '@eslint/eslintrc@3.1.0': dependencies: ajv: 6.12.6 debug: 4.3.6 - espree: 9.6.1 - globals: 13.24.0 + espree: 10.1.0 + globals: 14.0.0 ignore: 5.3.2 import-fresh: 3.3.0 js-yaml: 4.1.0 @@ -3046,21 +3130,19 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@8.57.0': {} + '@eslint/js@9.11.1': {} - '@fastify/busboy@2.1.1': {} + '@eslint/object-schema@2.1.4': {} - '@humanwhocodes/config-array@0.11.14': + '@eslint/plugin-kit@0.2.0': dependencies: - '@humanwhocodes/object-schema': 2.0.3 - debug: 4.3.6 - minimatch: 3.1.2 - transitivePeerDependencies: - - supports-color + levn: 0.4.1 + + '@fastify/busboy@2.1.1': {} '@humanwhocodes/module-importer@1.0.1': {} - '@humanwhocodes/object-schema@2.0.3': {} + '@humanwhocodes/retry@0.3.0': {} '@isaacs/cliui@8.0.2': dependencies: @@ -3215,6 +3297,8 @@ snapshots: '@types/estree@1.0.5': {} + '@types/estree@1.0.6': {} + '@types/json-schema@7.0.15': {} '@types/json5@0.0.29': {} @@ -3240,16 +3324,16 @@ snapshots: '@types/semver@7.5.8': {} - '@typescript-eslint/eslint-plugin@7.2.0(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4)': + '@typescript-eslint/eslint-plugin@7.2.0(@typescript-eslint/parser@7.2.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.5.4))(eslint@9.11.1(jiti@1.21.6))(typescript@5.5.4)': dependencies: '@eslint-community/regexpp': 4.11.0 - '@typescript-eslint/parser': 7.2.0(eslint@8.57.0)(typescript@5.5.4) + '@typescript-eslint/parser': 7.2.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.5.4) '@typescript-eslint/scope-manager': 7.2.0 - '@typescript-eslint/type-utils': 7.2.0(eslint@8.57.0)(typescript@5.5.4) - '@typescript-eslint/utils': 7.2.0(eslint@8.57.0)(typescript@5.5.4) + '@typescript-eslint/type-utils': 7.2.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.5.4) + '@typescript-eslint/utils': 7.2.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.5.4) '@typescript-eslint/visitor-keys': 7.2.0 debug: 4.3.6 - eslint: 8.57.0 + eslint: 9.11.1(jiti@1.21.6) graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 @@ -3260,14 +3344,45 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4)': + '@typescript-eslint/eslint-plugin@8.7.0(@typescript-eslint/parser@8.7.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.5.4))(eslint@9.11.1(jiti@1.21.6))(typescript@5.5.4)': + dependencies: + '@eslint-community/regexpp': 4.11.0 + '@typescript-eslint/parser': 8.7.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.5.4) + '@typescript-eslint/scope-manager': 8.7.0 + '@typescript-eslint/type-utils': 8.7.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.5.4) + '@typescript-eslint/utils': 8.7.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.5.4) + '@typescript-eslint/visitor-keys': 8.7.0 + eslint: 9.11.1(jiti@1.21.6) + graphemer: 1.4.0 + ignore: 5.3.2 + natural-compare: 1.4.0 + ts-api-utils: 1.3.0(typescript@5.5.4) + optionalDependencies: + typescript: 5.5.4 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/parser@7.2.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.5.4)': dependencies: '@typescript-eslint/scope-manager': 7.2.0 '@typescript-eslint/types': 7.2.0 '@typescript-eslint/typescript-estree': 7.2.0(typescript@5.5.4) '@typescript-eslint/visitor-keys': 7.2.0 debug: 4.3.6 - eslint: 8.57.0 + eslint: 9.11.1(jiti@1.21.6) + optionalDependencies: + typescript: 5.5.4 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/parser@8.7.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.5.4)': + dependencies: + '@typescript-eslint/scope-manager': 8.7.0 + '@typescript-eslint/types': 8.7.0 + '@typescript-eslint/typescript-estree': 8.7.0(typescript@5.5.4) + '@typescript-eslint/visitor-keys': 8.7.0 + debug: 4.3.6 + eslint: 9.11.1(jiti@1.21.6) optionalDependencies: typescript: 5.5.4 transitivePeerDependencies: @@ -3278,20 +3393,39 @@ snapshots: '@typescript-eslint/types': 7.2.0 '@typescript-eslint/visitor-keys': 7.2.0 - '@typescript-eslint/type-utils@7.2.0(eslint@8.57.0)(typescript@5.5.4)': + '@typescript-eslint/scope-manager@8.7.0': + dependencies: + '@typescript-eslint/types': 8.7.0 + '@typescript-eslint/visitor-keys': 8.7.0 + + '@typescript-eslint/type-utils@7.2.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.5.4)': dependencies: '@typescript-eslint/typescript-estree': 7.2.0(typescript@5.5.4) - '@typescript-eslint/utils': 7.2.0(eslint@8.57.0)(typescript@5.5.4) + '@typescript-eslint/utils': 7.2.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.5.4) debug: 4.3.6 - eslint: 8.57.0 + eslint: 9.11.1(jiti@1.21.6) ts-api-utils: 1.3.0(typescript@5.5.4) optionalDependencies: typescript: 5.5.4 transitivePeerDependencies: - supports-color + '@typescript-eslint/type-utils@8.7.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.5.4)': + dependencies: + '@typescript-eslint/typescript-estree': 8.7.0(typescript@5.5.4) + '@typescript-eslint/utils': 8.7.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.5.4) + debug: 4.3.6 + ts-api-utils: 1.3.0(typescript@5.5.4) + optionalDependencies: + typescript: 5.5.4 + transitivePeerDependencies: + - eslint + - supports-color + '@typescript-eslint/types@7.2.0': {} + '@typescript-eslint/types@8.7.0': {} + '@typescript-eslint/typescript-estree@7.2.0(typescript@5.5.4)': dependencies: '@typescript-eslint/types': 7.2.0 @@ -3307,26 +3441,55 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@7.2.0(eslint@8.57.0)(typescript@5.5.4)': + '@typescript-eslint/typescript-estree@8.7.0(typescript@5.5.4)': + dependencies: + '@typescript-eslint/types': 8.7.0 + '@typescript-eslint/visitor-keys': 8.7.0 + debug: 4.3.6 + fast-glob: 3.3.2 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.6.3 + ts-api-utils: 1.3.0(typescript@5.5.4) + optionalDependencies: + typescript: 5.5.4 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/utils@7.2.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.5.4)': dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.11.1(jiti@1.21.6)) '@types/json-schema': 7.0.15 '@types/semver': 7.5.8 '@typescript-eslint/scope-manager': 7.2.0 '@typescript-eslint/types': 7.2.0 '@typescript-eslint/typescript-estree': 7.2.0(typescript@5.5.4) - eslint: 8.57.0 + eslint: 9.11.1(jiti@1.21.6) semver: 7.6.3 transitivePeerDependencies: - supports-color - typescript + '@typescript-eslint/utils@8.7.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.5.4)': + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@9.11.1(jiti@1.21.6)) + '@typescript-eslint/scope-manager': 8.7.0 + '@typescript-eslint/types': 8.7.0 + '@typescript-eslint/typescript-estree': 8.7.0(typescript@5.5.4) + eslint: 9.11.1(jiti@1.21.6) + transitivePeerDependencies: + - supports-color + - typescript + '@typescript-eslint/visitor-keys@7.2.0': dependencies: '@typescript-eslint/types': 7.2.0 eslint-visitor-keys: 3.4.3 - '@ungap/structured-clone@1.2.0': {} + '@typescript-eslint/visitor-keys@8.7.0': + dependencies: + '@typescript-eslint/types': 8.7.0 + eslint-visitor-keys: 3.4.3 '@vitest/expect@2.1.1': dependencies: @@ -3680,10 +3843,6 @@ snapshots: dependencies: esutils: 2.0.3 - doctrine@3.0.0: - dependencies: - esutils: 2.0.3 - eastasianwidth@0.2.0: {} emoji-regex@8.0.0: {} @@ -3879,19 +4038,19 @@ snapshots: escape-string-regexp@4.0.0: {} - eslint-config-next@14.2.11(eslint@8.57.0)(typescript@5.5.4): + eslint-config-next@14.2.11(eslint@9.11.1(jiti@1.21.6))(typescript@5.5.4): dependencies: '@next/eslint-plugin-next': 14.2.11 '@rushstack/eslint-patch': 1.10.4 - '@typescript-eslint/eslint-plugin': 7.2.0(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4) - '@typescript-eslint/parser': 7.2.0(eslint@8.57.0)(typescript@5.5.4) - eslint: 8.57.0 + '@typescript-eslint/eslint-plugin': 7.2.0(@typescript-eslint/parser@7.2.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.5.4))(eslint@9.11.1(jiti@1.21.6))(typescript@5.5.4) + '@typescript-eslint/parser': 7.2.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.5.4) + eslint: 9.11.1(jiti@1.21.6) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.3(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0)(eslint@8.57.0) - eslint-plugin-import: 2.30.0(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.0) - eslint-plugin-jsx-a11y: 6.10.0(eslint@8.57.0) - eslint-plugin-react: 7.36.1(eslint@8.57.0) - eslint-plugin-react-hooks: 4.6.2(eslint@8.57.0) + eslint-import-resolver-typescript: 3.6.3(@typescript-eslint/parser@7.2.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0)(eslint@9.11.1(jiti@1.21.6)) + eslint-plugin-import: 2.30.0(@typescript-eslint/parser@7.2.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.3)(eslint@9.11.1(jiti@1.21.6)) + eslint-plugin-jsx-a11y: 6.10.0(eslint@9.11.1(jiti@1.21.6)) + eslint-plugin-react: 7.36.1(eslint@9.11.1(jiti@1.21.6)) + eslint-plugin-react-hooks: 4.6.2(eslint@9.11.1(jiti@1.21.6)) optionalDependencies: typescript: 5.5.4 transitivePeerDependencies: @@ -3907,37 +4066,37 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0)(eslint@8.57.0): + eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.2.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0)(eslint@9.11.1(jiti@1.21.6)): dependencies: '@nolyfill/is-core-module': 1.0.39 debug: 4.3.6 enhanced-resolve: 5.17.1 - eslint: 8.57.0 - eslint-module-utils: 2.11.0(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0)(eslint@8.57.0))(eslint@8.57.0) + eslint: 9.11.1(jiti@1.21.6) + eslint-module-utils: 2.11.0(@typescript-eslint/parser@7.2.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.2.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0)(eslint@9.11.1(jiti@1.21.6)))(eslint@9.11.1(jiti@1.21.6)) fast-glob: 3.3.2 get-tsconfig: 4.8.0 is-bun-module: 1.2.1 is-glob: 4.0.3 optionalDependencies: - eslint-plugin-import: 2.30.0(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.0) + eslint-plugin-import: 2.30.0(@typescript-eslint/parser@7.2.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.3)(eslint@9.11.1(jiti@1.21.6)) transitivePeerDependencies: - '@typescript-eslint/parser' - eslint-import-resolver-node - eslint-import-resolver-webpack - supports-color - eslint-module-utils@2.11.0(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0)(eslint@8.57.0))(eslint@8.57.0): + eslint-module-utils@2.11.0(@typescript-eslint/parser@7.2.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.2.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0)(eslint@9.11.1(jiti@1.21.6)))(eslint@9.11.1(jiti@1.21.6)): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 7.2.0(eslint@8.57.0)(typescript@5.5.4) - eslint: 8.57.0 + '@typescript-eslint/parser': 7.2.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.5.4) + eslint: 9.11.1(jiti@1.21.6) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.3(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0)(eslint@8.57.0) + eslint-import-resolver-typescript: 3.6.3(@typescript-eslint/parser@7.2.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0)(eslint@9.11.1(jiti@1.21.6)) transitivePeerDependencies: - supports-color - eslint-plugin-import@2.30.0(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.0): + eslint-plugin-import@2.30.0(@typescript-eslint/parser@7.2.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.3)(eslint@9.11.1(jiti@1.21.6)): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.8 @@ -3946,9 +4105,9 @@ snapshots: array.prototype.flatmap: 1.3.2 debug: 3.2.7 doctrine: 2.1.0 - eslint: 8.57.0 + eslint: 9.11.1(jiti@1.21.6) eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.11.0(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0)(eslint@8.57.0))(eslint@8.57.0) + eslint-module-utils: 2.11.0(@typescript-eslint/parser@7.2.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.2.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0)(eslint@9.11.1(jiti@1.21.6)))(eslint@9.11.1(jiti@1.21.6)) hasown: 2.0.2 is-core-module: 2.15.1 is-glob: 4.0.3 @@ -3959,13 +4118,13 @@ snapshots: semver: 6.3.1 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 7.2.0(eslint@8.57.0)(typescript@5.5.4) + '@typescript-eslint/parser': 7.2.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.5.4) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - eslint-plugin-jsx-a11y@6.10.0(eslint@8.57.0): + eslint-plugin-jsx-a11y@6.10.0(eslint@9.11.1(jiti@1.21.6)): dependencies: aria-query: 5.1.3 array-includes: 3.1.8 @@ -3976,7 +4135,7 @@ snapshots: damerau-levenshtein: 1.0.8 emoji-regex: 9.2.2 es-iterator-helpers: 1.0.19 - eslint: 8.57.0 + eslint: 9.11.1(jiti@1.21.6) hasown: 2.0.2 jsx-ast-utils: 3.3.5 language-tags: 1.0.9 @@ -3985,11 +4144,11 @@ snapshots: safe-regex-test: 1.0.3 string.prototype.includes: 2.0.0 - eslint-plugin-react-hooks@4.6.2(eslint@8.57.0): + eslint-plugin-react-hooks@4.6.2(eslint@9.11.1(jiti@1.21.6)): dependencies: - eslint: 8.57.0 + eslint: 9.11.1(jiti@1.21.6) - eslint-plugin-react@7.36.1(eslint@8.57.0): + eslint-plugin-react@7.36.1(eslint@9.11.1(jiti@1.21.6)): dependencies: array-includes: 3.1.8 array.prototype.findlast: 1.2.5 @@ -3997,7 +4156,7 @@ snapshots: array.prototype.tosorted: 1.1.4 doctrine: 2.1.0 es-iterator-helpers: 1.0.19 - eslint: 8.57.0 + eslint: 9.11.1(jiti@1.21.6) estraverse: 5.3.0 hasown: 2.0.2 jsx-ast-utils: 3.3.5 @@ -4011,61 +4170,64 @@ snapshots: string.prototype.matchall: 4.0.11 string.prototype.repeat: 1.0.0 - eslint-scope@7.2.2: + eslint-scope@8.0.2: dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 eslint-visitor-keys@3.4.3: {} - eslint@8.57.0: + eslint-visitor-keys@4.0.0: {} + + eslint@9.11.1(jiti@1.21.6): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.11.1(jiti@1.21.6)) '@eslint-community/regexpp': 4.11.0 - '@eslint/eslintrc': 2.1.4 - '@eslint/js': 8.57.0 - '@humanwhocodes/config-array': 0.11.14 + '@eslint/config-array': 0.18.0 + '@eslint/core': 0.6.0 + '@eslint/eslintrc': 3.1.0 + '@eslint/js': 9.11.1 + '@eslint/plugin-kit': 0.2.0 '@humanwhocodes/module-importer': 1.0.1 + '@humanwhocodes/retry': 0.3.0 '@nodelib/fs.walk': 1.2.8 - '@ungap/structured-clone': 1.2.0 + '@types/estree': 1.0.6 + '@types/json-schema': 7.0.15 ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 debug: 4.3.6 - doctrine: 3.0.0 escape-string-regexp: 4.0.0 - eslint-scope: 7.2.2 - eslint-visitor-keys: 3.4.3 - espree: 9.6.1 + eslint-scope: 8.0.2 + eslint-visitor-keys: 4.0.0 + espree: 10.1.0 esquery: 1.6.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 - file-entry-cache: 6.0.1 + file-entry-cache: 8.0.0 find-up: 5.0.0 glob-parent: 6.0.2 - globals: 13.24.0 - graphemer: 1.4.0 ignore: 5.3.2 imurmurhash: 0.1.4 is-glob: 4.0.3 is-path-inside: 3.0.3 - js-yaml: 4.1.0 json-stable-stringify-without-jsonify: 1.0.1 - levn: 0.4.1 lodash.merge: 4.6.2 minimatch: 3.1.2 natural-compare: 1.4.0 optionator: 0.9.4 strip-ansi: 6.0.1 text-table: 0.2.0 + optionalDependencies: + jiti: 1.21.6 transitivePeerDependencies: - supports-color - espree@9.6.1: + espree@10.1.0: dependencies: acorn: 8.12.1 acorn-jsx: 5.3.2(acorn@8.12.1) - eslint-visitor-keys: 3.4.3 + eslint-visitor-keys: 4.0.0 esquery@1.6.0: dependencies: @@ -4081,7 +4243,7 @@ snapshots: estree-walker@3.0.3: dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 esutils@2.0.3: {} @@ -4117,9 +4279,9 @@ snapshots: dependencies: reusify: 1.0.4 - file-entry-cache@6.0.1: + file-entry-cache@8.0.0: dependencies: - flat-cache: 3.2.0 + flat-cache: 4.0.1 fill-range@7.1.1: dependencies: @@ -4130,11 +4292,10 @@ snapshots: locate-path: 6.0.0 path-exists: 4.0.0 - flat-cache@3.2.0: + flat-cache@4.0.1: dependencies: flatted: 3.3.1 keyv: 4.5.4 - rimraf: 3.0.2 flatted@3.3.1: {} @@ -4147,8 +4308,6 @@ snapshots: cross-spawn: 7.0.3 signal-exit: 4.1.0 - fs.realpath@1.0.0: {} - fsevents@2.3.2: optional: true @@ -4229,18 +4388,9 @@ snapshots: package-json-from-dist: 1.0.0 path-scurry: 2.0.0 - glob@7.2.3: - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 3.1.2 - once: 1.4.0 - path-is-absolute: 1.0.1 + globals@14.0.0: {} - globals@13.24.0: - dependencies: - type-fest: 0.20.2 + globals@15.9.0: {} globalthis@1.0.4: dependencies: @@ -4295,13 +4445,6 @@ snapshots: imurmurhash@0.1.4: {} - inflight@1.0.6: - dependencies: - once: 1.4.0 - wrappy: 1.0.2 - - inherits@2.0.4: {} - internal-slot@1.0.7: dependencies: es-errors: 1.3.0 @@ -4674,10 +4817,6 @@ snapshots: ohash@1.1.4: {} - once@1.4.0: - dependencies: - wrappy: 1.0.2 - onetime@5.1.2: dependencies: mimic-fn: 2.1.0 @@ -4709,8 +4848,6 @@ snapshots: path-exists@4.0.0: {} - path-is-absolute@1.0.1: {} - path-key@3.1.1: {} path-parse@1.0.7: {} @@ -4880,10 +5017,6 @@ snapshots: reusify@1.0.4: {} - rimraf@3.0.2: - dependencies: - glob: 7.2.3 - rollup-plugin-inject@3.0.2: dependencies: estree-walker: 0.6.1 @@ -5225,8 +5358,6 @@ snapshots: dependencies: prelude-ls: 1.2.1 - type-fest@0.20.2: {} - typed-array-buffer@1.0.2: dependencies: call-bind: 1.0.7 @@ -5259,6 +5390,17 @@ snapshots: is-typed-array: 1.1.13 possible-typed-array-names: 1.0.0 + typescript-eslint@8.7.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.5.4): + dependencies: + '@typescript-eslint/eslint-plugin': 8.7.0(@typescript-eslint/parser@8.7.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.5.4))(eslint@9.11.1(jiti@1.21.6))(typescript@5.5.4) + '@typescript-eslint/parser': 8.7.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.5.4) + '@typescript-eslint/utils': 8.7.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.5.4) + optionalDependencies: + typescript: 5.5.4 + transitivePeerDependencies: + - eslint + - supports-color + typescript@5.5.4: {} ufo@1.5.4: {} @@ -5453,8 +5595,6 @@ snapshots: string-width: 5.1.2 strip-ansi: 7.1.0 - wrappy@1.0.2: {} - ws@8.18.0: {} xxhash-wasm@1.0.2: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index c848147f..bd079069 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -8,7 +8,6 @@ catalog: "@types/node": ^22.2.0 "@types/react": ^18 "@types/react-dom": ^18 - "eslint": ^8 "eslint-config-next": 14.2.11 "next": 14.2.11 "react": ^18 @@ -20,3 +19,7 @@ catalog: "esbuild": ^0.23.0 "vitest": ^2.1.1 "ts-morph": ^23.0.0 + "@eslint/js": ^9.11.1 + "eslint": ^9.11.1 + "globals": ^15.9.0 + "typescript-eslint": ^8.7.0 From 152638673cc7da465f630d4aa359d52552bb4d99 Mon Sep 17 00:00:00 2001 From: Dario Piotrowicz Date: Fri, 27 Sep 2024 14:27:09 +0100 Subject: [PATCH 02/10] add prefer-node-protocol eslint rule --- packages/cloudflare/eslint.config.mjs | 11 +- packages/cloudflare/package.json | 1 + packages/cloudflare/tsup.config.ts | 2 +- pnpm-lock.yaml | 398 ++++++++++++++++++++++++++ 4 files changed, 409 insertions(+), 3 deletions(-) diff --git a/packages/cloudflare/eslint.config.mjs b/packages/cloudflare/eslint.config.mjs index 1ba2803e..5ea186d4 100644 --- a/packages/cloudflare/eslint.config.mjs +++ b/packages/cloudflare/eslint.config.mjs @@ -1,6 +1,7 @@ import globals from "globals"; import pluginJs from "@eslint/js"; import tseslint from "typescript-eslint"; +import eslintPluginUnicorn from 'eslint-plugin-unicorn'; export default [ { @@ -10,13 +11,19 @@ export default [ files: ["**/*.{js,mjs,cjs,ts}"], }, { - languageOptions: { globals: globals.node }, + languageOptions: { + globals: globals.node + }, }, pluginJs.configs.recommended, ...tseslint.configs.recommended, { + plugins: { + unicorn: eslintPluginUnicorn, + }, "rules": { - "@typescript-eslint/ban-ts-comment": "off" + "@typescript-eslint/ban-ts-comment": "off", + "unicorn/prefer-node-protocol": "error" } } ]; diff --git a/packages/cloudflare/package.json b/packages/cloudflare/package.json index d24351f4..f42bec10 100644 --- a/packages/cloudflare/package.json +++ b/packages/cloudflare/package.json @@ -43,6 +43,7 @@ "@types/node": "catalog:", "esbuild": "catalog:", "eslint": "catalog:", + "eslint-plugin-unicorn": "^55.0.0", "glob": "catalog:", "globals": "catalog:", "next": "catalog:", diff --git a/packages/cloudflare/tsup.config.ts b/packages/cloudflare/tsup.config.ts index e69b049b..4fe78752 100644 --- a/packages/cloudflare/tsup.config.ts +++ b/packages/cloudflare/tsup.config.ts @@ -1,4 +1,4 @@ -import { cp } from "fs/promises"; +import { cp } from "node:fs/promises"; import { defineConfig } from "tsup"; const cliConfig = defineConfig({ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 27aea872..7928c71a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -173,6 +173,9 @@ importers: eslint: specifier: 'catalog:' version: 9.11.1(jiti@1.21.6) + eslint-plugin-unicorn: + specifier: ^55.0.0 + version: 55.0.0(eslint@9.11.1(jiti@1.21.6)) glob: specifier: 'catalog:' version: 11.0.0 @@ -201,6 +204,18 @@ packages: resolution: {integrity: sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==} engines: {node: '>=10'} + '@babel/code-frame@7.24.7': + resolution: {integrity: sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==} + engines: {node: '>=6.9.0'} + + '@babel/helper-validator-identifier@7.24.7': + resolution: {integrity: sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==} + engines: {node: '>=6.9.0'} + + '@babel/highlight@7.24.7': + resolution: {integrity: sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==} + engines: {node: '>=6.9.0'} + '@cloudflare/kv-asset-handler@0.3.4': resolution: {integrity: sha512-YLPHc8yASwjNkmcDMQMY35yiWjoKAKnhUbPRszBRS0YgH+IXtsMp61j+yTcnCE3oO2DgP0U3iejLC8FTtKDC8Q==} engines: {node: '>=16.13'} @@ -939,6 +954,9 @@ packages: '@types/node@22.2.0': resolution: {integrity: sha512-bm6EG6/pCpkxDf/0gDNDdtDILMOHgaQBVOJGdwsqClnxA3xL6jtMv76rLBc006RVMWbmaf0xbmom4Z/5o2nRkQ==} + '@types/normalize-package-data@2.4.4': + resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} + '@types/prop-types@15.7.12': resolution: {integrity: sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q==} @@ -1121,6 +1139,10 @@ packages: resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==} engines: {node: '>=12'} + ansi-styles@3.2.1: + resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} + engines: {node: '>=4'} + ansi-styles@4.3.0: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} engines: {node: '>=8'} @@ -1223,6 +1245,15 @@ packages: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} + browserslist@4.24.0: + resolution: {integrity: sha512-Rmb62sR1Zpjql25eSanFGEhAxcFwfA1K0GuQcLoaJBAcENegrQut3hYdhXFF1obQfiDyqIW/cLM5HSJ/9k884A==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + + builtin-modules@3.3.0: + resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==} + engines: {node: '>=6'} + bundle-require@5.0.0: resolution: {integrity: sha512-GuziW3fSSmopcx4KRymQEJVbZUfqlCqcq7dvs6TYwKRZiegK/2buMxQTPs6MGlNv50wms1699qYO54R8XfRX4w==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -1252,6 +1283,9 @@ packages: caniuse-lite@1.0.30001651: resolution: {integrity: sha512-9Cf+Xv1jJNe1xPZLGuUXLNkE1BoDkqRqYyFJ9TDYSqhduqA4hu4oR9HluGoWYQC/aj8WHjsGVV+bwkh0+tegRg==} + caniuse-lite@1.0.30001664: + resolution: {integrity: sha512-AmE7k4dXiNKQipgn7a2xg558IRqPN3jMQY/rOsbxDhrd0tyChwbITBfiwtnqz8bi2M5mIWbxAYBvk7W7QBUS2g==} + capnp-ts@0.7.0: resolution: {integrity: sha512-XKxXAC3HVPv7r674zP0VC3RTXz+/JKhfyw94ljvF80yynK6VkTnqE3jMuN8b3dUVmmc43TjyxjW4KTsmB3c86g==} @@ -1259,6 +1293,10 @@ packages: resolution: {integrity: sha512-pT1ZgP8rPNqUgieVaEY+ryQr6Q4HXNg8Ei9UnLUrjN4IA7dvQC5JB+/kxVcPNDHyBcc/26CXPkbNzq3qwrOEKA==} engines: {node: '>=12'} + chalk@2.4.2: + resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} + engines: {node: '>=4'} + chalk@4.1.2: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} engines: {node: '>=10'} @@ -1271,16 +1309,30 @@ packages: resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} engines: {node: '>= 8.10.0'} + ci-info@4.0.0: + resolution: {integrity: sha512-TdHqgGf9odd8SXNuxtUBVx8Nv+qZOejE6qyqiy5NtbYYQOeFa6zmHkxlPzmaLxWWHsU6nJmB7AETdVPi+2NBUg==} + engines: {node: '>=8'} + + clean-regexp@1.0.0: + resolution: {integrity: sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==} + engines: {node: '>=4'} + client-only@0.0.1: resolution: {integrity: sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==} code-block-writer@13.0.2: resolution: {integrity: sha512-XfXzAGiStXSmCIwrkdfvc7FS5Dtj8yelCtyOf2p2skCAfvLd6zu0rGzuS9NSCO3bq1JKpFZ7tbKdKlcd5occQA==} + color-convert@1.9.3: + resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} + color-convert@2.0.1: resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} engines: {node: '>=7.0.0'} + color-name@1.1.3: + resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} + color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} @@ -1299,6 +1351,9 @@ packages: resolution: {integrity: sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==} engines: {node: '>= 0.6'} + core-js-compat@3.38.1: + resolution: {integrity: sha512-JRH6gfXxGmrzF3tZ57lFx97YARxCXPaMzPo6jELZhv88pBH5VXpQ+y0znKGlFnzuaihqhLbefxSJxWJMPtfDzw==} + cross-spawn@7.0.3: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} @@ -1385,6 +1440,9 @@ packages: eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} + electron-to-chromium@1.5.29: + resolution: {integrity: sha512-PF8n2AlIhCKXQ+gTpiJi0VhcHDb69kYX4MtCiivctc2QD3XuNZ/XIOlbGzt7WAjjEev0TtaH6Cu3arZExm5DOw==} + emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} @@ -1395,6 +1453,9 @@ packages: resolution: {integrity: sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==} engines: {node: '>=10.13.0'} + error-ex@1.3.2: + resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} + es-abstract@1.23.3: resolution: {integrity: sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==} engines: {node: '>= 0.4'} @@ -1444,6 +1505,14 @@ packages: engines: {node: '>=18'} hasBin: true + escalade@3.2.0: + resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} + engines: {node: '>=6'} + + escape-string-regexp@1.0.5: + resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} + engines: {node: '>=0.8.0'} + escape-string-regexp@4.0.0: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} @@ -1522,6 +1591,12 @@ packages: peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7 + eslint-plugin-unicorn@55.0.0: + resolution: {integrity: sha512-n3AKiVpY2/uDcGrS3+QsYDkjPfaOrNrsfQxU9nt5nitd9KuvVXrfAvgCO9DYPSfap+Gqjw9EOrXIsBp5tlHZjA==} + engines: {node: '>=18.18'} + peerDependencies: + eslint: '>=8.56.0' + eslint-scope@8.0.2: resolution: {integrity: sha512-6E4xmrTw5wtxnLA5wYL3WDfhZ/1bUBGOXV0zQvVRDOtrR8D0p6W7fs3JweNYhwRYeGvd/1CKX2se0/2s7Q/nJA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1602,6 +1677,10 @@ packages: resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} engines: {node: '>=8'} + find-up@4.1.0: + resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} + engines: {node: '>=8'} + find-up@5.0.0: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} engines: {node: '>=10'} @@ -1714,6 +1793,10 @@ packages: has-bigints@1.0.2: resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} + has-flag@3.0.0: + resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} + engines: {node: '>=4'} + has-flag@4.0.0: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} @@ -1737,6 +1820,9 @@ packages: resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} engines: {node: '>= 0.4'} + hosted-git-info@2.8.9: + resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} + human-signals@2.1.0: resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} engines: {node: '>=10.17.0'} @@ -1753,6 +1839,10 @@ packages: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} engines: {node: '>=0.8.19'} + indent-string@4.0.0: + resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} + engines: {node: '>=8'} + internal-slot@1.0.7: resolution: {integrity: sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==} engines: {node: '>= 0.4'} @@ -1765,6 +1855,9 @@ packages: resolution: {integrity: sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==} engines: {node: '>= 0.4'} + is-arrayish@0.2.1: + resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} + is-async-function@2.0.0: resolution: {integrity: sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==} engines: {node: '>= 0.4'} @@ -1780,6 +1873,10 @@ packages: resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} engines: {node: '>= 0.4'} + is-builtin-module@3.2.1: + resolution: {integrity: sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==} + engines: {node: '>=6'} + is-bun-module@1.2.1: resolution: {integrity: sha512-AmidtEM6D6NmUiLOvvU7+IePxjEjOzra2h0pSrsfSAcXwl/83zLLXDByafUJy9k/rKK0pvXMLdwKwGHlX2Ke6Q==} @@ -1912,9 +2009,21 @@ packages: resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} hasBin: true + jsesc@0.5.0: + resolution: {integrity: sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==} + hasBin: true + + jsesc@3.0.2: + resolution: {integrity: sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==} + engines: {node: '>=6'} + hasBin: true + json-buffer@3.0.1: resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + json-parse-even-better-errors@2.3.1: + resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} + json-schema-traverse@0.4.1: resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} @@ -1958,6 +2067,10 @@ packages: resolution: {integrity: sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + locate-path@5.0.0: + resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} + engines: {node: '>=8'} + locate-path@6.0.0: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} engines: {node: '>=10'} @@ -2008,6 +2121,10 @@ packages: resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} engines: {node: '>=6'} + min-indent@1.0.1: + resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} + engines: {node: '>=4'} + miniflare@3.20240925.0: resolution: {integrity: sha512-2LmQbKHf0n6ertUKhT+Iltixi53giqDH7P71+wCir3OnGyXIODqYwOECx1mSDNhYThpxM2dav8UdPn6SQiMoXw==} engines: {node: '>=16.13'} @@ -2080,6 +2197,12 @@ packages: resolution: {integrity: sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==} engines: {node: '>= 6.13.0'} + node-releases@2.0.18: + resolution: {integrity: sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==} + + normalize-package-data@2.5.0: + resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} + normalize-path@3.0.0: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} @@ -2139,14 +2262,26 @@ packages: resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} engines: {node: '>= 0.8.0'} + p-limit@2.3.0: + resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} + engines: {node: '>=6'} + p-limit@3.1.0: resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} engines: {node: '>=10'} + p-locate@4.1.0: + resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} + engines: {node: '>=8'} + p-locate@5.0.0: resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} engines: {node: '>=10'} + p-try@2.2.0: + resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} + engines: {node: '>=6'} + package-json-from-dist@1.0.0: resolution: {integrity: sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==} @@ -2154,6 +2289,10 @@ packages: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} engines: {node: '>=6'} + parse-json@5.2.0: + resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} + engines: {node: '>=8'} + path-browserify@1.0.1: resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} @@ -2218,6 +2357,10 @@ packages: engines: {node: '>=18'} hasBin: true + pluralize@8.0.0: + resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==} + engines: {node: '>=4'} + possible-typed-array-names@1.0.0: resolution: {integrity: sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==} engines: {node: '>= 0.4'} @@ -2322,6 +2465,14 @@ packages: read-cache@1.0.0: resolution: {integrity: sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==} + read-pkg-up@7.0.1: + resolution: {integrity: sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==} + engines: {node: '>=8'} + + read-pkg@5.2.0: + resolution: {integrity: sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==} + engines: {node: '>=8'} + readdirp@3.6.0: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} engines: {node: '>=8.10.0'} @@ -2330,10 +2481,18 @@ packages: resolution: {integrity: sha512-fmfw4XgoDke3kdI6h4xcUz1dG8uaiv5q9gcEwLS4Pnth2kxT+GZ7YehS1JTMGBQmtV7Y4GFGbs2re2NqhdozUg==} engines: {node: '>= 0.4'} + regexp-tree@0.1.27: + resolution: {integrity: sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==} + hasBin: true + regexp.prototype.flags@1.5.2: resolution: {integrity: sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==} engines: {node: '>= 0.4'} + regjsparser@0.10.0: + resolution: {integrity: sha512-qx+xQGZVsy55CH0a1hiVwHmqjLryfh7wQyF5HO07XJ9f7dQMY/gPQHhlyDkIzJKC+x2fUCpCcUODUUUFrm7SHA==} + hasBin: true + resolve-from@4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} @@ -2394,6 +2553,10 @@ packages: resolution: {integrity: sha512-th5B4L2U+eGLq1TVh7zNRGBapioSORUeymIydxgFpwww9d2qyKvtuPU2jJuHvYAwwqi2Y596QBL3eEqcPEYL8Q==} engines: {node: '>=10'} + semver@5.7.2: + resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} + hasBin: true + semver@6.3.1: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true @@ -2457,6 +2620,18 @@ packages: resolution: {integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==} deprecated: Please use @jridgewell/sourcemap-codec instead + spdx-correct@3.2.0: + resolution: {integrity: sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==} + + spdx-exceptions@2.5.0: + resolution: {integrity: sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==} + + spdx-expression-parse@3.0.1: + resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} + + spdx-license-ids@3.0.20: + resolution: {integrity: sha512-jg25NiDV/1fLtSgEgyvVyDunvaNHbuwF9lfNV17gSmPFAlYzdfNBlLtLzXTevwkPj7DhGbmN9VnmJIgLnhvaBw==} + stackback@0.0.2: resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} @@ -2523,6 +2698,10 @@ packages: resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} engines: {node: '>=6'} + strip-indent@3.0.0: + resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} + engines: {node: '>=8'} + strip-json-comments@3.1.1: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} @@ -2545,6 +2724,10 @@ packages: engines: {node: '>=16 || 14 >=14.17'} hasBin: true + supports-color@5.5.0: + resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} + engines: {node: '>=4'} + supports-color@7.2.0: resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} engines: {node: '>=8'} @@ -2647,6 +2830,14 @@ packages: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} + type-fest@0.6.0: + resolution: {integrity: sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==} + engines: {node: '>=8'} + + type-fest@0.8.1: + resolution: {integrity: sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==} + engines: {node: '>=8'} + typed-array-buffer@1.0.2: resolution: {integrity: sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==} engines: {node: '>= 0.4'} @@ -2693,12 +2884,21 @@ packages: unenv-nightly@2.0.0-20240919-125358-9a64854: resolution: {integrity: sha512-XjsgUTrTHR7iw+k/SRTNjh6EQgwpC9voygnoCJo5kh4hKqsSDHUW84MhL9EsHTNfLctvVBHaSw8e2k3R2fKXsQ==} + update-browserslist-db@1.1.1: + resolution: {integrity: sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==} + hasBin: true + peerDependencies: + browserslist: '>= 4.21.0' + uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + validate-npm-package-license@3.0.4: + resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} + vite-node@2.1.1: resolution: {integrity: sha512-N/mGckI1suG/5wQI35XeR9rsMsPqKXzq1CdUndzVstBj/HvyxxGctwnK6WX43NGt5L3Z5tcRf83g4TITKJhPrA==} engines: {node: ^18.0.0 || >=20.0.0} @@ -2852,6 +3052,20 @@ snapshots: '@alloc/quick-lru@5.2.0': {} + '@babel/code-frame@7.24.7': + dependencies: + '@babel/highlight': 7.24.7 + picocolors: 1.1.0 + + '@babel/helper-validator-identifier@7.24.7': {} + + '@babel/highlight@7.24.7': + dependencies: + '@babel/helper-validator-identifier': 7.24.7 + chalk: 2.4.2 + js-tokens: 4.0.0 + picocolors: 1.1.0 + '@cloudflare/kv-asset-handler@0.3.4': dependencies: mime: 3.0.0 @@ -3311,6 +3525,8 @@ snapshots: dependencies: undici-types: 6.13.0 + '@types/normalize-package-data@2.4.4': {} + '@types/prop-types@15.7.12': {} '@types/react-dom@18.3.0': @@ -3552,6 +3768,10 @@ snapshots: ansi-regex@6.0.1: {} + ansi-styles@3.2.1: + dependencies: + color-convert: 1.9.3 + ansi-styles@4.3.0: dependencies: color-convert: 2.0.1 @@ -3675,6 +3895,15 @@ snapshots: dependencies: fill-range: 7.1.1 + browserslist@4.24.0: + dependencies: + caniuse-lite: 1.0.30001664 + electron-to-chromium: 1.5.29 + node-releases: 2.0.18 + update-browserslist-db: 1.1.1(browserslist@4.24.0) + + builtin-modules@3.3.0: {} + bundle-require@5.0.0(esbuild@0.23.1): dependencies: esbuild: 0.23.1 @@ -3700,6 +3929,8 @@ snapshots: caniuse-lite@1.0.30001651: {} + caniuse-lite@1.0.30001664: {} + capnp-ts@0.7.0: dependencies: debug: 4.3.6 @@ -3715,6 +3946,12 @@ snapshots: loupe: 3.1.1 pathval: 2.0.0 + chalk@2.4.2: + dependencies: + ansi-styles: 3.2.1 + escape-string-regexp: 1.0.5 + supports-color: 5.5.0 + chalk@4.1.2: dependencies: ansi-styles: 4.3.0 @@ -3734,14 +3971,26 @@ snapshots: optionalDependencies: fsevents: 2.3.3 + ci-info@4.0.0: {} + + clean-regexp@1.0.0: + dependencies: + escape-string-regexp: 1.0.5 + client-only@0.0.1: {} code-block-writer@13.0.2: {} + color-convert@1.9.3: + dependencies: + color-name: 1.1.3 + color-convert@2.0.1: dependencies: color-name: 1.1.4 + color-name@1.1.3: {} + color-name@1.1.4: {} commander@4.1.1: {} @@ -3752,6 +4001,10 @@ snapshots: cookie@0.5.0: {} + core-js-compat@3.38.1: + dependencies: + browserslist: 4.24.0 + cross-spawn@7.0.3: dependencies: path-key: 3.1.1 @@ -3845,6 +4098,8 @@ snapshots: eastasianwidth@0.2.0: {} + electron-to-chromium@1.5.29: {} + emoji-regex@8.0.0: {} emoji-regex@9.2.2: {} @@ -3854,6 +4109,10 @@ snapshots: graceful-fs: 4.2.11 tapable: 2.2.1 + error-ex@1.3.2: + dependencies: + is-arrayish: 0.2.1 + es-abstract@1.23.3: dependencies: array-buffer-byte-length: 1.0.1 @@ -4036,6 +4295,10 @@ snapshots: '@esbuild/win32-ia32': 0.23.1 '@esbuild/win32-x64': 0.23.1 + escalade@3.2.0: {} + + escape-string-regexp@1.0.5: {} + escape-string-regexp@4.0.0: {} eslint-config-next@14.2.11(eslint@9.11.1(jiti@1.21.6))(typescript@5.5.4): @@ -4170,6 +4433,26 @@ snapshots: string.prototype.matchall: 4.0.11 string.prototype.repeat: 1.0.0 + eslint-plugin-unicorn@55.0.0(eslint@9.11.1(jiti@1.21.6)): + dependencies: + '@babel/helper-validator-identifier': 7.24.7 + '@eslint-community/eslint-utils': 4.4.0(eslint@9.11.1(jiti@1.21.6)) + ci-info: 4.0.0 + clean-regexp: 1.0.0 + core-js-compat: 3.38.1 + eslint: 9.11.1(jiti@1.21.6) + esquery: 1.6.0 + globals: 15.9.0 + indent-string: 4.0.0 + is-builtin-module: 3.2.1 + jsesc: 3.0.2 + pluralize: 8.0.0 + read-pkg-up: 7.0.1 + regexp-tree: 0.1.27 + regjsparser: 0.10.0 + semver: 7.6.3 + strip-indent: 3.0.0 + eslint-scope@8.0.2: dependencies: esrecurse: 4.3.0 @@ -4287,6 +4570,11 @@ snapshots: dependencies: to-regex-range: 5.0.1 + find-up@4.1.0: + dependencies: + locate-path: 5.0.0 + path-exists: 4.0.0 + find-up@5.0.0: dependencies: locate-path: 6.0.0 @@ -4416,6 +4704,8 @@ snapshots: has-bigints@1.0.2: {} + has-flag@3.0.0: {} + has-flag@4.0.0: {} has-property-descriptors@1.0.2: @@ -4434,6 +4724,8 @@ snapshots: dependencies: function-bind: 1.1.2 + hosted-git-info@2.8.9: {} + human-signals@2.1.0: {} ignore@5.3.2: {} @@ -4445,6 +4737,8 @@ snapshots: imurmurhash@0.1.4: {} + indent-string@4.0.0: {} + internal-slot@1.0.7: dependencies: es-errors: 1.3.0 @@ -4461,6 +4755,8 @@ snapshots: call-bind: 1.0.7 get-intrinsic: 1.2.4 + is-arrayish@0.2.1: {} + is-async-function@2.0.0: dependencies: has-tostringtag: 1.0.2 @@ -4478,6 +4774,10 @@ snapshots: call-bind: 1.0.7 has-tostringtag: 1.0.2 + is-builtin-module@3.2.1: + dependencies: + builtin-modules: 3.3.0 + is-bun-module@1.2.1: dependencies: semver: 7.6.3 @@ -4600,8 +4900,14 @@ snapshots: dependencies: argparse: 2.0.1 + jsesc@0.5.0: {} + + jsesc@3.0.2: {} + json-buffer@3.0.1: {} + json-parse-even-better-errors@2.3.1: {} + json-schema-traverse@0.4.1: {} json-stable-stringify-without-jsonify@1.0.1: {} @@ -4640,6 +4946,10 @@ snapshots: load-tsconfig@0.2.5: {} + locate-path@5.0.0: + dependencies: + p-locate: 4.1.0 + locate-path@6.0.0: dependencies: p-locate: 5.0.0 @@ -4681,6 +4991,8 @@ snapshots: mimic-fn@2.1.0: {} + min-indent@1.0.1: {} + miniflare@3.20240925.0: dependencies: '@cspotcode/source-map-support': 0.8.1 @@ -4764,6 +5076,15 @@ snapshots: node-forge@1.3.1: {} + node-releases@2.0.18: {} + + normalize-package-data@2.5.0: + dependencies: + hosted-git-info: 2.8.9 + resolve: 1.22.8 + semver: 5.7.2 + validate-npm-package-license: 3.0.4 + normalize-path@3.0.0: {} npm-run-path@4.0.1: @@ -4830,20 +5151,37 @@ snapshots: type-check: 0.4.0 word-wrap: 1.2.5 + p-limit@2.3.0: + dependencies: + p-try: 2.2.0 + p-limit@3.1.0: dependencies: yocto-queue: 0.1.0 + p-locate@4.1.0: + dependencies: + p-limit: 2.3.0 + p-locate@5.0.0: dependencies: p-limit: 3.1.0 + p-try@2.2.0: {} + package-json-from-dist@1.0.0: {} parent-module@1.0.1: dependencies: callsites: 3.1.0 + parse-json@5.2.0: + dependencies: + '@babel/code-frame': 7.24.7 + error-ex: 1.3.2 + json-parse-even-better-errors: 2.3.1 + lines-and-columns: 1.2.4 + path-browserify@1.0.1: {} path-exists@4.0.0: {} @@ -4888,6 +5226,8 @@ snapshots: optionalDependencies: fsevents: 2.3.2 + pluralize@8.0.0: {} + possible-typed-array-names@1.0.0: {} postcss-import@15.1.0(postcss@8.4.31): @@ -4974,6 +5314,19 @@ snapshots: dependencies: pify: 2.3.0 + read-pkg-up@7.0.1: + dependencies: + find-up: 4.1.0 + read-pkg: 5.2.0 + type-fest: 0.8.1 + + read-pkg@5.2.0: + dependencies: + '@types/normalize-package-data': 2.4.4 + normalize-package-data: 2.5.0 + parse-json: 5.2.0 + type-fest: 0.6.0 + readdirp@3.6.0: dependencies: picomatch: 2.3.1 @@ -4988,6 +5341,8 @@ snapshots: globalthis: 1.0.4 which-builtin-type: 1.1.4 + regexp-tree@0.1.27: {} + regexp.prototype.flags@1.5.2: dependencies: call-bind: 1.0.7 @@ -4995,6 +5350,10 @@ snapshots: es-errors: 1.3.0 set-function-name: 2.0.2 + regjsparser@0.10.0: + dependencies: + jsesc: 0.5.0 + resolve-from@4.0.0: {} resolve-from@5.0.0: {} @@ -5079,6 +5438,8 @@ snapshots: '@types/node-forge': 1.3.11 node-forge: 1.3.1 + semver@5.7.2: {} + semver@6.3.1: {} semver@7.6.3: {} @@ -5132,6 +5493,20 @@ snapshots: sourcemap-codec@1.4.8: {} + spdx-correct@3.2.0: + dependencies: + spdx-expression-parse: 3.0.1 + spdx-license-ids: 3.0.20 + + spdx-exceptions@2.5.0: {} + + spdx-expression-parse@3.0.1: + dependencies: + spdx-exceptions: 2.5.0 + spdx-license-ids: 3.0.20 + + spdx-license-ids@3.0.20: {} + stackback@0.0.2: {} stacktracey@2.1.8: @@ -5217,6 +5592,10 @@ snapshots: strip-final-newline@2.0.0: {} + strip-indent@3.0.0: + dependencies: + min-indent: 1.0.1 + strip-json-comments@3.1.1: {} styled-jsx@5.1.1(react@18.3.1): @@ -5234,6 +5613,10 @@ snapshots: pirates: 4.0.6 ts-interface-checker: 0.1.13 + supports-color@5.5.0: + dependencies: + has-flag: 3.0.0 + supports-color@7.2.0: dependencies: has-flag: 4.0.0 @@ -5358,6 +5741,10 @@ snapshots: dependencies: prelude-ls: 1.2.1 + type-fest@0.6.0: {} + + type-fest@0.8.1: {} + typed-array-buffer@1.0.2: dependencies: call-bind: 1.0.7 @@ -5425,12 +5812,23 @@ snapshots: pathe: 1.1.2 ufo: 1.5.4 + update-browserslist-db@1.1.1(browserslist@4.24.0): + dependencies: + browserslist: 4.24.0 + escalade: 3.2.0 + picocolors: 1.1.0 + uri-js@4.4.1: dependencies: punycode: 2.3.1 util-deprecate@1.0.2: {} + validate-npm-package-license@3.0.4: + dependencies: + spdx-correct: 3.2.0 + spdx-expression-parse: 3.0.1 + vite-node@2.1.1(@types/node@22.2.0): dependencies: cac: 6.7.14 From 502b5d366bfc42c4570898e999ccecd748b031eb Mon Sep 17 00:00:00 2001 From: Dario Piotrowicz Date: Fri, 27 Sep 2024 14:33:52 +0100 Subject: [PATCH 03/10] enable eslint sort-imports rule --- packages/cloudflare/eslint.config.mjs | 5 +++-- packages/cloudflare/src/cli/args.ts | 2 +- .../cloudflare/src/cli/build/build-worker.ts | 22 +++++++++---------- packages/cloudflare/src/cli/build/index.ts | 4 ++-- .../build/patches/investigated/patch-cache.ts | 2 +- ...get-chunk-installation-identifiers.test.ts | 6 ++--- ...ith-updated-webpack-f-require-code.test.ts | 6 ++--- ...pdated-webpack-chunks-file-content.test.ts | 6 ++--- .../update-webpack-chunks-file/index.ts | 7 +++--- .../to-investigate/inline-eval-manifest.ts | 2 +- .../to-investigate/inline-next-require.ts | 2 +- .../patches/to-investigate/patch-find-dir.ts | 4 ++-- .../patches/to-investigate/patch-read-file.ts | 4 ++-- .../patches/to-investigate/wrangler-deps.ts | 2 +- packages/cloudflare/src/cli/config.ts | 2 +- packages/cloudflare/src/cli/index.ts | 6 ++--- .../cloudflare/src/cli/templates/worker.ts | 12 +++++----- 17 files changed, 43 insertions(+), 51 deletions(-) diff --git a/packages/cloudflare/eslint.config.mjs b/packages/cloudflare/eslint.config.mjs index 5ea186d4..7a8bfeec 100644 --- a/packages/cloudflare/eslint.config.mjs +++ b/packages/cloudflare/eslint.config.mjs @@ -1,7 +1,7 @@ +import eslintPluginUnicorn from 'eslint-plugin-unicorn'; import globals from "globals"; import pluginJs from "@eslint/js"; import tseslint from "typescript-eslint"; -import eslintPluginUnicorn from 'eslint-plugin-unicorn'; export default [ { @@ -23,7 +23,8 @@ export default [ }, "rules": { "@typescript-eslint/ban-ts-comment": "off", - "unicorn/prefer-node-protocol": "error" + "unicorn/prefer-node-protocol": "error", + "sort-imports": "error" } } ]; diff --git a/packages/cloudflare/src/cli/args.ts b/packages/cloudflare/src/cli/args.ts index 44033570..deed6b9a 100644 --- a/packages/cloudflare/src/cli/args.ts +++ b/packages/cloudflare/src/cli/args.ts @@ -1,4 +1,4 @@ -import { mkdirSync, type Stats, statSync } from "node:fs"; +import { type Stats, mkdirSync, statSync } from "node:fs"; import { parseArgs } from "node:util"; import { resolve } from "node:path"; diff --git a/packages/cloudflare/src/cli/build/build-worker.ts b/packages/cloudflare/src/cli/build/build-worker.ts index dca7175f..2acdd63e 100644 --- a/packages/cloudflare/src/cli/build/build-worker.ts +++ b/packages/cloudflare/src/cli/build/build-worker.ts @@ -1,20 +1,18 @@ -import { Config } from "../config"; -import { build, Plugin } from "esbuild"; -import { existsSync, readFileSync } from "node:fs"; +import { Plugin, build } from "esbuild"; import { cp, readFile, writeFile } from "node:fs/promises"; -import path from "node:path"; -import { fileURLToPath } from "node:url"; - -import { patchRequire } from "./patches/investigated/patch-require"; +import { existsSync, readFileSync } from "node:fs"; +import { Config } from "../config"; import { copyPackageCliFiles } from "./patches/investigated/copy-package-cli-files"; - -import { patchReadFile } from "./patches/to-investigate/patch-read-file"; -import { patchFindDir } from "./patches/to-investigate/patch-find-dir"; -import { inlineNextRequire } from "./patches/to-investigate/inline-next-require"; +import { fileURLToPath } from "node:url"; import { inlineEvalManifest } from "./patches/to-investigate/inline-eval-manifest"; +import { inlineNextRequire } from "./patches/to-investigate/inline-next-require"; +import { patchCache } from "./patches/investigated/patch-cache"; +import { patchFindDir } from "./patches/to-investigate/patch-find-dir"; +import { patchReadFile } from "./patches/to-investigate/patch-read-file"; +import { patchRequire } from "./patches/investigated/patch-require"; import { patchWranglerDeps } from "./patches/to-investigate/wrangler-deps"; +import path from "node:path"; import { updateWebpackChunksFile } from "./patches/investigated/update-webpack-chunks-file"; -import { patchCache } from "./patches/investigated/patch-cache"; /** The dist directory of the Cloudflare adapter package */ const packageDistDir = path.join(path.dirname(fileURLToPath(import.meta.url)), ".."); diff --git a/packages/cloudflare/src/cli/build/index.ts b/packages/cloudflare/src/cli/build/index.ts index 34f1c9f3..d28443eb 100644 --- a/packages/cloudflare/src/cli/build/index.ts +++ b/packages/cloudflare/src/cli/build/index.ts @@ -1,9 +1,9 @@ -import { rm } from "node:fs/promises"; +import { containsDotNextDir, getConfig } from "../config"; import { buildNextjsApp } from "./build-next-app"; import { buildWorker } from "./build-worker"; -import { containsDotNextDir, getConfig } from "../config"; import { cpSync } from "node:fs"; import path from "node:path"; +import { rm } from "node:fs/promises"; /** * Builds the application in a format that can be passed to workerd diff --git a/packages/cloudflare/src/cli/build/patches/investigated/patch-cache.ts b/packages/cloudflare/src/cli/build/patches/investigated/patch-cache.ts index 83e8cc4b..3c521d2f 100644 --- a/packages/cloudflare/src/cli/build/patches/investigated/patch-cache.ts +++ b/packages/cloudflare/src/cli/build/patches/investigated/patch-cache.ts @@ -1,5 +1,5 @@ -import path from "node:path"; import { Config } from "../../../config"; +import path from "node:path"; /** * Install the cloudflare KV cache handler diff --git a/packages/cloudflare/src/cli/build/patches/investigated/update-webpack-chunks-file/get-chunk-installation-identifiers.test.ts b/packages/cloudflare/src/cli/build/patches/investigated/update-webpack-chunks-file/get-chunk-installation-identifiers.test.ts index bac3d6e8..90995191 100644 --- a/packages/cloudflare/src/cli/build/patches/investigated/update-webpack-chunks-file/get-chunk-installation-identifiers.test.ts +++ b/packages/cloudflare/src/cli/build/patches/investigated/update-webpack-chunks-file/get-chunk-installation-identifiers.test.ts @@ -1,8 +1,6 @@ -import { readFile } from "node:fs/promises"; - -import { expect, test, describe } from "vitest"; - +import { describe, expect, test } from "vitest"; import { getChunkInstallationIdentifiers } from "./get-chunk-installation-identifiers"; +import { readFile } from "node:fs/promises"; import { tsParseFile } from "../../../utils"; describe("getChunkInstallationIdentifiers", () => { diff --git a/packages/cloudflare/src/cli/build/patches/investigated/update-webpack-chunks-file/get-file-content-with-updated-webpack-f-require-code.test.ts b/packages/cloudflare/src/cli/build/patches/investigated/update-webpack-chunks-file/get-file-content-with-updated-webpack-f-require-code.test.ts index 1edecc38..34e5eb74 100644 --- a/packages/cloudflare/src/cli/build/patches/investigated/update-webpack-chunks-file/get-file-content-with-updated-webpack-f-require-code.test.ts +++ b/packages/cloudflare/src/cli/build/patches/investigated/update-webpack-chunks-file/get-file-content-with-updated-webpack-f-require-code.test.ts @@ -1,8 +1,6 @@ -import { readFile } from "node:fs/promises"; - -import { expect, test, describe } from "vitest"; - +import { describe, expect, test } from "vitest"; import { getFileContentWithUpdatedWebpackFRequireCode } from "./get-file-content-with-updated-webpack-f-require-code"; +import { readFile } from "node:fs/promises"; import { tsParseFile } from "../../../utils"; describe("getFileContentWithUpdatedWebpackFRequireCode", () => { diff --git a/packages/cloudflare/src/cli/build/patches/investigated/update-webpack-chunks-file/get-updated-webpack-chunks-file-content.test.ts b/packages/cloudflare/src/cli/build/patches/investigated/update-webpack-chunks-file/get-updated-webpack-chunks-file-content.test.ts index a03db5bb..e360d370 100644 --- a/packages/cloudflare/src/cli/build/patches/investigated/update-webpack-chunks-file/get-updated-webpack-chunks-file-content.test.ts +++ b/packages/cloudflare/src/cli/build/patches/investigated/update-webpack-chunks-file/get-updated-webpack-chunks-file-content.test.ts @@ -1,8 +1,6 @@ -import { readFile } from "node:fs/promises"; - -import { expect, test, describe } from "vitest"; - +import { describe, expect, test } from "vitest"; import { getUpdatedWebpackChunksFileContent } from "./get-updated-webpack-chunks-file-content"; +import { readFile } from "node:fs/promises"; describe("getUpdatedWebpackChunksFileContent", () => { test("returns the updated content of a webpack runtime chunks unminified file", async () => { diff --git a/packages/cloudflare/src/cli/build/patches/investigated/update-webpack-chunks-file/index.ts b/packages/cloudflare/src/cli/build/patches/investigated/update-webpack-chunks-file/index.ts index 8f3ceaf4..c1fe1bab 100644 --- a/packages/cloudflare/src/cli/build/patches/investigated/update-webpack-chunks-file/index.ts +++ b/packages/cloudflare/src/cli/build/patches/investigated/update-webpack-chunks-file/index.ts @@ -1,8 +1,7 @@ -import { readdirSync, readFileSync, writeFileSync } from "node:fs"; -import path from "node:path"; - -import { Config } from "../../../../cli/config"; +import { readFileSync, readdirSync, writeFileSync } from "node:fs"; +import { Config } from "../../../../config"; import { getUpdatedWebpackChunksFileContent } from "./get-updated-webpack-chunks-file-content"; +import path from "node:path"; /** * Fixes the webpack-runtime.js file by removing its webpack dynamic requires. diff --git a/packages/cloudflare/src/cli/build/patches/to-investigate/inline-eval-manifest.ts b/packages/cloudflare/src/cli/build/patches/to-investigate/inline-eval-manifest.ts index 8565154b..84ca809c 100644 --- a/packages/cloudflare/src/cli/build/patches/to-investigate/inline-eval-manifest.ts +++ b/packages/cloudflare/src/cli/build/patches/to-investigate/inline-eval-manifest.ts @@ -1,6 +1,6 @@ +import { Config } from "../../../config"; import { globSync } from "glob"; import path from "node:path"; -import { Config } from "../../../cli/config"; /** * `evalManifest` relies on readFileSync so we need to patch the function so that it instead returns the content of the manifest files diff --git a/packages/cloudflare/src/cli/build/patches/to-investigate/inline-next-require.ts b/packages/cloudflare/src/cli/build/patches/to-investigate/inline-next-require.ts index 6cf56b79..543ace8c 100644 --- a/packages/cloudflare/src/cli/build/patches/to-investigate/inline-next-require.ts +++ b/packages/cloudflare/src/cli/build/patches/to-investigate/inline-next-require.ts @@ -1,4 +1,4 @@ -import { readFileSync, existsSync } from "node:fs"; +import { existsSync, readFileSync } from "node:fs"; import { Config } from "../../../cli/config"; import path from "node:path"; diff --git a/packages/cloudflare/src/cli/build/patches/to-investigate/patch-find-dir.ts b/packages/cloudflare/src/cli/build/patches/to-investigate/patch-find-dir.ts index 86dd9dad..cbc78d19 100644 --- a/packages/cloudflare/src/cli/build/patches/to-investigate/patch-find-dir.ts +++ b/packages/cloudflare/src/cli/build/patches/to-investigate/patch-find-dir.ts @@ -1,6 +1,6 @@ -import path from "node:path"; -import { Config } from "../../../cli/config"; +import { Config } from "../../../config"; import { existsSync } from "node:fs"; +import path from "node:path"; /** * Here we patch `findDir` so that the next server can detect whether the `app` or `pages` directory exists diff --git a/packages/cloudflare/src/cli/build/patches/to-investigate/patch-read-file.ts b/packages/cloudflare/src/cli/build/patches/to-investigate/patch-read-file.ts index bfc2618b..89560fcd 100644 --- a/packages/cloudflare/src/cli/build/patches/to-investigate/patch-read-file.ts +++ b/packages/cloudflare/src/cli/build/patches/to-investigate/patch-read-file.ts @@ -1,7 +1,7 @@ -import { readFileSync } from "node:fs"; +import { Config } from "../../../config"; import { globSync } from "glob"; -import { Config } from "../../../cli/config"; import path from "node:path"; +import { readFileSync } from "node:fs"; export function patchReadFile(code: string, config: Config): string { console.log("# patchReadFile"); diff --git a/packages/cloudflare/src/cli/build/patches/to-investigate/wrangler-deps.ts b/packages/cloudflare/src/cli/build/patches/to-investigate/wrangler-deps.ts index 1e168950..6240999a 100644 --- a/packages/cloudflare/src/cli/build/patches/to-investigate/wrangler-deps.ts +++ b/packages/cloudflare/src/cli/build/patches/to-investigate/wrangler-deps.ts @@ -1,6 +1,6 @@ -import path from "node:path"; import fs, { writeFileSync } from "node:fs"; import { Config } from "../../../config"; +import path from "node:path"; export function patchWranglerDeps(config: Config) { console.log("# patchWranglerDeps"); diff --git a/packages/cloudflare/src/cli/config.ts b/packages/cloudflare/src/cli/config.ts index f005ee2b..140d40c6 100644 --- a/packages/cloudflare/src/cli/config.ts +++ b/packages/cloudflare/src/cli/config.ts @@ -1,5 +1,5 @@ -import { readdirSync, statSync } from "node:fs"; import path, { relative } from "node:path"; +import { readdirSync, statSync } from "node:fs"; const PACKAGE_NAME = "@opennextjs/cloudflare"; diff --git a/packages/cloudflare/src/cli/index.ts b/packages/cloudflare/src/cli/index.ts index ec96fcf7..24ee2bfa 100644 --- a/packages/cloudflare/src/cli/index.ts +++ b/packages/cloudflare/src/cli/index.ts @@ -1,8 +1,8 @@ #!/usr/bin/env node -import { resolve } from "node:path"; -import { getArgs } from "./args"; -import { existsSync } from "node:fs"; import { build } from "./build"; +import { existsSync } from "node:fs"; +import { getArgs } from "./args"; +import { resolve } from "node:path"; const nextAppDir = resolve("."); diff --git a/packages/cloudflare/src/cli/templates/worker.ts b/packages/cloudflare/src/cli/templates/worker.ts index 6f133cb0..a90d1d15 100644 --- a/packages/cloudflare/src/cli/templates/worker.ts +++ b/packages/cloudflare/src/cli/templates/worker.ts @@ -1,11 +1,11 @@ -import { AsyncLocalStorage } from "node:async_hooks"; -import Stream from "node:stream"; -import type { NextConfig } from "next"; -import { NodeNextRequest, NodeNextResponse } from "next/dist/server/base-http/node"; -import { MockedResponse } from "next/dist/server/lib/mock-request"; import NextNodeServer, { NodeRequestHandler } from "next/dist/server/next-server"; -import type { IncomingMessage } from "node:http"; +import { NodeNextRequest, NodeNextResponse } from "next/dist/server/base-http/node"; +import { AsyncLocalStorage } from "node:async_hooks"; import { type CloudflareContext } from "../../api"; +import type { IncomingMessage } from "node:http"; +import { MockedResponse } from "next/dist/server/lib/mock-request"; +import type { NextConfig } from "next"; +import Stream from "node:stream"; const NON_BODY_RESPONSES = new Set([101, 204, 205, 304]); From 0abde8921aefa41a6d5def4c92d7e5247fa926cc Mon Sep 17 00:00:00 2001 From: Dario Piotrowicz Date: Fri, 27 Sep 2024 14:36:22 +0100 Subject: [PATCH 04/10] add linting to gh workflow --- .github/workflows/prettier.yml | 4 +++- package.json | 1 + packages/cloudflare/package.json | 2 +- packages/cloudflare/src/cli/index.ts | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index 55e3652f..c78583e1 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -1,4 +1,4 @@ -name: Prettier check +name: Code checks on: push: branches: [main] @@ -17,3 +17,5 @@ jobs: run: npm install -g pnpm && pnpm install - name: Check formatting run: pnpm prettier:check + - name: Check linting + run: pnpm lint:check diff --git a/package.json b/package.json index fdffc8c9..4e1bfbe7 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "scripts": { "prettier:check": "prettier --check .", "prettier:fix": "prettier --write .", + "lint:check": "pnpm -r lint:check", "postinstall": "pnpm --filter cloudflare build", "install-playwright": "playwright install --with-deps", "e2e": "pnpm -r e2e", diff --git a/packages/cloudflare/package.json b/packages/cloudflare/package.json index f42bec10..530918b5 100644 --- a/packages/cloudflare/package.json +++ b/packages/cloudflare/package.json @@ -5,7 +5,7 @@ "scripts": { "build": "tsup", "build:watch": "tsup --watch src", - "lint": "eslint", + "lint:check": "eslint", "test": "vitest --run", "test:watch": "vitest" }, diff --git a/packages/cloudflare/src/cli/index.ts b/packages/cloudflare/src/cli/index.ts index 24ee2bfa..38677221 100644 --- a/packages/cloudflare/src/cli/index.ts +++ b/packages/cloudflare/src/cli/index.ts @@ -1,6 +1,6 @@ #!/usr/bin/env node import { build } from "./build"; -import { existsSync } from "node:fs"; +import { existsSync } from "fs"; import { getArgs } from "./args"; import { resolve } from "node:path"; From 4ad6cf4b762f074e12b2557030cacf8809dd3127 Mon Sep 17 00:00:00 2001 From: Dario Piotrowicz Date: Fri, 27 Sep 2024 14:39:42 +0100 Subject: [PATCH 05/10] add lint:fix script and fix lint error --- package.json | 1 + packages/cloudflare/package.json | 1 + packages/cloudflare/src/cli/index.ts | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 4e1bfbe7..af03cd66 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "prettier:check": "prettier --check .", "prettier:fix": "prettier --write .", "lint:check": "pnpm -r lint:check", + "lint:fix": "pnpm -r lint:fix", "postinstall": "pnpm --filter cloudflare build", "install-playwright": "playwright install --with-deps", "e2e": "pnpm -r e2e", diff --git a/packages/cloudflare/package.json b/packages/cloudflare/package.json index 530918b5..bf140b60 100644 --- a/packages/cloudflare/package.json +++ b/packages/cloudflare/package.json @@ -6,6 +6,7 @@ "build": "tsup", "build:watch": "tsup --watch src", "lint:check": "eslint", + "lint:fix": "eslint --fix", "test": "vitest --run", "test:watch": "vitest" }, diff --git a/packages/cloudflare/src/cli/index.ts b/packages/cloudflare/src/cli/index.ts index 38677221..24ee2bfa 100644 --- a/packages/cloudflare/src/cli/index.ts +++ b/packages/cloudflare/src/cli/index.ts @@ -1,6 +1,6 @@ #!/usr/bin/env node import { build } from "./build"; -import { existsSync } from "fs"; +import { existsSync } from "node:fs"; import { getArgs } from "./args"; import { resolve } from "node:path"; From 0c34dcb6e2b5a9405a871fca38a5584635097354 Mon Sep 17 00:00:00 2001 From: Dario Piotrowicz Date: Fri, 27 Sep 2024 14:41:39 +0100 Subject: [PATCH 06/10] move eslint-plugin-unicorn to pnpm catalog --- packages/cloudflare/package.json | 2 +- pnpm-lock.yaml | 5 ++++- pnpm-workspace.yaml | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/cloudflare/package.json b/packages/cloudflare/package.json index bf140b60..39a45531 100644 --- a/packages/cloudflare/package.json +++ b/packages/cloudflare/package.json @@ -44,7 +44,7 @@ "@types/node": "catalog:", "esbuild": "catalog:", "eslint": "catalog:", - "eslint-plugin-unicorn": "^55.0.0", + "eslint-plugin-unicorn": "catalog:", "glob": "catalog:", "globals": "catalog:", "next": "catalog:", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7928c71a..b79ccbf0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -33,6 +33,9 @@ catalogs: eslint-config-next: specifier: 14.2.11 version: 14.2.11 + eslint-plugin-unicorn: + specifier: ^55.0.0 + version: 55.0.0 glob: specifier: ^11.0.0 version: 11.0.0 @@ -174,7 +177,7 @@ importers: specifier: 'catalog:' version: 9.11.1(jiti@1.21.6) eslint-plugin-unicorn: - specifier: ^55.0.0 + specifier: 'catalog:' version: 55.0.0(eslint@9.11.1(jiti@1.21.6)) glob: specifier: 'catalog:' diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index bd079069..b18267ee 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -23,3 +23,4 @@ catalog: "eslint": ^9.11.1 "globals": ^15.9.0 "typescript-eslint": ^8.7.0 + "eslint-plugin-unicorn": ^55.0.0 From 0d471976998d90175d30e924da84ad349e4c883f Mon Sep 17 00:00:00 2001 From: Dario Piotrowicz Date: Fri, 27 Sep 2024 14:44:37 +0100 Subject: [PATCH 07/10] fix formatting --- packages/cloudflare/eslint.config.mjs | 14 +++++++------- packages/cloudflare/src/cli/templates/worker.ts | 5 +++-- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/packages/cloudflare/eslint.config.mjs b/packages/cloudflare/eslint.config.mjs index 7a8bfeec..0fd1be22 100644 --- a/packages/cloudflare/eslint.config.mjs +++ b/packages/cloudflare/eslint.config.mjs @@ -1,18 +1,18 @@ -import eslintPluginUnicorn from 'eslint-plugin-unicorn'; +import eslintPluginUnicorn from "eslint-plugin-unicorn"; import globals from "globals"; import pluginJs from "@eslint/js"; import tseslint from "typescript-eslint"; export default [ { - ignores: ["dist", "**/test-snapshots", "**/test-fixtures"] + ignores: ["dist", "**/test-snapshots", "**/test-fixtures"], }, { files: ["**/*.{js,mjs,cjs,ts}"], }, { languageOptions: { - globals: globals.node + globals: globals.node, }, }, pluginJs.configs.recommended, @@ -21,10 +21,10 @@ export default [ plugins: { unicorn: eslintPluginUnicorn, }, - "rules": { + rules: { "@typescript-eslint/ban-ts-comment": "off", "unicorn/prefer-node-protocol": "error", - "sort-imports": "error" - } - } + "sort-imports": "error", + }, + }, ]; diff --git a/packages/cloudflare/src/cli/templates/worker.ts b/packages/cloudflare/src/cli/templates/worker.ts index a90d1d15..8547d944 100644 --- a/packages/cloudflare/src/cli/templates/worker.ts +++ b/packages/cloudflare/src/cli/templates/worker.ts @@ -68,8 +68,9 @@ export default { function getWrappedStreams(request: Request, ctx: ExecutionContext) { const url = new URL(request.url); - const req = // eslint-disable-next-line @typescript-eslint/no-explicit-any - (request.body ? Stream.Readable.fromWeb(request.body as any) : Stream.Readable.from([])) as IncomingMessage; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const reqBody = request.body && Stream.Readable.fromWeb(request.body as any); + const req = (reqBody ?? Stream.Readable.from([])) as IncomingMessage; req.httpVersion = "1.0"; req.httpVersionMajor = 1; req.httpVersionMinor = 0; From d1c6f9638c52a6b1ba9dfdef3cbc6b9eaf8805e9 Mon Sep 17 00:00:00 2001 From: Dario Piotrowicz Date: Fri, 27 Sep 2024 15:04:32 +0100 Subject: [PATCH 08/10] rename plrettier.yml to checks.yml --- .github/workflows/{prettier.yml => checks.yml} | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) rename .github/workflows/{prettier.yml => checks.yml} (74%) diff --git a/.github/workflows/prettier.yml b/.github/workflows/checks.yml similarity index 74% rename from .github/workflows/prettier.yml rename to .github/workflows/checks.yml index c78583e1..3ee8d3f8 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/checks.yml @@ -15,7 +15,5 @@ jobs: node-version: lts/* - name: Install dependencies run: npm install -g pnpm && pnpm install - - name: Check formatting - run: pnpm prettier:check - - name: Check linting - run: pnpm lint:check + - name: Run code checks + run: pnpm checks From 9ec72f94729c5b52768962babed93b2d41ac2704 Mon Sep 17 00:00:00 2001 From: Dario Piotrowicz Date: Fri, 27 Sep 2024 15:06:04 +0100 Subject: [PATCH 09/10] create single script for prettier+linting --- .github/workflows/checks.yml | 2 +- package.json | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 3ee8d3f8..46c91431 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -16,4 +16,4 @@ jobs: - name: Install dependencies run: npm install -g pnpm && pnpm install - name: Run code checks - run: pnpm checks + run: pnpm code:checks diff --git a/package.json b/package.json index af03cd66..f3988de7 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,8 @@ "prettier:fix": "prettier --write .", "lint:check": "pnpm -r lint:check", "lint:fix": "pnpm -r lint:fix", + "code:checks": "pnpm lint:check ; pnpm lint:check", + "code:fixes": "pnpm prettier:fix && pnpm lint:fix", "postinstall": "pnpm --filter cloudflare build", "install-playwright": "playwright install --with-deps", "e2e": "pnpm -r e2e", From db50089df906b784c2fb1fc9e6d3b1578bdad460 Mon Sep 17 00:00:00 2001 From: Dario Piotrowicz Date: Fri, 27 Sep 2024 16:43:39 +0100 Subject: [PATCH 10/10] Update package.json Co-authored-by: Victor Berchet --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f3988de7..f35e3e32 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "prettier:fix": "prettier --write .", "lint:check": "pnpm -r lint:check", "lint:fix": "pnpm -r lint:fix", - "code:checks": "pnpm lint:check ; pnpm lint:check", + "code:checks": "pnpm lint:check && pnpm lint:check", "code:fixes": "pnpm prettier:fix && pnpm lint:fix", "postinstall": "pnpm --filter cloudflare build", "install-playwright": "playwright install --with-deps",