From 3129410e965a38023b069b8876ac66ae7a7ae689 Mon Sep 17 00:00:00 2001 From: psteinroe Date: Sun, 22 Oct 2023 15:43:46 +0200 Subject: [PATCH] chore: uprade tooling --- docs/package.json | 6 +- docs/pages/postgrest/mutations.mdx | 2 +- docs/pages/storage/queries.mdx | 2 +- examples/react-query/components/ui/button.tsx | 2 +- examples/react-query/components/ui/sheet.tsx | 2 +- examples/react-query/components/ui/toast.tsx | 2 +- examples/react-query/components/ui/toggle.tsx | 2 +- examples/react-query/package.json | 16 +- examples/react-query/pages/_app.tsx | 1 + examples/react-query/pages/use-query.tsx | 2 +- examples/react-query/prettier.config.js | 5 - examples/react-query/types/database.ts | 10 +- examples/swr/components/ui/button.tsx | 2 +- examples/swr/components/ui/sheet.tsx | 2 +- examples/swr/components/ui/toast.tsx | 2 +- examples/swr/components/ui/toggle.tsx | 2 +- examples/swr/package.json | 16 +- examples/swr/pages/_app.tsx | 1 + .../swr/pages/use-infinite-scroll-query.tsx | 2 +- examples/swr/pages/use-pagination-query.tsx | 2 +- examples/swr/prettier.config.js | 5 - examples/swr/types/database.ts | 10 +- package.json | 4 +- packages/eslint-config-custom/package.json | 6 +- .../cursor-pagination-fetcher.spec.ts | 12 +- .../__tests__/database.types.ts | 10 +- .../__tests__/delete-fetcher.spec.ts | 10 +- .../__tests__/delete-item.spec.ts | 4 +- .../build-mutation-fetcher-response.spec.ts | 8 +- .../fetch/build-normalized-query.spec.ts | 38 +- .../fetch/build-select-statement.spec.ts | 10 +- .../__tests__/fetch/dedupe.spec.ts | 2 +- .../postgrest-core/__tests__/fetcher.spec.ts | 12 +- .../__tests__/filter/denormalize.spec.ts | 12 +- .../__tests__/insert-fetcher.spec.ts | 10 +- .../__tests__/lib/find-filters.spec.ts | 30 +- .../__tests__/lib/find-index-ordered.spec.ts | 20 +- .../__tests__/lib/parse-order-by-key.ts | 2 +- .../__tests__/lib/parse-select-param.spec.ts | 8 +- .../__tests__/lib/sorted-comparator.spec.ts | 28 +- .../mutate/build-delete-mutator-fn.spec.ts | 20 +- .../mutate/build-upsert-mutator-fn.spec.ts | 82 +- .../__tests__/mutate/mutate.spec.ts | 8 +- .../__tests__/mutate/upsert.spec.ts | 22 +- .../offset-pagination-fetcher.spec.ts | 20 +- .../postgrest-filter.integration.spec.ts | 54 +- .../__tests__/postgrest-filter.spec.ts | 60 +- .../__tests__/postgrest-parser.spec.ts | 147 +- .../__tests__/postgrest-query-parser.spec.ts | 4 +- .../__tests__/update-fetcher.spec.ts | 6 +- .../__tests__/upsert-fetcher.spec.ts | 8 +- .../__tests__/upsert-item.spec.ts | 4 +- packages/postgrest-core/package.json | 2 +- .../src/cursor-pagination-fetcher.ts | 8 +- packages/postgrest-core/src/delete-fetcher.ts | 10 +- packages/postgrest-core/src/delete-item.ts | 2 +- .../fetch/build-mutation-fetcher-response.ts | 12 +- .../src/fetch/build-normalized-query.ts | 10 +- packages/postgrest-core/src/fetch/dedupe.ts | 4 +- packages/postgrest-core/src/fetcher.ts | 2 +- .../postgrest-core/src/filter/denormalize.ts | 8 +- packages/postgrest-core/src/insert-fetcher.ts | 12 +- .../postgrest-core/src/lib/binary-search.ts | 2 +- .../src/lib/cache-data-types.ts | 6 +- .../postgrest-core/src/lib/encode-object.ts | 2 +- .../src/lib/extract-paths-from-filter.ts | 2 +- .../lib/filter-filter-definitions-by-paths.ts | 2 +- .../postgrest-core/src/lib/find-filters.ts | 2 +- .../src/lib/find-index-ordered.ts | 2 +- .../postgrest-core/src/lib/find-last-index.ts | 2 +- packages/postgrest-core/src/lib/get-table.ts | 2 +- packages/postgrest-core/src/lib/get.ts | 2 +- .../src/lib/group-paths-recursive.ts | 2 +- .../src/lib/is-iso-date-string.ts | 2 +- .../src/lib/is-postgrest-builder.ts | 2 +- .../postgrest-core/src/lib/mutator-types.ts | 2 +- packages/postgrest-core/src/lib/operators.ts | 4 +- .../src/lib/parse-select-param.ts | 10 +- .../postgrest-core/src/lib/query-types.ts | 8 +- .../postgrest-core/src/lib/response-types.ts | 6 +- .../src/lib/set-filter-value.ts | 2 +- .../src/lib/sort-search-param.ts | 2 +- .../src/lib/sorted-comparator.ts | 10 +- .../src/mutate/build-delete-mutator-fn.ts | 20 +- .../src/mutate/build-upsert-mutator-fn.ts | 24 +- packages/postgrest-core/src/mutate/mutate.ts | 22 +- .../postgrest-core/src/mutate/transformers.ts | 10 +- .../src/offset-pagination-fetcher.ts | 10 +- .../postgrest-core/src/postgrest-filter.ts | 26 +- .../postgrest-core/src/postgrest-parser.ts | 4 +- .../src/postgrest-query-parser.ts | 12 +- packages/postgrest-core/src/update-fetcher.ts | 10 +- packages/postgrest-core/src/upsert-fetcher.ts | 12 +- packages/postgrest-core/src/upsert-item.ts | 2 +- .../use-delete-mutation.integration.spec.tsx | 20 +- .../use-insert-mutation.integration.spec.tsx | 6 +- .../use-update-mutation.integration.spec.tsx | 10 +- .../use-upsert-mutation.integration.spec.tsx | 6 +- .../query/use-query.integration.spec.tsx | 12 +- ...se-subscription-query-integration.spec.tsx | 10 +- .../use-subscription.integration.spec.tsx | 6 +- .../postgrest-react-query/__tests__/utils.tsx | 2 +- packages/postgrest-react-query/package.json | 2 +- .../src/cache/use-delete-item.ts | 4 +- .../src/cache/use-upsert-item.ts | 4 +- .../src/lib/use-postgrest-filter-cache.ts | 2 +- .../src/lib/use-queries-for-table-loader.ts | 2 +- .../src/mutate/get-user-response.ts | 2 +- .../postgrest-react-query/src/mutate/types.ts | 20 +- .../src/mutate/use-delete-mutation.ts | 16 +- .../src/mutate/use-insert-mutation.ts | 22 +- .../src/mutate/use-update-mutation.ts | 16 +- .../src/mutate/use-upsert-mutation.ts | 20 +- .../src/query/use-query.ts | 16 +- .../src/subscribe/use-subscription-query.ts | 18 +- .../src/subscribe/use-subscription.ts | 8 +- .../postgrest-swr/__tests__/database.types.ts | 10 +- .../__tests__/lib/get-mutable-keys.spec.ts | 2 +- .../use-delete-mutation.integration.spec.tsx | 20 +- .../use-insert-mutation.integration.spec.tsx | 6 +- .../use-update-mutation.integration.spec.tsx | 14 +- .../use-upsert-mutation.integration.spec.tsx | 6 +- .../use-cursor-infinite-scroll-query.spec.tsx | 58 +- ...offset-infinite-query.integration.spec.tsx | 12 +- ...infinite-scroll-query.integration.spec.tsx | 16 +- .../use-pagination-query.integration.spec.tsx | 22 +- .../query/use-query.integration.spec.tsx | 26 +- ...se-subscription-query.integration.spec.tsx | 10 +- .../use-subscription.integration.spec.tsx | 6 +- packages/postgrest-swr/__tests__/utils.tsx | 2 +- packages/postgrest-swr/package.json | 2 +- .../src/cache/use-delete-item.ts | 4 +- .../src/cache/use-upsert-item.ts | 4 +- .../src/lib/create-key-getter.ts | 20 +- packages/postgrest-swr/src/lib/encode.ts | 2 +- packages/postgrest-swr/src/lib/middleware.ts | 6 +- .../src/lib/use-postgrest-filter-cache.ts | 2 +- packages/postgrest-swr/src/mutate/types.ts | 20 +- .../src/mutate/use-delete-mutation.ts | 20 +- .../src/mutate/use-insert-mutation.ts | 24 +- .../src/mutate/use-update-mutation.ts | 20 +- .../src/mutate/use-upsert-mutation.ts | 24 +- .../query/use-cursor-infinite-scroll-query.ts | 28 +- .../use-infinite-offset-pagination-query.ts | 22 +- .../src/query/use-offset-infinite-query.ts | 12 +- .../query/use-offset-infinite-scroll-query.ts | 22 +- packages/postgrest-swr/src/query/use-query.ts | 22 +- .../src/subscribe/use-subscription-query.ts | 20 +- .../src/subscribe/use-subscription.ts | 8 +- packages/prettier-config/package.json | 2 +- .../__tests__/directory-fetcher.spec.ts | 10 +- .../__tests__/directory-urls-fetcher.spec.ts | 28 +- .../__tests__/remove-directory.spec.ts | 14 +- .../__tests__/remove-files.spec.ts | 12 +- .../storage-core/__tests__/upload.spec.ts | 58 +- .../__tests__/url-fetcher.spec.ts | 38 +- packages/storage-core/__tests__/utils.ts | 10 +- packages/storage-core/package.json | 2 +- .../storage-core/src/directory-fetcher.ts | 2 +- .../src/directory-urls-fetcher.ts | 4 +- packages/storage-core/src/mutate-paths.ts | 6 +- packages/storage-core/src/upload.ts | 8 +- packages/storage-core/src/url-fetcher.ts | 8 +- .../__tests__/lib/key.spec.ts | 2 +- .../mutate/use-remove-directory.spec.tsx | 8 +- .../mutate/use-remove-files.spec.tsx | 8 +- .../__tests__/mutate/use-upload.spec.tsx | 12 +- .../query/use-directory-urls.spec.tsx | 8 +- .../__tests__/query/use-directory.spec.tsx | 8 +- .../__tests__/query/use-file-url.spec.tsx | 4 +- .../storage-react-query/__tests__/utils.tsx | 14 +- packages/storage-react-query/package.json | 2 +- .../src/mutate/use-remove-directory.ts | 4 +- .../src/mutate/use-remove-files.ts | 4 +- .../src/mutate/use-upload.ts | 6 +- .../src/query/use-directory-urls.ts | 4 +- .../src/query/use-directory.ts | 4 +- .../src/query/use-file-url.ts | 4 +- .../storage-swr/__tests__/lib/key.spec.ts | 2 +- .../mutate/use-remove-directory.spec.tsx | 8 +- .../mutate/use-remove-files.spec.tsx | 8 +- .../__tests__/mutate/use-upload.spec.tsx | 12 +- .../query/use-directory-urls.spec.tsx | 12 +- .../__tests__/query/use-directory.spec.tsx | 12 +- .../__tests__/query/use-file-url.spec.tsx | 8 +- packages/storage-swr/__tests__/utils.tsx | 14 +- packages/storage-swr/package.json | 2 +- .../src/mutate/use-remove-directory.ts | 8 +- .../src/mutate/use-remove-files.ts | 8 +- packages/storage-swr/src/mutate/use-upload.ts | 10 +- .../src/query/use-directory-urls.ts | 6 +- .../storage-swr/src/query/use-directory.ts | 6 +- .../storage-swr/src/query/use-file-url.ts | 7 +- pnpm-lock.yaml | 1939 ++++++----------- 194 files changed, 1725 insertions(+), 2400 deletions(-) diff --git a/docs/package.json b/docs/package.json index 5a638169..2e6b966a 100644 --- a/docs/package.json +++ b/docs/package.json @@ -17,8 +17,8 @@ "@types/react": "18.2.0", "@types/react-dom": "^18.0.7", "@vercel/analytics": "^1.0.0", - "eslint": "8.40.0", - "eslint-config-next": "13.5.0", + "eslint": "8.52.0", + "eslint-config-next": "13.5.6", "next": "^13.1.6", "nextra": "^2.2.19", "nextra-theme-docs": "^2.2.19", @@ -29,6 +29,6 @@ "devDependencies": { "autoprefixer": "^10.4.13", "postcss": "^8.4.14", - "tailwindcss": "^3.1.7" + "tailwindcss": "3.3.3" } } diff --git a/docs/pages/postgrest/mutations.mdx b/docs/pages/postgrest/mutations.mdx index 65a1f55d..4effaae6 100644 --- a/docs/pages/postgrest/mutations.mdx +++ b/docs/pages/postgrest/mutations.mdx @@ -33,7 +33,7 @@ Note that the cache would not be updated if the returned item does not contain ` const { trigger: insert } = useInsertMutation( client.from("contact"), ["id"], - "name" + "name", ); ``` diff --git a/docs/pages/storage/queries.mdx b/docs/pages/storage/queries.mdx index cfc612c9..54c2cf5f 100644 --- a/docs/pages/storage/queries.mdx +++ b/docs/pages/storage/queries.mdx @@ -8,7 +8,7 @@ The cache helpers query hooks wrap the data fetching hooks of the cache librarie useFileUrl( client.storage.from("public_contact_files"), "postgrest-storage-file-url-94/1.jpg", - "public" + "public", ); ``` diff --git a/examples/react-query/components/ui/button.tsx b/examples/react-query/components/ui/button.tsx index 65172532..69e03618 100644 --- a/examples/react-query/components/ui/button.tsx +++ b/examples/react-query/components/ui/button.tsx @@ -1,5 +1,5 @@ import * as React from "react" -import { VariantProps, cva } from "class-variance-authority" +import { cva, VariantProps } from "class-variance-authority" import { cn } from "@/lib/utils" diff --git a/examples/react-query/components/ui/sheet.tsx b/examples/react-query/components/ui/sheet.tsx index 75545b74..72136e48 100644 --- a/examples/react-query/components/ui/sheet.tsx +++ b/examples/react-query/components/ui/sheet.tsx @@ -2,7 +2,7 @@ import * as React from "react" import * as SheetPrimitive from "@radix-ui/react-dialog" -import { VariantProps, cva } from "class-variance-authority" +import { cva, VariantProps } from "class-variance-authority" import { X } from "lucide-react" import { cn } from "@/lib/utils" diff --git a/examples/react-query/components/ui/toast.tsx b/examples/react-query/components/ui/toast.tsx index b7387e4f..a22e47b4 100644 --- a/examples/react-query/components/ui/toast.tsx +++ b/examples/react-query/components/ui/toast.tsx @@ -1,6 +1,6 @@ import * as React from "react" import * as ToastPrimitives from "@radix-ui/react-toast" -import { VariantProps, cva } from "class-variance-authority" +import { cva, VariantProps } from "class-variance-authority" import { X } from "lucide-react" import { cn } from "@/lib/utils" diff --git a/examples/react-query/components/ui/toggle.tsx b/examples/react-query/components/ui/toggle.tsx index 4e72bcae..f4796355 100644 --- a/examples/react-query/components/ui/toggle.tsx +++ b/examples/react-query/components/ui/toggle.tsx @@ -2,7 +2,7 @@ import * as React from "react" import * as TogglePrimitive from "@radix-ui/react-toggle" -import { VariantProps, cva } from "class-variance-authority" +import { cva, VariantProps } from "class-variance-authority" import { cn } from "@/lib/utils" diff --git a/examples/react-query/package.json b/examples/react-query/package.json index 43a81a14..e251aca9 100644 --- a/examples/react-query/package.json +++ b/examples/react-query/package.json @@ -65,21 +65,21 @@ "zod": "^3.21.4" }, "devDependencies": { - "@ianvs/prettier-plugin-sort-imports": "^3.7.1", + "@ianvs/prettier-plugin-sort-imports": "4.1.1", "@types/node": "^17.0.12", "@types/react": "^18.0.22", "@types/react-dom": "^18.0.7", "@types/uuid": "^9.0.2", "autoprefixer": "^10.4.13", "dotenv": "16.0.1", - "eslint": "^8.31.0", - "eslint-config-next": "13.0.0", - "eslint-config-prettier": "^8.3.0", - "eslint-plugin-react": "^7.31.11", - "eslint-plugin-tailwindcss": "^3.8.0", + "eslint": "8.52.0", + "eslint-config-next": "13.5.6", + "eslint-config-prettier": "9.0.0", + "eslint-plugin-react": "7.33.2", + "eslint-plugin-tailwindcss": "3.13.0", "postcss": "^8.4.14", - "prettier": "2.8.8", - "tailwindcss": "^3.1.7", + "prettier": "3.0.3", + "tailwindcss": "3.3.3", "typescript": "5.2.2" } } diff --git a/examples/react-query/pages/_app.tsx b/examples/react-query/pages/_app.tsx index 5cd269c6..2c05e4a8 100644 --- a/examples/react-query/pages/_app.tsx +++ b/examples/react-query/pages/_app.tsx @@ -5,6 +5,7 @@ import { Analytics } from "@vercel/analytics/react" import { ThemeProvider } from "next-themes" import "@/styles/globals.css" + import { useState } from "react" import Head from "next/head" import { createBrowserSupabaseClient } from "@supabase/auth-helpers-nextjs" diff --git a/examples/react-query/pages/use-query.tsx b/examples/react-query/pages/use-query.tsx index 4eadfd99..8b853352 100644 --- a/examples/react-query/pages/use-query.tsx +++ b/examples/react-query/pages/use-query.tsx @@ -6,9 +6,9 @@ import { z } from "zod" import { Database } from "@/types/database" import { + continentEnumSchema, UpsertContactFormData, UpsertContactModal, - continentEnumSchema, } from "@/components/contact/upsert-contact.modal" import { Layout } from "@/components/layout" import { Code } from "@/components/typography/code" diff --git a/examples/react-query/prettier.config.js b/examples/react-query/prettier.config.js index 7c73d8fa..24e98d8f 100644 --- a/examples/react-query/prettier.config.js +++ b/examples/react-query/prettier.config.js @@ -18,11 +18,6 @@ module.exports = { "^@/styles/(.*)$", "^[./]", ], - importOrderSeparation: false, - importOrderSortSpecifiers: true, - importOrderBuiltinModulesToTop: true, importOrderParserPlugins: ["typescript", "jsx", "decorators-legacy"], - importOrderMergeDuplicateImports: true, - importOrderCombineTypeAndValueImports: true, plugins: ["@ianvs/prettier-plugin-sort-imports"], } diff --git a/examples/react-query/types/database.ts b/examples/react-query/types/database.ts index 845e8ed3..141a7271 100644 --- a/examples/react-query/types/database.ts +++ b/examples/react-query/types/database.ts @@ -87,7 +87,7 @@ export interface Database { columns: ["country"] referencedRelation: "country" referencedColumns: ["code"] - } + }, ] } contact_note: { @@ -115,7 +115,7 @@ export interface Database { columns: ["contact_id"] referencedRelation: "contact" referencedColumns: ["id"] - } + }, ] } continent: { @@ -164,7 +164,7 @@ export interface Database { columns: ["continent_code"] referencedRelation: "continent" referencedColumns: ["code"] - } + }, ] } } @@ -228,7 +228,7 @@ export interface Database { columns: ["owner"] referencedRelation: "users" referencedColumns: ["id"] - } + }, ] } migrations: { @@ -301,7 +301,7 @@ export interface Database { columns: ["owner"] referencedRelation: "users" referencedColumns: ["id"] - } + }, ] } } diff --git a/examples/swr/components/ui/button.tsx b/examples/swr/components/ui/button.tsx index 65172532..69e03618 100644 --- a/examples/swr/components/ui/button.tsx +++ b/examples/swr/components/ui/button.tsx @@ -1,5 +1,5 @@ import * as React from "react" -import { VariantProps, cva } from "class-variance-authority" +import { cva, VariantProps } from "class-variance-authority" import { cn } from "@/lib/utils" diff --git a/examples/swr/components/ui/sheet.tsx b/examples/swr/components/ui/sheet.tsx index 75545b74..72136e48 100644 --- a/examples/swr/components/ui/sheet.tsx +++ b/examples/swr/components/ui/sheet.tsx @@ -2,7 +2,7 @@ import * as React from "react" import * as SheetPrimitive from "@radix-ui/react-dialog" -import { VariantProps, cva } from "class-variance-authority" +import { cva, VariantProps } from "class-variance-authority" import { X } from "lucide-react" import { cn } from "@/lib/utils" diff --git a/examples/swr/components/ui/toast.tsx b/examples/swr/components/ui/toast.tsx index b7387e4f..a22e47b4 100644 --- a/examples/swr/components/ui/toast.tsx +++ b/examples/swr/components/ui/toast.tsx @@ -1,6 +1,6 @@ import * as React from "react" import * as ToastPrimitives from "@radix-ui/react-toast" -import { VariantProps, cva } from "class-variance-authority" +import { cva, VariantProps } from "class-variance-authority" import { X } from "lucide-react" import { cn } from "@/lib/utils" diff --git a/examples/swr/components/ui/toggle.tsx b/examples/swr/components/ui/toggle.tsx index 4e72bcae..f4796355 100644 --- a/examples/swr/components/ui/toggle.tsx +++ b/examples/swr/components/ui/toggle.tsx @@ -2,7 +2,7 @@ import * as React from "react" import * as TogglePrimitive from "@radix-ui/react-toggle" -import { VariantProps, cva } from "class-variance-authority" +import { cva, VariantProps } from "class-variance-authority" import { cn } from "@/lib/utils" diff --git a/examples/swr/package.json b/examples/swr/package.json index e553b372..32f0973e 100644 --- a/examples/swr/package.json +++ b/examples/swr/package.json @@ -66,21 +66,21 @@ "zod": "^3.21.4" }, "devDependencies": { - "@ianvs/prettier-plugin-sort-imports": "^3.7.1", + "@ianvs/prettier-plugin-sort-imports": "4.1.1", "@types/node": "^17.0.12", "@types/react": "^18.0.22", "@types/react-dom": "^18.0.7", "@types/uuid": "^9.0.2", "autoprefixer": "^10.4.13", "dotenv": "16.0.1", - "eslint": "^8.31.0", - "eslint-config-next": "13.0.0", - "eslint-config-prettier": "^8.3.0", - "eslint-plugin-react": "^7.31.11", - "eslint-plugin-tailwindcss": "^3.8.0", + "eslint": "8.52.0", + "eslint-config-next": "13.5.6", + "eslint-config-prettier": "9.0.0", + "eslint-plugin-react": "7.33.2", + "eslint-plugin-tailwindcss": "3.13.0", "postcss": "^8.4.14", - "prettier": "2.8.8", - "tailwindcss": "^3.1.7", + "prettier": "3.0.3", + "tailwindcss": "3.3.3", "typescript": "^5.2.2" } } diff --git a/examples/swr/pages/_app.tsx b/examples/swr/pages/_app.tsx index 757a6065..39eda1a3 100644 --- a/examples/swr/pages/_app.tsx +++ b/examples/swr/pages/_app.tsx @@ -4,6 +4,7 @@ import { Analytics } from "@vercel/analytics/react" import { ThemeProvider } from "next-themes" import "@/styles/globals.css" + import { useState } from "react" import Head from "next/head" import { createBrowserSupabaseClient } from "@supabase/auth-helpers-nextjs" diff --git a/examples/swr/pages/use-infinite-scroll-query.tsx b/examples/swr/pages/use-infinite-scroll-query.tsx index ac27db91..56b6b27f 100644 --- a/examples/swr/pages/use-infinite-scroll-query.tsx +++ b/examples/swr/pages/use-infinite-scroll-query.tsx @@ -7,9 +7,9 @@ import { z } from "zod" import { Database } from "@/types/database" import { + continentEnumSchema, UpsertContactFormData, UpsertContactModal, - continentEnumSchema, } from "@/components/contact/upsert-contact.modal" import { Layout } from "@/components/layout" import { Code } from "@/components/typography/code" diff --git a/examples/swr/pages/use-pagination-query.tsx b/examples/swr/pages/use-pagination-query.tsx index 72da9fda..8120d4ae 100644 --- a/examples/swr/pages/use-pagination-query.tsx +++ b/examples/swr/pages/use-pagination-query.tsx @@ -7,9 +7,9 @@ import { z } from "zod" import { Database } from "@/types/database" import { + continentEnumSchema, UpsertContactFormData, UpsertContactModal, - continentEnumSchema, } from "@/components/contact/upsert-contact.modal" import { Layout } from "@/components/layout" import { Code } from "@/components/typography/code" diff --git a/examples/swr/prettier.config.js b/examples/swr/prettier.config.js index 7c73d8fa..24e98d8f 100644 --- a/examples/swr/prettier.config.js +++ b/examples/swr/prettier.config.js @@ -18,11 +18,6 @@ module.exports = { "^@/styles/(.*)$", "^[./]", ], - importOrderSeparation: false, - importOrderSortSpecifiers: true, - importOrderBuiltinModulesToTop: true, importOrderParserPlugins: ["typescript", "jsx", "decorators-legacy"], - importOrderMergeDuplicateImports: true, - importOrderCombineTypeAndValueImports: true, plugins: ["@ianvs/prettier-plugin-sort-imports"], } diff --git a/examples/swr/types/database.ts b/examples/swr/types/database.ts index 845e8ed3..141a7271 100644 --- a/examples/swr/types/database.ts +++ b/examples/swr/types/database.ts @@ -87,7 +87,7 @@ export interface Database { columns: ["country"] referencedRelation: "country" referencedColumns: ["code"] - } + }, ] } contact_note: { @@ -115,7 +115,7 @@ export interface Database { columns: ["contact_id"] referencedRelation: "contact" referencedColumns: ["id"] - } + }, ] } continent: { @@ -164,7 +164,7 @@ export interface Database { columns: ["continent_code"] referencedRelation: "continent" referencedColumns: ["code"] - } + }, ] } } @@ -228,7 +228,7 @@ export interface Database { columns: ["owner"] referencedRelation: "users" referencedColumns: ["id"] - } + }, ] } migrations: { @@ -301,7 +301,7 @@ export interface Database { columns: ["owner"] referencedRelation: "users" referencedColumns: ["id"] - } + }, ] } } diff --git a/package.json b/package.json index f98b6f9f..8121d206 100644 --- a/package.json +++ b/package.json @@ -28,8 +28,8 @@ "ci:release": "changeset publish" }, "devDependencies": { - "eslint": "8.40.0", - "prettier": "2.8.8", + "eslint": "8.52.0", + "prettier": "3.0.3", "@changesets/cli": "2.26.0", "turbo": "latest" }, diff --git a/packages/eslint-config-custom/package.json b/packages/eslint-config-custom/package.json index 2240ef41..db6f8134 100644 --- a/packages/eslint-config-custom/package.json +++ b/packages/eslint-config-custom/package.json @@ -6,9 +6,9 @@ "main": "index.js", "license": "MIT", "dependencies": { - "eslint": "^8.0.0", - "eslint-config-turbo": "latest", - "eslint-config-universe": "11.3.0" + "eslint": "8.52.0", + "eslint-config-turbo": "1.10.16", + "eslint-config-universe": "12.0.0" }, "devDependencies": { "typescript": "5.2.2" diff --git a/packages/postgrest-core/__tests__/cursor-pagination-fetcher.spec.ts b/packages/postgrest-core/__tests__/cursor-pagination-fetcher.spec.ts index a82b7c94..dbf4b467 100644 --- a/packages/postgrest-core/__tests__/cursor-pagination-fetcher.spec.ts +++ b/packages/postgrest-core/__tests__/cursor-pagination-fetcher.spec.ts @@ -1,7 +1,7 @@ import { createClient, SupabaseClient } from '@supabase/supabase-js'; -import { createCursorPaginationFetcher } from '../src/cursor-pagination-fetcher'; import { Database } from './database.types'; +import { createCursorPaginationFetcher } from '../src/cursor-pagination-fetcher'; import './utils'; @@ -16,7 +16,7 @@ describe('cursor-pagination-fetcher', () => { testRunPrefix = `${TEST_PREFIX}-${Math.floor(Math.random() * 100)}`; client = createClient( process.env.SUPABASE_URL as string, - process.env.SUPABASE_ANON_KEY as string + process.env.SUPABASE_ANON_KEY as string, ); await client.from('contact').delete().ilike('username', `${TEST_PREFIX}%`); @@ -40,7 +40,7 @@ describe('cursor-pagination-fetcher', () => { createCursorPaginationFetcher(null, (key) => ({ cursor: `${testRunPrefix}-username-2`, order: { column: 'username', ascending: true, nullsFirst: false }, - })) + })), ).toEqual(null); }); @@ -56,7 +56,7 @@ describe('cursor-pagination-fetcher', () => { cursor: undefined, order: { column: 'username', ascending: true, nullsFirst: false }, - }) + }), ); expect(fetcher).toBeDefined(); const data = await fetcher!(''); @@ -78,7 +78,7 @@ describe('cursor-pagination-fetcher', () => { (key) => ({ cursor: `${testRunPrefix}-username-2`, order: { column: 'username', ascending: true, nullsFirst: false }, - }) + }), ); expect(fetcher).toBeDefined(); const data = await fetcher!(''); @@ -100,7 +100,7 @@ describe('cursor-pagination-fetcher', () => { (key) => ({ cursor: `${testRunPrefix}-username-3`, order: { column: 'username', ascending: false, nullsFirst: false }, - }) + }), ); expect(fetcher).toBeDefined(); const data = await fetcher!(''); diff --git a/packages/postgrest-core/__tests__/database.types.ts b/packages/postgrest-core/__tests__/database.types.ts index f2de0d8a..a106d52e 100644 --- a/packages/postgrest-core/__tests__/database.types.ts +++ b/packages/postgrest-core/__tests__/database.types.ts @@ -87,7 +87,7 @@ export interface Database { columns: ['country']; referencedRelation: 'country'; referencedColumns: ['code']; - } + }, ]; }; contact_note: { @@ -115,7 +115,7 @@ export interface Database { columns: ['contact_id']; referencedRelation: 'contact'; referencedColumns: ['id']; - } + }, ]; }; continent: { @@ -164,7 +164,7 @@ export interface Database { columns: ['continent_code']; referencedRelation: 'continent'; referencedColumns: ['code']; - } + }, ]; }; }; @@ -228,7 +228,7 @@ export interface Database { columns: ['owner']; referencedRelation: 'users'; referencedColumns: ['id']; - } + }, ]; }; migrations: { @@ -301,7 +301,7 @@ export interface Database { columns: ['owner']; referencedRelation: 'users'; referencedColumns: ['id']; - } + }, ]; }; }; diff --git a/packages/postgrest-core/__tests__/delete-fetcher.spec.ts b/packages/postgrest-core/__tests__/delete-fetcher.spec.ts index e8a88e48..ce2b9c27 100644 --- a/packages/postgrest-core/__tests__/delete-fetcher.spec.ts +++ b/packages/postgrest-core/__tests__/delete-fetcher.spec.ts @@ -1,7 +1,7 @@ import { createClient, SupabaseClient } from '@supabase/supabase-js'; -import { buildDeleteFetcher } from '../src/delete-fetcher'; import { Database } from './database.types'; +import { buildDeleteFetcher } from '../src/delete-fetcher'; import './utils'; const TEST_PREFIX = 'postgrest-fetcher-delete-'; @@ -14,7 +14,7 @@ describe('delete', () => { testRunPrefix = `${TEST_PREFIX}-${Math.floor(Math.random() * 100)}`; client = createClient( process.env.SUPABASE_URL as string, - process.env.SUPABASE_ANON_KEY as string + process.env.SUPABASE_ANON_KEY as string, ); await client.from('contact').delete().ilike('username', `${TEST_PREFIX}%`); }); @@ -22,7 +22,7 @@ describe('delete', () => { await expect( buildDeleteFetcher(client.from('contact'), ['id'], { queriesForTable: () => [], - })({}) + })({}), ).rejects.toThrowError('Missing value for primary key id'); }); @@ -39,7 +39,7 @@ describe('delete', () => { ['id'], { queriesForTable: () => [], - } + }, )({ id: contact?.id, }); @@ -66,7 +66,7 @@ describe('delete', () => { ['id'], { queriesForTable: () => [{ paths: [], filters: [] }], - } + }, )({ id: contact?.id, }); diff --git a/packages/postgrest-core/__tests__/delete-item.spec.ts b/packages/postgrest-core/__tests__/delete-item.spec.ts index ac243ff1..cc9ead30 100644 --- a/packages/postgrest-core/__tests__/delete-item.spec.ts +++ b/packages/postgrest-core/__tests__/delete-item.spec.ts @@ -44,12 +44,12 @@ describe('deleteItem', () => { }; }, mutate: jest.fn(), - } + }, ); expect(mutate).toHaveBeenCalledTimes(1); expect(mutate).toHaveBeenCalledWith( expect.objectContaining({ type: 'DELETE' }), - expect.anything() + expect.anything(), ); }); }); diff --git a/packages/postgrest-core/__tests__/fetch/build-mutation-fetcher-response.spec.ts b/packages/postgrest-core/__tests__/fetch/build-mutation-fetcher-response.spec.ts index 98b045f8..d06cdaf4 100644 --- a/packages/postgrest-core/__tests__/fetch/build-mutation-fetcher-response.spec.ts +++ b/packages/postgrest-core/__tests__/fetch/build-mutation-fetcher-response.spec.ts @@ -31,8 +31,8 @@ describe('buildMutationFetcherResponse', () => { }, }, }, - { userQueryPaths: query!.userQueryPaths, paths: query!.paths } - ) + { userQueryPaths: query!.userQueryPaths, paths: query!.paths }, + ), ).toEqual({ normalizedData: { test: '123', @@ -291,8 +291,8 @@ describe('buildMutationFetcherResponse', () => { path: 'inbox_id.name', }, ], - } - ) + }, + ), ).toEqual({ normalizedData: { assignee_id: null, diff --git a/packages/postgrest-core/__tests__/fetch/build-normalized-query.spec.ts b/packages/postgrest-core/__tests__/fetch/build-normalized-query.spec.ts index 7333ac34..570f8e1b 100644 --- a/packages/postgrest-core/__tests__/fetch/build-normalized-query.spec.ts +++ b/packages/postgrest-core/__tests__/fetch/build-normalized-query.spec.ts @@ -19,7 +19,7 @@ describe('buildNormalizedQuery', () => { new PostgrestParser(q1), new PostgrestParser(q2), ], - })?.selectQuery + })?.selectQuery, ).toEqual('test,some,value,another_test,other'); }); @@ -38,7 +38,7 @@ describe('buildNormalizedQuery', () => { new PostgrestParser(q1), new PostgrestParser(q2), ], - }) + }), ).toEqual({ paths: [ { alias: undefined, declaration: 'something', path: 'something' }, @@ -70,7 +70,7 @@ describe('buildNormalizedQuery', () => { new PostgrestParser(q1), new PostgrestParser(q2), ], - })?.selectQuery + })?.selectQuery, ).toEqual('something,the,user,queries,test,some,value,another_test,other'); }); @@ -91,7 +91,7 @@ describe('buildNormalizedQuery', () => { new PostgrestParser(q1), new PostgrestParser(q2), ], - })?.selectQuery + })?.selectQuery, ).toEqual('something,the,user,queries,test,some,value,another_test,other'); }); @@ -109,9 +109,9 @@ describe('buildNormalizedQuery', () => { new PostgrestParser(q1), new PostgrestParser(q2), ], - })?.selectQuery + })?.selectQuery, ).toEqual( - 'something,the,user,queries,some_relation!hint2(test),test,some,value,another_test,other,some_relation!hint1(test)' + 'something,the,user,queries,some_relation!hint2(test),test,some,value,another_test,other,some_relation!hint1(test)', ); }); @@ -130,7 +130,7 @@ describe('buildNormalizedQuery', () => { new PostgrestParser(q1), new PostgrestParser(q2), ], - })?.selectQuery + })?.selectQuery, ).toEqual('something,the,user,queries,test,some,value,another_test,other'); }); @@ -141,9 +141,9 @@ describe('buildNormalizedQuery', () => { buildNormalizedQuery({ query: 'something,the,user,queries,note_id,note:note_id(test)', queriesForTable: () => [new PostgrestParser(q)], - })?.selectQuery + })?.selectQuery, ).toEqual( - 'something,the,user,queries,d_0_note_id:note_id,note_id(test),test,some,value' + 'something,the,user,queries,d_0_note_id:note_id,note_id(test),test,some,value', ); }); @@ -155,9 +155,9 @@ describe('buildNormalizedQuery', () => { query: 'something,the,user,queries,note_id(test,relation_id,rel:relation_id(test))', queriesForTable: () => [new PostgrestParser(q)], - })?.selectQuery + })?.selectQuery, ).toEqual( - 'something,the,user,queries,note_id(test,d_0_relation_id:relation_id,relation_id(test)),test,some,value' + 'something,the,user,queries,note_id(test,d_0_relation_id:relation_id,relation_id(test)),test,some,value', ); }); @@ -165,13 +165,13 @@ describe('buildNormalizedQuery', () => { const q1 = c .from('conversation') .select( - 'id,status,session_time,is_spam,subject,channel_type,created_at,recipient_list,unread,recipient:recipient_id(id,contact_id,full_name,handle),tags:tag(id,name,color),channel:channel_id(id,active,name,provider_id),inbox:inbox_id(id,name),assignee:assignee_id(id,display_name)' + 'id,status,session_time,is_spam,subject,channel_type,created_at,recipient_list,unread,recipient:recipient_id(id,contact_id,full_name,handle),tags:tag(id,name,color),channel:channel_id(id,active,name,provider_id),inbox:inbox_id(id,name),assignee:assignee_id(id,display_name)', ) .eq('id', '3a991789-5117-452c-ac14-e5fc3a8bc467'); const q2 = c .from('conversation') .select( - 'id,created_at,recipient_id,organisation_id,inbox_id,channel_type,display_date,recipient_list,unread,status,subject,latest_message_attachment_count,is_spam,inbox_id,session_time,blurb,assignee:assignee_id(id,display_name),tags:tag(id,name,color),inbox:inbox_id(id,name),channel:channel_id(provider_id,name,active,id)' + 'id,created_at,recipient_id,organisation_id,inbox_id,channel_type,display_date,recipient_list,unread,status,subject,latest_message_attachment_count,is_spam,inbox_id,session_time,blurb,assignee:assignee_id(id,display_name),tags:tag(id,name,color),inbox:inbox_id(id,name),channel:channel_id(provider_id,name,active,id)', ) .eq('is_spam', false) .eq('organisation_id', 'f79fecf8-fde8-4cff-9b15-93d50e32577d') @@ -186,7 +186,7 @@ describe('buildNormalizedQuery', () => { new PostgrestParser(q1), new PostgrestParser(q2), ], - }) + }), ).toMatchObject({ selectQuery: 'id,assignee_id(id,display_name),tag(id,name,color),status,session_time,is_spam,subject,channel_type,created_at,recipient_list,unread,recipient_id(id,contact_id,full_name,handle),channel_id(id,active,name,provider_id),inbox_id(id,name),organisation_id,d_0_recipient_id:recipient_id,d_1_inbox_id:inbox_id,display_date,latest_message_attachment_count,blurb', @@ -376,14 +376,14 @@ describe('buildNormalizedQuery', () => { const q1 = c .from('contact') .select( - 'recipients:recipient!recipient_conversation_id_fkey!inner(contact_id)' + 'recipients:recipient!recipient_conversation_id_fkey!inner(contact_id)', ) .eq('recipients.contact_id', 'some-contact-id'); expect( buildNormalizedQuery({ queriesForTable: () => [new PostgrestParser(q1)], - })?.selectQuery + })?.selectQuery, ).toEqual('recipient!recipient_conversation_id_fkey!inner(contact_id)'); }); @@ -392,7 +392,7 @@ describe('buildNormalizedQuery', () => { const q2 = c .from('contact') .select( - 'some,other,alias:value,alias:relation!hint!inner(relation_value)' + 'some,other,alias:value,alias:relation!hint!inner(relation_value)', ) .eq('another_test', 'value'); @@ -403,9 +403,9 @@ describe('buildNormalizedQuery', () => { new PostgrestParser(q1), new PostgrestParser(q2), ], - })?.selectQuery + })?.selectQuery, ).toEqual( - 'something,the,user,queries,test,some,value,another_test,other,relation!hint!inner(relation_value)' + 'something,the,user,queries,test,some,value,another_test,other,relation!hint!inner(relation_value)', ); }); }); diff --git a/packages/postgrest-core/__tests__/fetch/build-select-statement.spec.ts b/packages/postgrest-core/__tests__/fetch/build-select-statement.spec.ts index f3f9a407..6f0f36e1 100644 --- a/packages/postgrest-core/__tests__/fetch/build-select-statement.spec.ts +++ b/packages/postgrest-core/__tests__/fetch/build-select-statement.spec.ts @@ -37,9 +37,9 @@ describe('buildSelectStatement', () => { path: 'test.prop', declaration: 'alias:test.prop', }, - ]) + ]), ).toEqual( - 'name,prop2,prop3,city:cities(test:name),countries(capital,population,some_ref(test:first,second)),alias:test(prop)' + 'name,prop2,prop3,city:cities(test:name),countries(capital,population,some_ref(test:first,second)),alias:test(prop)', ); }); @@ -56,9 +56,9 @@ describe('buildSelectStatement', () => { path: 'organisation.name', declaration: 'organisation!contact_organisation_id_fkey!inner.name', }, - ]) + ]), ).toEqual( - 'name,organisation!contact_organisation_id_fkey!inner(test:name)' + 'name,organisation!contact_organisation_id_fkey!inner(test:name)', ); }); @@ -66,7 +66,7 @@ describe('buildSelectStatement', () => { expect( buildSelectStatement([ { alias: 'field', path: 'name->nested', declaration: 'name->nested' }, - ]) + ]), ).toEqual('field:name->nested'); }); }); diff --git a/packages/postgrest-core/__tests__/fetch/dedupe.spec.ts b/packages/postgrest-core/__tests__/fetch/dedupe.spec.ts index ba687c65..b7240460 100644 --- a/packages/postgrest-core/__tests__/fetch/dedupe.spec.ts +++ b/packages/postgrest-core/__tests__/fetch/dedupe.spec.ts @@ -6,7 +6,7 @@ describe('buildDedupePath', () => { buildDedupePath(0, { path: 'note_id.relation_id', declaration: 'note_id.relation_id', - }) + }), ).toMatchObject({ path: 'note_id.relation_id', declaration: 'note_id.d_0_relation_id:relation_id', diff --git a/packages/postgrest-core/__tests__/fetcher.spec.ts b/packages/postgrest-core/__tests__/fetcher.spec.ts index 79e40005..edf7c235 100644 --- a/packages/postgrest-core/__tests__/fetcher.spec.ts +++ b/packages/postgrest-core/__tests__/fetcher.spec.ts @@ -1,7 +1,7 @@ import { createClient, SupabaseClient } from '@supabase/supabase-js'; -import { fetcher } from '../src/fetcher'; import { Database } from './database.types'; +import { fetcher } from '../src/fetcher'; import './utils'; const TEST_PREFIX = 'postgrest-fetcher-fetch-'; @@ -15,7 +15,7 @@ describe('fetcher', () => { testRunPrefix = `${TEST_PREFIX}-${Math.floor(Math.random() * 100)}`; client = createClient( process.env.SUPABASE_URL as string, - process.env.SUPABASE_ANON_KEY as string + process.env.SUPABASE_ANON_KEY as string, ); await client.from('contact').delete().ilike('username', `${TEST_PREFIX}%`); @@ -37,8 +37,8 @@ describe('fetcher', () => { client .from('contact') .select('username', { count: 'exact' }) - .eq('username', `${testRunPrefix}-username-1`) - ) + .eq('username', `${testRunPrefix}-username-1`), + ), ).resolves.toEqual({ data: [{ username: `${testRunPrefix}-username-1` }], count: 1, @@ -54,8 +54,8 @@ describe('fetcher', () => { client .from('contact') .select('username', { count: 'exact' }) - .eq('unknown', `${testRunPrefix}-username-1`) - ) + .eq('unknown', `${testRunPrefix}-username-1`), + ), ).rejects.toEqual({ code: '42703', details: null, diff --git a/packages/postgrest-core/__tests__/filter/denormalize.spec.ts b/packages/postgrest-core/__tests__/filter/denormalize.spec.ts index 34b11133..99ccd3ba 100644 --- a/packages/postgrest-core/__tests__/filter/denormalize.spec.ts +++ b/packages/postgrest-core/__tests__/filter/denormalize.spec.ts @@ -4,7 +4,7 @@ import { parseSelectParam } from '../../src/lib/parse-select-param'; describe('denormalize', () => { it('should work with nested alias', () => { const paths = parseSelectParam( - 'note_id(test,relation_id,rel:relation_id(test))' + 'note_id(test,relation_id,rel:relation_id(test))', ); expect( @@ -15,7 +15,7 @@ describe('denormalize', () => { 'note_id.test': '123', 'note_id.relation_id': 'id', 'note_id.relation_id.test': '345', - }) + }), ).toEqual({ note_id: { test: '123', @@ -39,8 +39,8 @@ describe('denormalize', () => { ], { assignee_id: null, - } - ) + }, + ), ).toEqual({ assignee: null, }); @@ -68,8 +68,8 @@ describe('denormalize', () => { ], { tag: [], - } - ) + }, + ), ).toEqual({ tags: [], }); diff --git a/packages/postgrest-core/__tests__/insert-fetcher.spec.ts b/packages/postgrest-core/__tests__/insert-fetcher.spec.ts index 05546b6e..db461fdb 100644 --- a/packages/postgrest-core/__tests__/insert-fetcher.spec.ts +++ b/packages/postgrest-core/__tests__/insert-fetcher.spec.ts @@ -1,7 +1,7 @@ import { createClient, SupabaseClient } from '@supabase/supabase-js'; -import { buildInsertFetcher } from '../src/insert-fetcher'; import { Database } from './database.types'; +import { buildInsertFetcher } from '../src/insert-fetcher'; import './utils'; const TEST_PREFIX = 'postgrest-fetcher-insert'; @@ -13,7 +13,7 @@ describe('insert', () => { testRunPrefix = `${TEST_PREFIX}-${Math.floor(Math.random() * 100)}`; client = createClient( process.env.SUPABASE_URL as string, - process.env.SUPABASE_ANON_KEY as string + process.env.SUPABASE_ANON_KEY as string, ); await client.from('contact').delete().ilike('username', `${TEST_PREFIX}%`); }); @@ -49,7 +49,7 @@ describe('insert', () => { })([ { username: `${testRunPrefix}-username-1` }, { username: `${testRunPrefix}-username-2` }, - ]) + ]), ).resolves.toEqual([ { normalizedData: { @@ -75,7 +75,7 @@ describe('insert', () => { })([ { username: `${testRunPrefix}-username-1` }, { username: `${testRunPrefix}-username-2` }, - ]) + ]), ).resolves.toEqual(null); }); @@ -84,7 +84,7 @@ describe('insert', () => { buildInsertFetcher(client.from('contact'), { query: 'alias:username', queriesForTable: () => [], - })([{ username: `${testRunPrefix}-username-1` }]) + })([{ username: `${testRunPrefix}-username-1` }]), ).resolves.toEqual([ { normalizedData: { username: `${testRunPrefix}-username-1` }, diff --git a/packages/postgrest-core/__tests__/lib/find-filters.spec.ts b/packages/postgrest-core/__tests__/lib/find-filters.spec.ts index fb4a1919..456ed2a5 100644 --- a/packages/postgrest-core/__tests__/lib/find-filters.spec.ts +++ b/packages/postgrest-core/__tests__/lib/find-filters.spec.ts @@ -18,10 +18,10 @@ describe('findFilters', () => { .from('test') .select('id', { head: true, count: 'exact' }) .eq('id', '123') - .contains('id', '456') + .contains('id', '456'), ).filters, - { path: 'id' } - ) + { path: 'id' }, + ), ).toEqual([ { alias: undefined, @@ -48,10 +48,10 @@ describe('findFilters', () => { .from('test') .select('test:id', { head: true, count: 'exact' }) .eq('id', '123') - .contains('id', '456') + .contains('id', '456'), ).filters, - { alias: 'test' } - ) + { alias: 'test' }, + ), ).toEqual([ { alias: 'test', negate: false, operator: 'eq', path: 'id', value: 123 }, { alias: 'test', negate: false, operator: 'cs', path: 'id', value: 456 }, @@ -66,10 +66,10 @@ describe('findFilters', () => { .from('test') .select('id', { head: true, count: 'exact' }) .eq('id', '123') - .contains('id', '456') + .contains('id', '456'), ).filters, - { operator: 'eq' } - ) + { operator: 'eq' }, + ), ).toEqual([ { alias: undefined, @@ -89,10 +89,10 @@ describe('findFilters', () => { .from('test') .select('id', { head: true, count: 'exact' }) .not('id', 'eq', '123') - .contains('id', '456') + .contains('id', '456'), ).filters, - { negate: true, operator: 'eq' } - ) + { negate: true, operator: 'eq' }, + ), ).toEqual([ { alias: undefined, @@ -112,10 +112,10 @@ describe('findFilters', () => { .from('test') .select('id', { head: true, count: 'exact' }) .neq('id', '123') - .contains('id', '456') + .contains('id', '456'), ).filters, - { value: 123 } - ) + { value: 123 }, + ), ).toEqual([ { alias: undefined, diff --git a/packages/postgrest-core/__tests__/lib/find-index-ordered.spec.ts b/packages/postgrest-core/__tests__/lib/find-index-ordered.spec.ts index e0137eb3..94b41d83 100644 --- a/packages/postgrest-core/__tests__/lib/find-index-ordered.spec.ts +++ b/packages/postgrest-core/__tests__/lib/find-index-ordered.spec.ts @@ -16,8 +16,8 @@ describe('findIndexOrdered', () => { { value_1: 2, value_2: 2 }, { value_1: 3, value_2: 3 }, ], - [{ column: 'value_1', ascending: true, nullsFirst: false }] - ) + [{ column: 'value_1', ascending: true, nullsFirst: false }], + ), ).toEqual(2); }); @@ -30,8 +30,8 @@ describe('findIndexOrdered', () => { { value_1: 2, value_2: 2 }, { value_1: 1, value_2: 3 }, ], - [{ column: 'value_1', ascending: false, nullsFirst: false }] - ) + [{ column: 'value_1', ascending: false, nullsFirst: false }], + ), ).toEqual(2); }); @@ -44,8 +44,8 @@ describe('findIndexOrdered', () => { { value_1: 2, value_2: 2 }, { value_1: 3, value_2: 3 }, ], - [{ column: 'value_1', ascending: true, nullsFirst: true }] - ) + [{ column: 'value_1', ascending: true, nullsFirst: true }], + ), ).toEqual(1); }); @@ -58,8 +58,8 @@ describe('findIndexOrdered', () => { { value_1: 2, value_2: 2 }, { value_1: null, value_2: 3 }, ], - [{ column: 'value_1', ascending: true, nullsFirst: true }] - ) + [{ column: 'value_1', ascending: true, nullsFirst: true }], + ), ).toEqual(1); }); @@ -75,8 +75,8 @@ describe('findIndexOrdered', () => { [ { column: 'value_1', ascending: true, nullsFirst: false }, { column: 'value_2', ascending: true, nullsFirst: false }, - ] - ) + ], + ), ).toEqual(2); }); }); diff --git a/packages/postgrest-core/__tests__/lib/parse-order-by-key.ts b/packages/postgrest-core/__tests__/lib/parse-order-by-key.ts index dcf25289..c3bf960e 100644 --- a/packages/postgrest-core/__tests__/lib/parse-order-by-key.ts +++ b/packages/postgrest-core/__tests__/lib/parse-order-by-key.ts @@ -21,7 +21,7 @@ describe('parseOrderByKey', () => { foreignTable: 'foreignTable', nullsFirst: false, }) - .order('two', { ascending: false, nullsFirst: true }) + .order('two', { ascending: false, nullsFirst: true }), ); expect(parseOrderByKey(parser.orderByKey)).toEqual(parser.orderBy); }); diff --git a/packages/postgrest-core/__tests__/lib/parse-select-param.spec.ts b/packages/postgrest-core/__tests__/lib/parse-select-param.spec.ts index 7e6b0211..20a9061c 100644 --- a/packages/postgrest-core/__tests__/lib/parse-select-param.spec.ts +++ b/packages/postgrest-core/__tests__/lib/parse-select-param.spec.ts @@ -4,8 +4,8 @@ describe('parseSelectParam', () => { it('should return input if falsy', () => { expect( parseSelectParam( - 'id,assignee:assignee_id(id,test_name:display_name),tags:tag(id,tag_name:name)' - ) + 'id,assignee:assignee_id(id,test_name:display_name),tags:tag(id,tag_name:name)', + ), ).toEqual([ { alias: undefined, @@ -38,8 +38,8 @@ describe('parseSelectParam', () => { it('should work for special case', () => { expect( parseSelectParam( - 'id,team_members:team_member_team_id_fkey(team_id,employee!team_member_employee_id_fkey(id,display_name,user_id))' - ) + 'id,team_members:team_member_team_id_fkey(team_id,employee!team_member_employee_id_fkey(id,display_name,user_id))', + ), ).toEqual([ { alias: undefined, diff --git a/packages/postgrest-core/__tests__/lib/sorted-comparator.spec.ts b/packages/postgrest-core/__tests__/lib/sorted-comparator.spec.ts index d82cf4c5..5258a57b 100644 --- a/packages/postgrest-core/__tests__/lib/sorted-comparator.spec.ts +++ b/packages/postgrest-core/__tests__/lib/sorted-comparator.spec.ts @@ -16,8 +16,8 @@ describe('sortedComparator', () => { ].sort( buildSortedComparator([ { column: 'value_1', ascending: true, nullsFirst: false }, - ]) - ) + ]), + ), ).toEqual([ { value_1: 1, value_2: 1 }, { value_1: 2, value_2: 2 }, @@ -34,8 +34,8 @@ describe('sortedComparator', () => { ].sort( buildSortedComparator([ { column: 'value_1', ascending: false, nullsFirst: false }, - ]) - ) + ]), + ), ).toEqual([ { value_1: 3, value_2: 3 }, { value_1: 2, value_2: 2 }, @@ -52,8 +52,8 @@ describe('sortedComparator', () => { ].sort( buildSortedComparator([ { column: 'value_1', ascending: true, nullsFirst: true }, - ]) - ) + ]), + ), ).toEqual([ { value_1: null, value_2: 3 }, { value_1: 1, value_2: 1 }, @@ -70,8 +70,8 @@ describe('sortedComparator', () => { ].sort( buildSortedComparator([ { column: 'value_1', ascending: true, nullsFirst: false }, - ]) - ) + ]), + ), ).toEqual([ { value_1: 1, value_2: 1 }, { value_1: 2, value_2: 2 }, @@ -89,8 +89,8 @@ describe('sortedComparator', () => { buildSortedComparator([ { column: 'value_1', ascending: true, nullsFirst: false }, { column: 'value_2', ascending: true, nullsFirst: false }, - ]) - ) + ]), + ), ).toEqual([ { value_1: 1, value_2: 2 }, { value_1: 1, value_2: 3 }, @@ -115,8 +115,8 @@ describe('sortedComparator', () => { nullsFirst: false, foreignTable: 'foreign', }, - ]) - ) + ]), + ), ).toEqual([ { foreign: { value_1: 1 }, value_2: 1 }, { foreign: { value_1: 2 }, value_2: 2 }, @@ -133,8 +133,8 @@ describe('sortedComparator', () => { ].sort( buildSortedComparator([ { column: 'value_1', ascending: true, nullsFirst: false }, - ]) - ) + ]), + ), ).toEqual([ { value_1: new Date('December 1, 1995 03:24:00'), value_2: 1 }, { value_1: new Date('December 2, 1995 03:24:00'), value_2: 2 }, diff --git a/packages/postgrest-core/__tests__/mutate/build-delete-mutator-fn.spec.ts b/packages/postgrest-core/__tests__/mutate/build-delete-mutator-fn.spec.ts index 7b2cd9b9..55bc76f6 100644 --- a/packages/postgrest-core/__tests__/mutate/build-delete-mutator-fn.spec.ts +++ b/packages/postgrest-core/__tests__/mutate/build-delete-mutator-fn.spec.ts @@ -11,7 +11,7 @@ describe('buildDeleteMutatorFn', () => { buildDeleteMutatorFn( { id_1: '0', id_2: '0' }, ['id_1', 'id_2'], - { limit: 3 } + { limit: 3 }, )([ [ { id_1: '1', id_2: '0' }, @@ -22,7 +22,7 @@ describe('buildDeleteMutatorFn', () => { { id_1: '1', id_2: '0' }, { id_1: '0', id_2: '1' }, ], - ]) + ]), ).toEqual([ [ { id_1: '1', id_2: '0' }, @@ -38,7 +38,7 @@ describe('buildDeleteMutatorFn', () => { buildDeleteMutatorFn({ id_1: '0', id_2: '0' }, [ 'id_1', 'id_2', - ])(undefined as any) + ])(undefined as any), ).toEqual(undefined); }); @@ -47,7 +47,7 @@ describe('buildDeleteMutatorFn', () => { buildDeleteMutatorFn({ id_1: '0', id_2: '0' }, [ 'id_1', 'id_2', - ])(null as any) + ])(null as any), ).toEqual(null); }); @@ -58,7 +58,7 @@ describe('buildDeleteMutatorFn', () => { 'id_2', ])({ data: { id_1: '0', id_2: '0' }, - }) + }), ).toMatchObject({ data: null, }); @@ -76,7 +76,7 @@ describe('buildDeleteMutatorFn', () => { { id_1: '0', id_2: '0' }, ], count: 3, - }) + }), ).toMatchObject({ data: [ { id_1: '1', id_2: '0' }, @@ -97,7 +97,7 @@ describe('buildDeleteMutatorFn', () => { { id_1: '0', id_2: '0' }, ], count: 3, - }) + }), ).toEqual({ data: [ { id_1: '1', id_2: '0' }, @@ -119,7 +119,7 @@ describe('buildDeleteMutatorFn', () => { { id_1: '1', id_2: '1' }, ], count: 3, - }) + }), ).toMatchObject({ data: [ { id_1: '1', id_2: '0' }, @@ -135,7 +135,7 @@ describe('buildDeleteMutatorFn', () => { buildDeleteMutatorFn( { id_1: '0', id_2: '0' }, ['id_1', 'id_2'], - { limit: 3 } + { limit: 3 }, )([ { hasMore: true, @@ -152,7 +152,7 @@ describe('buildDeleteMutatorFn', () => { { id_1: '0', id_2: '1' }, ], }, - ]) + ]), ).toEqual([ { data: [ diff --git a/packages/postgrest-core/__tests__/mutate/build-upsert-mutator-fn.spec.ts b/packages/postgrest-core/__tests__/mutate/build-upsert-mutator-fn.spec.ts index 7229cb77..1fc899e5 100644 --- a/packages/postgrest-core/__tests__/mutate/build-upsert-mutator-fn.spec.ts +++ b/packages/postgrest-core/__tests__/mutate/build-upsert-mutator-fn.spec.ts @@ -21,7 +21,7 @@ describe('buildUpsertMutatorFn', () => { return true; }, }, - { limit: 2, orderBy: undefined } + { limit: 2, orderBy: undefined }, )([ [ { id_1: '1', id_2: '0', value: 'test1' }, @@ -31,7 +31,7 @@ describe('buildUpsertMutatorFn', () => { { id_1: '1', id_2: '0', value: 'test3' }, { id_1: '0', id_2: '1', value: 'test4' }, ], - ]) + ]), ).toEqual([ [ { id_1: '0', id_2: '0', value: 'test' }, @@ -58,7 +58,7 @@ describe('buildUpsertMutatorFn', () => { return false; }, }, - { limit: 2, orderBy: undefined } + { limit: 2, orderBy: undefined }, )([ [ { id_1: '1', id_2: '0', value: 'test1' }, @@ -68,7 +68,7 @@ describe('buildUpsertMutatorFn', () => { { id_1: '1', id_2: '0', value: 'test3' }, { id_1: '0', id_2: '1', value: 'test4' }, ], - ]) + ]), ).toEqual([ [ { id_1: '1', id_2: '0', value: 'test1' }, @@ -94,7 +94,7 @@ describe('buildUpsertMutatorFn', () => { return false; }, }, - { limit: 3, orderBy: undefined } + { limit: 3, orderBy: undefined }, )([ [ { id_1: '1', id_2: '0', value: 'test1' }, @@ -105,7 +105,7 @@ describe('buildUpsertMutatorFn', () => { { id_1: '0', id_2: '1', value: 'test4' }, { id_1: '0', id_2: '0', value: 'test5' }, ], - ]) + ]), ).toEqual([ [ { id_1: '1', id_2: '0', value: 'test1' }, @@ -132,7 +132,7 @@ describe('buildUpsertMutatorFn', () => { return false; }, }, - { limit: 2, orderBy: undefined } + { limit: 2, orderBy: undefined }, )([ [ { id_1: '1', id_2: '0', value: 'test1' }, @@ -142,7 +142,7 @@ describe('buildUpsertMutatorFn', () => { { id_1: '0', id_2: '0', value: 'test3' }, { id_1: '1', id_2: '1', value: 'test4' }, ], - ]) + ]), ).toEqual([ [ { id_1: '1', id_2: '0', value: 'test1' }, @@ -165,8 +165,8 @@ describe('buildUpsertMutatorFn', () => { return true; }, }, - { limit: undefined, orderBy: undefined } - )(undefined as any) + { limit: undefined, orderBy: undefined }, + )(undefined as any), ).toEqual(undefined); }); @@ -183,8 +183,8 @@ describe('buildUpsertMutatorFn', () => { return true; }, }, - { limit: undefined, orderBy: undefined } - )(null as any) + { limit: undefined, orderBy: undefined }, + )(null as any), ).toEqual(null); }); @@ -201,11 +201,11 @@ describe('buildUpsertMutatorFn', () => { return true; }, }, - { limit: undefined, orderBy: undefined } + { limit: undefined, orderBy: undefined }, )([ { id_1: '1', id_2: '0', value: 'array1' }, { id_1: '0', id_2: '1', value: 'array2' }, - ] as any) + ] as any), ).toEqual([ { id_1: '1', id_2: '0', value: 'array1' }, { id_1: '0', id_2: '1', value: 'array2' }, @@ -225,14 +225,14 @@ describe('buildUpsertMutatorFn', () => { return true; }, }, - { limit: undefined, orderBy: undefined } + { limit: undefined, orderBy: undefined }, )({ data: [ { id_1: '1', id_2: '0', value: 'test1' }, { id_1: '0', id_2: '1', value: 'test2' }, ], count: 2, - }) + }), ).toEqual({ data: [ { id_1: '0', id_2: '0', value: 'test' }, @@ -256,14 +256,14 @@ describe('buildUpsertMutatorFn', () => { return false; }, }, - { limit: undefined, orderBy: undefined } + { limit: undefined, orderBy: undefined }, )({ data: [ { id_1: '1', id_2: '0', value: 'test1' }, { id_1: '0', id_2: '1', value: 'test2' }, ], count: 2, - }) + }), ).toEqual({ data: [ { id_1: '1', id_2: '0', value: 'test1' }, @@ -286,7 +286,7 @@ describe('buildUpsertMutatorFn', () => { return false; }, }, - { limit: undefined, orderBy: undefined } + { limit: undefined, orderBy: undefined }, )({ data: [ { id_1: '1', id_2: '0', value: 'test3' }, @@ -294,7 +294,7 @@ describe('buildUpsertMutatorFn', () => { { id_1: '0', id_2: '0', value: 'test5' }, ], count: 3, - }) + }), ).toEqual({ data: [ { id_1: '1', id_2: '0', value: 'test3' }, @@ -322,7 +322,7 @@ describe('buildUpsertMutatorFn', () => { }, }, { limit: undefined, orderBy: undefined }, - { merge: mergeFn } + { merge: mergeFn }, )({ data: [ { id_1: '1', id_2: '0', value: 'test3' }, @@ -330,7 +330,7 @@ describe('buildUpsertMutatorFn', () => { { id_1: '0', id_2: '0', value: 'test5' }, ], count: 3, - }) + }), ).toEqual({ data: [ { id_1: '1', id_2: '0', value: 'test3' }, @@ -341,7 +341,7 @@ describe('buildUpsertMutatorFn', () => { }); expect(mergeFn).toHaveBeenCalledWith( { id_1: '0', id_2: '0', value: 'test5' }, - { id_1: '0', id_2: '0', value: 'test' } + { id_1: '0', id_2: '0', value: 'test' }, ); }); @@ -358,7 +358,7 @@ describe('buildUpsertMutatorFn', () => { return false; }, }, - { limit: undefined, orderBy: undefined } + { limit: undefined, orderBy: undefined }, )({ data: [ { id_1: '1', id_2: '0', value: 'test3' }, @@ -366,7 +366,7 @@ describe('buildUpsertMutatorFn', () => { { id_1: '0', id_2: '0', value: 'test5' }, ], count: 3, - }) + }), ).toEqual({ data: [ { id_1: '1', id_2: '0', value: 'test3' }, @@ -389,10 +389,10 @@ describe('buildUpsertMutatorFn', () => { return false; }, }, - { limit: undefined, orderBy: undefined } + { limit: undefined, orderBy: undefined }, )({ data: { id_1: '0', id_2: '0', value: 'test5' }, - }) + }), ).toEqual({ data: null, }); @@ -410,10 +410,10 @@ describe('buildUpsertMutatorFn', () => { return true; }, }, - { limit: undefined, orderBy: undefined } + { limit: undefined, orderBy: undefined }, )({ data: { id_1: '0', id_2: '0', value: 'test5' }, - }) + }), ).toEqual({ data: { id_1: '0', id_2: '0', value: 'test' }, }); @@ -435,7 +435,7 @@ describe('buildUpsertMutatorFn', () => { { limit: 2, orderBy: [{ column: 'value', ascending: true, nullsFirst: true }], - } + }, )([ [ { id_1: '1', id_2: '0', value: 'test1' }, @@ -445,7 +445,7 @@ describe('buildUpsertMutatorFn', () => { { id_1: '2', id_2: '0', value: 'test3' }, { id_1: '0', id_2: '2', value: 'test5' }, ], - ]) + ]), ).toEqual([ [ { id_1: '1', id_2: '0', value: 'test1' }, @@ -475,7 +475,7 @@ describe('buildUpsertMutatorFn', () => { { limit: 2, orderBy: [{ column: 'value', ascending: false, nullsFirst: true }], - } + }, )([ [ { id_1: '1', id_2: '0', value: 'test5' }, @@ -485,7 +485,7 @@ describe('buildUpsertMutatorFn', () => { { id_1: '2', id_2: '0', value: 'test2' }, { id_1: '0', id_2: '2', value: 'test1' }, ], - ]) + ]), ).toEqual([ [ { id_1: '1', id_2: '0', value: 'test5' }, @@ -515,7 +515,7 @@ describe('buildUpsertMutatorFn', () => { { limit: 2, orderBy: [{ column: 'value', ascending: true, nullsFirst: true }], - } + }, )([ [ { id_1: '1', id_2: '0', value: 'test1' }, @@ -525,7 +525,7 @@ describe('buildUpsertMutatorFn', () => { { id_1: '2', id_2: '0', value: 'test3' }, { id_1: '0', id_2: '2', value: 'test5' }, ], - ]) + ]), ).toEqual([ [ { id_1: '0', id_2: '0', value: null }, @@ -555,7 +555,7 @@ describe('buildUpsertMutatorFn', () => { { limit: 2, orderBy: [{ column: 'value', ascending: true, nullsFirst: false }], - } + }, )([ [ { id_1: '1', id_2: '0', value: 'test1' }, @@ -565,7 +565,7 @@ describe('buildUpsertMutatorFn', () => { { id_1: '2', id_2: '0', value: 'test3' }, { id_1: '0', id_2: '2', value: 'test5' }, ], - ]) + ]), ).toEqual([ [ { id_1: '1', id_2: '0', value: 'test1' }, @@ -592,7 +592,7 @@ describe('buildUpsertMutatorFn', () => { return true; }, }, - { limit: 2, orderBy: undefined } + { limit: 2, orderBy: undefined }, )([ { data: [ @@ -608,7 +608,7 @@ describe('buildUpsertMutatorFn', () => { ], hasMore: false, }, - ]) + ]), ).toEqual([ { data: [ @@ -641,11 +641,11 @@ describe('buildUpsertMutatorFn', () => { return true; }, }, - { limit: undefined, orderBy: undefined } + { limit: undefined, orderBy: undefined }, )({ data: null, count: 3, - }) + }), ).toEqual({ data: null, count: 3, diff --git a/packages/postgrest-core/__tests__/mutate/mutate.spec.ts b/packages/postgrest-core/__tests__/mutate/mutate.spec.ts index e2946201..58d3ff82 100644 --- a/packages/postgrest-core/__tests__/mutate/mutate.spec.ts +++ b/packages/postgrest-core/__tests__/mutate/mutate.spec.ts @@ -74,7 +74,7 @@ const mockMutate = async ({ }; }, mutate: mutateMockFn, - } + }, ); return mutateMockFn; }; @@ -212,9 +212,9 @@ describe('mutate', () => { ? buildUpsertMutatorFn : type === 'DELETE' ? buildDeleteMutatorFn - : jest.fn() + : jest.fn(), ).toHaveBeenCalledTimes(1); - } + }, ); it('should parse order by key', async () => { @@ -256,7 +256,7 @@ describe('mutate', () => { }, ], }, - undefined + undefined, ); }); diff --git a/packages/postgrest-core/__tests__/mutate/upsert.spec.ts b/packages/postgrest-core/__tests__/mutate/upsert.spec.ts index f13b7df0..b1d7c78d 100644 --- a/packages/postgrest-core/__tests__/mutate/upsert.spec.ts +++ b/packages/postgrest-core/__tests__/mutate/upsert.spec.ts @@ -24,8 +24,8 @@ describe('upsert', () => { apply(obj: unknown): obj is ItemType { return true; }, - } - ) + }, + ), ).toEqual([ { id_1: 0, id_2: 0, value_1: 1, value_2: 1 }, { id_1: 1, id_2: 1, value_1: 3, value_2: 3 }, @@ -51,8 +51,8 @@ describe('upsert', () => { }, { orderBy: [{ column: 'value_1', ascending: false, nullsFirst: false }], - } - ) + }, + ), ).toEqual([ { id_1: 1, id_2: 1, value_1: 3, value_2: 3 }, { id_1: 2, id_2: 2, value_1: 2, value_2: 2 }, @@ -76,8 +76,8 @@ describe('upsert', () => { apply(obj: unknown): obj is ItemType { return true; }, - } - ) + }, + ), ).toEqual([ { id_1: 1, id_2: 1, value_1: 3, value_2: 3 }, { id_1: 0, id_2: 0, value_1: 1, value_2: 1 }, @@ -102,8 +102,8 @@ describe('upsert', () => { }, { orderBy: [{ column: 'value_1', ascending: false, nullsFirst: false }], - } - ) + }, + ), ).toEqual([ { id_1: 1, id_2: 1, value_1: 3, value_2: 3 }, { id_1: 3, id_2: 3, value_1: 1, value_2: 1 }, @@ -135,8 +135,8 @@ describe('upsert', () => { { orderBy: [{ column: 'value_1', ascending: false, nullsFirst: false }], }, - { merge: mergeMock } - ) + { merge: mergeMock }, + ), ).toEqual([ { id_1: 1, id_2: 1, value_1: 3, value_2: 3 }, { id_1: 3, id_2: 3, value_1: 1, value_2: 1 }, @@ -144,7 +144,7 @@ describe('upsert', () => { ]); expect(mergeMock).toHaveBeenCalledWith( { id_1: 2, id_2: 2, value_1: 2, value_2: 2 }, - { id_1: 2, id_2: 2, value_1: 0, value_2: 0 } + { id_1: 2, id_2: 2, value_1: 0, value_2: 0 }, ); }); }); diff --git a/packages/postgrest-core/__tests__/offset-pagination-fetcher.spec.ts b/packages/postgrest-core/__tests__/offset-pagination-fetcher.spec.ts index dea9b30d..079caae8 100644 --- a/packages/postgrest-core/__tests__/offset-pagination-fetcher.spec.ts +++ b/packages/postgrest-core/__tests__/offset-pagination-fetcher.spec.ts @@ -1,10 +1,10 @@ import { createClient, SupabaseClient } from '@supabase/supabase-js'; +import { Database } from './database.types'; import { createOffsetPaginationFetcher, createOffsetPaginationHasMoreFetcher, } from '../src/offset-pagination-fetcher'; -import { Database } from './database.types'; import './utils'; const TEST_PREFIX = 'postgrest-fetcher-offset-pagination-fetcher-'; @@ -18,7 +18,7 @@ describe('offset-pagination-fetcher', () => { testRunPrefix = `${TEST_PREFIX}-${Math.floor(Math.random() * 100)}`; client = createClient( process.env.SUPABASE_URL as string, - process.env.SUPABASE_ANON_KEY as string + process.env.SUPABASE_ANON_KEY as string, ); await client.from('contact').delete().ilike('username', `${TEST_PREFIX}%`); @@ -45,8 +45,8 @@ describe('offset-pagination-fetcher', () => { limit: undefined, offset: undefined, }), - 50 - ) + 50, + ), ).toEqual(null); }); @@ -60,7 +60,7 @@ describe('offset-pagination-fetcher', () => { limit: undefined, offset: undefined, }), - 2 + 2, ); expect(fetcher).toBeDefined(); const data = await fetcher!(''); @@ -77,7 +77,7 @@ describe('offset-pagination-fetcher', () => { limit: 2, offset: 2, }), - 50 + 50, ); expect(fetcher).toBeDefined(); const data = await fetcher!(''); @@ -95,8 +95,8 @@ describe('offset-pagination-fetcher', () => { limit: undefined, offset: undefined, }), - 50 - ) + 50, + ), ).toEqual(null); }); @@ -110,7 +110,7 @@ describe('offset-pagination-fetcher', () => { limit: undefined, offset: undefined, }), - 2 + 2, ); expect(fetcher).toBeDefined(); const { data } = await fetcher!(''); @@ -128,7 +128,7 @@ describe('offset-pagination-fetcher', () => { limit: 3, offset: 0, }), - 2 + 2, ); expect(fetcher).toBeDefined(); const { data, hasMore } = await fetcher!(''); diff --git a/packages/postgrest-core/__tests__/postgrest-filter.integration.spec.ts b/packages/postgrest-core/__tests__/postgrest-filter.integration.spec.ts index 34dc0c88..1bda9dda 100644 --- a/packages/postgrest-core/__tests__/postgrest-filter.integration.spec.ts +++ b/packages/postgrest-core/__tests__/postgrest-filter.integration.spec.ts @@ -1,8 +1,8 @@ import { PostgrestFilterBuilder } from '@supabase/postgrest-js'; import { SupabaseClient, createClient } from '@supabase/supabase-js'; -import { PostgrestFilter } from '../src/postgrest-filter'; import type { Database } from './database.types'; +import { PostgrestFilter } from '../src/postgrest-filter'; import './utils'; @@ -17,7 +17,7 @@ describe('postgrest-filter-fn', () => { testRunPrefix = `${TEST_PREFIX}-${Math.floor(Math.random() * 100)}`; supabase = createClient( process.env.SUPABASE_URL as string, - process.env.SUPABASE_ANON_KEY as string + process.env.SUPABASE_ANON_KEY as string, ); await supabase .from('contact') @@ -69,7 +69,7 @@ describe('postgrest-filter-fn', () => { query = supabase .from('contact') .select( - 'id,created_at,username,ticket_number,golden_ticket,tags,age_range,metadata,hello:metadata->>hello,catchphrase,country!inner(code,mapped_name:name,full_name)' + 'id,created_at,username,ticket_number,golden_ticket,tags,age_range,metadata,hello:metadata->>hello,catchphrase,country!inner(code,mapped_name:name,full_name)', ); }); @@ -81,7 +81,7 @@ describe('postgrest-filter-fn', () => { Database['public'], Database['public']['Tables']['contact']['Row'], any - > + >, ) => q.or(`username.eq.${testRunPrefix}-username-1,username.eq.mrx`), ], [ @@ -91,10 +91,10 @@ describe('postgrest-filter-fn', () => { Database['public'], Database['public']['Tables']['contact']['Row'], any - > + >, ) => q.or( - `username.eq.unknown,and(ticket_number.eq.2,golden_ticket.is.true)` + `username.eq.unknown,and(ticket_number.eq.2,golden_ticket.is.true)`, ), ], [ @@ -104,7 +104,7 @@ describe('postgrest-filter-fn', () => { Database['public'], Database['public']['Tables']['contact']['Row'], any - > + >, ) => q.eq('username', `${testRunPrefix}-username-2`), ], [ @@ -114,7 +114,7 @@ describe('postgrest-filter-fn', () => { Database['public'], Database['public']['Tables']['contact']['Row'], any - > + >, ) => q.not('golden_ticket', 'is', true), ], [ @@ -124,7 +124,7 @@ describe('postgrest-filter-fn', () => { Database['public'], Database['public']['Tables']['contact']['Row'], any - > + >, ) => q.neq('catchphrase', 'cat bat'), ], [ @@ -134,7 +134,7 @@ describe('postgrest-filter-fn', () => { Database['public'], Database['public']['Tables']['contact']['Row'], any - > + >, ) => q.gt('ticket_number', 50), ], [ @@ -144,7 +144,7 @@ describe('postgrest-filter-fn', () => { Database['public'], Database['public']['Tables']['contact']['Row'], any - > + >, ) => q.gte('ticket_number', 8), ], [ @@ -154,7 +154,7 @@ describe('postgrest-filter-fn', () => { Database['public'], Database['public']['Tables']['contact']['Row'], any - > + >, ) => q.lt('ticket_number', 1), ], [ @@ -164,7 +164,7 @@ describe('postgrest-filter-fn', () => { Database['public'], Database['public']['Tables']['contact']['Row'], any - > + >, ) => q.lte('ticket_number', 0), ], [ @@ -174,7 +174,7 @@ describe('postgrest-filter-fn', () => { Database['public'], Database['public']['Tables']['contact']['Row'], any - > + >, ) => q.like('username', `%-username-1`), ], [ @@ -184,7 +184,7 @@ describe('postgrest-filter-fn', () => { Database['public'], Database['public']['Tables']['contact']['Row'], any - > + >, ) => q.ilike('username', `%-USERNAME-1`), ], [ @@ -194,7 +194,7 @@ describe('postgrest-filter-fn', () => { Database['public'], Database['public']['Tables']['contact']['Row'], any - > + >, ) => q.in('username', [`${testRunPrefix}-username-1`]), ], [ @@ -204,7 +204,7 @@ describe('postgrest-filter-fn', () => { Database['public'], Database['public']['Tables']['contact']['Row'], any - > + >, ) => q.is('golden_ticket', false), ], [ @@ -214,7 +214,7 @@ describe('postgrest-filter-fn', () => { Database['public'], Database['public']['Tables']['contact']['Row'], any - > + >, ) => q.textSearch('catchphrase', 'fa:* & ca:*'), ], [ @@ -224,7 +224,7 @@ describe('postgrest-filter-fn', () => { Database['public'], Database['public']['Tables']['contact']['Row'], any - > + >, ) => q.textSearch('catchphrase', 'fat', { type: 'plain' }), ], [ @@ -234,7 +234,7 @@ describe('postgrest-filter-fn', () => { Database['public'], Database['public']['Tables']['contact']['Row'], any - > + >, ) => q.contains('tags', ['supateam', 'investor']), ], [ @@ -244,7 +244,7 @@ describe('postgrest-filter-fn', () => { Database['public'], Database['public']['Tables']['contact']['Row'], any - > + >, ) => q.contains('metadata->array', JSON.stringify([{ value: 'a' }])), ], [ @@ -254,7 +254,7 @@ describe('postgrest-filter-fn', () => { Database['public'], Database['public']['Tables']['contact']['Row'], any - > + >, ) => q.containedBy('tags', ['supateam', 'investor']), ], [ @@ -264,7 +264,7 @@ describe('postgrest-filter-fn', () => { Database['public'], Database['public']['Tables']['contact']['Row'], any - > + >, ) => q.eq('metadata->>hello' as any, 'supabase'), ], [ @@ -274,7 +274,7 @@ describe('postgrest-filter-fn', () => { Database['public'], Database['public']['Tables']['contact']['Row'], any - > + >, ) => q.eq('metadata->array->0->>value' as any, 'a'), ], [ @@ -284,7 +284,7 @@ describe('postgrest-filter-fn', () => { Database['public'], Database['public']['Tables']['contact']['Row'], any - > + >, ) => q.or('name.eq.Germany,name.eq.Ghana', { foreignTable: 'country', @@ -297,7 +297,7 @@ describe('postgrest-filter-fn', () => { Database['public'], Database['public']['Tables']['contact']['Row'], any - > + >, ) => q.or(`metadata->array.cs.[{"value": "b"}]`), ], [ @@ -307,7 +307,7 @@ describe('postgrest-filter-fn', () => { Database['public'], Database['public']['Tables']['contact']['Row'], any - > + >, ) => q.or('name.eq.unknown,and(name.eq.Germany,code.eq.DE)', { foreignTable: 'country', diff --git a/packages/postgrest-core/__tests__/postgrest-filter.spec.ts b/packages/postgrest-core/__tests__/postgrest-filter.spec.ts index 541eb519..18dc6eed 100644 --- a/packages/postgrest-core/__tests__/postgrest-filter.spec.ts +++ b/packages/postgrest-core/__tests__/postgrest-filter.spec.ts @@ -35,9 +35,9 @@ describe('PostgrestFilter', () => { createClient('https://localhost', 'test') .from('contact') .select('username') - .eq('username', 'test') - ).queryKey - ).apply({ username: 'test' }) + .eq('username', 'test'), + ).queryKey, + ).apply({ username: 'test' }), ).toEqual(true); }); @@ -120,7 +120,7 @@ describe('PostgrestFilter', () => { 'dfa3a5e7-947b-4df4-985d-c8453c8fa911', 'team_member_team_id_fkey.2.employee.display_name': 'Invited User', 'team_member_team_id_fkey.2.employee.user_id': null, - }) + }), ).toEqual({ id: 'f5c16e1a-cbe8-497a-b741-344f7376237c', name: 'Default Teamdäööäjhlmjl', @@ -196,7 +196,7 @@ describe('PostgrestFilter', () => { 'tag.1.id': '146beb37-f4ca-4995-951e-067412e09095', 'tag.1.name': 'two', 'tag.1.color': 'blue', - }) + }), ).toEqual({ id: '846beb37-f4ca-4995-951e-067412e09095', unread: false, @@ -256,7 +256,7 @@ describe('PostgrestFilter', () => { 'tag.1.id': '146beb37-f4ca-4995-951e-067412e09095', 'tag.1.name': 'two', 'tag.1.color': 'blue', - }) + }), ).toEqual({ id: '846beb37-f4ca-4995-951e-067412e09095', unread: false, @@ -310,7 +310,7 @@ describe('PostgrestFilter', () => { unread: false, 'recipient_id.id': '046beb37-f4ca-4995-951e-067412e09095', 'recipient_id.full_name': 'test', - }) + }), ).toEqual({ id: '846beb37-f4ca-4995-951e-067412e09095', unread: false, @@ -415,7 +415,7 @@ describe('PostgrestFilter', () => { }).denormalize({ id: '846beb37-f4ca-4995-951e-067412e09095', unread: false, - }) + }), ).toEqual({ id: '846beb37-f4ca-4995-951e-067412e09095', unread: false, @@ -458,7 +458,7 @@ describe('PostgrestFilter', () => { 'some.nested.value': 'test', 'some.nested.array.0.type': 'a', 'some.nested.array.1.type': 'b', - }) + }), ).toEqual({ array: ['element-1', 'element-2'], some: { @@ -479,7 +479,7 @@ describe('PostgrestFilter', () => { paths: [ { path: 'null_value.value', declaration: 'null_value.value' }, ], - }).hasPaths(MOCK) + }).hasPaths(MOCK), ).toEqual(true); }); @@ -490,7 +490,7 @@ describe('PostgrestFilter', () => { paths: [ { path: 'empty_array.value', declaration: 'empty_array.value' }, ], - }).hasPaths(MOCK) + }).hasPaths(MOCK), ).toEqual(true); }); @@ -504,7 +504,7 @@ describe('PostgrestFilter', () => { declaration: 'array_of_objects.some->>value', }, ], - }).hasPaths(MOCK) + }).hasPaths(MOCK), ).toEqual(true); }); @@ -518,7 +518,7 @@ describe('PostgrestFilter', () => { declaration: 'array_of_objects.some.value', }, ], - }).hasPaths(MOCK) + }).hasPaths(MOCK), ).toEqual(true); }); @@ -532,7 +532,7 @@ describe('PostgrestFilter', () => { declaration: 'invalid_array_of_objects.some.value', }, ], - }).hasPaths(MOCK) + }).hasPaths(MOCK), ).toEqual(false); }); }); @@ -559,7 +559,7 @@ describe('PostgrestFilter', () => { { path: 'array', declaration: 'array' }, { path: 'some.nested.value', declaration: 'some.nested.value' }, ], - }).hasFiltersOnPaths(['some_path', 'some_unexisting_path']) + }).hasFiltersOnPaths(['some_path', 'some_unexisting_path']), ).toEqual(false); }); it('should return true if any path is included', () => { @@ -590,7 +590,7 @@ describe('PostgrestFilter', () => { { path: 'array', declaration: 'array' }, { path: 'some.nested.value', declaration: 'some.nested.value' }, ], - }).hasFiltersOnPaths(['some_unexisting_path', 'id']) + }).hasFiltersOnPaths(['some_unexisting_path', 'id']), ).toEqual(true); }); }); @@ -623,7 +623,7 @@ describe('PostgrestFilter', () => { { path: 'array', declaration: 'array' }, { path: 'some.nested.value', declaration: 'some.nested.value' }, ], - }).applyFiltersOnPaths(MOCK, ['some_other_path']) + }).applyFiltersOnPaths(MOCK, ['some_other_path']), ).toEqual(true); }); it('with or', () => { @@ -654,7 +654,7 @@ describe('PostgrestFilter', () => { { path: 'array', declaration: 'array' }, { path: 'some.nested.value', declaration: 'some.nested.value' }, ], - }).applyFiltersOnPaths(MOCK, ['some_other_path']) + }).applyFiltersOnPaths(MOCK, ['some_other_path']), ).toEqual(false); }); }); @@ -687,7 +687,7 @@ describe('PostgrestFilter', () => { { path: 'array', declaration: 'array' }, { path: 'some.nested.value', declaration: 'some.nested.value' }, ], - }).apply(MOCK) + }).apply(MOCK), ).toEqual(true); }); it('or', () => { @@ -716,7 +716,7 @@ describe('PostgrestFilter', () => { { path: 'array', declaration: 'array' }, { path: 'some.nested.value', declaration: 'some.nested.value' }, ], - }).apply(MOCK) + }).apply(MOCK), ).toEqual(true); }); it('or with nested value and undefined path', () => { @@ -751,7 +751,7 @@ describe('PostgrestFilter', () => { { path: 'array', declaration: 'array' }, { path: 'some.nested.value', declaration: 'some.nested.value' }, ], - }).apply(MOCK) + }).apply(MOCK), ).toEqual(true); }); it('or with nested and', () => { @@ -790,7 +790,7 @@ describe('PostgrestFilter', () => { { path: 'array', declaration: 'array' }, { path: 'some.nested.value', declaration: 'some.nested.value' }, ], - }).apply(MOCK) + }).apply(MOCK), ).toEqual(true); }); it('negate', () => { @@ -809,7 +809,7 @@ describe('PostgrestFilter', () => { { path: 'array', declaration: 'array' }, { path: 'some.nested.value', declaration: 'some.nested.value' }, ], - }).apply(MOCK) + }).apply(MOCK), ).toEqual(true); }); @@ -829,7 +829,7 @@ describe('PostgrestFilter', () => { { path: 'array', declaration: 'array' }, { path: 'some.nested.value', declaration: 'some.nested.value' }, ], - }).apply(MOCK) + }).apply(MOCK), ).toEqual(true); }); it('boolean values', () => { @@ -848,7 +848,7 @@ describe('PostgrestFilter', () => { { path: 'array', declaration: 'array' }, { path: 'some.nested.value', declaration: 'some.nested.value' }, ], - }).apply(MOCK) + }).apply(MOCK), ).toEqual(true); }); @@ -868,7 +868,7 @@ describe('PostgrestFilter', () => { { path: 'array', declaration: 'array' }, { path: 'some.nested.value', declaration: 'some.nested.value' }, ], - }).apply(MOCK) + }).apply(MOCK), ).toEqual(true); }); @@ -888,7 +888,7 @@ describe('PostgrestFilter', () => { { path: 'array', declaration: 'array' }, { path: 'some.nested.value', declaration: 'some.nested.value' }, ], - }).apply(MOCK) + }).apply(MOCK), ).toEqual(true); }); it('should return false if selected value is not present', () => { @@ -900,7 +900,7 @@ describe('PostgrestFilter', () => { { path: 'array', declaration: 'array' }, { path: 'some.nested.value', declaration: 'some.nested.value' }, ], - }).apply(MOCK) + }).apply(MOCK), ).toEqual(false); }); @@ -926,8 +926,8 @@ describe('PostgrestFilter', () => { negate: false, operator: 'unknown', value: 'value', - })}. Operator unknown is not supported.` - ) + })}. Operator unknown is not supported.`, + ), ); } }); diff --git a/packages/postgrest-core/__tests__/postgrest-parser.spec.ts b/packages/postgrest-core/__tests__/postgrest-parser.spec.ts index f23b5011..603da3f3 100644 --- a/packages/postgrest-core/__tests__/postgrest-parser.spec.ts +++ b/packages/postgrest-core/__tests__/postgrest-parser.spec.ts @@ -16,8 +16,8 @@ describe('PostgrestParser', () => { .from('test') .select('*', { head: true, count: 'exact' }) .eq('id', '123') - .contains('id', '456') - ).isHead + .contains('id', '456'), + ).isHead, ).toEqual(true); }); @@ -28,8 +28,8 @@ describe('PostgrestParser', () => { .from('test') .select('*', { head: true, count: 'exact' }) .eq('id', '123') - .contains('id', '456') - ).count + .contains('id', '456'), + ).count, ).toEqual('exact'); }); @@ -40,7 +40,7 @@ describe('PostgrestParser', () => { .select('*', { head: true, count: 'exact' }) .eq('id', '123') .contains('id', '456') - .range(100, 999) + .range(100, 999), ); expect(parser.limit).toEqual(900); expect(parser.offset).toEqual(100); @@ -53,7 +53,7 @@ describe('PostgrestParser', () => { .from('test') .select('*', { head: true, count: 'exact' }) .eq('id', '123') - .order('one', { nullsFirst: true, ascending: false }) + .order('one', { nullsFirst: true, ascending: false }), ); expect(parser.orderBy).toEqual([ { @@ -70,7 +70,7 @@ describe('PostgrestParser', () => { .from('test') .select('*', { head: true, count: 'exact' }) .eq('id', '123') - .order('one', { foreignTable: 'test' }) + .order('one', { foreignTable: 'test' }), ); expect(parser.orderBy).toEqual([ { @@ -88,7 +88,7 @@ describe('PostgrestParser', () => { .select('*', { head: true, count: 'exact' }) .eq('id', '123') .order('one', { ascending: true }) - .order('two', { ascending: false }) + .order('two', { ascending: false }), ); expect(parser.orderBy).toEqual([ { @@ -114,8 +114,8 @@ describe('PostgrestParser', () => { .select('*', { head: true, count: 'exact' }) .eq('id', '123') .order('one', { ascending: true, foreignTable: 'foreignTable' }) - .order('two', { ascending: false }) - ).orderByKey + .order('two', { ascending: false }), + ).orderByKey, ).toEqual('foreignTable.one:asc.nullsLast|two:desc.nullsLast'); }); }); @@ -123,8 +123,8 @@ describe('PostgrestParser', () => { it('should set table', () => { expect( new PostgrestParser( - c.from('test').select('*').eq('id', '123').contains('id', '456') - ).table + c.from('test').select('*').eq('id', '123').contains('id', '456'), + ).table, ).toEqual('test'); }); it('should work with rpc', () => { @@ -133,8 +133,8 @@ describe('PostgrestParser', () => { c .rpc('my_rpc', { param: 123, test: { object: 'test' } }) .eq('id', '123') - .contains('id', '456') - ).table + .contains('id', '456'), + ).table, ).toEqual('rpc/my_rpc'); }); }); @@ -145,8 +145,8 @@ describe('PostgrestParser', () => { createClient('http://localhost', '123', { db: { schema: 'test' } }) .rpc('my_rpc', { param: 123, test: { object: 'test' } }) .eq('id', '123') - .contains('id', '456') - ).schema + .contains('id', '456'), + ).schema, ).toEqual('test'); }); @@ -157,8 +157,8 @@ describe('PostgrestParser', () => { c.rpc('test', { some: { nested: 'value', another: 1 }, another: 'value', - }) - ).bodyKey + }), + ).bodyKey, ).toEqual('another=value&some.another=1&some.nested=value'); }); @@ -168,15 +168,15 @@ describe('PostgrestParser', () => { c.rpc('test', { some: { nested: 'value', another: 1 }, another: 'value', - }) - ).bodyKey + }), + ).bodyKey, ).toEqual( new PostgrestParser( c.rpc('test', { another: 'value', some: { another: 1, nested: 'value' }, - }) - ).bodyKey + }), + ).bodyKey, ); }); }); @@ -185,19 +185,19 @@ describe('PostgrestParser', () => { it('should return the same key if filters were applied in different orders', () => { expect( new PostgrestParser( - c.from('test').select('*').eq('id', '123').contains('id', '456') - ).queryKey + c.from('test').select('*').eq('id', '123').contains('id', '456'), + ).queryKey, ).toEqual( new PostgrestParser( - c.from('test').select('*').contains('id', '456').eq('id', '123') - ).queryKey + c.from('test').select('*').contains('id', '456').eq('id', '123'), + ).queryKey, ); }); it('should return only the relevant part of the url', () => { expect( new PostgrestParser( - c.from('test').select('*').eq('id', '123').contains('id', '456') - ).queryKey + c.from('test').select('*').eq('id', '123').contains('id', '456'), + ).queryKey, ).toEqual('id=cs.456&id=eq.123&select=*'); }); }); @@ -208,9 +208,9 @@ describe('PostgrestParser', () => { c .from('test') .select( - 'id,test:some_column,relation(value,aliased_relation:other_relation(other_value))' - ) - ).paths + 'id,test:some_column,relation(value,aliased_relation:other_relation(other_value))', + ), + ).paths, ).toEqual([ { declaration: 'id', alias: undefined, path: 'id' }, { @@ -380,7 +380,7 @@ describe('PostgrestParser', () => { query = c .from('test') .select( - 'id,test:some_column,relation(value,aliased_relation:other_relation(other_value),aliased:test)' + 'id,test:some_column,relation(value,aliased_relation:other_relation(other_value),aliased:test)', ); }); @@ -390,10 +390,10 @@ describe('PostgrestParser', () => { c .from('test') .select( - 'recipients:recipient!recipient_conversation_id_fkey!inner(contact_id)' + 'recipients:recipient!recipient_conversation_id_fkey!inner(contact_id)', ) - .eq('recipients.contact_id', 'some-contact-id') - ).filters + .eq('recipients.contact_id', 'some-contact-id'), + ).filters, ).toEqual([ { path: 'recipient.contact_id', @@ -411,9 +411,9 @@ describe('PostgrestParser', () => { query.not( 'relation.other_relation.other_value', 'eq', - 'some.value.with.dots' - ) - ).filters + 'some.value.with.dots', + ), + ).filters, ).toEqual([ { path: 'relation.other_relation.other_value', @@ -428,7 +428,7 @@ describe('PostgrestParser', () => { it('negated filter on embeddings', () => { expect( new PostgrestParser(query.not('relation.value', 'eq', 'filterValue')) - .filters + .filters, ).toEqual([ { path: 'relation.value', @@ -442,7 +442,7 @@ describe('PostgrestParser', () => { it('filter on embeddings', () => { expect( - new PostgrestParser(query.eq('relation.value', 'filterValue')).filters + new PostgrestParser(query.eq('relation.value', 'filterValue')).filters, ).toEqual([ { path: 'relation.value', @@ -456,7 +456,7 @@ describe('PostgrestParser', () => { it('or', () => { expect( - new PostgrestParser(query.or('id.eq.123,id.gte.456')).filters + new PostgrestParser(query.or('id.eq.123,id.gte.456')).filters, ).toEqual([ { or: [ @@ -480,7 +480,7 @@ describe('PostgrestParser', () => { it('with alias', () => { expect( new PostgrestParser(query.or('id.eq.123,id.gte.456,some_column.eq.123')) - .filters + .filters, ).toEqual([ { or: [ @@ -515,8 +515,8 @@ describe('PostgrestParser', () => { new PostgrestParser( query.or('test.eq.Wellington,value.eq.Paris', { foreignTable: 'relation', - }) - ).filters + }), + ).filters, ).toEqual([ { or: [ @@ -543,8 +543,8 @@ describe('PostgrestParser', () => { new PostgrestParser( query.or('name.eq.Wellington,name.eq.Paris', { foreignTable: 'cities', - }) - ).filters + }), + ).filters, ).toEqual([ { or: [ @@ -568,9 +568,9 @@ describe('PostgrestParser', () => { expect( new PostgrestParser( query.or( - 'full_name.eq.20,test.neq.true,and(full_name.eq.Test Name,email.eq.test@mail.com)' - ) - ).filters + 'full_name.eq.20,test.neq.true,and(full_name.eq.Test Name,email.eq.test@mail.com)', + ), + ).filters, ).toEqual([ { or: [ @@ -615,10 +615,10 @@ describe('PostgrestParser', () => { new PostgrestParser( query .or( - 'full_name.eq.20,and(full_name.eq.Test Name,email.eq.test@mail.com)' + 'full_name.eq.20,and(full_name.eq.Test Name,email.eq.test@mail.com)', ) - .order('full_name', { ascending: true, nullsFirst: true }) - ).filters + .order('full_name', { ascending: true, nullsFirst: true }), + ).filters, ).toEqual([ { or: [ @@ -653,8 +653,8 @@ describe('PostgrestParser', () => { new PostgrestParser( query.or('id.gt.20,and(name.eq.New Zealand,name.eq.France)', { foreignTable: 'cities', - }) - ).filters + }), + ).filters, ).toEqual([ { or: [ @@ -697,8 +697,8 @@ describe('PostgrestParser', () => { it('json selector', () => { expect( new PostgrestParser( - query.eq('id -> nested -> moreNested ->> test', '123') - ).filters + query.eq('id -> nested -> moreNested ->> test', '123'), + ).filters, ).toEqual([ { path: 'id->nested->moreNested->>test', @@ -711,8 +711,8 @@ describe('PostgrestParser', () => { it('json selector with mapped name', () => { expect( new PostgrestParser( - query.eq('id -> nested -> moreNested ->> test', '123') - ).filters + query.eq('id -> nested -> moreNested ->> test', '123'), + ).filters, ).toEqual([ { path: 'id->nested->moreNested->>test', @@ -731,7 +731,7 @@ describe('PostgrestParser', () => { operator: 'eq', value: 123, }, - ] + ], ); }); it('neq', () => { @@ -817,8 +817,8 @@ describe('PostgrestParser', () => { it('fts', () => { expect( new PostgrestParser( - query.textSearch('text_search_column', 'search value') - ).filters + query.textSearch('text_search_column', 'search value'), + ).filters, ).toEqual([ { path: 'text_search_column', @@ -831,8 +831,8 @@ describe('PostgrestParser', () => { it('plfts', () => { expect( new PostgrestParser( - query.textSearch('column', 'te me', { type: 'plain' }) - ).filters + query.textSearch('column', 'te me', { type: 'plain' }), + ).filters, ).toEqual([ { path: 'column', @@ -844,7 +844,7 @@ describe('PostgrestParser', () => { }); it('in', () => { expect( - new PostgrestParser(query.in('id', ['test1', 'test2'])).filters + new PostgrestParser(query.in('id', ['test1', 'test2'])).filters, ).toEqual([ { path: 'id', @@ -856,7 +856,7 @@ describe('PostgrestParser', () => { }); it('contains', () => { expect( - new PostgrestParser(query.contains('id', ['test1', 'test2'])).filters + new PostgrestParser(query.contains('id', ['test1', 'test2'])).filters, ).toEqual([ { path: 'id', @@ -868,7 +868,8 @@ describe('PostgrestParser', () => { }); it('containedBy', () => { expect( - new PostgrestParser(query.containedBy('id', ['test1', 'test2'])).filters + new PostgrestParser(query.containedBy('id', ['test1', 'test2'])) + .filters, ).toEqual([ { path: 'id', @@ -883,8 +884,8 @@ describe('PostgrestParser', () => { expect( new PostgrestParser( query.or('eq.20,and(unknown.eq.Test Name,email.eq.test@mail.com)'), - { exclusivePaths: ['full_name'] } - ).filters + { exclusivePaths: ['full_name'] }, + ).filters, ).toEqual([]); }); @@ -892,8 +893,8 @@ describe('PostgrestParser', () => { expect( new PostgrestParser( query.or('or(unknown.eq.Test Name,email.eq.test@mail.com)'), - { exclusivePaths: ['full_name'] } - ).filters + { exclusivePaths: ['full_name'] }, + ).filters, ).toEqual([]); }); @@ -901,10 +902,10 @@ describe('PostgrestParser', () => { expect( new PostgrestParser( query.or( - 'full_name.eq.20,and(full_name.eq.Test Name,email.eq.test@mail.com)' + 'full_name.eq.20,and(full_name.eq.Test Name,email.eq.test@mail.com)', ), - { exclusivePaths: ['full_name'] } - ).filters + { exclusivePaths: ['full_name'] }, + ).filters, ).toEqual([ { or: [ diff --git a/packages/postgrest-core/__tests__/postgrest-query-parser.spec.ts b/packages/postgrest-core/__tests__/postgrest-query-parser.spec.ts index 4ac43202..fcd81d4c 100644 --- a/packages/postgrest-core/__tests__/postgrest-query-parser.spec.ts +++ b/packages/postgrest-core/__tests__/postgrest-query-parser.spec.ts @@ -4,8 +4,8 @@ describe('PostgrestQueryParser', () => { it('should work if the column has the name as the operator', () => { expect( new PostgrestQueryParser( - 'fts=fts.12%3A*&limit=50&offset=0&order=name.asc&organisation_id=eq.7ffe8eab-8e99-4b63-be2d-a418d4cb767b&select=id%2Cname%2Cwhatsapp_status%2Ctype%2Crequest_approvals%2Clanguage%28name%29%2Ctext%2Cupdated_at%2Cprovider_template_approval%28status%2Ccategory%29' - ).filters + 'fts=fts.12%3A*&limit=50&offset=0&order=name.asc&organisation_id=eq.7ffe8eab-8e99-4b63-be2d-a418d4cb767b&select=id%2Cname%2Cwhatsapp_status%2Ctype%2Crequest_approvals%2Clanguage%28name%29%2Ctext%2Cupdated_at%2Cprovider_template_approval%28status%2Ccategory%29', + ).filters, ).toEqual([ { alias: undefined, diff --git a/packages/postgrest-core/__tests__/update-fetcher.spec.ts b/packages/postgrest-core/__tests__/update-fetcher.spec.ts index 7611a170..2e38a48f 100644 --- a/packages/postgrest-core/__tests__/update-fetcher.spec.ts +++ b/packages/postgrest-core/__tests__/update-fetcher.spec.ts @@ -16,7 +16,7 @@ describe('update', () => { testRunPrefix = `${TEST_PREFIX}-${Math.floor(Math.random() * 100)}`; client = createClient( process.env.SUPABASE_URL as string, - process.env.SUPABASE_ANON_KEY as string + process.env.SUPABASE_ANON_KEY as string, ); await client.from('contact').delete().ilike('username', `${TEST_PREFIX}%`); @@ -34,7 +34,7 @@ describe('update', () => { await expect( buildUpdateFetcher(client.from('contact'), ['id'], { queriesForTable: () => [], - })({}) + })({}), ).rejects.toThrowError('Missing value for primary key id'); }); @@ -42,7 +42,7 @@ describe('update', () => { const updatedContact = await buildUpdateFetcher( client.from('contact'), ['id'], - { queriesForTable: () => [] } + { queriesForTable: () => [] }, )({ id: contact?.id, username: `${testRunPrefix}-username-2`, diff --git a/packages/postgrest-core/__tests__/upsert-fetcher.spec.ts b/packages/postgrest-core/__tests__/upsert-fetcher.spec.ts index ef5db4c3..137b38fa 100644 --- a/packages/postgrest-core/__tests__/upsert-fetcher.spec.ts +++ b/packages/postgrest-core/__tests__/upsert-fetcher.spec.ts @@ -1,7 +1,7 @@ import { createClient, SupabaseClient } from '@supabase/supabase-js'; -import { buildUpsertFetcher } from '../src/upsert-fetcher'; import { Database } from './database.types'; +import { buildUpsertFetcher } from '../src/upsert-fetcher'; import './utils'; const TEST_PREFIX = 'postgrest-fetcher-upsert-'; @@ -14,7 +14,7 @@ describe('upsert', () => { testRunPrefix = `${TEST_PREFIX}-${Math.floor(Math.random() * 100)}`; client = createClient( process.env.SUPABASE_URL as string, - process.env.SUPABASE_ANON_KEY as string + process.env.SUPABASE_ANON_KEY as string, ); await client.from('contact').delete().ilike('username', `${TEST_PREFIX}%`); }); @@ -25,8 +25,8 @@ describe('upsert', () => { [ { username: `${testRunPrefix}-username-1` }, { username: `${testRunPrefix}-username-2` }, - ] - ) + ], + ), ).resolves.toEqual(null); }); diff --git a/packages/postgrest-core/__tests__/upsert-item.spec.ts b/packages/postgrest-core/__tests__/upsert-item.spec.ts index 964c1930..107d877f 100644 --- a/packages/postgrest-core/__tests__/upsert-item.spec.ts +++ b/packages/postgrest-core/__tests__/upsert-item.spec.ts @@ -44,13 +44,13 @@ describe('upsertItem', () => { }; }, mutate: jest.fn(), - } + }, ); expect(mutate).toHaveBeenCalledTimes(1); expect(mutate).toHaveBeenCalledWith( expect.objectContaining({ type: 'UPSERT' }), expect.anything(), - undefined + undefined, ); }); }); diff --git a/packages/postgrest-core/package.json b/packages/postgrest-core/package.json index 16e4e98a..2fbf1fd4 100644 --- a/packages/postgrest-core/package.json +++ b/packages/postgrest-core/package.json @@ -64,7 +64,7 @@ "@types/lodash": "4.14.184", "@types/flat": "5.0.2", "dotenv": "16.3.1", - "eslint": "8.40.0", + "eslint": "8.52.0", "jest": "29.7.0", "ts-jest": "29.1.0", "tsup": "7.2.0", diff --git a/packages/postgrest-core/src/cursor-pagination-fetcher.ts b/packages/postgrest-core/src/cursor-pagination-fetcher.ts index ea4f9252..737a99f9 100644 --- a/packages/postgrest-core/src/cursor-pagination-fetcher.ts +++ b/packages/postgrest-core/src/cursor-pagination-fetcher.ts @@ -6,7 +6,7 @@ import { PostgrestPaginationResponse } from './lib/response-types'; import { setFilterValue } from './lib/set-filter-value'; export type PostgrestCursorPaginationFetcher = ( - args: Args + args: Args, ) => Promise; export type PostgrestCursorPaginationKeyDecoder = (args: Args) => { @@ -19,10 +19,10 @@ export const createCursorPaginationFetcher = < Row extends Record, Result, Args, - Relationships = unknown + Relationships = unknown, >( query: PostgrestTransformBuilder | null, - decode: PostgrestCursorPaginationKeyDecoder + decode: PostgrestCursorPaginationKeyDecoder, ): PostgrestCursorPaginationFetcher< PostgrestPaginationResponse, Args @@ -36,7 +36,7 @@ export const createCursorPaginationFetcher = < query['url'].searchParams, `${order.foreignTable ? `${order.foreignTable}.` : ''}${order.column}`, order.ascending ? 'gt' : 'lt', - cursor + cursor, ); } diff --git a/packages/postgrest-core/src/delete-fetcher.ts b/packages/postgrest-core/src/delete-fetcher.ts index a0c4ed6e..433481c3 100644 --- a/packages/postgrest-core/src/delete-fetcher.ts +++ b/packages/postgrest-core/src/delete-fetcher.ts @@ -9,13 +9,13 @@ import { MutationFetcherResponse } from './fetch/build-mutation-fetcher-response import { BuildNormalizedQueryOps } from './fetch/build-normalized-query'; export type DeleteFetcher = ( - input: Partial + input: Partial, ) => Promise | null>; export type DeleteFetcherOptions< S extends GenericSchema, T extends GenericTable, - Re = T extends { Relationships: infer R } ? R : unknown + Re = T extends { Relationships: infer R } ? R : unknown, > = Parameters['delete']>[0]; export const buildDeleteFetcher = @@ -24,14 +24,14 @@ export const buildDeleteFetcher = T extends GenericTable, Re = T extends { Relationships: infer R } ? R : unknown, Q extends string = '*', - R = GetResult + R = GetResult, >( qb: PostgrestQueryBuilder, primaryKeys: (keyof T['Row'])[], - opts: BuildNormalizedQueryOps & DeleteFetcherOptions + opts: BuildNormalizedQueryOps & DeleteFetcherOptions, ): DeleteFetcher => async ( - input: Partial + input: Partial, ): Promise | null> => { let filterBuilder = qb.delete(opts); for (const key of primaryKeys) { diff --git a/packages/postgrest-core/src/delete-item.ts b/packages/postgrest-core/src/delete-item.ts index d778804b..caf55d45 100644 --- a/packages/postgrest-core/src/delete-item.ts +++ b/packages/postgrest-core/src/delete-item.ts @@ -7,5 +7,5 @@ export type DeleteItemProps> = Omit< export const deleteItem = >( op: DeleteItemProps, - cache: Cache + cache: Cache, ) => mutate({ type: 'DELETE', ...op }, cache); diff --git a/packages/postgrest-core/src/fetch/build-mutation-fetcher-response.ts b/packages/postgrest-core/src/fetch/build-mutation-fetcher-response.ts index 43013a02..e74f6a99 100644 --- a/packages/postgrest-core/src/fetch/build-mutation-fetcher-response.ts +++ b/packages/postgrest-core/src/fetch/build-mutation-fetcher-response.ts @@ -1,12 +1,12 @@ import flatten from 'flat'; +import { BuildNormalizedQueryReturn } from './build-normalized-query'; import { get } from '../lib/get'; import { groupPathsRecursive, isNestedPath, } from '../lib/group-paths-recursive'; import { Path } from '../lib/query-types'; -import { BuildNormalizedQueryReturn } from './build-normalized-query'; /** * The parsed response of the mutation fetcher @@ -30,7 +30,7 @@ export const buildMutationFetcherResponse = ( { paths, userQueryPaths, - }: Pick + }: Pick, ): MutationFetcherResponse => { return { normalizedData: normalizeResponse(paths, input), @@ -70,7 +70,7 @@ const normalizeResponse = (paths: Path[], obj: R): R => { ...flatten({ [curr.path]: normalizeResponse( curr.paths, - value as Record + value as Record, ), }), }; @@ -87,7 +87,7 @@ const normalizeResponse = (paths: Path[], obj: R): R => { const buildUserQueryData = ( userQueryPaths: Path[], paths: Path[], - obj: R + obj: R, ): R => { const userQueryGroups = groupPathsRecursive(userQueryPaths); const pathGroups = groupPathsRecursive(paths); @@ -95,7 +95,7 @@ const buildUserQueryData = ( return userQueryGroups.reduce((prev, curr) => { // paths is reflecting the obj const inputPath = pathGroups.find( - (p) => p.path === curr.path && isNestedPath(p) === isNestedPath(curr) + (p) => p.path === curr.path && isNestedPath(p) === isNestedPath(curr), ); if (!inputPath) { // should never happen though since userQueryPaths is a subset of paths @@ -115,7 +115,7 @@ const buildUserQueryData = ( buildUserQueryData( curr.paths, inputPath.paths, - value as Record + value as Record, ); } return prev; diff --git a/packages/postgrest-core/src/fetch/build-normalized-query.ts b/packages/postgrest-core/src/fetch/build-normalized-query.ts index 3465b94d..4a539f5a 100644 --- a/packages/postgrest-core/src/fetch/build-normalized-query.ts +++ b/packages/postgrest-core/src/fetch/build-normalized-query.ts @@ -1,3 +1,5 @@ +import { buildSelectStatement } from './build-select-statement'; +import { buildDedupePath } from './dedupe'; import { extractPathsFromFilters } from '../lib/extract-paths-from-filter'; import { parseSelectParam } from '../lib/parse-select-param'; import { @@ -6,8 +8,6 @@ import { QueryWithoutWildcard, } from '../lib/query-types'; import { removeAliasFromDeclaration } from '../lib/remove-alias-from-declaration'; -import { buildSelectStatement } from './build-select-statement'; -import { buildDedupePath } from './dedupe'; export type BuildNormalizedQueryOps = { query?: QueryWithoutWildcard | null; @@ -57,7 +57,7 @@ export const buildNormalizedQuery = ({ for (const filterPath of extractPathsFromFilters(tableQuery.filters)) { // add paths used in filter const path = tableQuery.paths.find( - (p) => p.path === filterPath.path && p.alias === filterPath.alias + (p) => p.path === filterPath.path && p.alias === filterPath.alias, ) ?? { path: filterPath.path, declaration: filterPath.path, @@ -67,7 +67,7 @@ export const buildNormalizedQuery = ({ paths.every( (p) => removeAliasFromDeclaration(p.declaration) !== - removeAliasFromDeclaration(path.declaration) + removeAliasFromDeclaration(path.declaration), ) ) { // do not use alias @@ -83,7 +83,7 @@ export const buildNormalizedQuery = ({ paths.every( (p) => removeAliasFromDeclaration(p.declaration) !== - removeAliasFromDeclaration(path.declaration) + removeAliasFromDeclaration(path.declaration), ) && // do not add agg functions !path.declaration.endsWith('.count') diff --git a/packages/postgrest-core/src/fetch/dedupe.ts b/packages/postgrest-core/src/fetch/dedupe.ts index 9a438191..59b7a15c 100644 --- a/packages/postgrest-core/src/fetch/dedupe.ts +++ b/packages/postgrest-core/src/fetch/dedupe.ts @@ -14,7 +14,7 @@ export const buildDedupePath = (idx: number, p: Path) => { const withoutAlias = el.split(':').pop() as string; if (i === a.length - 1) { return `${[DEDUPE_ALIAS_PREFIX, idx, withoutAlias].join( - '_' + '_', )}:${withoutAlias}`; } return withoutAlias; @@ -23,7 +23,7 @@ export const buildDedupePath = (idx: number, p: Path) => { alias: p.path .split('.') .map((el, i, a) => - i === a.length - 1 ? [DEDUPE_ALIAS_PREFIX, idx, el].join('_') : el + i === a.length - 1 ? [DEDUPE_ALIAS_PREFIX, idx, el].join('_') : el, ) .join('.'), }; diff --git a/packages/postgrest-core/src/fetcher.ts b/packages/postgrest-core/src/fetcher.ts index cb586812..6cdbe9d9 100644 --- a/packages/postgrest-core/src/fetcher.ts +++ b/packages/postgrest-core/src/fetcher.ts @@ -2,7 +2,7 @@ import { isPostgrestBuilder } from './lib/is-postgrest-builder'; import { AnyPostgrestResponse } from './lib/response-types'; export const fetcher = async ( - q: PromiseLike> + q: PromiseLike>, ) => { if (isPostgrestBuilder(q)) { q = q.throwOnError(); diff --git a/packages/postgrest-core/src/filter/denormalize.ts b/packages/postgrest-core/src/filter/denormalize.ts index 415b345b..ad7dfc64 100644 --- a/packages/postgrest-core/src/filter/denormalize.ts +++ b/packages/postgrest-core/src/filter/denormalize.ts @@ -11,7 +11,7 @@ export const denormalize = >( // the paths into which we need to transform paths: Path[], // the normalized response data - obj: R + obj: R, ): R => { const groups = groupPathsRecursive(paths); @@ -80,7 +80,7 @@ export const denormalize = >( return { ...prev, [curr.alias || curr.path]: Object.values(flatNestedObjectOrArray).map( - (v) => denormalize(curr.paths, v) + (v) => denormalize(curr.paths, v), ), }; } @@ -88,7 +88,7 @@ export const denormalize = >( ...prev, [curr.alias || curr.path]: denormalize( curr.paths, - flatNestedObjectOrArray + flatNestedObjectOrArray, ), }; }, {} as R); @@ -96,5 +96,5 @@ export const denormalize = >( // just to make ts happy const isFlatNestedArray = ( - obj: Record> | Record + obj: Record> | Record, ): obj is Record> => true; diff --git a/packages/postgrest-core/src/insert-fetcher.ts b/packages/postgrest-core/src/insert-fetcher.ts index 3fde27f2..bf094121 100644 --- a/packages/postgrest-core/src/insert-fetcher.ts +++ b/packages/postgrest-core/src/insert-fetcher.ts @@ -13,13 +13,13 @@ import { } from './fetch/build-normalized-query'; export type InsertFetcher = ( - input: T['Insert'][] + input: T['Insert'][], ) => Promise[] | null>; export type InsertFetcherOptions< S extends GenericSchema, T extends GenericTable, - Re = T extends { Relationships: infer R } ? R : unknown + Re = T extends { Relationships: infer R } ? R : unknown, > = Parameters['insert']>[1]; function buildInsertFetcher< @@ -27,13 +27,13 @@ function buildInsertFetcher< T extends GenericTable, Re = T extends { Relationships: infer R } ? R : unknown, Q extends string = '*', - R = GetResult + R = GetResult, >( qb: PostgrestQueryBuilder, - opts: BuildNormalizedQueryOps & InsertFetcherOptions + opts: BuildNormalizedQueryOps & InsertFetcherOptions, ): InsertFetcher { return async ( - input: T['Insert'][] + input: T['Insert'][], ): Promise[] | null> => { const query = buildNormalizedQuery(opts); if (query) { @@ -44,7 +44,7 @@ function buildInsertFetcher< .throwOnError(); // data cannot be null because of throwOnError() return (data as R[]).map((d) => - buildMutationFetcherResponse(d, { paths, userQueryPaths }) + buildMutationFetcherResponse(d, { paths, userQueryPaths }), ); } await qb.insert(input as any).throwOnError(); diff --git a/packages/postgrest-core/src/lib/binary-search.ts b/packages/postgrest-core/src/lib/binary-search.ts index 86fb9451..73249743 100644 --- a/packages/postgrest-core/src/lib/binary-search.ts +++ b/packages/postgrest-core/src/lib/binary-search.ts @@ -14,7 +14,7 @@ export function binarySearch( arr: Type[], el: Type, - compare: (a: Type, b: Type) => number + compare: (a: Type, b: Type) => number, ) { let m = 0; let n = arr.length - 1; diff --git a/packages/postgrest-core/src/lib/cache-data-types.ts b/packages/postgrest-core/src/lib/cache-data-types.ts index 4ba2110e..12f9af29 100644 --- a/packages/postgrest-core/src/lib/cache-data-types.ts +++ b/packages/postgrest-core/src/lib/cache-data-types.ts @@ -3,7 +3,7 @@ import { PostgrestHasMorePaginationResponse } from './response-types'; export type PostgrestPaginationCacheData = Result[][]; export const isPostgrestPaginationCacheData = ( - q: unknown + q: unknown, ): q is PostgrestPaginationCacheData => { if (!Array.isArray(q)) return false; return q.length === 0 || Array.isArray(q[0]); @@ -13,14 +13,14 @@ export type PostgrestHasMorePaginationCacheData = PostgrestHasMorePaginationResponse[]; export const isPostgrestHasMorePaginationCacheData = ( - q: unknown + q: unknown, ): q is PostgrestHasMorePaginationCacheData => { if (!Array.isArray(q)) return false; if (q.length === 0) return true; const firstPage = q[0]; return ( Array.isArray( - (firstPage as PostgrestHasMorePaginationResponse).data + (firstPage as PostgrestHasMorePaginationResponse).data, ) && typeof (firstPage as PostgrestHasMorePaginationResponse).hasMore === 'boolean' diff --git a/packages/postgrest-core/src/lib/encode-object.ts b/packages/postgrest-core/src/lib/encode-object.ts index dcb47654..db6f5f85 100644 --- a/packages/postgrest-core/src/lib/encode-object.ts +++ b/packages/postgrest-core/src/lib/encode-object.ts @@ -7,7 +7,7 @@ import { sortSearchParams } from './sort-search-param'; */ export const encodeObject = (obj: Record): string => { const sortedEntries = Object.entries( - flatten(obj) as Record + flatten(obj) as Record, ).sort(([a], [b]) => a.length - b.length); const bodyParams = new URLSearchParams(); sortedEntries.forEach(([key, value]) => { diff --git a/packages/postgrest-core/src/lib/extract-paths-from-filter.ts b/packages/postgrest-core/src/lib/extract-paths-from-filter.ts index 6a961f8a..c0ea64f6 100644 --- a/packages/postgrest-core/src/lib/extract-paths-from-filter.ts +++ b/packages/postgrest-core/src/lib/extract-paths-from-filter.ts @@ -17,7 +17,7 @@ export const extractPathsFromFilters = (f: FilterDefinitions) => { const aliasElements = filter.alias?.split('.'); const declaration = pathElements .map( - (el, idx) => `${aliasElements ? `${aliasElements[idx]}:` : ''}${el}` + (el, idx) => `${aliasElements ? `${aliasElements[idx]}:` : ''}${el}`, ) .join('.'); prev.push({ path: filter.path, alias: filter.alias, declaration }); diff --git a/packages/postgrest-core/src/lib/filter-filter-definitions-by-paths.ts b/packages/postgrest-core/src/lib/filter-filter-definitions-by-paths.ts index c7099fc8..509f77e2 100644 --- a/packages/postgrest-core/src/lib/filter-filter-definitions-by-paths.ts +++ b/packages/postgrest-core/src/lib/filter-filter-definitions-by-paths.ts @@ -7,7 +7,7 @@ import { export const filterFilterDefinitionsByPaths = ( f: FilterDefinitions, - paths: string[] + paths: string[], ) => { return f.reduce((prev, filter) => { if (isAndFilter(filter)) { diff --git a/packages/postgrest-core/src/lib/find-filters.ts b/packages/postgrest-core/src/lib/find-filters.ts index 5f9b797c..2db607ba 100644 --- a/packages/postgrest-core/src/lib/find-filters.ts +++ b/packages/postgrest-core/src/lib/find-filters.ts @@ -9,7 +9,7 @@ import { // Helper to search for filters in a filter definition export const findFilters = ( f: FilterDefinitions, - by: Partial + by: Partial, ) => { const filters: FilterDefinition[] = []; f.forEach((filter) => { diff --git a/packages/postgrest-core/src/lib/find-index-ordered.ts b/packages/postgrest-core/src/lib/find-index-ordered.ts index ffbfddc6..6573bc79 100644 --- a/packages/postgrest-core/src/lib/find-index-ordered.ts +++ b/packages/postgrest-core/src/lib/find-index-ordered.ts @@ -5,5 +5,5 @@ import { buildSortedComparator } from './sorted-comparator'; export const findIndexOrdered = >( input: Type, currentData: Type[], - orderBy: OrderDefinition[] + orderBy: OrderDefinition[], ): number => binarySearch(currentData, input, buildSortedComparator(orderBy)); diff --git a/packages/postgrest-core/src/lib/find-last-index.ts b/packages/postgrest-core/src/lib/find-last-index.ts index e8218672..7937655a 100644 --- a/packages/postgrest-core/src/lib/find-last-index.ts +++ b/packages/postgrest-core/src/lib/find-last-index.ts @@ -8,7 +8,7 @@ */ export function findLastIndex( array: T[], - predicate: (value: T, index: number, obj: T[]) => boolean + predicate: (value: T, index: number, obj: T[]) => boolean, ): number { let l = array.length; while (l--) { diff --git a/packages/postgrest-core/src/lib/get-table.ts b/packages/postgrest-core/src/lib/get-table.ts index 592951df..34ea1cb3 100644 --- a/packages/postgrest-core/src/lib/get-table.ts +++ b/packages/postgrest-core/src/lib/get-table.ts @@ -10,5 +10,5 @@ import { export const getTable = ( query: | PostgrestBuilder - | PostgrestQueryBuilder + | PostgrestQueryBuilder, ): string => (query as { url: URL })['url'].pathname.split('/').pop() as string; diff --git a/packages/postgrest-core/src/lib/get.ts b/packages/postgrest-core/src/lib/get.ts index 456b30af..ceb86db0 100644 --- a/packages/postgrest-core/src/lib/get.ts +++ b/packages/postgrest-core/src/lib/get.ts @@ -5,7 +5,7 @@ export const get = (obj: any, path: string, defaultValue: any = undefined) => { .filter(Boolean) .reduce( (res, key) => (res !== null && res !== undefined ? res[key] : res), - obj + obj, ); const result = travel(/[,[\]]+?/) || travel(/[,[\].]+?/); return result === undefined || result === obj ? defaultValue : result; diff --git a/packages/postgrest-core/src/lib/group-paths-recursive.ts b/packages/postgrest-core/src/lib/group-paths-recursive.ts index 9674b40a..ae744173 100644 --- a/packages/postgrest-core/src/lib/group-paths-recursive.ts +++ b/packages/postgrest-core/src/lib/group-paths-recursive.ts @@ -24,7 +24,7 @@ export const groupPathsRecursive = (paths: Path[]): (Path | NestedPath)[] => { // if has more than one level left, const firstLevelDeclaration = curr.declaration.split('.')[0]; const indexOfNested = prev.findIndex( - (p) => isNestedPath(p) && p.declaration === firstLevelDeclaration + (p) => isNestedPath(p) && p.declaration === firstLevelDeclaration, ); const pathWithoutCurrentLevel = removeFirstPathElement(curr); if (indexOfNested !== -1) { diff --git a/packages/postgrest-core/src/lib/is-iso-date-string.ts b/packages/postgrest-core/src/lib/is-iso-date-string.ts index a2e1e08e..24b65607 100644 --- a/packages/postgrest-core/src/lib/is-iso-date-string.ts +++ b/packages/postgrest-core/src/lib/is-iso-date-string.ts @@ -6,5 +6,5 @@ export const isISODateString = (v: unknown): boolean => typeof v === 'string' && /(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))/.test( - v + v, ); diff --git a/packages/postgrest-core/src/lib/is-postgrest-builder.ts b/packages/postgrest-core/src/lib/is-postgrest-builder.ts index 14133744..b98a4395 100644 --- a/packages/postgrest-core/src/lib/is-postgrest-builder.ts +++ b/packages/postgrest-core/src/lib/is-postgrest-builder.ts @@ -1,7 +1,7 @@ import { PostgrestBuilder } from '@supabase/postgrest-js'; export const isPostgrestBuilder = ( - q: unknown + q: unknown, ): q is PostgrestBuilder => { return typeof (q as PostgrestBuilder).throwOnError === 'function'; }; diff --git a/packages/postgrest-core/src/lib/mutator-types.ts b/packages/postgrest-core/src/lib/mutator-types.ts index 886a52f7..78e23a89 100644 --- a/packages/postgrest-core/src/lib/mutator-types.ts +++ b/packages/postgrest-core/src/lib/mutator-types.ts @@ -26,7 +26,7 @@ export type MutatorFn = ( currentData: | AnyPostgrestResponse | PostgrestHasMorePaginationResponse - | unknown + | unknown, ) => | AnyPostgrestResponse | PostgrestHasMorePaginationResponse diff --git a/packages/postgrest-core/src/lib/operators.ts b/packages/postgrest-core/src/lib/operators.ts index 8f1de976..e0d27aba 100644 --- a/packages/postgrest-core/src/lib/operators.ts +++ b/packages/postgrest-core/src/lib/operators.ts @@ -70,12 +70,12 @@ export const OPERATOR_MAP: { [Key in FilterOperator]?: OperatorFn } = { if (!Array.isArray(c)) return false; if (!Array.isArray(v)) v = v.slice(1, -1).split(','); return c.every((i: string) => - v.some((cmpVal: any) => deepEqual(cmpVal, i)) + v.some((cmpVal: any) => deepEqual(cmpVal, i)), ); }, fts: textSearch, plfts: (c, v) => buildLikeRegex(enclose(v.toLowerCase(), '%')).test( - c.toString().toLowerCase() + c.toString().toLowerCase(), ), }; diff --git a/packages/postgrest-core/src/lib/parse-select-param.ts b/packages/postgrest-core/src/lib/parse-select-param.ts index 92da8d73..acd88032 100644 --- a/packages/postgrest-core/src/lib/parse-select-param.ts +++ b/packages/postgrest-core/src/lib/parse-select-param.ts @@ -17,7 +17,7 @@ export const parseSelectParam = (s: string, currentPath?: Path): Path[] => { '2': 'selectedColumns', '3': null, }, - } + }, ).reduce((prev, curr, idx, matches) => { if (curr.name === 'selectedColumns') { const name = matches[idx - 1].value.slice(1, -1); @@ -33,12 +33,12 @@ export const parseSelectParam = (s: string, currentPath?: Path): Path[] => { .map(([table, selectedColumns]) => `${table}(${selectedColumns})` .replace(/\(/g, '\\(') - .replace(/\)/g, '\\)') + .replace(/\)/g, '\\)'), ) .join('|')}`, - 'g' + 'g', ), - '' + '', ) .replace(/(,)\1+/g, ',') .split(',') @@ -97,7 +97,7 @@ export const parseSelectParam = (s: string, currentPath?: Path): Path[] => { alias: currentPath?.alias || currentAliasElem ? alias : undefined, declaration, }); - } + }, ), ]; }; diff --git a/packages/postgrest-core/src/lib/query-types.ts b/packages/postgrest-core/src/lib/query-types.ts index fe660502..c419738c 100644 --- a/packages/postgrest-core/src/lib/query-types.ts +++ b/packages/postgrest-core/src/lib/query-types.ts @@ -3,7 +3,7 @@ * @returns true if obj is of type Type, false if not */ export type FilterFn> = ( - obj: unknown + obj: unknown, ) => obj is Type; /** @@ -97,17 +97,17 @@ type ArrayElement = ArrayType extends readonly (infer ElementType)[] ? ElementType : never; export const isAndFilter = ( - f: ArrayElement + f: ArrayElement, ): f is { and: FilterDefinitions } => Array.isArray((f as { and: FilterDefinitions }).and); export const isOrFilter = ( - f: ArrayElement + f: ArrayElement, ): f is { or: FilterDefinitions } => Array.isArray((f as { or: FilterDefinitions }).or); export const isFilterDefinition = ( - f: ArrayElement + f: ArrayElement, ): f is FilterDefinition => !isAndFilter(f) && !isOrFilter(f); export type OrderDefinition = { diff --git a/packages/postgrest-core/src/lib/response-types.ts b/packages/postgrest-core/src/lib/response-types.ts index 21f31de0..58a64feb 100644 --- a/packages/postgrest-core/src/lib/response-types.ts +++ b/packages/postgrest-core/src/lib/response-types.ts @@ -11,7 +11,7 @@ export type AnyPostgrestResponse = | PostgrestResponse; export const isAnyPostgrestResponse = ( - q: unknown + q: unknown, ): q is AnyPostgrestResponse => { if (!q) return false; return ( @@ -23,7 +23,7 @@ export const isAnyPostgrestResponse = ( export type PostgrestPaginationResponse = Result[]; export const isPostgrestPaginationResponse = ( - q: unknown + q: unknown, ): q is PostgrestPaginationResponse => { return Array.isArray(q); }; @@ -34,7 +34,7 @@ export type PostgrestHasMorePaginationResponse = { }; export const isPostgrestHasMorePaginationResponse = ( - q: unknown + q: unknown, ): q is PostgrestHasMorePaginationResponse => { if (!q) return false; return ( diff --git a/packages/postgrest-core/src/lib/set-filter-value.ts b/packages/postgrest-core/src/lib/set-filter-value.ts index 307f7ad2..06b90e93 100644 --- a/packages/postgrest-core/src/lib/set-filter-value.ts +++ b/packages/postgrest-core/src/lib/set-filter-value.ts @@ -2,7 +2,7 @@ export const setFilterValue = ( searchParams: URLSearchParams, path: string, op: string, - value: string + value: string, ) => { const filters = searchParams.getAll(path); // delete all diff --git a/packages/postgrest-core/src/lib/sort-search-param.ts b/packages/postgrest-core/src/lib/sort-search-param.ts index 6dd789cb..fa763d29 100644 --- a/packages/postgrest-core/src/lib/sort-search-param.ts +++ b/packages/postgrest-core/src/lib/sort-search-param.ts @@ -4,5 +4,5 @@ export const sortSearchParams = (params: URLSearchParams) => const x = `${a[0]}${a[1]}`; const y = `${b[0]}${b[1]}`; return x > y ? 1 : -1; - }) + }), ); diff --git a/packages/postgrest-core/src/lib/sorted-comparator.ts b/packages/postgrest-core/src/lib/sorted-comparator.ts index f0cf06cb..aaa5abb0 100644 --- a/packages/postgrest-core/src/lib/sorted-comparator.ts +++ b/packages/postgrest-core/src/lib/sorted-comparator.ts @@ -3,7 +3,7 @@ import { ifDateGetTime } from './if-date-get-time'; import { OrderDefinition } from './query-types'; export const buildSortedComparator = >( - orderBy: OrderDefinition[] + orderBy: OrderDefinition[], ) => { return (a: Type, b: Type) => { for (const { column, ascending, nullsFirst, foreignTable } of orderBy) { @@ -11,16 +11,16 @@ export const buildSortedComparator = >( defaultGet( a, `${foreignTable ? `${foreignTable}.` : ''}${column}`, - null - ) + null, + ), ); const bValue = ifDateGetTime( defaultGet( b, `${foreignTable ? `${foreignTable}.` : ''}${column}`, - null - ) + null, + ), ); // go to next if value is equals diff --git a/packages/postgrest-core/src/mutate/build-delete-mutator-fn.ts b/packages/postgrest-core/src/mutate/build-delete-mutator-fn.ts index c8ea1df9..3442c58d 100644 --- a/packages/postgrest-core/src/mutate/build-delete-mutator-fn.ts +++ b/packages/postgrest-core/src/mutate/build-delete-mutator-fn.ts @@ -1,3 +1,7 @@ +import { + toHasMorePaginationCacheData, + toPaginationCacheData, +} from './transformers'; import { isPostgrestHasMorePaginationCacheData, isPostgrestPaginationCacheData, @@ -5,25 +9,21 @@ import { import { MutatorFn } from '../lib/mutator-types'; import { OrderDefinition } from '../lib/query-types'; import { isAnyPostgrestResponse } from '../lib/response-types'; -import { - toHasMorePaginationCacheData, - toPaginationCacheData, -} from './transformers'; const deleteItem = >( input: Type, currentData: Type[], - primaryKeys: (keyof Type)[] + primaryKeys: (keyof Type)[], ) => { return currentData.filter((i) => - primaryKeys.some((pk) => i[pk] !== input[pk]) + primaryKeys.some((pk) => i[pk] !== input[pk]), ); }; export const buildDeleteMutatorFn = >( input: Type, primaryKeys: (keyof Type)[], - query?: { orderBy?: OrderDefinition[]; limit?: number } + query?: { orderBy?: OrderDefinition[]; limit?: number }, ): MutatorFn => { const limit = query?.limit ?? 1000; return (currentData) => { @@ -35,15 +35,15 @@ export const buildDeleteMutatorFn = >( deleteItem( input, currentData.flatMap((p) => p.data), - primaryKeys + primaryKeys, ), currentData, - limit + limit, ); } else if (isPostgrestPaginationCacheData(currentData)) { return toPaginationCacheData( deleteItem(input, currentData.flat(), primaryKeys), - limit + limit, ); } else if (isAnyPostgrestResponse(currentData)) { const { data } = currentData; diff --git a/packages/postgrest-core/src/mutate/build-upsert-mutator-fn.ts b/packages/postgrest-core/src/mutate/build-upsert-mutator-fn.ts index 1fecd372..d33613e1 100644 --- a/packages/postgrest-core/src/mutate/build-upsert-mutator-fn.ts +++ b/packages/postgrest-core/src/mutate/build-upsert-mutator-fn.ts @@ -1,5 +1,9 @@ import { merge as mergeAnything } from 'merge-anything'; +import { + toHasMorePaginationCacheData, + toPaginationCacheData, +} from './transformers'; import { isPostgrestHasMorePaginationCacheData, isPostgrestPaginationCacheData, @@ -9,10 +13,6 @@ import { MutatorFn, UpsertMutatorConfig } from '../lib/mutator-types'; import { OrderDefinition } from '../lib/query-types'; import { isAnyPostgrestResponse } from '../lib/response-types'; import { PostgrestFilter } from '../postgrest-filter'; -import { - toHasMorePaginationCacheData, - toPaginationCacheData, -} from './transformers'; export const upsert = >( input: Type, @@ -20,13 +20,13 @@ export const upsert = >( primaryKeys: (keyof Type)[], filter: Pick, 'apply'>, query?: { orderBy?: OrderDefinition[] }, - config?: UpsertMutatorConfig + config?: UpsertMutatorConfig, ) => { const mergeFn = config?.merge ? config.merge : mergeAnything; // find item const itemIdx = currentData.findIndex((oldItem) => - primaryKeys.every((pk) => oldItem[pk] === input[pk]) + primaryKeys.every((pk) => oldItem[pk] === input[pk]), ); let newItem = input; @@ -65,7 +65,7 @@ export const buildUpsertMutatorFn = >( primaryKeys: (keyof Type)[], filter: Pick, 'apply' | 'hasPaths'>, query: { orderBy: OrderDefinition[] | undefined; limit: number | undefined }, - config?: UpsertMutatorConfig + config?: UpsertMutatorConfig, ): MutatorFn => { const merge = config?.merge ?? mergeAnything; const limit = query.limit ?? 1000; @@ -81,10 +81,10 @@ export const buildUpsertMutatorFn = >( primaryKeys, filter, query, - config + config, ), currentData, - limit + limit, ); } else if (isPostgrestPaginationCacheData(currentData)) { return toPaginationCacheData( @@ -94,9 +94,9 @@ export const buildUpsertMutatorFn = >( primaryKeys, filter, query, - config + config, ), - limit + limit, ); } else if (isAnyPostgrestResponse(currentData)) { const { data } = currentData; @@ -123,7 +123,7 @@ export const buildUpsertMutatorFn = >( primaryKeys, filter, query, - config + config, ); return { diff --git a/packages/postgrest-core/src/mutate/mutate.ts b/packages/postgrest-core/src/mutate/mutate.ts index fe107757..63b02ea6 100644 --- a/packages/postgrest-core/src/mutate/mutate.ts +++ b/packages/postgrest-core/src/mutate/mutate.ts @@ -1,3 +1,5 @@ +import { buildDeleteMutatorFn } from './build-delete-mutator-fn'; +import { buildUpsertMutatorFn } from './build-upsert-mutator-fn'; import { DecodedKey, MutatorFn, @@ -7,8 +9,6 @@ import { import { parseOrderByKey } from '../lib/parse-order-by-key'; import { PostgrestFilter } from '../postgrest-filter'; import { PostgrestQueryParserOptions } from '../postgrest-query-parser'; -import { buildDeleteMutatorFn } from './build-delete-mutator-fn'; -import { buildUpsertMutatorFn } from './build-upsert-mutator-fn'; export type OperationType = 'UPSERT' | 'DELETE'; @@ -35,7 +35,7 @@ export type Cache> = { */ getPostgrestFilter: ( query: string, - opts?: PostgrestQueryParserOptions + opts?: PostgrestQueryParserOptions, ) => Pick< PostgrestFilter, | 'apply' @@ -58,7 +58,7 @@ export type Cache> = { export const mutate = async >( op: Operation, cache: Cache, - config?: UpsertMutatorConfig + config?: UpsertMutatorConfig, ) => { const { input, type, opts, schema, table } = op; const { cacheKeys, decode, getPostgrestFilter, mutate } = cache; @@ -82,7 +82,7 @@ export const mutate = async >( // or input matches all pk filters filter.applyFiltersOnPaths( transformedInput, - op.primaryKeys as string[] + op.primaryKeys as string[], ) ) { mutations.push( @@ -98,9 +98,9 @@ export const mutate = async >( ? parseOrderByKey(key.orderByKey) : undefined, }, - config - ) - ) + config, + ), + ), ); } // For upsert, the input has to have a value for all primary keys @@ -111,8 +111,8 @@ export const mutate = async >( mutations.push( mutate( k, - buildDeleteMutatorFn(input, op.primaryKeys as (keyof Type)[]) - ) + buildDeleteMutatorFn(input, op.primaryKeys as (keyof Type)[]), + ), ); } } @@ -133,7 +133,7 @@ export const mutate = async >( if ( opts?.revalidateTables?.find( - (t) => (!t.schema || t.schema === key.schema) && t.table === key.table + (t) => (!t.schema || t.schema === key.schema) && t.table === key.table, ) ) { mutations.push(mutate(k)); diff --git a/packages/postgrest-core/src/mutate/transformers.ts b/packages/postgrest-core/src/mutate/transformers.ts index d7093603..ac72a327 100644 --- a/packages/postgrest-core/src/mutate/transformers.ts +++ b/packages/postgrest-core/src/mutate/transformers.ts @@ -4,11 +4,11 @@ import { } from '../lib/cache-data-types'; export const toHasMorePaginationCacheData = < - Type extends Record + Type extends Record, >( a: Type[], currentData: PostgrestHasMorePaginationCacheData, - chunkSize: number + chunkSize: number, ) => { // return array in chunks const hasMoreCache = currentData.map((p) => p.hasMore); @@ -39,13 +39,13 @@ export const toHasMorePaginationCacheData = < return resultArray; }, - [] + [], ); }; export const toPaginationCacheData = >( a: Type[], - chunkSize: number + chunkSize: number, ) => { return a.reduce>( (resultArray, item, index) => { @@ -61,6 +61,6 @@ export const toPaginationCacheData = >( return resultArray; }, - [] + [], ); }; diff --git a/packages/postgrest-core/src/offset-pagination-fetcher.ts b/packages/postgrest-core/src/offset-pagination-fetcher.ts index 6aa546de..6b86eb42 100644 --- a/packages/postgrest-core/src/offset-pagination-fetcher.ts +++ b/packages/postgrest-core/src/offset-pagination-fetcher.ts @@ -7,7 +7,7 @@ import { } from './lib/response-types'; export type PostgrestOffsetPaginationFetcher = ( - args: Args + args: Args, ) => Promise; export type PostgrestOffsetPaginationKeyDecoder = (args: Args) => { @@ -20,11 +20,11 @@ export const createOffsetPaginationFetcher = < Row extends Record, Result, Args, - Relationships = unknown + Relationships = unknown, >( query: PostgrestTransformBuilder | null, decode: PostgrestOffsetPaginationKeyDecoder, - pageSize: number + pageSize: number, ): PostgrestOffsetPaginationFetcher< PostgrestPaginationResponse, Args @@ -44,11 +44,11 @@ export const createOffsetPaginationHasMoreFetcher = < Schema extends GenericSchema, Row extends Record, Result, - Args + Args, >( query: PostgrestTransformBuilder | null, decode: PostgrestOffsetPaginationKeyDecoder, - pageSize: number + pageSize: number, ): PostgrestOffsetPaginationFetcher< PostgrestHasMorePaginationResponse, Args diff --git a/packages/postgrest-core/src/postgrest-filter.ts b/packages/postgrest-core/src/postgrest-filter.ts index 583ac63a..85000a33 100644 --- a/packages/postgrest-core/src/postgrest-filter.ts +++ b/packages/postgrest-core/src/postgrest-filter.ts @@ -27,7 +27,7 @@ export class PostgrestFilter> { private _filterPaths: Path[]; constructor( - public readonly params: { filters: FilterDefinitions; paths: Path[] } + public readonly params: { filters: FilterDefinitions; paths: Path[] }, ) { this._filterPaths = extractPathsFromFilters(this.params.filters); } @@ -41,14 +41,14 @@ export class PostgrestFilter> { } public static fromBuilder< - Result extends Record = Record + Result extends Record = Record, >( fb: PostgrestBuilder, - opts?: PostgrestQueryParserOptions + opts?: PostgrestQueryParserOptions, ): PostgrestFilter { const parser = new PostgrestQueryParser( fb['url'].searchParams.toString(), - opts + opts, ); return new PostgrestFilter({ filters: parser.filters, @@ -86,7 +86,7 @@ export class PostgrestFilter> { applyFiltersOnPaths(obj: unknown, paths: string[]): obj is Result { const filterFns = filterFilterDefinitionsByPaths( this.params.filters, - paths + paths, ).map((d) => this.buildFilterFn(d)); const filtersFn = (obj: unknown): obj is Result => filterFns.every((fn) => isObject(obj) && fn(obj)); @@ -97,7 +97,7 @@ export class PostgrestFilter> { if (!this._selectFn) { this._selectFn = (obj): obj is Result => this.params.paths.every((p) => - this.hasPathRecursive(obj, p.alias ?? p.path) + this.hasPathRecursive(obj, p.alias ?? p.path), ); } return this._selectFn(obj); @@ -106,7 +106,7 @@ export class PostgrestFilter> { private hasPathRecursive( obj: unknown, basePath: string, - objectPath?: string + objectPath?: string, ): boolean { const v = get(obj, basePath); @@ -128,7 +128,7 @@ export class PostgrestFilter> { return this.hasPathRecursive( obj, pathElements.join('.'), - [currentPathElement, objectPath].filter(Boolean).join('.') + [currentPathElement, objectPath].filter(Boolean).join('.'), ); } @@ -139,7 +139,7 @@ export class PostgrestFilter> { filterFn, value, negate, - }: { filterFn: OperatorFn; value: ValueType; negate: boolean } + }: { filterFn: OperatorFn; value: ValueType; negate: boolean }, ): boolean { // parse json operators "->" and "->>" to "." const pathElements = path.replace(/->>|->/g, '.').split('.'); @@ -156,7 +156,7 @@ export class PostgrestFilter> { filterFn, value, negate, - } + }, ); } @@ -169,7 +169,7 @@ export class PostgrestFilter> { def: | FilterDefinition | { or: FilterDefinitions } - | { and: FilterDefinitions } + | { and: FilterDefinitions }, ): (obj: object) => boolean { if ('or' in def) { return (obj: object) => def.or.some((d) => this.buildFilterFn(d)(obj)); @@ -182,8 +182,8 @@ export class PostgrestFilter> { if (!filterFn) throw new Error( `Unable to build filter function for ${JSON.stringify( - def - )}. Operator ${operator} is not supported.` + def, + )}. Operator ${operator} is not supported.`, ); return (obj: object) => diff --git a/packages/postgrest-core/src/postgrest-parser.ts b/packages/postgrest-core/src/postgrest-parser.ts index 099b58c8..49c132eb 100644 --- a/packages/postgrest-core/src/postgrest-parser.ts +++ b/packages/postgrest-core/src/postgrest-parser.ts @@ -28,7 +28,7 @@ export class PostgrestParser extends PostgrestQueryParser { constructor( fb: PostgrestBuilder, - public readonly opts?: PostgrestQueryParserOptions + public readonly opts?: PostgrestQueryParserOptions, ) { super(new URL(fb['url']).searchParams.toString(), opts); @@ -91,7 +91,7 @@ export class PostgrestParser extends PostgrestQueryParser { ({ column, ascending, nullsFirst, foreignTable }) => `${foreignTable ? `${foreignTable}.` : ''}${column}:${ ascending ? 'asc' : 'desc' - }.${nullsFirst ? 'nullsFirst' : 'nullsLast'}` + }.${nullsFirst ? 'nullsFirst' : 'nullsLast'}`, ) .join('|'); } diff --git a/packages/postgrest-core/src/postgrest-query-parser.ts b/packages/postgrest-core/src/postgrest-query-parser.ts index 03a90e46..17e00065 100644 --- a/packages/postgrest-core/src/postgrest-query-parser.ts +++ b/packages/postgrest-core/src/postgrest-query-parser.ts @@ -27,7 +27,7 @@ export class PostgrestQueryParser { constructor( query: string, - public readonly opts?: PostgrestQueryParserOptions + public readonly opts?: PostgrestQueryParserOptions, ) { this._params = new URLSearchParams(query); } @@ -145,7 +145,7 @@ export class PostgrestQueryParser { this._params.forEach((value, key) => { if ( SUPPORTED_OPERATORS.some( - (f) => key === f || value.split('.').includes(f) + (f) => key === f || value.split('.').includes(f), ) ) { const filter = this.parseFilterString(`${key}.${value}`, undefined); @@ -159,7 +159,7 @@ export class PostgrestQueryParser { private parseFilterString( filter: string, - prefix?: string + prefix?: string, ): | FilterDefinition | { or: FilterDefinitions } @@ -205,13 +205,13 @@ export class PostgrestQueryParser { } const operatorIdx = findLastIndex(split, (s) => - SUPPORTED_OPERATORS.includes(s) + SUPPORTED_OPERATORS.includes(s), ); if (operatorIdx === -1) throw new Error( `Could not find a valid operator in ${split.join( - '.' - )}. Supported are ${SUPPORTED_OPERATORS.join(',')}.` + '.', + )}. Supported are ${SUPPORTED_OPERATORS.join(',')}.`, ); const negate = split[operatorIdx - 1] === 'not'; diff --git a/packages/postgrest-core/src/update-fetcher.ts b/packages/postgrest-core/src/update-fetcher.ts index 09015175..f7329a78 100644 --- a/packages/postgrest-core/src/update-fetcher.ts +++ b/packages/postgrest-core/src/update-fetcher.ts @@ -15,13 +15,13 @@ import { } from './fetch/build-normalized-query'; export type UpdateFetcher = ( - input: Partial + input: Partial, ) => Promise | null>; export type UpdateFetcherOptions< S extends GenericSchema, T extends GenericTable, - Re = T extends { Relationships: infer R } ? R : unknown + Re = T extends { Relationships: infer R } ? R : unknown, > = Parameters['update']>[1]; export const buildUpdateFetcher = @@ -30,14 +30,14 @@ export const buildUpdateFetcher = T extends GenericTable, Re = T extends { Relationships: infer R } ? R : unknown, Q extends string = '*', - R = GetResult + R = GetResult, >( qb: PostgrestQueryBuilder, primaryKeys: (keyof T['Row'])[], - opts: BuildNormalizedQueryOps & UpdateFetcherOptions + opts: BuildNormalizedQueryOps & UpdateFetcherOptions, ): UpdateFetcher => async ( - input: Partial + input: Partial, ): Promise | null> => { let filterBuilder = qb.update(input as any, opts); // todo fix type; for (const key of primaryKeys) { diff --git a/packages/postgrest-core/src/upsert-fetcher.ts b/packages/postgrest-core/src/upsert-fetcher.ts index cabfca0a..ce099def 100644 --- a/packages/postgrest-core/src/upsert-fetcher.ts +++ b/packages/postgrest-core/src/upsert-fetcher.ts @@ -13,13 +13,13 @@ import { } from './fetch/build-normalized-query'; export type UpsertFetcher = ( - input: T['Insert'][] + input: T['Insert'][], ) => Promise[] | null>; export type UpsertFetcherOptions< S extends GenericSchema, T extends GenericTable, - Re = T extends { Relationships: infer R } ? R : unknown + Re = T extends { Relationships: infer R } ? R : unknown, > = Parameters['upsert']>[1]; export const buildUpsertFetcher = @@ -28,13 +28,13 @@ export const buildUpsertFetcher = T extends GenericTable, Re = T extends { Relationships: infer R } ? R : unknown, Q extends string = '*', - R = GetResult + R = GetResult, >( qb: PostgrestQueryBuilder, - opts: BuildNormalizedQueryOps & UpsertFetcherOptions + opts: BuildNormalizedQueryOps & UpsertFetcherOptions, ): UpsertFetcher => async ( - input: T['Insert'][] + input: T['Insert'][], ): Promise[] | null> => { const query = buildNormalizedQuery(opts); if (query) { @@ -44,7 +44,7 @@ export const buildUpsertFetcher = .throwOnError() .select(selectQuery); return (data as R[]).map((d) => - buildMutationFetcherResponse(d, { paths, userQueryPaths }) + buildMutationFetcherResponse(d, { paths, userQueryPaths }), ); } await qb diff --git a/packages/postgrest-core/src/upsert-item.ts b/packages/postgrest-core/src/upsert-item.ts index 32aa5b07..a1183dac 100644 --- a/packages/postgrest-core/src/upsert-item.ts +++ b/packages/postgrest-core/src/upsert-item.ts @@ -10,5 +10,5 @@ export type UpsertItemProps> = Omit< export const upsertItem = >( op: UpsertItemProps, cache: Cache, - config?: UpsertMutatorConfig + config?: UpsertMutatorConfig, ) => mutate({ type: 'UPSERT', ...op }, cache, config); diff --git a/packages/postgrest-react-query/__tests__/mutate/use-delete-mutation.integration.spec.tsx b/packages/postgrest-react-query/__tests__/mutate/use-delete-mutation.integration.spec.tsx index 6c5a022e..04935bef 100644 --- a/packages/postgrest-react-query/__tests__/mutate/use-delete-mutation.integration.spec.tsx +++ b/packages/postgrest-react-query/__tests__/mutate/use-delete-mutation.integration.spec.tsx @@ -19,7 +19,7 @@ describe('useDeleteMutation', () => { testRunPrefix = `${TEST_PREFIX}-${Math.floor(Math.random() * 100)}`; client = createClient( process.env.SUPABASE_URL as string, - process.env.SUPABASE_ANON_KEY as string + process.env.SUPABASE_ANON_KEY as string, ); }); @@ -31,7 +31,7 @@ describe('useDeleteMutation', () => { .insert( new Array(3) .fill(0) - .map((idx) => ({ username: `${testRunPrefix}-${idx}` })) + .map((idx) => ({ username: `${testRunPrefix}-${idx}` })), ) .select('*'); contacts = data as Database['public']['Tables']['contact']['Row'][]; @@ -45,23 +45,23 @@ describe('useDeleteMutation', () => { client .from('contact') .select('id,username', { count: 'exact' }) - .eq('username', contacts[0].username ?? '') + .eq('username', contacts[0].username ?? ''), ); const { mutateAsync: deleteContact } = useDeleteMutation( client.from('contact'), ['id'], null, - { onSuccess: () => setSuccess(true) } + { onSuccess: () => setSuccess(true) }, ); const { mutateAsync: deleteWithEmptyOptions } = useDeleteMutation( client.from('contact'), ['id'], null, - {} + {}, ); const { mutateAsync: deleteWithoutOptions } = useDeleteMutation( client.from('contact'), - ['id'] + ['id'], ); return (
@@ -102,26 +102,26 @@ describe('useDeleteMutation', () => { await screen.findByText( `count: ${contacts.length}`, {}, - { timeout: 10000 } + { timeout: 10000 }, ); fireEvent.click(screen.getByTestId('deleteWithEmptyOptions')); await screen.findByText( `count: ${contacts.length - 1}`, {}, - { timeout: 10000 } + { timeout: 10000 }, ); fireEvent.click(screen.getByTestId('deleteWithoutOptions')); await screen.findByText( `count: ${contacts.length - 2}`, {}, - { timeout: 10000 } + { timeout: 10000 }, ); fireEvent.click(screen.getByTestId('delete')); await screen.findByText('success: true', {}, { timeout: 10000 }); await screen.findByText( `count: ${contacts.length - 3}`, {}, - { timeout: 10000 } + { timeout: 10000 }, ); }); }); diff --git a/packages/postgrest-react-query/__tests__/mutate/use-insert-mutation.integration.spec.tsx b/packages/postgrest-react-query/__tests__/mutate/use-insert-mutation.integration.spec.tsx index d6c874a9..c8467d6c 100644 --- a/packages/postgrest-react-query/__tests__/mutate/use-insert-mutation.integration.spec.tsx +++ b/packages/postgrest-react-query/__tests__/mutate/use-insert-mutation.integration.spec.tsx @@ -17,7 +17,7 @@ describe('useInsertMutation', () => { testRunPrefix = `${TEST_PREFIX}-${Math.floor(Math.random() * 100)}`; client = createClient( process.env.SUPABASE_URL as string, - process.env.SUPABASE_ANON_KEY as string + process.env.SUPABASE_ANON_KEY as string, ); await client.from('contact').delete().ilike('username', `${TEST_PREFIX}%`); }); @@ -33,7 +33,7 @@ describe('useInsertMutation', () => { client .from('contact') .select('id,alias:username', { count: 'exact' }) - .in('username', [USERNAME_1, USERNAME_2, USERNAME_3]) + .in('username', [USERNAME_1, USERNAME_2, USERNAME_3]), ); const { mutateAsync: insert } = useInsertMutation( client.from('contact'), @@ -41,7 +41,7 @@ describe('useInsertMutation', () => { null, { onSuccess: () => setSuccess(true), - } + }, ); return ( diff --git a/packages/postgrest-react-query/__tests__/mutate/use-update-mutation.integration.spec.tsx b/packages/postgrest-react-query/__tests__/mutate/use-update-mutation.integration.spec.tsx index 7712d3ec..2a9a1f08 100644 --- a/packages/postgrest-react-query/__tests__/mutate/use-update-mutation.integration.spec.tsx +++ b/packages/postgrest-react-query/__tests__/mutate/use-update-mutation.integration.spec.tsx @@ -17,7 +17,7 @@ describe('useUpdateMutation', () => { testRunPrefix = `${TEST_PREFIX}-${Math.floor(Math.random() * 100)}`; client = createClient( process.env.SUPABASE_URL as string, - process.env.SUPABASE_ANON_KEY as string + process.env.SUPABASE_ANON_KEY as string, ); await client.from('contact').delete().ilike('username', `${TEST_PREFIX}%`); }); @@ -32,11 +32,11 @@ describe('useUpdateMutation', () => { client .from('contact') .select('id,username', { count: 'exact' }) - .in('username', [USERNAME_1, USERNAME_2]) + .in('username', [USERNAME_1, USERNAME_2]), ); const { mutateAsync: insert } = useInsertMutation( client.from('contact'), - ['id'] + ['id'], ); const { mutateAsync: update } = useUpdateMutation( client.from('contact'), @@ -44,7 +44,7 @@ describe('useUpdateMutation', () => { null, { onSuccess: () => setSuccess(true), - } + }, ); return (
@@ -64,7 +64,7 @@ describe('useUpdateMutation', () => { { data?.find((d) => - [USERNAME_1, USERNAME_2].includes(d.username ?? '') + [USERNAME_1, USERNAME_2].includes(d.username ?? ''), )?.username } diff --git a/packages/postgrest-react-query/__tests__/mutate/use-upsert-mutation.integration.spec.tsx b/packages/postgrest-react-query/__tests__/mutate/use-upsert-mutation.integration.spec.tsx index 996039a0..097687f6 100644 --- a/packages/postgrest-react-query/__tests__/mutate/use-upsert-mutation.integration.spec.tsx +++ b/packages/postgrest-react-query/__tests__/mutate/use-upsert-mutation.integration.spec.tsx @@ -17,7 +17,7 @@ describe('useUpsertMutation', () => { testRunPrefix = `${TEST_PREFIX}-${Math.floor(Math.random() * 100)}`; client = createClient( process.env.SUPABASE_URL as string, - process.env.SUPABASE_ANON_KEY as string + process.env.SUPABASE_ANON_KEY as string, ); await client.from('contact').delete().ilike('username', `${TEST_PREFIX}%`); }); @@ -32,7 +32,7 @@ describe('useUpsertMutation', () => { client .from('contact') .select('id,username,golden_ticket', { count: 'exact' }) - .in('username', [USERNAME_1, USERNAME_2]) + .in('username', [USERNAME_1, USERNAME_2]), ); const { mutateAsync: upsert } = useUpsertMutation( @@ -41,7 +41,7 @@ describe('useUpsertMutation', () => { null, { onSuccess: () => setSuccess(true), - } + }, ); return ( diff --git a/packages/postgrest-react-query/__tests__/query/use-query.integration.spec.tsx b/packages/postgrest-react-query/__tests__/query/use-query.integration.spec.tsx index d88a0d0d..244b8b35 100644 --- a/packages/postgrest-react-query/__tests__/query/use-query.integration.spec.tsx +++ b/packages/postgrest-react-query/__tests__/query/use-query.integration.spec.tsx @@ -19,7 +19,7 @@ describe('useQuery', () => { testRunPrefix = `${TEST_PREFIX}-${Math.floor(Math.random() * 100)}`; client = createClient( process.env.SUPABASE_URL as string, - process.env.SUPABASE_ANON_KEY as string + process.env.SUPABASE_ANON_KEY as string, ); await client.from('contact').delete().ilike('username', `${TEST_PREFIX}%`); @@ -54,7 +54,7 @@ describe('useQuery', () => { await screen.findByText( contacts[0].username as string, {}, - { timeout: 10000 } + { timeout: 10000 }, ); expect(queryClient.getQueryData(encode(query, false))).toBeDefined(); }); @@ -103,7 +103,7 @@ describe('useQuery', () => { await screen.findByText( contacts[0].username as string, {}, - { timeout: 10000 } + { timeout: 10000 }, ); expect(screen.getByTestId('count').textContent).toEqual('4'); expect(queryClient.getQueryData(encode(query, false))).toBeDefined(); @@ -119,7 +119,7 @@ describe('useQuery', () => { .select('id,username') .eq('username', contacts[0].username ?? '') .maybeSingle(), - { enabled: condition } + { enabled: condition }, ); return ( @@ -137,7 +137,7 @@ describe('useQuery', () => { await screen.findByText( contacts[0].username as string, {}, - { timeout: 10000 } + { timeout: 10000 }, ); }); @@ -149,7 +149,7 @@ describe('useQuery', () => { .from('contact') .select('id,username') .eq('username', contacts[0].username ?? '') - .single() + .single(), ); const [refetched, setRefetched] = useState(null); diff --git a/packages/postgrest-react-query/__tests__/subscribe/use-subscription-query-integration.spec.tsx b/packages/postgrest-react-query/__tests__/subscribe/use-subscription-query-integration.spec.tsx index c61051bd..3343bf4a 100644 --- a/packages/postgrest-react-query/__tests__/subscribe/use-subscription-query-integration.spec.tsx +++ b/packages/postgrest-react-query/__tests__/subscribe/use-subscription-query-integration.spec.tsx @@ -17,7 +17,7 @@ describe('useSubscriptionQuery', () => { testRunPrefix = `${TEST_PREFIX}-${Math.floor(Math.random() * 100)}`; client = createClient( process.env.SUPABASE_URL as string, - process.env.SUPABASE_ANON_KEY as string + process.env.SUPABASE_ANON_KEY as string, ); await client.from('contact').delete().ilike('username', `${TEST_PREFIX}%`); }); @@ -36,7 +36,7 @@ describe('useSubscriptionQuery', () => { .select('id,username,has_low_ticket_number,ticket_number', { count: 'exact', }) - .eq('username', USERNAME_1) + .eq('username', USERNAME_1), ); const [cbCalled, setCbCalled] = useState(false); @@ -58,7 +58,7 @@ describe('useSubscriptionQuery', () => { setCbCalled(true); } }, - } + }, ); return ( @@ -90,7 +90,7 @@ describe('useSubscriptionQuery', () => { await screen.findByText( 'ticket_number: 1 | has_low_ticket_number: true', {}, - { timeout: 10000 } + { timeout: 10000 }, ); expect(screen.getByTestId('count').textContent).toEqual('count: 1'); await act(async () => { @@ -103,7 +103,7 @@ describe('useSubscriptionQuery', () => { await screen.findByText( 'ticket_number: 1000 | has_low_ticket_number: false', {}, - { timeout: 10000 } + { timeout: 10000 }, ); expect(screen.getByTestId('count').textContent).toEqual('count: 1'); await screen.findByText('cbCalled: true', {}, { timeout: 10000 }); diff --git a/packages/postgrest-react-query/__tests__/subscribe/use-subscription.integration.spec.tsx b/packages/postgrest-react-query/__tests__/subscribe/use-subscription.integration.spec.tsx index 35798ff4..e288ffc0 100644 --- a/packages/postgrest-react-query/__tests__/subscribe/use-subscription.integration.spec.tsx +++ b/packages/postgrest-react-query/__tests__/subscribe/use-subscription.integration.spec.tsx @@ -17,7 +17,7 @@ describe('useSubscription', () => { testRunPrefix = `${TEST_PREFIX}-${Math.floor(Math.random() * 100)}`; client = createClient( process.env.SUPABASE_URL as string, - process.env.SUPABASE_ANON_KEY as string + process.env.SUPABASE_ANON_KEY as string, ); await client.from('contact').delete().ilike('username', `${TEST_PREFIX}%`); }); @@ -34,7 +34,7 @@ describe('useSubscription', () => { client .from('contact') .select('id,username,ticket_number', { count: 'exact' }) - .eq('username', USERNAME_1) + .eq('username', USERNAME_1), ); const [cbCalled, setCbCalled] = useState(false); @@ -49,7 +49,7 @@ describe('useSubscription', () => { filter: `username=eq.${USERNAME_1}`, }, ['id'], - { callback: () => setCbCalled(true) } + { callback: () => setCbCalled(true) }, ); return ( diff --git a/packages/postgrest-react-query/__tests__/utils.tsx b/packages/postgrest-react-query/__tests__/utils.tsx index 3e1c6495..8f0cadb4 100644 --- a/packages/postgrest-react-query/__tests__/utils.tsx +++ b/packages/postgrest-react-query/__tests__/utils.tsx @@ -8,7 +8,7 @@ dotenv.config({ path: resolve(__dirname, '../../../.env.local') }); export const renderWithConfig = ( element: React.ReactElement, - queryClient: QueryClient + queryClient: QueryClient, ): ReturnType => { const TestQueryClientProvider = ({ children, diff --git a/packages/postgrest-react-query/package.json b/packages/postgrest-react-query/package.json index c1bda134..63ae15f1 100644 --- a/packages/postgrest-react-query/package.json +++ b/packages/postgrest-react-query/package.json @@ -63,7 +63,7 @@ "jest-environment-jsdom": "29.7.0", "@types/jest": "29.5.0", "dotenv": "16.3.1", - "eslint": "8.40.0", + "eslint": "8.52.0", "@supabase-cache-helpers/eslint-config-custom": "workspace:*", "@supabase-cache-helpers/prettier-config": "workspace:*", "jest": "29.7.0", diff --git a/packages/postgrest-react-query/src/cache/use-delete-item.ts b/packages/postgrest-react-query/src/cache/use-delete-item.ts index cd17a7bc..2c83be6e 100644 --- a/packages/postgrest-react-query/src/cache/use-delete-item.ts +++ b/packages/postgrest-react-query/src/cache/use-delete-item.ts @@ -12,7 +12,7 @@ import { decode, usePostgrestFilterCache } from '../lib'; * @returns void */ export function useDeleteItem>( - opts: Omit, 'input'> + opts: Omit, 'input'>, ) { const queryClient = useQueryClient(); const getPostgrestFilter = usePostgrestFilterCache(); @@ -33,6 +33,6 @@ export function useDeleteItem>( queryClient.setQueriesData({ queryKey: key }, fn); }, decode, - } + }, ); } diff --git a/packages/postgrest-react-query/src/cache/use-upsert-item.ts b/packages/postgrest-react-query/src/cache/use-upsert-item.ts index 75f9d064..027f44b3 100644 --- a/packages/postgrest-react-query/src/cache/use-upsert-item.ts +++ b/packages/postgrest-react-query/src/cache/use-upsert-item.ts @@ -12,7 +12,7 @@ import { decode, usePostgrestFilterCache } from '../lib'; * @returns void */ export function useUpsertItem>( - opts: Omit, 'input'> + opts: Omit, 'input'>, ) { const queryClient = useQueryClient(); const getPostgrestFilter = usePostgrestFilterCache(); @@ -33,6 +33,6 @@ export function useUpsertItem>( queryClient.setQueriesData({ queryKey: key }, fn); }, decode, - } + }, ); } diff --git a/packages/postgrest-react-query/src/lib/use-postgrest-filter-cache.ts b/packages/postgrest-react-query/src/lib/use-postgrest-filter-cache.ts index 4f43e400..6ed5917f 100644 --- a/packages/postgrest-react-query/src/lib/use-postgrest-filter-cache.ts +++ b/packages/postgrest-react-query/src/lib/use-postgrest-filter-cache.ts @@ -8,7 +8,7 @@ import { useQueryClient } from '@tanstack/react-query'; export const POSTGREST_FILTER_KEY_PREFIX = 'postgrest-filter'; export const usePostgrestFilterCache = < - R extends Record + R extends Record, >() => { const queryClient = useQueryClient(); diff --git a/packages/postgrest-react-query/src/lib/use-queries-for-table-loader.ts b/packages/postgrest-react-query/src/lib/use-queries-for-table-loader.ts index 4f4f221f..a5f7bb17 100644 --- a/packages/postgrest-react-query/src/lib/use-queries-for-table-loader.ts +++ b/packages/postgrest-react-query/src/lib/use-queries-for-table-loader.ts @@ -21,6 +21,6 @@ export const useQueriesForTableLoader = (table: string) => { } return prev; }, - [] + [], ); }; diff --git a/packages/postgrest-react-query/src/mutate/get-user-response.ts b/packages/postgrest-react-query/src/mutate/get-user-response.ts index bdc3ca51..509d909d 100644 --- a/packages/postgrest-react-query/src/mutate/get-user-response.ts +++ b/packages/postgrest-react-query/src/mutate/get-user-response.ts @@ -7,7 +7,7 @@ export function truthy(value: T): value is Truthy { } export const getUserResponse = ( - d: MutationFetcherResponse[] | null | undefined + d: MutationFetcherResponse[] | null | undefined, ) => { if (!d) return d; return d.map((r) => r.userQueryData).filter(truthy); diff --git a/packages/postgrest-react-query/src/mutate/types.ts b/packages/postgrest-react-query/src/mutate/types.ts index 4efa30fc..8315dbe4 100644 --- a/packages/postgrest-react-query/src/mutate/types.ts +++ b/packages/postgrest-react-query/src/mutate/types.ts @@ -1,3 +1,9 @@ +import { GetResult } from '@supabase/postgrest-js/dist/module/select-query-parser'; +import { + GenericSchema, + GenericTable, +} from '@supabase/postgrest-js/dist/module/types'; +import { PostgrestError } from '@supabase/supabase-js'; import { DeleteFetcherOptions, InsertFetcherOptions, @@ -5,12 +11,6 @@ import { UpsertFetcherOptions, PostgrestMutatorOpts, } from '@supabase-cache-helpers/postgrest-core'; -import { GetResult } from '@supabase/postgrest-js/dist/module/select-query-parser'; -import { - GenericSchema, - GenericTable, -} from '@supabase/postgrest-js/dist/module/types'; -import { PostgrestError } from '@supabase/supabase-js'; import { UseMutationOptions } from '@tanstack/react-query'; export type Operation = 'Insert' | 'UpdateOne' | 'Upsert' | 'DeleteOne'; @@ -18,7 +18,7 @@ export type Operation = 'Insert' | 'UpdateOne' | 'Upsert' | 'DeleteOne'; type GetFetcherOptions< S extends GenericSchema, T extends GenericTable, - O extends Operation + O extends Operation, > = O extends 'Insert' ? InsertFetcherOptions : O extends 'UpdateOne' @@ -31,7 +31,7 @@ type GetFetcherOptions< export type GetInputType< T extends GenericTable, - O extends Operation + O extends Operation, > = O extends 'DeleteOne' ? Partial // TODO: Can we pick the primary keys somehow? : O extends 'Insert' | 'Upsert' @@ -46,7 +46,7 @@ export type GetReturnType< Relationships, O extends Operation, Q extends string = '*', - R = GetResult + R = GetResult, > = O extends 'UpdateOne' ? R | null : O extends 'DeleteOne' @@ -61,7 +61,7 @@ export type UsePostgrestMutationOpts< Relationships, O extends Operation, Q extends string = '*', - R = GetResult + R = GetResult, > = PostgrestMutatorOpts & UseMutationOptions< GetReturnType | null, diff --git a/packages/postgrest-react-query/src/mutate/use-delete-mutation.ts b/packages/postgrest-react-query/src/mutate/use-delete-mutation.ts index 390cb9d1..bafcd631 100644 --- a/packages/postgrest-react-query/src/mutate/use-delete-mutation.ts +++ b/packages/postgrest-react-query/src/mutate/use-delete-mutation.ts @@ -1,19 +1,19 @@ -import { - buildDeleteFetcher, - getTable, - QueryWithoutWildcard, -} from '@supabase-cache-helpers/postgrest-core'; import { PostgrestQueryBuilder } from '@supabase/postgrest-js'; import { GetResult } from '@supabase/postgrest-js/dist/module/select-query-parser'; import { GenericSchema, GenericTable, } from '@supabase/postgrest-js/dist/module/types'; +import { + buildDeleteFetcher, + getTable, + QueryWithoutWildcard, +} from '@supabase-cache-helpers/postgrest-core'; import { useMutation } from '@tanstack/react-query'; +import { UsePostgrestMutationOpts } from './types'; import { useDeleteItem } from '../cache'; import { useQueriesForTableLoader } from '../lib'; -import { UsePostgrestMutationOpts } from './types'; /** * Hook to execute a DELETE mutation @@ -28,7 +28,7 @@ function useDeleteMutation< T extends GenericTable, Re = T extends { Relationships: infer R } ? R : unknown, Q extends string = '*', - R = GetResult + R = GetResult, >( qb: PostgrestQueryBuilder, primaryKeys: (keyof T['Row'])[], @@ -36,7 +36,7 @@ function useDeleteMutation< opts?: Omit< UsePostgrestMutationOpts, 'mutationFn' - > + >, ) { const queriesForTable = useQueriesForTableLoader(getTable(qb)); const deleteItem = useDeleteItem({ diff --git a/packages/postgrest-react-query/src/mutate/use-insert-mutation.ts b/packages/postgrest-react-query/src/mutate/use-insert-mutation.ts index da4a24d8..1bbd87d3 100644 --- a/packages/postgrest-react-query/src/mutate/use-insert-mutation.ts +++ b/packages/postgrest-react-query/src/mutate/use-insert-mutation.ts @@ -1,20 +1,20 @@ -import { - buildInsertFetcher, - getTable, - QueryWithoutWildcard, -} from '@supabase-cache-helpers/postgrest-core'; import { PostgrestQueryBuilder } from '@supabase/postgrest-js'; import { GetResult } from '@supabase/postgrest-js/dist/module/select-query-parser'; import { GenericSchema, GenericTable, } from '@supabase/postgrest-js/dist/module/types'; +import { + buildInsertFetcher, + getTable, + QueryWithoutWildcard, +} from '@supabase-cache-helpers/postgrest-core'; import { useMutation } from '@tanstack/react-query'; -import { useUpsertItem } from '../cache'; -import { useQueriesForTableLoader } from '../lib'; import { getUserResponse } from './get-user-response'; import { UsePostgrestMutationOpts } from './types'; +import { useUpsertItem } from '../cache'; +import { useQueriesForTableLoader } from '../lib'; /** * Hook to execute a INSERT mutation @@ -29,12 +29,12 @@ function useInsertMutation< T extends GenericTable, Re = T extends { Relationships: infer R } ? R : unknown, Q extends string = '*', - R = GetResult + R = GetResult, >( qb: PostgrestQueryBuilder, primaryKeys: (keyof T['Row'])[], query?: QueryWithoutWildcard | null, - opts?: Omit, 'mutationFn'> + opts?: Omit, 'mutationFn'>, ) { const queriesForTable = useQueriesForTableLoader(getTable(qb)); const upsertItem = useUpsertItem({ @@ -56,8 +56,8 @@ function useInsertMutation< if (result) { await Promise.all( result.map( - async (d) => await upsertItem(d.normalizedData as T['Row']) - ) + async (d) => await upsertItem(d.normalizedData as T['Row']), + ), ); } return getUserResponse(result) ?? null; diff --git a/packages/postgrest-react-query/src/mutate/use-update-mutation.ts b/packages/postgrest-react-query/src/mutate/use-update-mutation.ts index 96a5ed0a..b304e825 100644 --- a/packages/postgrest-react-query/src/mutate/use-update-mutation.ts +++ b/packages/postgrest-react-query/src/mutate/use-update-mutation.ts @@ -1,19 +1,19 @@ -import { - buildUpdateFetcher, - getTable, - QueryWithoutWildcard, -} from '@supabase-cache-helpers/postgrest-core'; import { PostgrestQueryBuilder } from '@supabase/postgrest-js'; import { GetResult } from '@supabase/postgrest-js/dist/module/select-query-parser'; import { GenericSchema, GenericTable, } from '@supabase/postgrest-js/dist/module/types'; +import { + buildUpdateFetcher, + getTable, + QueryWithoutWildcard, +} from '@supabase-cache-helpers/postgrest-core'; import { useMutation } from '@tanstack/react-query'; +import { UsePostgrestMutationOpts } from './types'; import { useUpsertItem } from '../cache'; import { useQueriesForTableLoader } from '../lib'; -import { UsePostgrestMutationOpts } from './types'; /** * Hook to execute a UPDATE mutation @@ -28,7 +28,7 @@ function useUpdateMutation< T extends GenericTable, Re = T extends { Relationships: infer R } ? R : unknown, Q extends string = '*', - R = GetResult + R = GetResult, >( qb: PostgrestQueryBuilder, primaryKeys: (keyof T['Row'])[], @@ -36,7 +36,7 @@ function useUpdateMutation< opts?: Omit< UsePostgrestMutationOpts, 'mutationFn' - > + >, ) { const queriesForTable = useQueriesForTableLoader(getTable(qb)); const upsertItem = useUpsertItem({ diff --git a/packages/postgrest-react-query/src/mutate/use-upsert-mutation.ts b/packages/postgrest-react-query/src/mutate/use-upsert-mutation.ts index 9ef08c6b..db89f49a 100644 --- a/packages/postgrest-react-query/src/mutate/use-upsert-mutation.ts +++ b/packages/postgrest-react-query/src/mutate/use-upsert-mutation.ts @@ -1,20 +1,20 @@ -import { - buildUpsertFetcher, - getTable, - QueryWithoutWildcard, -} from '@supabase-cache-helpers/postgrest-core'; import { PostgrestQueryBuilder } from '@supabase/postgrest-js'; import { GetResult } from '@supabase/postgrest-js/dist/module/select-query-parser'; import { GenericSchema, GenericTable, } from '@supabase/postgrest-js/dist/module/types'; +import { + buildUpsertFetcher, + getTable, + QueryWithoutWildcard, +} from '@supabase-cache-helpers/postgrest-core'; import { useMutation } from '@tanstack/react-query'; -import { useUpsertItem } from '../cache'; -import { useQueriesForTableLoader } from '../lib'; import { getUserResponse } from './get-user-response'; import { UsePostgrestMutationOpts } from './types'; +import { useUpsertItem } from '../cache'; +import { useQueriesForTableLoader } from '../lib'; /** * Hook to execute a UPSERT mutation @@ -29,12 +29,12 @@ function useUpsertMutation< T extends GenericTable, Re = T extends { Relationships: infer R } ? R : unknown, Q extends string = '*', - R = GetResult + R = GetResult, >( qb: PostgrestQueryBuilder, primaryKeys: (keyof T['Row'])[], query?: QueryWithoutWildcard | null, - opts?: Omit, 'mutationFn'> + opts?: Omit, 'mutationFn'>, ) { const queriesForTable = useQueriesForTableLoader(getTable(qb)); const upsertItem = useUpsertItem({ @@ -54,7 +54,7 @@ function useUpsertMutation< })(input); if (data) { await Promise.all( - data.map(async (d) => await upsertItem(d.normalizedData as T['Row'])) + data.map(async (d) => await upsertItem(d.normalizedData as T['Row'])), ); } return getUserResponse(data) ?? null; diff --git a/packages/postgrest-react-query/src/query/use-query.ts b/packages/postgrest-react-query/src/query/use-query.ts index 3f0666f6..b4d4509b 100644 --- a/packages/postgrest-react-query/src/query/use-query.ts +++ b/packages/postgrest-react-query/src/query/use-query.ts @@ -1,13 +1,13 @@ -import { - AnyPostgrestResponse, - isPostgrestBuilder, -} from '@supabase-cache-helpers/postgrest-core'; import { PostgrestError, PostgrestResponse, PostgrestSingleResponse, PostgrestMaybeSingleResponse, } from '@supabase/postgrest-js'; +import { + AnyPostgrestResponse, + isPostgrestBuilder, +} from '@supabase-cache-helpers/postgrest-core'; import { useQuery as useReactQuery, UseQueryResult as UseReactQueryResult, @@ -87,7 +87,7 @@ function useQuery( config?: Omit< UseReactQueryOptions, PostgrestError>, 'queryKey' | 'queryFn' | 'initialData' - > + >, ): UseQuerySingleReturn; /** * React hook to execute a PostgREST query and return a maybe single item response. @@ -101,7 +101,7 @@ function useQuery( config?: Omit< UseReactQueryOptions, PostgrestError>, 'queryKey' | 'queryFn' | 'initialData' - > + >, ): UseQueryMaybeSingleReturn; /** * React hook to execute a PostgREST query. @@ -116,7 +116,7 @@ function useQuery( config?: Omit< UseReactQueryOptions, PostgrestError>, 'queryKey' | 'queryFn' | 'initialData' - > + >, ): UseQueryReturn; /** * React hook to execute a PostgREST query. @@ -131,7 +131,7 @@ function useQuery( config?: Omit< UseReactQueryOptions, PostgrestError>, 'queryKey' | 'queryFn' | 'intialData' - > + >, ): UseQueryAnyReturn { const { data, ...rest } = useReactQuery< AnyPostgrestResponse, diff --git a/packages/postgrest-react-query/src/subscribe/use-subscription-query.ts b/packages/postgrest-react-query/src/subscribe/use-subscription-query.ts index aa8640c8..40c59a4b 100644 --- a/packages/postgrest-react-query/src/subscribe/use-subscription-query.ts +++ b/packages/postgrest-react-query/src/subscribe/use-subscription-query.ts @@ -1,7 +1,3 @@ -import { - buildNormalizedQuery, - PostgrestMutatorOpts, -} from '@supabase-cache-helpers/postgrest-core'; import { GetResult } from '@supabase/postgrest-js/dist/module/select-query-parser'; import { GenericSchema, @@ -15,6 +11,10 @@ import { REALTIME_POSTGRES_CHANGES_LISTEN_EVENT, SupabaseClient, } from '@supabase/supabase-js'; +import { + buildNormalizedQuery, + PostgrestMutatorOpts, +} from '@supabase-cache-helpers/postgrest-core'; import { MutationOptions as ReactQueryMutatorOptions } from '@tanstack/react-query'; import { useEffect, useState } from 'react'; @@ -29,7 +29,7 @@ export type UseSubscriptionQueryOpts< T extends GenericTable, Relatsonships, Q extends string = '*', - R = GetResult + R = GetResult, > = PostgrestMutatorOpts & ReactQueryMutatorOptions & { /** @@ -38,7 +38,7 @@ export type UseSubscriptionQueryOpts< * the affected row of the event (or a modified version of it, if a select query is provided). */ callback?: ( - event: RealtimePostgresChangesPayload & { data: T['Row'] | R } + event: RealtimePostgresChangesPayload & { data: T['Row'] | R }, ) => void | Promise; }; @@ -67,7 +67,7 @@ function useSubscriptionQuery< T extends GenericTable, Relatsonships, Q extends string = '*', - R = GetResult + R = GetResult, >( client: SupabaseClient | null, channelName: string, @@ -77,7 +77,7 @@ function useSubscriptionQuery< > & { table: string }, primaryKeys: (keyof T['Row'])[], query?: Q extends '*' ? "'*' is not allowed" : Q | null, - opts?: UseSubscriptionQueryOpts + opts?: UseSubscriptionQueryOpts, ) { const [status, setStatus] = useState(); const [channel, setChannel] = useState(); @@ -138,7 +138,7 @@ function useSubscriptionQuery< data, }); } - } + }, ) .subscribe((status: string) => setStatus(status)); diff --git a/packages/postgrest-react-query/src/subscribe/use-subscription.ts b/packages/postgrest-react-query/src/subscribe/use-subscription.ts index 4681b031..5380b375 100644 --- a/packages/postgrest-react-query/src/subscribe/use-subscription.ts +++ b/packages/postgrest-react-query/src/subscribe/use-subscription.ts @@ -1,4 +1,3 @@ -import { PostgrestMutatorOpts } from '@supabase-cache-helpers/postgrest-core'; import { GenericTable } from '@supabase/postgrest-js/dist/module/types'; import { RealtimePostgresChangesFilter, @@ -7,6 +6,7 @@ import { REALTIME_POSTGRES_CHANGES_LISTEN_EVENT, SupabaseClient, } from '@supabase/supabase-js'; +import { PostgrestMutatorOpts } from '@supabase-cache-helpers/postgrest-core'; import { MutationOptions as ReactQueryMutatorOptions } from '@tanstack/react-query'; import { useEffect, useState } from 'react'; @@ -20,7 +20,7 @@ export type UseSubscriptionOpts = PostgrestMutatorOpts< > & ReactQueryMutatorOptions & { callback?: ( - event: RealtimePostgresChangesPayload + event: RealtimePostgresChangesPayload, ) => void | Promise; }; @@ -42,7 +42,7 @@ function useSubscription( 'table' > & { table: string }, primaryKeys: (keyof T['Row'])[], - opts?: UseSubscriptionOpts + opts?: UseSubscriptionOpts, ) { const [status, setStatus] = useState(); const deleteItem = useDeleteItem({ @@ -83,7 +83,7 @@ function useSubscription( ...payload, }); } - } + }, ) .subscribe((status: string) => setStatus(status)); diff --git a/packages/postgrest-swr/__tests__/database.types.ts b/packages/postgrest-swr/__tests__/database.types.ts index f2de0d8a..a106d52e 100644 --- a/packages/postgrest-swr/__tests__/database.types.ts +++ b/packages/postgrest-swr/__tests__/database.types.ts @@ -87,7 +87,7 @@ export interface Database { columns: ['country']; referencedRelation: 'country'; referencedColumns: ['code']; - } + }, ]; }; contact_note: { @@ -115,7 +115,7 @@ export interface Database { columns: ['contact_id']; referencedRelation: 'contact'; referencedColumns: ['id']; - } + }, ]; }; continent: { @@ -164,7 +164,7 @@ export interface Database { columns: ['continent_code']; referencedRelation: 'continent'; referencedColumns: ['code']; - } + }, ]; }; }; @@ -228,7 +228,7 @@ export interface Database { columns: ['owner']; referencedRelation: 'users'; referencedColumns: ['id']; - } + }, ]; }; migrations: { @@ -301,7 +301,7 @@ export interface Database { columns: ['owner']; referencedRelation: 'users'; referencedColumns: ['id']; - } + }, ]; }; }; diff --git a/packages/postgrest-swr/__tests__/lib/get-mutable-keys.spec.ts b/packages/postgrest-swr/__tests__/lib/get-mutable-keys.spec.ts index c7fba4d2..820d66bf 100644 --- a/packages/postgrest-swr/__tests__/lib/get-mutable-keys.spec.ts +++ b/packages/postgrest-swr/__tests__/lib/get-mutable-keys.spec.ts @@ -8,7 +8,7 @@ describe('getMutableKeys', () => { 'postgrest$page$public$contact$limit=1&offset=0&order=username.asc&select=id%2Cusername&username=ilike.postgrest-swr-pagination-88%25$null$count=null$head=false$undefined.username:asc.nullsLast', 'postgrest$page$public$contact$limit=1&offset=1&order=username.asc&select=id%2Cusername&username=ilike.postgrest-swr-pagination-88%25$null$count=null$head=false$undefined.username:asc.nullsLast', 'postgrest$page$public$contact$limit=1&offset=2&order=username.asc&select=id%2Cusername&username=ilike.postgrest-swr-pagination-88%25$null$count=null$head=false$undefined.username:asc.nullsLast', - ]) + ]), ).toEqual([ '$inf$postgrest$page$public$contact$limit=1&offset=0&order=username.asc&select=id%2Cusername&username=ilike.postgrest-swr-pagination-88%25$null$count=null$head=false$undefined.username:asc.nullsLast', ]); diff --git a/packages/postgrest-swr/__tests__/mutate/use-delete-mutation.integration.spec.tsx b/packages/postgrest-swr/__tests__/mutate/use-delete-mutation.integration.spec.tsx index 71230b0c..9e0597af 100644 --- a/packages/postgrest-swr/__tests__/mutate/use-delete-mutation.integration.spec.tsx +++ b/packages/postgrest-swr/__tests__/mutate/use-delete-mutation.integration.spec.tsx @@ -19,7 +19,7 @@ describe('useDeleteMutation', () => { testRunPrefix = `${TEST_PREFIX}-${Math.floor(Math.random() * 100)}`; client = createClient( process.env.SUPABASE_URL as string, - process.env.SUPABASE_ANON_KEY as string + process.env.SUPABASE_ANON_KEY as string, ); }); @@ -33,7 +33,7 @@ describe('useDeleteMutation', () => { .insert( new Array(3) .fill(0) - .map((_, idx) => ({ username: `${testRunPrefix}-${idx}` })) + .map((_, idx) => ({ username: `${testRunPrefix}-${idx}` })), ) .select('*'); contacts = data as Database['public']['Tables']['contact']['Row'][]; @@ -50,23 +50,23 @@ describe('useDeleteMutation', () => { { revalidateOnFocus: false, revalidateOnReconnect: false, - } + }, ); const { trigger: deleteContact } = useDeleteMutation( client.from('contact'), ['id'], null, - { onSuccess: () => setSuccess(true) } + { onSuccess: () => setSuccess(true) }, ); const { trigger: deleteWithEmptyOptions } = useDeleteMutation( client.from('contact'), ['id'], null, - {} + {}, ); const { trigger: deleteWithoutOptions } = useDeleteMutation( client.from('contact'), - ['id'] + ['id'], ); return (
@@ -107,26 +107,26 @@ describe('useDeleteMutation', () => { await screen.findByText( `count: ${contacts.length}`, {}, - { timeout: 10000 } + { timeout: 10000 }, ); fireEvent.click(screen.getByTestId('deleteWithEmptyOptions')); await screen.findByText( `count: ${contacts.length - 1}`, {}, - { timeout: 10000 } + { timeout: 10000 }, ); fireEvent.click(screen.getByTestId('deleteWithoutOptions')); await screen.findByText( `count: ${contacts.length - 2}`, {}, - { timeout: 10000 } + { timeout: 10000 }, ); fireEvent.click(screen.getByTestId('delete')); await screen.findByText('success: true', {}, { timeout: 10000 }); await screen.findByText( `count: ${contacts.length - 3}`, {}, - { timeout: 10000 } + { timeout: 10000 }, ); }); }); diff --git a/packages/postgrest-swr/__tests__/mutate/use-insert-mutation.integration.spec.tsx b/packages/postgrest-swr/__tests__/mutate/use-insert-mutation.integration.spec.tsx index da22420a..1a1d3a25 100644 --- a/packages/postgrest-swr/__tests__/mutate/use-insert-mutation.integration.spec.tsx +++ b/packages/postgrest-swr/__tests__/mutate/use-insert-mutation.integration.spec.tsx @@ -17,7 +17,7 @@ describe('useInsertMutation', () => { testRunPrefix = `${TEST_PREFIX}-${Math.floor(Math.random() * 100)}`; client = createClient( process.env.SUPABASE_URL as string, - process.env.SUPABASE_ANON_KEY as string + process.env.SUPABASE_ANON_KEY as string, ); await client.from('contact').delete().ilike('username', `${TEST_PREFIX}%`); }); @@ -40,7 +40,7 @@ describe('useInsertMutation', () => { { revalidateOnFocus: false, revalidateOnReconnect: false, - } + }, ); const { trigger: insert } = useInsertMutation( client.from('contact'), @@ -48,7 +48,7 @@ describe('useInsertMutation', () => { null, { onSuccess: () => setSuccess(true), - } + }, ); return ( diff --git a/packages/postgrest-swr/__tests__/mutate/use-update-mutation.integration.spec.tsx b/packages/postgrest-swr/__tests__/mutate/use-update-mutation.integration.spec.tsx index 54ad1cc6..846fe54f 100644 --- a/packages/postgrest-swr/__tests__/mutate/use-update-mutation.integration.spec.tsx +++ b/packages/postgrest-swr/__tests__/mutate/use-update-mutation.integration.spec.tsx @@ -17,7 +17,7 @@ describe('useUpdateMutation', () => { testRunPrefix = `${TEST_PREFIX}-${Math.floor(Math.random() * 100)}`; client = createClient( process.env.SUPABASE_URL as string, - process.env.SUPABASE_ANON_KEY as string + process.env.SUPABASE_ANON_KEY as string, ); await client .from('serial_key_table') @@ -44,11 +44,11 @@ describe('useUpdateMutation', () => { { revalidateOnFocus: false, revalidateOnReconnect: false, - } + }, ); const { trigger: insert } = useInsertMutation( client.from('serial_key_table'), - ['id'] + ['id'], ); const { trigger: update } = useUpdateMutation( client.from('serial_key_table'), @@ -56,7 +56,7 @@ describe('useUpdateMutation', () => { null, { onSuccess: () => setSuccess(true), - } + }, ); return (
@@ -109,7 +109,7 @@ describe('useUpdateMutation', () => { { revalidateOnFocus: false, revalidateOnReconnect: false, - } + }, ); const { trigger: insert } = useInsertMutation(client.from('contact'), [ 'id', @@ -120,7 +120,7 @@ describe('useUpdateMutation', () => { null, { onSuccess: () => setSuccess(true), - } + }, ); return (
@@ -140,7 +140,7 @@ describe('useUpdateMutation', () => { { data?.find((d) => - [USERNAME_1, USERNAME_2].includes(d.username ?? '') + [USERNAME_1, USERNAME_2].includes(d.username ?? ''), )?.username } diff --git a/packages/postgrest-swr/__tests__/mutate/use-upsert-mutation.integration.spec.tsx b/packages/postgrest-swr/__tests__/mutate/use-upsert-mutation.integration.spec.tsx index 75deac3e..d5b66ec5 100644 --- a/packages/postgrest-swr/__tests__/mutate/use-upsert-mutation.integration.spec.tsx +++ b/packages/postgrest-swr/__tests__/mutate/use-upsert-mutation.integration.spec.tsx @@ -17,7 +17,7 @@ describe('useUpsertMutation', () => { testRunPrefix = `${TEST_PREFIX}-${Math.floor(Math.random() * 100)}`; client = createClient( process.env.SUPABASE_URL as string, - process.env.SUPABASE_ANON_KEY as string + process.env.SUPABASE_ANON_KEY as string, ); await client.from('contact').delete().ilike('username', `${TEST_PREFIX}%`); }); @@ -39,7 +39,7 @@ describe('useUpsertMutation', () => { { revalidateOnFocus: false, revalidateOnReconnect: false, - } + }, ); const { trigger: upsert } = useUpsertMutation( @@ -48,7 +48,7 @@ describe('useUpsertMutation', () => { null, { onSuccess: () => setSuccess(true), - } + }, ); return ( diff --git a/packages/postgrest-swr/__tests__/query/use-cursor-infinite-scroll-query.spec.tsx b/packages/postgrest-swr/__tests__/query/use-cursor-infinite-scroll-query.spec.tsx index 91552a0b..11acda0e 100644 --- a/packages/postgrest-swr/__tests__/query/use-cursor-infinite-scroll-query.spec.tsx +++ b/packages/postgrest-swr/__tests__/query/use-cursor-infinite-scroll-query.spec.tsx @@ -23,7 +23,7 @@ describe('useCursorInfiniteScrollQuery', () => { testRunPrefix = `${TEST_PREFIX}-${Math.floor(Math.random() * 100)}`; client = createClient( process.env.SUPABASE_URL as string, - process.env.SUPABASE_ANON_KEY as string + process.env.SUPABASE_ANON_KEY as string, ); await client.from('contact').delete().ilike('username', `${TEST_PREFIX}%`); @@ -80,7 +80,7 @@ describe('useCursorInfiniteScrollQuery', () => { .order('username', { ascending: true }) .limit(1), { path: 'username' }, - { revalidateOnFocus: false } + { revalidateOnFocus: false }, ); return ( @@ -101,18 +101,18 @@ describe('useCursorInfiniteScrollQuery', () => { await screen.findByText( `${testRunPrefix}-username-1`, {}, - { timeout: 10000 } + { timeout: 10000 }, ); const list = screen.getByTestId('list'); expect(list.childElementCount).toEqual(1); fireEvent.click( - await screen.findByTestId('loadMore', {}, { timeout: 10000 }) + await screen.findByTestId('loadMore', {}, { timeout: 10000 }), ); await screen.findByText( `${testRunPrefix}-username-2`, {}, - { timeout: 10000 } + { timeout: 10000 }, ); expect(list.childElementCount).toEqual(2); @@ -121,7 +121,7 @@ describe('useCursorInfiniteScrollQuery', () => { await screen.findByText( `${testRunPrefix}-username-3`, {}, - { timeout: 10000 } + { timeout: 10000 }, ); expect(list.childElementCount).toEqual(3); @@ -138,7 +138,7 @@ describe('useCursorInfiniteScrollQuery', () => { .order('username', { ascending: false }) .limit(1), { path: 'username' }, - { revalidateOnFocus: false } + { revalidateOnFocus: false }, ); return ( @@ -159,18 +159,18 @@ describe('useCursorInfiniteScrollQuery', () => { await screen.findByText( `${testRunPrefix}-username-4`, {}, - { timeout: 10000 } + { timeout: 10000 }, ); const list = screen.getByTestId('list'); expect(list.childElementCount).toEqual(1); fireEvent.click( - await screen.findByTestId('loadMore', {}, { timeout: 10000 }) + await screen.findByTestId('loadMore', {}, { timeout: 10000 }), ); await screen.findByText( `${testRunPrefix}-username-3`, {}, - { timeout: 10000 } + { timeout: 10000 }, ); expect(list.childElementCount).toEqual(2); @@ -179,7 +179,7 @@ describe('useCursorInfiniteScrollQuery', () => { await screen.findByText( `${testRunPrefix}-username-2`, {}, - { timeout: 10000 } + { timeout: 10000 }, ); expect(list.childElementCount).toEqual(3); @@ -198,7 +198,7 @@ describe('useCursorInfiniteScrollQuery', () => { { path: 'username', until: `${testRunPrefix}-username-2`, - } + }, ); return ( @@ -219,7 +219,7 @@ describe('useCursorInfiniteScrollQuery', () => { await screen.findByText( `${testRunPrefix}-username-1`, {}, - { timeout: 10000 } + { timeout: 10000 }, ); const list = screen.getByTestId('list'); expect(list.childElementCount).toEqual(1); @@ -228,7 +228,7 @@ describe('useCursorInfiniteScrollQuery', () => { await screen.findByText( `${testRunPrefix}-username-2`, {}, - { timeout: 10000 } + { timeout: 10000 }, ); expect(list.childElementCount).toEqual(2); @@ -248,7 +248,7 @@ describe('useCursorInfiniteScrollQuery', () => { .order('username', { ascending: true }) .limit(1) : null, - { path: 'username' } + { path: 'username' }, ); return ( @@ -269,7 +269,7 @@ describe('useCursorInfiniteScrollQuery', () => { await screen.findByText( `${testRunPrefix}-username-1`, {}, - { timeout: 10000 } + { timeout: 10000 }, ); }); @@ -285,7 +285,7 @@ describe('useCursorInfiniteScrollQuery', () => { .limit(2), { path: 'username', - } + }, ); return ( @@ -309,12 +309,12 @@ describe('useCursorInfiniteScrollQuery', () => { await screen.findByText( `${testRunPrefix}-username-1`, {}, - { timeout: 10000 } + { timeout: 10000 }, ); await screen.findByText( `${testRunPrefix}-username-2`, {}, - { timeout: 10000 } + { timeout: 10000 }, ); expect(list.childElementCount).toEqual(2); @@ -322,12 +322,12 @@ describe('useCursorInfiniteScrollQuery', () => { await screen.findByText( `${testRunPrefix}-username-3`, {}, - { timeout: 10000 } + { timeout: 10000 }, ); await screen.findByText( `${testRunPrefix}-username-4`, {}, - { timeout: 10000 } + { timeout: 10000 }, ); expect(list.childElementCount).toEqual(4); @@ -354,7 +354,7 @@ describe('useCursorInfiniteScrollQuery', () => { .limit(2), { path: 'username', - } + }, ); return ( @@ -378,12 +378,12 @@ describe('useCursorInfiniteScrollQuery', () => { await screen.findByText( `${testRunPrefix}-username-4`, {}, - { timeout: 10000 } + { timeout: 10000 }, ); await screen.findByText( `${testRunPrefix}-username-3`, {}, - { timeout: 10000 } + { timeout: 10000 }, ); expect(list.childElementCount).toEqual(2); @@ -391,12 +391,12 @@ describe('useCursorInfiniteScrollQuery', () => { await screen.findByText( `${testRunPrefix}-username-2`, {}, - { timeout: 10000 } + { timeout: 10000 }, ); await screen.findByText( `${testRunPrefix}-username-1`, {}, - { timeout: 10000 } + { timeout: 10000 }, ); expect(list.childElementCount).toEqual(4); @@ -424,7 +424,7 @@ describe('useCursorInfiniteScrollQuery', () => { { path: 'created_at', until: d2.toISOString(), - } + }, ); return ( @@ -445,7 +445,7 @@ describe('useCursorInfiniteScrollQuery', () => { await screen.findByText( `${testRunPrefix}-username-1`, {}, - { timeout: 10000 } + { timeout: 10000 }, ); const list = screen.getByTestId('list'); expect(list.childElementCount).toEqual(1); @@ -454,7 +454,7 @@ describe('useCursorInfiniteScrollQuery', () => { await screen.findByText( `${testRunPrefix}-username-2`, {}, - { timeout: 10000 } + { timeout: 10000 }, ); expect(list.childElementCount).toEqual(2); diff --git a/packages/postgrest-swr/__tests__/query/use-offset-infinite-query.integration.spec.tsx b/packages/postgrest-swr/__tests__/query/use-offset-infinite-query.integration.spec.tsx index 153d35d6..6a587968 100644 --- a/packages/postgrest-swr/__tests__/query/use-offset-infinite-query.integration.spec.tsx +++ b/packages/postgrest-swr/__tests__/query/use-offset-infinite-query.integration.spec.tsx @@ -18,7 +18,7 @@ describe('useOffsetInfiniteQuery', () => { testRunPrefix = `${TEST_PREFIX}-${Math.floor(Math.random() * 100)}`; client = createClient( process.env.SUPABASE_URL as string, - process.env.SUPABASE_ANON_KEY as string + process.env.SUPABASE_ANON_KEY as string, ); await client.from('contact').delete().ilike('username', `${TEST_PREFIX}%`); @@ -52,7 +52,7 @@ describe('useOffsetInfiniteQuery', () => { .ilike('username', `${testRunPrefix}%`) .order('username', { ascending: true }) : null, - { pageSize: 1 } + { pageSize: 1 }, ); return (
@@ -74,7 +74,7 @@ describe('useOffsetInfiniteQuery', () => { await screen.findByText( `${testRunPrefix}-username-1`, {}, - { timeout: 10000 } + { timeout: 10000 }, ); const list = screen.getByTestId('list'); expect(list.childElementCount).toEqual(1); @@ -85,12 +85,12 @@ describe('useOffsetInfiniteQuery', () => { await screen.findByText( `${testRunPrefix}-username-2`, {}, - { timeout: 10000 } + { timeout: 10000 }, ); await screen.findByText( `${testRunPrefix}-username-3`, {}, - { timeout: 10000 } + { timeout: 10000 }, ); expect(list.childElementCount).toEqual(3); @@ -108,7 +108,7 @@ describe('useOffsetInfiniteQuery', () => { { pageSize: 1, fallbackData: [[{ id: 'test', username: 'fallback' }]], - } + }, ); return (
diff --git a/packages/postgrest-swr/__tests__/query/use-offset-infinite-scroll-query.integration.spec.tsx b/packages/postgrest-swr/__tests__/query/use-offset-infinite-scroll-query.integration.spec.tsx index b27191cd..4e8cf774 100644 --- a/packages/postgrest-swr/__tests__/query/use-offset-infinite-scroll-query.integration.spec.tsx +++ b/packages/postgrest-swr/__tests__/query/use-offset-infinite-scroll-query.integration.spec.tsx @@ -18,7 +18,7 @@ describe('useOffsetInfiniteScrollQuery', () => { testRunPrefix = `${TEST_PREFIX}-${Math.floor(Math.random() * 100)}`; client = createClient( process.env.SUPABASE_URL as string, - process.env.SUPABASE_ANON_KEY as string + process.env.SUPABASE_ANON_KEY as string, ); await client.from('contact').delete().ilike('username', `${TEST_PREFIX}%`); @@ -49,7 +49,7 @@ describe('useOffsetInfiniteScrollQuery', () => { .select('id,username') .ilike('username', `${testRunPrefix}%`) .order('username', { ascending: true }), - { pageSize: 1 } + { pageSize: 1 }, ); return (
@@ -69,7 +69,7 @@ describe('useOffsetInfiniteScrollQuery', () => { await screen.findByText( `${testRunPrefix}-username-1`, {}, - { timeout: 10000 } + { timeout: 10000 }, ); const list = screen.getByTestId('list'); expect(list.childElementCount).toEqual(1); @@ -78,7 +78,7 @@ describe('useOffsetInfiniteScrollQuery', () => { await screen.findByText( `${testRunPrefix}-username-2`, {}, - { timeout: 10000 } + { timeout: 10000 }, ); expect(list.childElementCount).toEqual(2); @@ -87,7 +87,7 @@ describe('useOffsetInfiniteScrollQuery', () => { await screen.findByText( `${testRunPrefix}-username-3`, {}, - { timeout: 10000 } + { timeout: 10000 }, ); expect(list.childElementCount).toEqual(3); @@ -103,7 +103,7 @@ describe('useOffsetInfiniteScrollQuery', () => { .ilike('username', `${testRunPrefix}%`) .order('username', { ascending: true }) : null, - { pageSize: 1 } + { pageSize: 1 }, ); return (
@@ -123,7 +123,7 @@ describe('useOffsetInfiniteScrollQuery', () => { await screen.findByText( `${testRunPrefix}-username-1`, {}, - { timeout: 10000 } + { timeout: 10000 }, ); }); @@ -140,7 +140,7 @@ describe('useOffsetInfiniteScrollQuery', () => { fallbackData: [ { data: [{ username: 'fallback', id: 'test' }], hasMore: false }, ], - } + }, ); return (
diff --git a/packages/postgrest-swr/__tests__/query/use-pagination-query.integration.spec.tsx b/packages/postgrest-swr/__tests__/query/use-pagination-query.integration.spec.tsx index dd0d1c58..90cd6b71 100644 --- a/packages/postgrest-swr/__tests__/query/use-pagination-query.integration.spec.tsx +++ b/packages/postgrest-swr/__tests__/query/use-pagination-query.integration.spec.tsx @@ -18,7 +18,7 @@ describe('useInfiniteOffsetPaginationQuery', () => { testRunPrefix = `${TEST_PREFIX}-${Math.floor(Math.random() * 100)}`; client = createClient( process.env.SUPABASE_URL as string, - process.env.SUPABASE_ANON_KEY as string + process.env.SUPABASE_ANON_KEY as string, ); await client.from('contact').delete().ilike('username', `${TEST_PREFIX}%`); @@ -49,7 +49,7 @@ describe('useInfiniteOffsetPaginationQuery', () => { .select('id,username') .ilike('username', `${testRunPrefix}%`) .order('username', { ascending: true }), - { pageSize: 1, revalidateOnReconnect: true } + { pageSize: 1, revalidateOnReconnect: true }, ); return ( @@ -80,7 +80,7 @@ describe('useInfiniteOffsetPaginationQuery', () => { await screen.findByText( `${testRunPrefix}-username-1`, {}, - { timeout: 10000 } + { timeout: 10000 }, ); const currentPageList = screen.getByTestId('currentPage'); expect(currentPageList.childElementCount).toEqual(1); @@ -92,7 +92,7 @@ describe('useInfiniteOffsetPaginationQuery', () => { await screen.findByText( `${testRunPrefix}-username-2`, {}, - { timeout: 10000 } + { timeout: 10000 }, ); await screen.findByTestId('previousPage', {}, { timeout: 10000 }); @@ -104,7 +104,7 @@ describe('useInfiniteOffsetPaginationQuery', () => { await screen.findByText( `${testRunPrefix}-username-3`, {}, - { timeout: 10000 } + { timeout: 10000 }, ); expect(currentPageList.childElementCount).toEqual(1); @@ -115,7 +115,7 @@ describe('useInfiniteOffsetPaginationQuery', () => { await screen.findByText( `${testRunPrefix}-username-1`, {}, - { timeout: 10000 } + { timeout: 10000 }, ); expect(screen.getByTestId('pageIndex').textContent).toEqual('0'); }); @@ -131,7 +131,7 @@ describe('useInfiniteOffsetPaginationQuery', () => { .ilike('username', `${testRunPrefix}%`) .order('username', { ascending: true }) : null, - { pageSize: 1, revalidateOnReconnect: true } + { pageSize: 1, revalidateOnReconnect: true }, ); return (
@@ -151,7 +151,7 @@ describe('useInfiniteOffsetPaginationQuery', () => { await screen.findByText( `${testRunPrefix}-username-1`, {}, - { timeout: 10000 } + { timeout: 10000 }, ); }); @@ -164,7 +164,7 @@ describe('useInfiniteOffsetPaginationQuery', () => { .select('id,username') .ilike('username', `${testRunPrefix}%`) .order('username', { ascending: true }), - { pageSize: 1, revalidateOnReconnect: true } + { pageSize: 1, revalidateOnReconnect: true }, ); return (
@@ -183,7 +183,7 @@ describe('useInfiniteOffsetPaginationQuery', () => { await screen.findByText( `${testRunPrefix}-username-4`, {}, - { timeout: 10000 } + { timeout: 10000 }, ); }); @@ -202,7 +202,7 @@ describe('useInfiniteOffsetPaginationQuery', () => { fallbackData: [ { data: [{ id: 'test', username: 'fallback' }], hasMore: true }, ], - } + }, ); return (
diff --git a/packages/postgrest-swr/__tests__/query/use-query.integration.spec.tsx b/packages/postgrest-swr/__tests__/query/use-query.integration.spec.tsx index ebe566d4..546c4ba6 100755 --- a/packages/postgrest-swr/__tests__/query/use-query.integration.spec.tsx +++ b/packages/postgrest-swr/__tests__/query/use-query.integration.spec.tsx @@ -18,7 +18,7 @@ describe('useQuery', () => { testRunPrefix = `${TEST_PREFIX}-${Math.floor(Math.random() * 100)}`; client = createClient( process.env.SUPABASE_URL as string, - process.env.SUPABASE_ANON_KEY as string + process.env.SUPABASE_ANON_KEY as string, ); await client.from('contact').delete().ilike('username', `${TEST_PREFIX}%`); @@ -49,7 +49,7 @@ describe('useQuery', () => { .select('id,username') .eq('username', contacts[0].username) .single(), - { revalidateOnFocus: false } + { revalidateOnFocus: false }, ); return
{data?.username}
; @@ -59,10 +59,10 @@ describe('useQuery', () => { await screen.findByText( contacts[0].username as string, {}, - { timeout: 10000 } + { timeout: 10000 }, ); expect( - Array.from(provider.keys()).find((k) => k.startsWith('postgrest')) + Array.from(provider.keys()).find((k) => k.startsWith('postgrest')), ).toBeDefined(); }); @@ -73,7 +73,7 @@ describe('useQuery', () => { .from('contact') .select('id,username') .eq('username', 'unknown') - .maybeSingle() + .maybeSingle(), ); return (
{isValidating ? 'validating' : `username: ${data?.username}`}
@@ -83,7 +83,7 @@ describe('useQuery', () => { renderWithConfig(, { provider: () => provider }); await screen.findByText('username: undefined', {}, { timeout: 10000 }); expect( - Array.from(provider.keys()).find((k) => k.startsWith('postgrest')) + Array.from(provider.keys()).find((k) => k.startsWith('postgrest')), ).toBeDefined(); }); @@ -94,7 +94,7 @@ describe('useQuery', () => { .from('contact') .select('id,username', { count: 'exact' }) .ilike('username', `${testRunPrefix}%`), - { revalidateOnFocus: false } + { revalidateOnFocus: false }, ); return (
@@ -113,11 +113,11 @@ describe('useQuery', () => { await screen.findByText( contacts[0].username as string, {}, - { timeout: 10000 } + { timeout: 10000 }, ); expect(screen.getByTestId('count').textContent).toEqual('4'); expect( - Array.from(provider.keys()).find((k) => k.startsWith('postgrest')) + Array.from(provider.keys()).find((k) => k.startsWith('postgrest')), ).toBeDefined(); }); @@ -132,7 +132,7 @@ describe('useQuery', () => { .eq('username', contacts[0].username) .maybeSingle() : null, - { revalidateOnFocus: false } + { revalidateOnFocus: false }, ); return ( @@ -151,7 +151,7 @@ describe('useQuery', () => { await screen.findByText( contacts[0].username as string, {}, - { timeout: 10000 } + { timeout: 10000 }, ); }); @@ -165,7 +165,7 @@ describe('useQuery', () => { .select('id,username') .eq('username', contacts[0].username) .single(), - { revalidateOnFocus: false } + { revalidateOnFocus: false }, ); const [mutated, setMutated] = useState(null); @@ -209,7 +209,7 @@ describe('useQuery', () => { count: 0, statusText: 'OK', }, - } + }, ); return
{data?.username}
; diff --git a/packages/postgrest-swr/__tests__/subscribe/use-subscription-query.integration.spec.tsx b/packages/postgrest-swr/__tests__/subscribe/use-subscription-query.integration.spec.tsx index c8b383d1..3c8ce533 100644 --- a/packages/postgrest-swr/__tests__/subscribe/use-subscription-query.integration.spec.tsx +++ b/packages/postgrest-swr/__tests__/subscribe/use-subscription-query.integration.spec.tsx @@ -17,7 +17,7 @@ describe('useSubscriptionQuery', () => { testRunPrefix = `${TEST_PREFIX}-${Math.floor(Math.random() * 100)}`; client = createClient( process.env.SUPABASE_URL as string, - process.env.SUPABASE_ANON_KEY as string + process.env.SUPABASE_ANON_KEY as string, ); await client.from('contact').delete().ilike('username', `${TEST_PREFIX}%`); }); @@ -43,7 +43,7 @@ describe('useSubscriptionQuery', () => { { revalidateOnFocus: false, revalidateOnReconnect: false, - } + }, ); const [cbCalled, setCbCalled] = useState(false); @@ -65,7 +65,7 @@ describe('useSubscriptionQuery', () => { setCbCalled(true); } }, - } + }, ); return ( @@ -99,7 +99,7 @@ describe('useSubscriptionQuery', () => { await screen.findByText( 'ticket_number: 1 | has_low_ticket_number: true', {}, - { timeout: 10000 } + { timeout: 10000 }, ); expect(screen.getByTestId('count').textContent).toEqual('count: 1'); await act(async () => { @@ -112,7 +112,7 @@ describe('useSubscriptionQuery', () => { await screen.findByText( 'ticket_number: 1000 | has_low_ticket_number: false', {}, - { timeout: 10000 } + { timeout: 10000 }, ); expect(screen.getByTestId('count').textContent).toEqual('count: 1'); await screen.findByText('cbCalled: true', {}, { timeout: 10000 }); diff --git a/packages/postgrest-swr/__tests__/subscribe/use-subscription.integration.spec.tsx b/packages/postgrest-swr/__tests__/subscribe/use-subscription.integration.spec.tsx index 070f8e97..ae99058e 100644 --- a/packages/postgrest-swr/__tests__/subscribe/use-subscription.integration.spec.tsx +++ b/packages/postgrest-swr/__tests__/subscribe/use-subscription.integration.spec.tsx @@ -17,7 +17,7 @@ describe('useSubscription', () => { testRunPrefix = `${TEST_PREFIX}-${Math.floor(Math.random() * 100)}`; client = createClient( process.env.SUPABASE_URL as string, - process.env.SUPABASE_ANON_KEY as string + process.env.SUPABASE_ANON_KEY as string, ); await client.from('contact').delete().ilike('username', `${TEST_PREFIX}%`); }); @@ -37,7 +37,7 @@ describe('useSubscription', () => { client .from('contact') .select('id,username,ticket_number', { count: 'exact' }) - .eq('username', USERNAME_1) + .eq('username', USERNAME_1), ); const [cbCalled, setCbCalled] = useState(false); @@ -52,7 +52,7 @@ describe('useSubscription', () => { filter: `username=eq.${USERNAME_1}`, }, ['id'], - { callback: () => setCbCalled(true), revalidate: true } + { callback: () => setCbCalled(true), revalidate: true }, ); const ticketNumber = Array.isArray(data) ? data[0]?.ticket_number : null; diff --git a/packages/postgrest-swr/__tests__/utils.tsx b/packages/postgrest-swr/__tests__/utils.tsx index c65ab091..0dcce62b 100644 --- a/packages/postgrest-swr/__tests__/utils.tsx +++ b/packages/postgrest-swr/__tests__/utils.tsx @@ -8,7 +8,7 @@ dotenv.config({ path: resolve(__dirname, '../../../.env.local') }); export const renderWithConfig = ( element: React.ReactElement, - config: Parameters[0]['value'] + config: Parameters[0]['value'], ): ReturnType => { const TestSWRConfig = ({ children }: { children: React.ReactNode }) => ( >( - opts: Omit, 'input'> & MutatorOptions + opts: Omit, 'input'> & MutatorOptions, ): (input: Type) => Promise { const { mutate, cache } = useSWRConfig(); const getPostgrestFilter = usePostgrestFilterCache(); @@ -34,6 +34,6 @@ export function useDeleteItem>( mutate(key, data, { ...opts, revalidate: opts?.revalidate ?? false }); }, decode, - } + }, ); } diff --git a/packages/postgrest-swr/src/cache/use-upsert-item.ts b/packages/postgrest-swr/src/cache/use-upsert-item.ts index 9bcf2c5b..7fea13cc 100644 --- a/packages/postgrest-swr/src/cache/use-upsert-item.ts +++ b/packages/postgrest-swr/src/cache/use-upsert-item.ts @@ -16,7 +16,7 @@ import { getMutableKeys } from '../lib/mutable-keys'; * @returns A function that takes a record of type `Type` and returns a promise that resolves once the record has been upserted into the cache. * **/ export function useUpsertItem>( - opts: Omit, 'input'> & MutatorOptions + opts: Omit, 'input'> & MutatorOptions, ): (input: Type) => Promise { const { mutate, cache } = useSWRConfig(); const getPostgrestFilter = usePostgrestFilterCache(); @@ -37,6 +37,6 @@ export function useUpsertItem>( }); }, decode, - } + }, ); } diff --git a/packages/postgrest-swr/src/lib/create-key-getter.ts b/packages/postgrest-swr/src/lib/create-key-getter.ts index b7d30772..2e87379d 100644 --- a/packages/postgrest-swr/src/lib/create-key-getter.ts +++ b/packages/postgrest-swr/src/lib/create-key-getter.ts @@ -1,3 +1,5 @@ +import { PostgrestTransformBuilder } from '@supabase/postgrest-js'; +import { GenericSchema } from '@supabase/postgrest-js/dist/module/types'; import { setFilterValue, get, @@ -7,16 +9,14 @@ import { PostgrestHasMorePaginationResponse, PostgrestPaginationResponse, } from '@supabase-cache-helpers/postgrest-core'; -import { PostgrestTransformBuilder } from '@supabase/postgrest-js'; -import { GenericSchema } from '@supabase/postgrest-js/dist/module/types'; export const createOffsetKeyGetter = < Schema extends GenericSchema, Table extends Record, - Result + Result, >( query: PostgrestTransformBuilder | null, - pageSize: number + pageSize: number, ) => { if (!query) return () => null; return ( @@ -24,7 +24,7 @@ export const createOffsetKeyGetter = < previousPageData: ( | PostgrestHasMorePaginationResponse | PostgrestPaginationResponse - )[] + )[], ) => { if ( previousPageData && @@ -42,14 +42,14 @@ export const createOffsetKeyGetter = < export const createCursorKeyGetter = < Schema extends GenericSchema, Table extends Record, - Result + Result, >( query: PostgrestTransformBuilder | null, { path, }: { path: string; - } + }, ) => { if (!query) return () => null; return ( @@ -57,7 +57,7 @@ export const createCursorKeyGetter = < previousPageData: ( | PostgrestHasMorePaginationResponse | PostgrestPaginationResponse - )[] + )[], ) => { if ( previousPageData && @@ -72,7 +72,7 @@ export const createCursorKeyGetter = < if (isPostgrestHasMorePaginationResponse(previousPageData)) { lastValue = get( previousPageData.data[previousPageData.data.length - 1], - path + path, ); } else if (isPostgrestPaginationResponse(previousPageData)) { lastValue = get(previousPageData[previousPageData.length - 1], path); @@ -104,7 +104,7 @@ export const createCursorKeyGetter = < query['url'].searchParams, path, ascending === 'asc' ? 'gt' : 'lt', - lastValue + lastValue, ); return query; diff --git a/packages/postgrest-swr/src/lib/encode.ts b/packages/postgrest-swr/src/lib/encode.ts index d4db0433..c7e81ce0 100644 --- a/packages/postgrest-swr/src/lib/encode.ts +++ b/packages/postgrest-swr/src/lib/encode.ts @@ -4,7 +4,7 @@ import { INFINITE_KEY_PREFIX, KEY_PREFIX, KEY_SEPARATOR } from './constants'; export const encode = ( parser: PostgrestParser, - isInfinite: boolean + isInfinite: boolean, ) => { return [ KEY_PREFIX, diff --git a/packages/postgrest-swr/src/lib/middleware.ts b/packages/postgrest-swr/src/lib/middleware.ts index 60759310..1dd3c716 100644 --- a/packages/postgrest-swr/src/lib/middleware.ts +++ b/packages/postgrest-swr/src/lib/middleware.ts @@ -12,12 +12,12 @@ import { import { encode } from './encode'; export const infiniteMiddleware = ( - useSWRInfiniteNext: SWRInfiniteHook + useSWRInfiniteNext: SWRInfiniteHook, ) => { return ( keyFn: SWRInfiniteKeyLoader, fetcher: SWRInfiniteFetcher, - config: SWRInfiniteConfiguration + config: SWRInfiniteConfiguration, ) => { return useSWRInfiniteNext( (index, previousPageData) => { @@ -31,7 +31,7 @@ export const infiniteMiddleware = ( return encode(new PostgrestParser(query), true); }, typeof fetcher === 'function' ? (query) => fetcher(query) : fetcher, - config + config, ); }; }; diff --git a/packages/postgrest-swr/src/lib/use-postgrest-filter-cache.ts b/packages/postgrest-swr/src/lib/use-postgrest-filter-cache.ts index 97521bbb..a2f351ff 100644 --- a/packages/postgrest-swr/src/lib/use-postgrest-filter-cache.ts +++ b/packages/postgrest-swr/src/lib/use-postgrest-filter-cache.ts @@ -8,7 +8,7 @@ import { useSWRConfig } from 'swr'; import { POSTGREST_FILTER_KEY_PREFIX, KEY_SEPARATOR } from './constants'; export const usePostgrestFilterCache = < - R extends Record + R extends Record, >() => { const { cache } = useSWRConfig(); diff --git a/packages/postgrest-swr/src/mutate/types.ts b/packages/postgrest-swr/src/mutate/types.ts index 0a4d7337..edab5321 100644 --- a/packages/postgrest-swr/src/mutate/types.ts +++ b/packages/postgrest-swr/src/mutate/types.ts @@ -1,3 +1,9 @@ +import { GetResult } from '@supabase/postgrest-js/dist/module/select-query-parser'; +import { + GenericSchema, + GenericTable, +} from '@supabase/postgrest-js/dist/module/types'; +import { PostgrestError } from '@supabase/supabase-js'; import { InsertFetcherOptions, UpdateFetcherOptions, @@ -5,12 +11,6 @@ import { DeleteFetcherOptions, PostgrestMutatorOpts, } from '@supabase-cache-helpers/postgrest-core'; -import { GetResult } from '@supabase/postgrest-js/dist/module/select-query-parser'; -import { - GenericSchema, - GenericTable, -} from '@supabase/postgrest-js/dist/module/types'; -import { PostgrestError } from '@supabase/supabase-js'; import { MutatorOptions as SWRMutatorOptions } from 'swr'; import { SWRMutationConfiguration } from 'swr/mutation'; @@ -21,7 +21,7 @@ export type Operation = 'Insert' | 'UpdateOne' | 'Upsert' | 'DeleteOne'; type GetFetcherOptions< S extends GenericSchema, T extends GenericTable, - O extends Operation + O extends Operation, > = O extends 'Insert' ? InsertFetcherOptions : O extends 'UpdateOne' @@ -34,7 +34,7 @@ type GetFetcherOptions< export type GetInputType< T extends GenericTable, - O extends Operation + O extends Operation, > = O extends 'DeleteOne' ? Partial // TODO: Can we pick the primary keys somehow? : O extends 'Insert' | 'Upsert' @@ -49,7 +49,7 @@ export type GetReturnType< Relationships, O extends Operation, Q extends string = '*', - R = GetResult + R = GetResult, > = O extends 'UpdateOne' ? R | null : O extends 'DeleteOne' @@ -64,7 +64,7 @@ export type UsePostgrestSWRMutationOpts< Relationships, O extends Operation, Q extends string = '*', - R = GetResult + R = GetResult, > = PostgrestMutatorOpts & Pick & SWRMutationConfiguration< diff --git a/packages/postgrest-swr/src/mutate/use-delete-mutation.ts b/packages/postgrest-swr/src/mutate/use-delete-mutation.ts index ec4a77d3..439518d4 100644 --- a/packages/postgrest-swr/src/mutate/use-delete-mutation.ts +++ b/packages/postgrest-swr/src/mutate/use-delete-mutation.ts @@ -1,20 +1,20 @@ -import { - buildDeleteFetcher, - getTable, - QueryWithoutWildcard, -} from '@supabase-cache-helpers/postgrest-core'; import { PostgrestError, PostgrestQueryBuilder } from '@supabase/postgrest-js'; import { GetResult } from '@supabase/postgrest-js/dist/module/select-query-parser'; import { GenericSchema, GenericTable, } from '@supabase/postgrest-js/dist/module/types'; +import { + buildDeleteFetcher, + getTable, + QueryWithoutWildcard, +} from '@supabase-cache-helpers/postgrest-core'; import useMutation, { SWRMutationResponse } from 'swr/mutation'; -import { useDeleteItem } from '../cache'; -import { useQueriesForTableLoader } from '../lib'; import { UsePostgrestSWRMutationOpts } from './types'; import { useRandomKey } from './use-random-key'; +import { useDeleteItem } from '../cache'; +import { useQueriesForTableLoader } from '../lib'; /** * Hook for performing a DELETE mutation on a PostgREST resource. @@ -30,12 +30,12 @@ function useDeleteMutation< T extends GenericTable, Re = T extends { Relationships: infer R } ? R : unknown, Q extends string = '*', - R = GetResult + R = GetResult, >( qb: PostgrestQueryBuilder, primaryKeys: (keyof T['Row'])[], query?: QueryWithoutWildcard | null, - opts?: UsePostgrestSWRMutationOpts + opts?: UsePostgrestSWRMutationOpts, ): SWRMutationResponse> { const key = useRandomKey(); const queriesForTable = useQueriesForTableLoader(getTable(qb)); @@ -63,7 +63,7 @@ function useDeleteMutation< return result?.userQueryData ?? null; }, - opts + opts, ); } diff --git a/packages/postgrest-swr/src/mutate/use-insert-mutation.ts b/packages/postgrest-swr/src/mutate/use-insert-mutation.ts index 80da5b6a..b41bfbfa 100644 --- a/packages/postgrest-swr/src/mutate/use-insert-mutation.ts +++ b/packages/postgrest-swr/src/mutate/use-insert-mutation.ts @@ -1,21 +1,21 @@ -import { - buildInsertFetcher, - getTable, - QueryWithoutWildcard, -} from '@supabase-cache-helpers/postgrest-core'; import { PostgrestError, PostgrestQueryBuilder } from '@supabase/postgrest-js'; import { GetResult } from '@supabase/postgrest-js/dist/module/select-query-parser'; import { GenericSchema, GenericTable, } from '@supabase/postgrest-js/dist/module/types'; +import { + buildInsertFetcher, + getTable, + QueryWithoutWildcard, +} from '@supabase-cache-helpers/postgrest-core'; import useMutation, { SWRMutationResponse } from 'swr/mutation'; -import { useUpsertItem } from '../cache'; -import { useQueriesForTableLoader } from '../lib'; import { getUserResponse } from './get-user-response'; import { UsePostgrestSWRMutationOpts } from './types'; import { useRandomKey } from './use-random-key'; +import { useUpsertItem } from '../cache'; +import { useQueriesForTableLoader } from '../lib'; /** * Hook for performing an INSERT mutation on a PostgREST resource. @@ -31,12 +31,12 @@ function useInsertMutation< T extends GenericTable, Re = T extends { Relationships: infer R } ? R : unknown, Q extends string = '*', - R = GetResult + R = GetResult, >( qb: PostgrestQueryBuilder, primaryKeys: (keyof T['Row'])[], query?: QueryWithoutWildcard | null, - opts?: UsePostgrestSWRMutationOpts + opts?: UsePostgrestSWRMutationOpts, ): SWRMutationResponse { const key = useRandomKey(); const queriesForTable = useQueriesForTableLoader(getTable(qb)); @@ -61,14 +61,14 @@ function useInsertMutation< if (result) { Promise.all( (result ?? []).map( - async (d) => await upsertItem(d.normalizedData as T['Row']) - ) + async (d) => await upsertItem(d.normalizedData as T['Row']), + ), ); } return getUserResponse(result); }, - opts + opts, ); } diff --git a/packages/postgrest-swr/src/mutate/use-update-mutation.ts b/packages/postgrest-swr/src/mutate/use-update-mutation.ts index c22650ca..da96b344 100644 --- a/packages/postgrest-swr/src/mutate/use-update-mutation.ts +++ b/packages/postgrest-swr/src/mutate/use-update-mutation.ts @@ -1,20 +1,20 @@ -import { - buildUpdateFetcher, - getTable, - QueryWithoutWildcard, -} from '@supabase-cache-helpers/postgrest-core'; import { PostgrestError, PostgrestQueryBuilder } from '@supabase/postgrest-js'; import { GetResult } from '@supabase/postgrest-js/dist/module/select-query-parser'; import { GenericSchema, GenericTable, } from '@supabase/postgrest-js/dist/module/types'; +import { + buildUpdateFetcher, + getTable, + QueryWithoutWildcard, +} from '@supabase-cache-helpers/postgrest-core'; import useSWRMutation, { SWRMutationResponse } from 'swr/mutation'; -import { useUpsertItem } from '../cache'; -import { useQueriesForTableLoader } from '../lib'; import { UsePostgrestSWRMutationOpts } from './types'; import { useRandomKey } from './use-random-key'; +import { useUpsertItem } from '../cache'; +import { useQueriesForTableLoader } from '../lib'; /** * Hook for performing an UPDATE mutation on a PostgREST resource. @@ -30,12 +30,12 @@ function useUpdateMutation< T extends GenericTable, Re = T extends { Relationships: infer R } ? R : unknown, Q extends string = '*', - R = GetResult + R = GetResult, >( qb: PostgrestQueryBuilder, primaryKeys: (keyof T['Row'])[], query?: QueryWithoutWildcard | null, - opts?: UsePostgrestSWRMutationOpts + opts?: UsePostgrestSWRMutationOpts, ): SWRMutationResponse { const key = useRandomKey(); const queriesForTable = useQueriesForTableLoader(getTable(qb)); @@ -62,7 +62,7 @@ function useUpdateMutation< } return result?.userQueryData ?? null; }, - opts + opts, ); } diff --git a/packages/postgrest-swr/src/mutate/use-upsert-mutation.ts b/packages/postgrest-swr/src/mutate/use-upsert-mutation.ts index 86b29cfd..d9245c2e 100644 --- a/packages/postgrest-swr/src/mutate/use-upsert-mutation.ts +++ b/packages/postgrest-swr/src/mutate/use-upsert-mutation.ts @@ -1,21 +1,21 @@ -import { - buildUpsertFetcher, - getTable, - QueryWithoutWildcard, -} from '@supabase-cache-helpers/postgrest-core'; import { PostgrestError, PostgrestQueryBuilder } from '@supabase/postgrest-js'; import { GetResult } from '@supabase/postgrest-js/dist/module/select-query-parser'; import { GenericSchema, GenericTable, } from '@supabase/postgrest-js/dist/module/types'; +import { + buildUpsertFetcher, + getTable, + QueryWithoutWildcard, +} from '@supabase-cache-helpers/postgrest-core'; import useMutation, { SWRMutationResponse } from 'swr/mutation'; -import { useUpsertItem } from '../cache'; -import { useQueriesForTableLoader } from '../lib'; import { getUserResponse } from './get-user-response'; import { UsePostgrestSWRMutationOpts } from './types'; import { useRandomKey } from './use-random-key'; +import { useUpsertItem } from '../cache'; +import { useQueriesForTableLoader } from '../lib'; /** * Hook for performing an UPSERT mutation on a PostgREST resource. @@ -31,12 +31,12 @@ function useUpsertMutation< T extends GenericTable, Re = T extends { Relationships: infer R } ? R : unknown, Q extends string = '*', - R = GetResult + R = GetResult, >( qb: PostgrestQueryBuilder, primaryKeys: (keyof T['Row'])[], query?: QueryWithoutWildcard | null, - opts?: UsePostgrestSWRMutationOpts + opts?: UsePostgrestSWRMutationOpts, ): SWRMutationResponse { const key = useRandomKey(); const queriesForTable = useQueriesForTableLoader(getTable(qb)); @@ -60,13 +60,13 @@ function useUpsertMutation< if (result) { Promise.all( result.map( - async (d) => await upsertItem(d.normalizedData as T['Row']) - ) + async (d) => await upsertItem(d.normalizedData as T['Row']), + ), ); } return getUserResponse(result); }, - opts + opts, ); } diff --git a/packages/postgrest-swr/src/query/use-cursor-infinite-scroll-query.ts b/packages/postgrest-swr/src/query/use-cursor-infinite-scroll-query.ts index 13a2e056..4ea3927b 100644 --- a/packages/postgrest-swr/src/query/use-cursor-infinite-scroll-query.ts +++ b/packages/postgrest-swr/src/query/use-cursor-infinite-scroll-query.ts @@ -1,3 +1,8 @@ +import { + PostgrestError, + PostgrestTransformBuilder, +} from '@supabase/postgrest-js'; +import { GenericSchema } from '@supabase/postgrest-js/dist/module/types'; import { createCursorPaginationFetcher, get, @@ -5,11 +10,6 @@ import { PostgrestPaginationCacheData, PostgrestPaginationResponse, } from '@supabase-cache-helpers/postgrest-core'; -import { - PostgrestError, - PostgrestTransformBuilder, -} from '@supabase/postgrest-js'; -import { GenericSchema } from '@supabase/postgrest-js/dist/module/types'; import { useCallback, useMemo } from 'react'; import { Middleware } from 'swr'; import useSWRInfinite, { @@ -31,7 +31,7 @@ export type SWRCursorInfiniteScrollPostgrestResponse = Omit< * The return value of useInfiniteScrollQuery hook. */ export type UseCursorInfiniteScrollQueryReturn< - Result extends Record + Result extends Record, > = Omit< SWRInfiniteResponse, PostgrestError>, 'data' @@ -42,7 +42,7 @@ export type UseCursorInfiniteScrollQueryReturn< export type CursorSettings< Table extends Record, - ColumnName extends string & keyof Table + ColumnName extends string & keyof Table, > = { path: ColumnName; until?: Table[ColumnName]; @@ -60,7 +60,7 @@ function useCursorInfiniteScrollQuery< Table extends Record, Result extends Record, ColumnName extends string & keyof Table, - Relationships = unknown + Relationships = unknown, >( query: PostgrestTransformBuilder< Schema, @@ -72,7 +72,7 @@ function useCursorInfiniteScrollQuery< config?: SWRInfiniteConfiguration< PostgrestPaginationResponse, PostgrestError - > + >, ): UseCursorInfiniteScrollQueryReturn { const { data, setSize, size, isValidating, ...rest } = useSWRInfinite< PostgrestPaginationResponse, @@ -113,10 +113,10 @@ function useCursorInfiniteScrollQuery< // cursor value is the gt or lt filter on the order key const q = new URLSearchParams(decodedKey.queryKey); const filters = q.getAll( - `${foreignTablePath ? `${foreignTablePath}.` : ''}${column}` + `${foreignTablePath ? `${foreignTablePath}.` : ''}${column}`, ); const filter = filters.find((f) => - f.startsWith(`${ascending === 'asc' ? 'gt' : 'lt'}.`) + f.startsWith(`${ascending === 'asc' ? 'gt' : 'lt'}.`), ); if (!filter) { @@ -140,7 +140,7 @@ function useCursorInfiniteScrollQuery< foreignTable: foreignTablePath ?? undefined, }, }; - } + }, ), { ...config, @@ -148,7 +148,7 @@ function useCursorInfiniteScrollQuery< ...(config?.use ?? []), infiniteMiddleware as unknown as Middleware, ], - } + }, ); const { flatData, hasLoadMore } = useMemo(() => { @@ -186,7 +186,7 @@ function useCursorInfiniteScrollQuery< const path = `${foreignTablePath ? `${foreignTablePath}.` : ''}${column}`; const lastElem = parseValue( - get(flatData[flatData.length - 1], path) as string + get(flatData[flatData.length - 1], path) as string, ); const until = parseValue(cursor.until); if (lastElem && until) { diff --git a/packages/postgrest-swr/src/query/use-infinite-offset-pagination-query.ts b/packages/postgrest-swr/src/query/use-infinite-offset-pagination-query.ts index 9a01d2d3..fb7d14e5 100644 --- a/packages/postgrest-swr/src/query/use-infinite-offset-pagination-query.ts +++ b/packages/postgrest-swr/src/query/use-infinite-offset-pagination-query.ts @@ -1,12 +1,12 @@ -import { - createOffsetPaginationHasMoreFetcher, - PostgrestHasMorePaginationResponse, -} from '@supabase-cache-helpers/postgrest-core'; import { PostgrestError, PostgrestTransformBuilder, } from '@supabase/postgrest-js'; import { GenericSchema } from '@supabase/postgrest-js/dist/module/types'; +import { + createOffsetPaginationHasMoreFetcher, + PostgrestHasMorePaginationResponse, +} from '@supabase-cache-helpers/postgrest-core'; import { useCallback, useState } from 'react'; import { Middleware } from 'swr'; import useSWRInfinite, { @@ -41,7 +41,7 @@ export type SWRInfinitePaginationPostgrestResponse = * The return value of the `usePaginationQuery` hook. */ export type UseInfiniteOffsetPaginationQueryReturn< - Result extends Record + Result extends Record, > = SWRInfiniteOffsetPaginationPostgrestResponse; /** @@ -61,13 +61,13 @@ export type UsePaginationQueryReturn> = function useInfiniteOffsetPaginationQuery< Schema extends GenericSchema, Table extends Record, - Result extends Record + Result extends Record, >( query: PostgrestTransformBuilder | null, config?: SWRInfiniteConfiguration< PostgrestHasMorePaginationResponse, PostgrestError - > & { pageSize?: number } + > & { pageSize?: number }, ): UseInfiniteOffsetPaginationQueryReturn { const { data, setSize, size, isValidating, ...rest } = useSWRInfinite< PostgrestHasMorePaginationResponse, @@ -86,7 +86,7 @@ function useInfiniteOffsetPaginationQuery< offset: decodedKey.offset, }; }, - config?.pageSize ?? 20 + config?.pageSize ?? 20, ), { ...config, @@ -94,7 +94,7 @@ function useInfiniteOffsetPaginationQuery< ...(config?.use ?? []), infiniteMiddleware as unknown as Middleware, ], - } + }, ); const [currentPageIndex, setCurrentPageIndex] = useState(0); @@ -110,7 +110,7 @@ function useInfiniteOffsetPaginationQuery< } setCurrentPageIndex(idx); }, - [size, setSize, setCurrentPageIndex] + [size, setSize, setCurrentPageIndex], ); const nextPageFn = useCallback(() => { @@ -122,7 +122,7 @@ function useInfiniteOffsetPaginationQuery< const previousPageFn = useCallback( () => setCurrentPageIndex((current) => current - 1), - [setCurrentPageIndex] + [setCurrentPageIndex], ); return { diff --git a/packages/postgrest-swr/src/query/use-offset-infinite-query.ts b/packages/postgrest-swr/src/query/use-offset-infinite-query.ts index 84e86d7a..ad298b68 100644 --- a/packages/postgrest-swr/src/query/use-offset-infinite-query.ts +++ b/packages/postgrest-swr/src/query/use-offset-infinite-query.ts @@ -1,10 +1,10 @@ -import { createOffsetPaginationFetcher } from '@supabase-cache-helpers/postgrest-core'; import { PostgrestError, PostgrestResponse, PostgrestTransformBuilder, } from '@supabase/postgrest-js'; import { GenericSchema } from '@supabase/postgrest-js/dist/module/types'; +import { createOffsetPaginationFetcher } from '@supabase-cache-helpers/postgrest-core'; import { Middleware } from 'swr'; import useSWRInfinite, { SWRInfiniteConfiguration, @@ -17,7 +17,7 @@ import { createOffsetKeyGetter, infiniteMiddleware, decode } from '../lib'; * The return type of the `useInfiniteQuery` hook */ export type UseOffsetInfiniteQueryReturn< - Result extends Record + Result extends Record, > = SWRInfiniteResponse< Exclude['data'], null>, PostgrestError @@ -39,7 +39,7 @@ function useOffsetInfiniteQuery< Schema extends GenericSchema, Table extends Record, Result extends Record, - Relationships = unknown + Relationships = unknown, >( query: PostgrestTransformBuilder< Schema, @@ -50,7 +50,7 @@ function useOffsetInfiniteQuery< config?: SWRInfiniteConfiguration< Exclude['data'], null>, PostgrestError - > & { pageSize?: number } + > & { pageSize?: number }, ): UseOffsetInfiniteQueryReturn { return useSWRInfinite< Exclude['data'], null>, @@ -69,7 +69,7 @@ function useOffsetInfiniteQuery< offset: decodedKey.offset, }; }, - config?.pageSize ?? 20 + config?.pageSize ?? 20, ), { ...config, @@ -77,7 +77,7 @@ function useOffsetInfiniteQuery< ...(config?.use ?? []), infiniteMiddleware as unknown as Middleware, ], - } + }, ); } diff --git a/packages/postgrest-swr/src/query/use-offset-infinite-scroll-query.ts b/packages/postgrest-swr/src/query/use-offset-infinite-scroll-query.ts index 56763235..e6253b5b 100644 --- a/packages/postgrest-swr/src/query/use-offset-infinite-scroll-query.ts +++ b/packages/postgrest-swr/src/query/use-offset-infinite-scroll-query.ts @@ -1,13 +1,13 @@ -import { - createOffsetPaginationHasMoreFetcher, - PostgrestHasMorePaginationCacheData, - PostgrestHasMorePaginationResponse, -} from '@supabase-cache-helpers/postgrest-core'; import { PostgrestError, PostgrestTransformBuilder, } from '@supabase/postgrest-js'; import { GenericSchema } from '@supabase/postgrest-js/dist/module/types'; +import { + createOffsetPaginationHasMoreFetcher, + PostgrestHasMorePaginationCacheData, + PostgrestHasMorePaginationResponse, +} from '@supabase-cache-helpers/postgrest-core'; import { useCallback } from 'react'; import { Middleware } from 'swr'; import useSWRInfinite, { @@ -38,7 +38,7 @@ export type SWRInfinityScrollPostgrestResponse = * The return value of useInfiniteScrollQuery hook. */ export type UseOffsetInfiniteScrollQueryReturn< - Result extends Record + Result extends Record, > = Omit< SWRInfiniteResponse< PostgrestHasMorePaginationResponse, @@ -54,7 +54,7 @@ export type UseOffsetInfiniteScrollQueryReturn< * @deprecated Use UseOffsetInfiniteScrollQueryReturn instead. */ export type UseInfiniteScrollQueryReturn< - Result extends Record + Result extends Record, > = UseOffsetInfiniteScrollQueryReturn; /** @@ -68,7 +68,7 @@ function useOffsetInfiniteScrollQuery< Schema extends GenericSchema, Table extends Record, Result extends Record, - Relationships = unknown + Relationships = unknown, >( query: PostgrestTransformBuilder< Schema, @@ -79,7 +79,7 @@ function useOffsetInfiniteScrollQuery< config?: SWRInfiniteConfiguration< PostgrestHasMorePaginationResponse, PostgrestError - > & { pageSize?: number } + > & { pageSize?: number }, ): UseOffsetInfiniteScrollQueryReturn { const { data, setSize, size, isValidating, ...rest } = useSWRInfinite< PostgrestHasMorePaginationResponse, @@ -98,7 +98,7 @@ function useOffsetInfiniteScrollQuery< offset: decodedKey.offset, }; }, - config?.pageSize ?? 20 + config?.pageSize ?? 20, ), { ...config, @@ -106,7 +106,7 @@ function useOffsetInfiniteScrollQuery< ...(config?.use ?? []), infiniteMiddleware as unknown as Middleware, ], - } + }, ); const hasMore = diff --git a/packages/postgrest-swr/src/query/use-query.ts b/packages/postgrest-swr/src/query/use-query.ts index 05e2dc82..666309fd 100644 --- a/packages/postgrest-swr/src/query/use-query.ts +++ b/packages/postgrest-swr/src/query/use-query.ts @@ -1,14 +1,14 @@ -import { - PostgrestParser, - AnyPostgrestResponse, - isPostgrestBuilder, -} from '@supabase-cache-helpers/postgrest-core'; import { PostgrestError, PostgrestResponse, PostgrestSingleResponse, PostgrestMaybeSingleResponse, } from '@supabase/postgrest-js'; +import { + PostgrestParser, + AnyPostgrestResponse, + isPostgrestBuilder, +} from '@supabase-cache-helpers/postgrest-core'; import useSWR, { SWRConfiguration, SWRResponse } from 'swr'; import { encode } from '../lib'; @@ -65,7 +65,7 @@ export type UseQueryAnyReturn = Omit< */ function useQuery( query: PromiseLike> | null, - config?: SWRConfiguration, PostgrestError> + config?: SWRConfiguration, PostgrestError>, ): UseQuerySingleReturn; /** * Perform a postgrest query using `useSWR`. @@ -79,7 +79,7 @@ function useQuery( config?: SWRConfiguration< PostgrestMaybeSingleResponse, PostgrestError - > + >, ): UseQueryMaybeSingleReturn; /** * Perform a postgrest query using `useSWR`. @@ -90,7 +90,7 @@ function useQuery( */ function useQuery( query: PromiseLike> | null, - config?: SWRConfiguration, PostgrestError> + config?: SWRConfiguration, PostgrestError>, ): UseQueryReturn; /** * Perform a postgrest query using `useSWR`. @@ -101,7 +101,7 @@ function useQuery( */ function useQuery( query: PromiseLike> | null, - config?: SWRConfiguration, PostgrestError> + config?: SWRConfiguration, PostgrestError>, ): UseQueryAnyReturn { const { data, ...rest } = useSWR< AnyPostgrestResponse, @@ -130,12 +130,12 @@ function useQuery( return useSWRNext( key ? encode(new PostgrestParser(key), false) : null, () => fetcher(key), - config + config, ); }; }, ], - } + }, ); return { data: data?.data, count: data?.count ?? null, ...rest }; diff --git a/packages/postgrest-swr/src/subscribe/use-subscription-query.ts b/packages/postgrest-swr/src/subscribe/use-subscription-query.ts index 314d6f73..e022c579 100644 --- a/packages/postgrest-swr/src/subscribe/use-subscription-query.ts +++ b/packages/postgrest-swr/src/subscribe/use-subscription-query.ts @@ -1,8 +1,3 @@ -import { - buildNormalizedQuery, - PostgrestMutatorOpts, - QueryWithoutWildcard, -} from '@supabase-cache-helpers/postgrest-core'; import { GetResult } from '@supabase/postgrest-js/dist/module/select-query-parser'; import { GenericSchema, @@ -16,6 +11,11 @@ import { REALTIME_POSTGRES_CHANGES_LISTEN_EVENT, SupabaseClient, } from '@supabase/supabase-js'; +import { + buildNormalizedQuery, + PostgrestMutatorOpts, + QueryWithoutWildcard, +} from '@supabase-cache-helpers/postgrest-core'; import { useEffect, useState } from 'react'; import { MutatorOptions as SWRMutatorOptions } from 'swr'; @@ -30,7 +30,7 @@ export type UseSubscriptionQueryOpts< T extends GenericTable, Re = T extends { Relationships: infer R } ? R : unknown, Q extends string = '*', - R = GetResult + R = GetResult, > = PostgrestMutatorOpts & SWRMutatorOptions & { /** @@ -39,7 +39,7 @@ export type UseSubscriptionQueryOpts< * the affected row of the event (or a modified version of it, if a select query is provided). */ callback?: ( - event: RealtimePostgresChangesPayload & { data: T['Row'] | R } + event: RealtimePostgresChangesPayload & { data: T['Row'] | R }, ) => void | Promise; }; @@ -68,7 +68,7 @@ function useSubscriptionQuery< T extends GenericTable, Re = T extends { Relationships: infer R } ? R : unknown, Q extends string = '*', - R = GetResult + R = GetResult, >( client: SupabaseClient | null, channelName: string, @@ -78,7 +78,7 @@ function useSubscriptionQuery< > & { table: string }, primaryKeys: (keyof T['Row'])[], query?: QueryWithoutWildcard | null, - opts?: UseSubscriptionQueryOpts + opts?: UseSubscriptionQueryOpts, ) { const [status, setStatus] = useState(); const [channel, setChannel] = useState(); @@ -141,7 +141,7 @@ function useSubscriptionQuery< data, }); } - } + }, ) .subscribe((status: string) => setStatus(status)); diff --git a/packages/postgrest-swr/src/subscribe/use-subscription.ts b/packages/postgrest-swr/src/subscribe/use-subscription.ts index 7ee19fd1..970f80c0 100644 --- a/packages/postgrest-swr/src/subscribe/use-subscription.ts +++ b/packages/postgrest-swr/src/subscribe/use-subscription.ts @@ -1,4 +1,3 @@ -import { PostgrestMutatorOpts } from '@supabase-cache-helpers/postgrest-core'; import { GenericTable } from '@supabase/postgrest-js/dist/module/types'; import { RealtimePostgresChangesFilter, @@ -7,6 +6,7 @@ import { REALTIME_POSTGRES_CHANGES_LISTEN_EVENT, SupabaseClient, } from '@supabase/supabase-js'; +import { PostgrestMutatorOpts } from '@supabase-cache-helpers/postgrest-core'; import { useEffect, useState } from 'react'; import { MutatorOptions as SWRMutatorOptions } from 'swr'; @@ -26,7 +26,7 @@ export type UseSubscriptionOpts = PostgrestMutatorOpts< * @returns Optionally returns a Promise. */ callback?: ( - event: RealtimePostgresChangesPayload + event: RealtimePostgresChangesPayload, ) => void | Promise; }; @@ -47,7 +47,7 @@ function useSubscription( 'table' > & { table: string }, primaryKeys: (keyof T['Row'])[], - opts?: UseSubscriptionOpts + opts?: UseSubscriptionOpts, ) { const [status, setStatus] = useState(); const deleteItem = useDeleteItem({ @@ -90,7 +90,7 @@ function useSubscription( ...payload, }); } - } + }, ) .subscribe((status: string) => setStatus(status)); diff --git a/packages/prettier-config/package.json b/packages/prettier-config/package.json index b98a5d6f..1631e38a 100644 --- a/packages/prettier-config/package.json +++ b/packages/prettier-config/package.json @@ -7,6 +7,6 @@ "clean": "rm -rf .turbo && rm -rf lint-results && rm -rf .nyc_output && rm -rf node_modules" }, "devDependencies": { - "prettier": "2.8.8" + "prettier": "3.0.3" } } diff --git a/packages/storage-core/__tests__/directory-fetcher.spec.ts b/packages/storage-core/__tests__/directory-fetcher.spec.ts index 34b3f390..6330790e 100644 --- a/packages/storage-core/__tests__/directory-fetcher.spec.ts +++ b/packages/storage-core/__tests__/directory-fetcher.spec.ts @@ -1,7 +1,7 @@ import { createClient, SupabaseClient } from '@supabase/supabase-js'; -import { fetchDirectory } from '../src/directory-fetcher'; import { upload, cleanup } from './utils'; +import { fetchDirectory } from '../src/directory-fetcher'; const TEST_PREFIX = 'storage-fetcher-directory'; @@ -14,7 +14,7 @@ describe('fetchDirectory', () => { dirName = `${TEST_PREFIX}-${Math.floor(Math.random() * 100)}`; client = createClient( process.env.SUPABASE_URL as string, - process.env.SUPABASE_ANON_KEY as string + process.env.SUPABASE_ANON_KEY as string, ); await cleanup(client, 'private_contact_files', dirName); @@ -50,11 +50,11 @@ describe('fetchDirectory', () => { it('should return files', async () => { await expect( - fetchDirectory(client.storage.from('private_contact_files'), dirName) + fetchDirectory(client.storage.from('private_contact_files'), dirName), ).resolves.toEqual( expect.arrayContaining( - files.map((f) => expect.objectContaining({ name: f })) - ) + files.map((f) => expect.objectContaining({ name: f })), + ), ); }); }); diff --git a/packages/storage-core/__tests__/directory-urls-fetcher.spec.ts b/packages/storage-core/__tests__/directory-urls-fetcher.spec.ts index bdcc3996..0fd0a85e 100644 --- a/packages/storage-core/__tests__/directory-urls-fetcher.spec.ts +++ b/packages/storage-core/__tests__/directory-urls-fetcher.spec.ts @@ -1,7 +1,7 @@ import { createClient, SupabaseClient } from '@supabase/supabase-js'; -import { createDirectoryUrlsFetcher } from '../src/directory-urls-fetcher'; import { upload, cleanup } from './utils'; +import { createDirectoryUrlsFetcher } from '../src/directory-urls-fetcher'; const TEST_PREFIX = 'storage-fetcher-directory'; @@ -15,7 +15,7 @@ describe('createDirectoryUrlsFetcher', () => { dirName = `${TEST_PREFIX}-${Math.floor(Math.random() * 100)}`; client = createClient( process.env.SUPABASE_URL as string, - process.env.SUPABASE_ANON_KEY as string + process.env.SUPABASE_ANON_KEY as string, ); await Promise.all([ cleanup(client, 'public_contact_files', dirName), @@ -37,19 +37,19 @@ describe('createDirectoryUrlsFetcher', () => { await expect( createDirectoryUrlsFetcher('public')( client.storage.from('public_contact_files'), - dirName - ) + dirName, + ), ).resolves.toEqual( expect.arrayContaining( publicFiles.map((f) => expect.objectContaining({ name: f, url: expect.stringContaining( - `http://localhost:54321/storage/v1/object/public/public_contact_files/${dirName}/${f}` + `http://localhost:54321/storage/v1/object/public/public_contact_files/${dirName}/${f}`, ), - }) - ) - ) + }), + ), + ), ); }); @@ -57,19 +57,19 @@ describe('createDirectoryUrlsFetcher', () => { await expect( createDirectoryUrlsFetcher('private')( client.storage.from('private_contact_files'), - dirName - ) + dirName, + ), ).resolves.toEqual( expect.arrayContaining( privateFiles.map((f) => expect.objectContaining({ name: f, url: expect.stringContaining( - `http://localhost:54321/storage/v1/object/sign/private_contact_files/${dirName}/${f}?token=` + `http://localhost:54321/storage/v1/object/sign/private_contact_files/${dirName}/${f}?token=`, ), - }) - ) - ) + }), + ), + ), ); }); }); diff --git a/packages/storage-core/__tests__/remove-directory.spec.ts b/packages/storage-core/__tests__/remove-directory.spec.ts index 16a4ddfd..5e1e5b97 100644 --- a/packages/storage-core/__tests__/remove-directory.spec.ts +++ b/packages/storage-core/__tests__/remove-directory.spec.ts @@ -1,8 +1,8 @@ import { createClient, SupabaseClient } from '@supabase/supabase-js'; +import { upload, cleanup } from './utils'; import { fetchDirectory } from '../src/directory-fetcher'; import { createRemoveDirectoryFetcher } from '../src/remove-directory'; -import { upload, cleanup } from './utils'; const TEST_PREFIX = 'storage-fetcher-remove-directory'; @@ -15,7 +15,7 @@ describe('createRemoveDirectoryFetcher', () => { dirName = `${TEST_PREFIX}-${Math.floor(Math.random() * 100)}`; client = createClient( process.env.SUPABASE_URL as string, - process.env.SUPABASE_ANON_KEY as string + process.env.SUPABASE_ANON_KEY as string, ); await cleanup(client, 'private_contact_files', dirName); @@ -45,20 +45,20 @@ describe('createRemoveDirectoryFetcher', () => { it('should remove all files in the directory', async () => { await expect( - fetchDirectory(client.storage.from('private_contact_files'), dirName) + fetchDirectory(client.storage.from('private_contact_files'), dirName), ).resolves.toHaveLength(4); await expect( createRemoveDirectoryFetcher( - client.storage.from('private_contact_files') - )(dirName) + client.storage.from('private_contact_files'), + )(dirName), ).resolves.toEqual( expect.arrayContaining([ expect.objectContaining({ name: `${dirName}/${files[0]}` }), expect.objectContaining({ name: `${dirName}/${files[1]}` }), - ]) + ]), ); await expect( - fetchDirectory(client.storage.from('private_contact_files'), dirName) + fetchDirectory(client.storage.from('private_contact_files'), dirName), ).resolves.toEqual([]); }); }); diff --git a/packages/storage-core/__tests__/remove-files.spec.ts b/packages/storage-core/__tests__/remove-files.spec.ts index b9d513de..6b5dc3e0 100644 --- a/packages/storage-core/__tests__/remove-files.spec.ts +++ b/packages/storage-core/__tests__/remove-files.spec.ts @@ -1,8 +1,8 @@ import { createClient, SupabaseClient } from '@supabase/supabase-js'; +import { upload, cleanup } from './utils'; import { fetchDirectory } from '../src/directory-fetcher'; import { createRemoveFilesFetcher } from '../src/remove-files'; -import { upload, cleanup } from './utils'; const TEST_PREFIX = 'storage-fetcher-remove-files'; @@ -15,7 +15,7 @@ describe('createRemoveFilesFetcher', () => { dirName = `${TEST_PREFIX}-${Math.floor(Math.random() * 100)}`; client = createClient( process.env.SUPABASE_URL as string, - process.env.SUPABASE_ANON_KEY as string + process.env.SUPABASE_ANON_KEY as string, ); await cleanup(client, 'private_contact_files', dirName); @@ -42,21 +42,21 @@ describe('createRemoveFilesFetcher', () => { it('should remove specified files', async () => { await expect( - fetchDirectory(client.storage.from('private_contact_files'), dirName) + fetchDirectory(client.storage.from('private_contact_files'), dirName), ).resolves.toHaveLength(4); await expect( createRemoveFilesFetcher(client.storage.from('private_contact_files'))([ `${dirName}/${files[0]}`, `${dirName}/${files[1]}`, - ]) + ]), ).resolves.toEqual( expect.arrayContaining([ expect.objectContaining({ name: `${dirName}/${files[0]}` }), expect.objectContaining({ name: `${dirName}/${files[1]}` }), - ]) + ]), ); await expect( - fetchDirectory(client.storage.from('private_contact_files'), dirName) + fetchDirectory(client.storage.from('private_contact_files'), dirName), ).resolves.toHaveLength(2); }); }); diff --git a/packages/storage-core/__tests__/upload.spec.ts b/packages/storage-core/__tests__/upload.spec.ts index 70c2e138..683f5146 100644 --- a/packages/storage-core/__tests__/upload.spec.ts +++ b/packages/storage-core/__tests__/upload.spec.ts @@ -1,8 +1,8 @@ import { createClient, SupabaseClient } from '@supabase/supabase-js'; +import { cleanup, loadFixtures } from './utils'; import { fetchDirectory } from '../src/directory-fetcher'; import { createUploadFetcher } from '../src/upload'; -import { cleanup, loadFixtures } from './utils'; const TEST_PREFIX = 'storage-fetcher-upload'; @@ -19,7 +19,7 @@ describe('createUploadFetcher', () => { dirName = `${TEST_PREFIX}-${Math.floor(Math.random() * 100)}`; client = createClient( process.env.SUPABASE_URL as string, - process.env.SUPABASE_ANON_KEY as string + process.env.SUPABASE_ANON_KEY as string, ); await cleanup(client, 'private_contact_files', dirName); @@ -42,13 +42,13 @@ describe('createUploadFetcher', () => { await expect( createUploadFetcher(mock as any)([ new File([files[0] as BlobPart], 'test1'), - ]) + ]), ).resolves.toEqual( expect.arrayContaining([ { error: { message: 'Unknown Error', name: 'StorageError' }, }, - ]) + ]), ); }); @@ -60,25 +60,25 @@ describe('createUploadFetcher', () => { })([ new File([files[0] as BlobPart], fileNames[0]), new File([files[1] as BlobPart], fileNames[1]), - ]) + ]), ).resolves.toEqual( expect.arrayContaining( [fileNames[0], fileNames[1]].map((fileName) => expect.objectContaining({ data: { path: `${dirName}/${fileName}` }, error: null, - }) - ) - ) + }), + ), + ), ); await expect( - fetchDirectory(client.storage.from('private_contact_files'), dirName) + fetchDirectory(client.storage.from('private_contact_files'), dirName), ).resolves.toEqual( expect.arrayContaining( [fileNames[0], fileNames[1]].map((f) => - expect.objectContaining({ name: f }) - ) - ) + expect.objectContaining({ name: f }), + ), + ), ); }); @@ -90,26 +90,26 @@ describe('createUploadFetcher', () => { new File([files[2] as BlobPart], fileNames[2]), new File([files[3] as BlobPart], fileNames[3]), ], - dirName - ) + dirName, + ), ).resolves.toEqual( expect.arrayContaining( [fileNames[2], fileNames[3]].map((fileName) => expect.objectContaining({ data: { path: `${dirName}/${fileName}` }, error: null, - }) - ) - ) + }), + ), + ), ); await expect( - fetchDirectory(client.storage.from('private_contact_files'), dirName) + fetchDirectory(client.storage.from('private_contact_files'), dirName), ).resolves.toEqual( expect.arrayContaining( [fileNames[2], fileNames[3]].map((f) => - expect.objectContaining({ name: f }) - ) - ) + expect.objectContaining({ name: f }), + ), + ), ); }); @@ -129,25 +129,25 @@ describe('createUploadFetcher', () => { name: fileNames[1], type: 'image/jpeg', }, - ]) + ]), ).resolves.toEqual( expect.arrayContaining( [fileNames[0], fileNames[1]].map((fileName) => expect.objectContaining({ data: { path: `${dirName}/${fileName}` }, error: null, - }) - ) - ) + }), + ), + ), ); await expect( - fetchDirectory(client.storage.from('private_contact_files'), dirName) + fetchDirectory(client.storage.from('private_contact_files'), dirName), ).resolves.toEqual( expect.arrayContaining( [fileNames[0], fileNames[1]].map((f) => - expect.objectContaining({ name: f }) - ) - ) + expect.objectContaining({ name: f }), + ), + ), ); }); }); diff --git a/packages/storage-core/__tests__/url-fetcher.spec.ts b/packages/storage-core/__tests__/url-fetcher.spec.ts index 9aec2d98..0961f43a 100644 --- a/packages/storage-core/__tests__/url-fetcher.spec.ts +++ b/packages/storage-core/__tests__/url-fetcher.spec.ts @@ -1,7 +1,7 @@ import { createClient, SupabaseClient } from '@supabase/supabase-js'; -import { createUrlFetcher } from '../src/url-fetcher'; import { upload, cleanup } from './utils'; +import { createUrlFetcher } from '../src/url-fetcher'; const TEST_PREFIX = 'storage-fetcher-directory'; @@ -15,7 +15,7 @@ describe('urlFetcher', () => { dirName = `${TEST_PREFIX}-${Math.floor(Math.random() * 100)}`; client = createClient( process.env.SUPABASE_URL as string, - process.env.SUPABASE_ANON_KEY as string + process.env.SUPABASE_ANON_KEY as string, ); await Promise.all([ @@ -38,7 +38,7 @@ describe('urlFetcher', () => { await expect( createUrlFetcher('public', { ensureExistence: true, - })(client.storage.from('public_contact_files'), 'unknown') + })(client.storage.from('public_contact_files'), 'unknown'), ).resolves.toBeUndefined(); }); @@ -48,24 +48,24 @@ describe('urlFetcher', () => { ensureExistence: true, })( client.storage.from('public_contact_files'), - `${dirName}/${publicFiles[0]}` - ) + `${dirName}/${publicFiles[0]}`, + ), ).resolves.toEqual( expect.stringContaining( - `http://localhost:54321/storage/v1/object/public/public_contact_files/${dirName}/${publicFiles[0]}?updated_at=` - ) + `http://localhost:54321/storage/v1/object/public/public_contact_files/${dirName}/${publicFiles[0]}?updated_at=`, + ), ); }); it('should return url for public bucket', async () => { await expect( createUrlFetcher('public')( client.storage.from('public_contact_files'), - `${dirName}/${publicFiles[0]}` - ) + `${dirName}/${publicFiles[0]}`, + ), ).resolves.toEqual( expect.stringContaining( - `http://localhost:54321/storage/v1/object/public/public_contact_files/${dirName}/${publicFiles[0]}?updated_at=` - ) + `http://localhost:54321/storage/v1/object/public/public_contact_files/${dirName}/${publicFiles[0]}?updated_at=`, + ), ); }); @@ -73,12 +73,12 @@ describe('urlFetcher', () => { await expect( createUrlFetcher('private')( client.storage.from('private_contact_files'), - `${dirName}/${privateFiles[0]}` - ) + `${dirName}/${privateFiles[0]}`, + ), ).resolves.toEqual( expect.stringContaining( - `http://localhost:54321/storage/v1/object/sign/private_contact_files/${dirName}/${privateFiles[0]}?token=` - ) + `http://localhost:54321/storage/v1/object/sign/private_contact_files/${dirName}/${privateFiles[0]}?token=`, + ), ); }); @@ -86,12 +86,12 @@ describe('urlFetcher', () => { await expect( createUrlFetcher('private', { expiresIn: 10 })( client.storage.from('private_contact_files'), - `${dirName}/${privateFiles[0]}` - ) + `${dirName}/${privateFiles[0]}`, + ), ).resolves.toEqual( expect.stringContaining( - `http://localhost:54321/storage/v1/object/sign/private_contact_files/${dirName}/${privateFiles[0]}?token=` - ) + `http://localhost:54321/storage/v1/object/sign/private_contact_files/${dirName}/${privateFiles[0]}?token=`, + ), ); }); diff --git a/packages/storage-core/__tests__/utils.ts b/packages/storage-core/__tests__/utils.ts index 2bc311f0..3a4bed2b 100644 --- a/packages/storage-core/__tests__/utils.ts +++ b/packages/storage-core/__tests__/utils.ts @@ -11,7 +11,7 @@ export const loadFixtures = async () => { return { fileNames, files: await Promise.all( - fileNames.map(async (f) => await readFile(join(fixturesDir, f))) + fileNames.map(async (f) => await readFile(join(fixturesDir, f))), ), }; }; @@ -19,7 +19,7 @@ export const loadFixtures = async () => { export const upload = async ( client: SupabaseClient, bucketName: string, - dirName: string + dirName: string, ): Promise => { const fixturesDir = resolve(__dirname, '__fixtures__'); const fileNames = await readdir(fixturesDir); @@ -28,8 +28,8 @@ export const upload = async ( async (f) => await client.storage .from(bucketName) - .upload(`${dirName}/${f}`, await readFile(join(fixturesDir, f))) - ) + .upload(`${dirName}/${f}`, await readFile(join(fixturesDir, f))), + ), ); return fileNames; }; @@ -37,7 +37,7 @@ export const upload = async ( export const cleanup = async ( client: SupabaseClient, bucketName: string, - dirName: string + dirName: string, ) => { const { data } = await client.storage.from(bucketName).list(dirName); await client.storage diff --git a/packages/storage-core/package.json b/packages/storage-core/package.json index f503c231..cd5175d4 100644 --- a/packages/storage-core/package.json +++ b/packages/storage-core/package.json @@ -47,7 +47,7 @@ "@supabase/supabase-js": "2.38.2", "@types/jest": "29.5.0", "dotenv": "16.3.1", - "eslint": "8.40.0", + "eslint": "8.52.0", "@supabase-cache-helpers/eslint-config-custom": "workspace:*", "@supabase-cache-helpers/prettier-config": "workspace:*", "jest": "29.7.0", diff --git a/packages/storage-core/src/directory-fetcher.ts b/packages/storage-core/src/directory-fetcher.ts index 9b37f307..ff7fd782 100644 --- a/packages/storage-core/src/directory-fetcher.ts +++ b/packages/storage-core/src/directory-fetcher.ts @@ -3,7 +3,7 @@ import StorageFileApi from '@supabase/storage-js/dist/module/packages/StorageFil export const fetchDirectory = async ( fileApi: StorageFileApi, - path: string + path: string, ): Promise => { const { data, error } = await fileApi.list(path); if (error) throw error; diff --git a/packages/storage-core/src/directory-urls-fetcher.ts b/packages/storage-core/src/directory-urls-fetcher.ts index b882a54a..8ecfec01 100644 --- a/packages/storage-core/src/directory-urls-fetcher.ts +++ b/packages/storage-core/src/directory-urls-fetcher.ts @@ -7,12 +7,12 @@ import { createUrlFetcher, URLFetcherConfig } from './url-fetcher'; type DirectoryURLsFetcher = ( fileApi: StorageFileApi, - path: string + path: string, ) => Promise<(FileObject & { url: string })[]>; export const createDirectoryUrlsFetcher = ( mode: StoragePrivacy, - config?: Pick + config?: Pick, ): DirectoryURLsFetcher => { const fetchUrl = createUrlFetcher(mode, config); return async (fileApi: StorageFileApi, path) => { diff --git a/packages/storage-core/src/mutate-paths.ts b/packages/storage-core/src/mutate-paths.ts index 0e2a71da..eb02d225 100644 --- a/packages/storage-core/src/mutate-paths.ts +++ b/packages/storage-core/src/mutate-paths.ts @@ -19,7 +19,7 @@ export type Cache = { export const mutatePaths = async ( bucketId: string, paths: string[], - { cacheKeys, decode, mutate }: Cache + { cacheKeys, decode, mutate }: Cache, ) => { const minimalPaths = getMinimalPaths(paths); if (minimalPaths.length === 0) return; @@ -30,11 +30,11 @@ export const mutatePaths = async ( if (decodedKey.bucketId !== bucketId) return false; if ( minimalPaths.find( - (p) => p.startsWith(decodedKey.path) || decodedKey.path.startsWith(p) + (p) => p.startsWith(decodedKey.path) || decodedKey.path.startsWith(p), ) ) { mutate(key); } - }) + }), ); }; diff --git a/packages/storage-core/src/upload.ts b/packages/storage-core/src/upload.ts index 3d5832db..4a3a6550 100644 --- a/packages/storage-core/src/upload.ts +++ b/packages/storage-core/src/upload.ts @@ -33,12 +33,12 @@ const isUploadFileInput = (i: FileInput): i is UploadFileInput => export const createUploadFetcher = ( fileApi: StorageFileApi, - config?: UploadFetcherConfig + config?: UploadFetcherConfig, ) => { const buildFileName = config?.buildFileName ?? defaultBuildFileName; return async ( files: FileList | FileInput[], - path?: string + path?: string, ): Promise => { // convert FileList into File[] const inputFiles: FileInput[] = []; @@ -53,13 +53,13 @@ export const createUploadFetcher = ( }).replace( // remove double "/" new RegExp('/+', 'g'), - '/' + '/', ), isUploadFileInput(f) ? f.data : f, { contentType: f.type, ...config, - } + }, ); return res; }); diff --git a/packages/storage-core/src/url-fetcher.ts b/packages/storage-core/src/url-fetcher.ts index 6d5cbeb6..0d0feeda 100644 --- a/packages/storage-core/src/url-fetcher.ts +++ b/packages/storage-core/src/url-fetcher.ts @@ -4,7 +4,7 @@ import { StoragePrivacy } from './lib/types'; type URLFetcher = ( fileApi: StorageFileApi, - path: string + path: string, ) => Promise; export type URLFetcherConfig = { @@ -14,11 +14,11 @@ export type URLFetcherConfig = { export const createUrlFetcher = ( mode: StoragePrivacy, - config?: URLFetcherConfig + config?: URLFetcherConfig, ): URLFetcher => { return async ( fileApi: StorageFileApi, - path: string + path: string, ): Promise => { let params: Record | undefined; if (config?.ensureExistence) { @@ -42,7 +42,7 @@ export const createUrlFetcher = ( if (mode === 'private') { const { data, error } = await fileApi.createSignedUrl( path, - config?.expiresIn ?? 1800 + config?.expiresIn ?? 1800, ); if (error) throw error; url = data.signedUrl; diff --git a/packages/storage-react-query/__tests__/lib/key.spec.ts b/packages/storage-react-query/__tests__/lib/key.spec.ts index 9e3894f1..898d28d2 100644 --- a/packages/storage-react-query/__tests__/lib/key.spec.ts +++ b/packages/storage-react-query/__tests__/lib/key.spec.ts @@ -4,7 +4,7 @@ describe('key', () => { describe('assertStorageKeyInput', () => { it('should throw for invalid key', () => { expect(() => assertStorageKeyInput(['some', 'unrelated', 'key'])).toThrow( - 'Invalid key' + 'Invalid key', ); }); }); diff --git a/packages/storage-react-query/__tests__/mutate/use-remove-directory.spec.tsx b/packages/storage-react-query/__tests__/mutate/use-remove-directory.spec.tsx index c9aa7add..a29fcd80 100644 --- a/packages/storage-react-query/__tests__/mutate/use-remove-directory.spec.tsx +++ b/packages/storage-react-query/__tests__/mutate/use-remove-directory.spec.tsx @@ -1,5 +1,5 @@ -import { fetchDirectory } from '@supabase-cache-helpers/storage-core'; import { createClient, SupabaseClient } from '@supabase/supabase-js'; +import { fetchDirectory } from '@supabase-cache-helpers/storage-core'; import { fireEvent, screen } from '@testing-library/react'; import { useDirectory, useRemoveDirectory } from '../../src'; @@ -16,7 +16,7 @@ describe('useRemoveDirectory', () => { dirName = `${TEST_PREFIX}-${Math.floor(Math.random() * 100)}`; client = createClient( process.env.SUPABASE_URL as string, - process.env.SUPABASE_ANON_KEY as string + process.env.SUPABASE_ANON_KEY as string, ); await Promise.all([ @@ -33,7 +33,7 @@ describe('useRemoveDirectory', () => { refetchOnWindowFocus: false, }); const { mutateAsync: remove, isSuccess } = useRemoveDirectory( - client.storage.from('private_contact_files') + client.storage.from('private_contact_files'), ); return ( <> @@ -47,7 +47,7 @@ describe('useRemoveDirectory', () => { fireEvent.click(screen.getByTestId('remove')); await screen.findByText('isSuccess: true', {}, { timeout: 10000 }); await expect( - fetchDirectory(client.storage.from('private_contact_files'), dirName) + fetchDirectory(client.storage.from('private_contact_files'), dirName), ).resolves.toEqual([]); }); }); diff --git a/packages/storage-react-query/__tests__/mutate/use-remove-files.spec.tsx b/packages/storage-react-query/__tests__/mutate/use-remove-files.spec.tsx index b888c8b7..a0582a86 100644 --- a/packages/storage-react-query/__tests__/mutate/use-remove-files.spec.tsx +++ b/packages/storage-react-query/__tests__/mutate/use-remove-files.spec.tsx @@ -1,5 +1,5 @@ -import { fetchDirectory } from '@supabase-cache-helpers/storage-core'; import { createClient, SupabaseClient } from '@supabase/supabase-js'; +import { fetchDirectory } from '@supabase-cache-helpers/storage-core'; import { fireEvent, screen } from '@testing-library/react'; import { useDirectory, useRemoveFiles } from '../../src'; @@ -16,7 +16,7 @@ describe('useRemoveFiles', () => { dirName = `${TEST_PREFIX}-${Math.floor(Math.random() * 100)}`; client = createClient( process.env.SUPABASE_URL as string, - process.env.SUPABASE_ANON_KEY as string + process.env.SUPABASE_ANON_KEY as string, ); await Promise.all([ @@ -33,7 +33,7 @@ describe('useRemoveFiles', () => { refetchOnWindowFocus: false, }); const { mutateAsync: remove, isSuccess } = useRemoveFiles( - client.storage.from('private_contact_files') + client.storage.from('private_contact_files'), ); return ( <> @@ -50,7 +50,7 @@ describe('useRemoveFiles', () => { fireEvent.click(screen.getByTestId('remove')); await screen.findByText('isSuccess: true', {}, { timeout: 10000 }); await expect( - fetchDirectory(client.storage.from('private_contact_files'), dirName) + fetchDirectory(client.storage.from('private_contact_files'), dirName), ).resolves.toEqual([]); }); }); diff --git a/packages/storage-react-query/__tests__/mutate/use-upload.spec.tsx b/packages/storage-react-query/__tests__/mutate/use-upload.spec.tsx index 6e2a6c7b..7ff58f24 100644 --- a/packages/storage-react-query/__tests__/mutate/use-upload.spec.tsx +++ b/packages/storage-react-query/__tests__/mutate/use-upload.spec.tsx @@ -1,5 +1,5 @@ -import { fetchDirectory } from '@supabase-cache-helpers/storage-core'; import { createClient, SupabaseClient } from '@supabase/supabase-js'; +import { fetchDirectory } from '@supabase-cache-helpers/storage-core'; import { fireEvent, screen } from '@testing-library/react'; import { useDirectory, useUpload } from '../../src'; @@ -17,7 +17,7 @@ describe('useUpload', () => { dirName = `${TEST_PREFIX}-${Math.floor(Math.random() * 100)}`; client = createClient( process.env.SUPABASE_URL as string, - process.env.SUPABASE_ANON_KEY as string + process.env.SUPABASE_ANON_KEY as string, ); await Promise.all([ @@ -37,7 +37,7 @@ describe('useUpload', () => { }); const { mutateAsync: upload, isSuccess } = useUpload( client.storage.from('private_contact_files'), - {} + {}, ); return ( <> @@ -54,11 +54,11 @@ describe('useUpload', () => { fireEvent.click(screen.getByTestId('upload')); await screen.findByText('isSuccess: true', {}, { timeout: 10000 }); await expect( - fetchDirectory(client.storage.from('private_contact_files'), dirName) + fetchDirectory(client.storage.from('private_contact_files'), dirName), ).resolves.toEqual( expect.arrayContaining( - files.map((f) => expect.objectContaining({ name: f.name })) - ) + files.map((f) => expect.objectContaining({ name: f.name })), + ), ); }); }); diff --git a/packages/storage-react-query/__tests__/query/use-directory-urls.spec.tsx b/packages/storage-react-query/__tests__/query/use-directory-urls.spec.tsx index 4a045dff..97b30acc 100644 --- a/packages/storage-react-query/__tests__/query/use-directory-urls.spec.tsx +++ b/packages/storage-react-query/__tests__/query/use-directory-urls.spec.tsx @@ -16,7 +16,7 @@ describe('useDirectoryFileUrls', () => { dirName = `${TEST_PREFIX}-${Math.floor(Math.random() * 100)}`; client = createClient( process.env.SUPABASE_URL as string, - process.env.SUPABASE_ANON_KEY as string + process.env.SUPABASE_ANON_KEY as string, ); await Promise.all([ @@ -36,7 +36,7 @@ describe('useDirectoryFileUrls', () => { 'private', { refetchOnWindowFocus: false, - } + }, ); return (
@@ -51,8 +51,8 @@ describe('useDirectoryFileUrls', () => { await Promise.all( privateFiles.map( async (f) => - await screen.findByText(`${f}: exists`, {}, { timeout: 10000 }) - ) + await screen.findByText(`${f}: exists`, {}, { timeout: 10000 }), + ), ); }); }); diff --git a/packages/storage-react-query/__tests__/query/use-directory.spec.tsx b/packages/storage-react-query/__tests__/query/use-directory.spec.tsx index c852e2d9..224cde66 100644 --- a/packages/storage-react-query/__tests__/query/use-directory.spec.tsx +++ b/packages/storage-react-query/__tests__/query/use-directory.spec.tsx @@ -16,7 +16,7 @@ describe('useDirectory', () => { dirName = `${TEST_PREFIX}-${Math.floor(Math.random() * 100)}`; client = createClient( process.env.SUPABASE_URL as string, - process.env.SUPABASE_ANON_KEY as string + process.env.SUPABASE_ANON_KEY as string, ); await Promise.all([ @@ -35,7 +35,7 @@ describe('useDirectory', () => { dirName, { refetchOnWindowFocus: false, - } + }, ); return (
@@ -49,8 +49,8 @@ describe('useDirectory', () => { renderWithConfig(); await Promise.all( privateFiles.map( - async (f) => await screen.findByText(f, {}, { timeout: 10000 }) - ) + async (f) => await screen.findByText(f, {}, { timeout: 10000 }), + ), ); }); }); diff --git a/packages/storage-react-query/__tests__/query/use-file-url.spec.tsx b/packages/storage-react-query/__tests__/query/use-file-url.spec.tsx index 23160525..71d83b2c 100644 --- a/packages/storage-react-query/__tests__/query/use-file-url.spec.tsx +++ b/packages/storage-react-query/__tests__/query/use-file-url.spec.tsx @@ -16,7 +16,7 @@ describe('useFileUrl', () => { dirName = `${TEST_PREFIX}-${Math.floor(Math.random() * 100)}`; client = createClient( process.env.SUPABASE_URL as string, - process.env.SUPABASE_ANON_KEY as string + process.env.SUPABASE_ANON_KEY as string, ); await Promise.all([ @@ -37,7 +37,7 @@ describe('useFileUrl', () => { { ensureExistence: true, refetchOnWindowFocus: false, - } + }, ); return
{`URL: ${url ? 'exists' : url}`}
; } diff --git a/packages/storage-react-query/__tests__/utils.tsx b/packages/storage-react-query/__tests__/utils.tsx index ad937e8f..b0bda79d 100644 --- a/packages/storage-react-query/__tests__/utils.tsx +++ b/packages/storage-react-query/__tests__/utils.tsx @@ -10,7 +10,7 @@ dotenv.config({ path: resolve(__dirname, '../../../.env.local') }); export const renderWithConfig = ( element: React.ReactElement, - queryClient?: QueryClient + queryClient?: QueryClient, ): ReturnType => { const client = queryClient ?? new QueryClient(); const TestQueryClientProvider = ({ @@ -29,8 +29,8 @@ export const loadFixtures = async () => { files: await Promise.all( fileNames.map( async (f) => - new File([(await readFile(join(fixturesDir, f))) as BlobPart], f) - ) + new File([(await readFile(join(fixturesDir, f))) as BlobPart], f), + ), ), }; }; @@ -38,7 +38,7 @@ export const loadFixtures = async () => { export const upload = async ( client: SupabaseClient, bucketName: string, - dirName: string + dirName: string, ): Promise => { const fixturesDir = resolve(__dirname, '__fixtures__'); const fileNames = await readdir(fixturesDir); @@ -47,8 +47,8 @@ export const upload = async ( async (f) => await client.storage .from(bucketName) - .upload(`${dirName}/${f}`, await readFile(join(fixturesDir, f))) - ) + .upload(`${dirName}/${f}`, await readFile(join(fixturesDir, f))), + ), ); return fileNames; }; @@ -56,7 +56,7 @@ export const upload = async ( export const cleanup = async ( client: SupabaseClient, bucketName: string, - dirName: string + dirName: string, ) => { const { data } = await client.storage.from(bucketName).list(dirName); await client.storage diff --git a/packages/storage-react-query/package.json b/packages/storage-react-query/package.json index 5b885cb6..d29ae103 100644 --- a/packages/storage-react-query/package.json +++ b/packages/storage-react-query/package.json @@ -63,7 +63,7 @@ "jest-environment-jsdom": "29.7.0", "@types/jest": "29.5.0", "dotenv": "16.3.1", - "eslint": "8.40.0", + "eslint": "8.52.0", "@supabase-cache-helpers/eslint-config-custom": "workspace:*", "jest": "29.7.0", "@supabase-cache-helpers/jest-presets": "workspace:*", diff --git a/packages/storage-react-query/src/mutate/use-remove-directory.ts b/packages/storage-react-query/src/mutate/use-remove-directory.ts index fea28607..74ce8a02 100644 --- a/packages/storage-react-query/src/mutate/use-remove-directory.ts +++ b/packages/storage-react-query/src/mutate/use-remove-directory.ts @@ -1,8 +1,8 @@ +import { FileObject, StorageError } from '@supabase/storage-js'; import { createRemoveDirectoryFetcher, mutatePaths, } from '@supabase-cache-helpers/storage-core'; -import { FileObject, StorageError } from '@supabase/storage-js'; import { QueryKey, useMutation, @@ -25,7 +25,7 @@ function useRemoveDirectory( config?: Omit< UseMutationOptions, 'mutationFn' - > + >, ): UseMutationResult { const queryClient = useQueryClient(); const fetcher = useCallback(createRemoveDirectoryFetcher(fileApi), [fileApi]); diff --git a/packages/storage-react-query/src/mutate/use-remove-files.ts b/packages/storage-react-query/src/mutate/use-remove-files.ts index 2217ce60..fb0820cd 100644 --- a/packages/storage-react-query/src/mutate/use-remove-files.ts +++ b/packages/storage-react-query/src/mutate/use-remove-files.ts @@ -1,8 +1,8 @@ +import { FileObject, StorageError } from '@supabase/storage-js'; import { createRemoveFilesFetcher, mutatePaths, } from '@supabase-cache-helpers/storage-core'; -import { FileObject, StorageError } from '@supabase/storage-js'; import { QueryKey, useMutation, @@ -25,7 +25,7 @@ function useRemoveFiles( config?: Omit< UseMutationOptions, 'mutationFn' - > + >, ): UseMutationResult { const queryClient = useQueryClient(); const fetcher = useCallback(createRemoveFilesFetcher(fileApi), [fileApi]); diff --git a/packages/storage-react-query/src/mutate/use-upload.ts b/packages/storage-react-query/src/mutate/use-upload.ts index 2d3b9953..8e165847 100644 --- a/packages/storage-react-query/src/mutate/use-upload.ts +++ b/packages/storage-react-query/src/mutate/use-upload.ts @@ -1,3 +1,4 @@ +import { StorageError } from '@supabase/storage-js'; import { FileInput, createUploadFetcher, @@ -5,7 +6,6 @@ import { UploadFileResponse, mutatePaths, } from '@supabase-cache-helpers/storage-core'; -import { StorageError } from '@supabase/storage-js'; import { useMutation, UseMutationOptions, @@ -41,7 +41,7 @@ function useUpload( Omit< UseMutationOptions, 'mutationFn' - > + >, ): UseMutationResult { const queryClient = useQueryClient(); const fetcher = useCallback(createUploadFetcher(fileApi, config), [ @@ -63,7 +63,7 @@ function useUpload( mutate: async (key) => { await queryClient.invalidateQueries({ queryKey: key }); }, - } + }, ); return result; }, diff --git a/packages/storage-react-query/src/query/use-directory-urls.ts b/packages/storage-react-query/src/query/use-directory-urls.ts index 90392a7f..ecf52ff8 100644 --- a/packages/storage-react-query/src/query/use-directory-urls.ts +++ b/packages/storage-react-query/src/query/use-directory-urls.ts @@ -1,9 +1,9 @@ +import { FileObject, StorageError } from '@supabase/storage-js'; import { createDirectoryUrlsFetcher, StoragePrivacy, URLFetcherConfig, } from '@supabase-cache-helpers/storage-core'; -import { FileObject, StorageError } from '@supabase/storage-js'; import { useQuery as useReactQuery, UseQueryResult as UseReactQueryResult, @@ -33,7 +33,7 @@ function useDirectoryFileUrls( >, 'queryKey' | 'queryFn' > & - Pick + Pick, ): UseReactQueryResult< (FileObject & { url: string })[] | undefined, StorageError diff --git a/packages/storage-react-query/src/query/use-directory.ts b/packages/storage-react-query/src/query/use-directory.ts index 32b520cd..40c0f87c 100644 --- a/packages/storage-react-query/src/query/use-directory.ts +++ b/packages/storage-react-query/src/query/use-directory.ts @@ -1,5 +1,5 @@ -import { fetchDirectory } from '@supabase-cache-helpers/storage-core'; import { FileObject, StorageError } from '@supabase/storage-js'; +import { fetchDirectory } from '@supabase-cache-helpers/storage-core'; import { useQuery as useReactQuery, UseQueryResult as UseReactQueryResult, @@ -22,7 +22,7 @@ function useDirectory( config?: Omit< UseReactQueryOptions, 'queryKey' | 'queryFn' - > + >, ): UseReactQueryResult { return useReactQuery({ queryKey: encode([fileApi, path]), diff --git a/packages/storage-react-query/src/query/use-file-url.ts b/packages/storage-react-query/src/query/use-file-url.ts index ba835a0e..ae22a15b 100644 --- a/packages/storage-react-query/src/query/use-file-url.ts +++ b/packages/storage-react-query/src/query/use-file-url.ts @@ -1,9 +1,9 @@ +import { StorageError } from '@supabase/storage-js'; import { StoragePrivacy, createUrlFetcher, URLFetcherConfig, } from '@supabase-cache-helpers/storage-core'; -import { StorageError } from '@supabase/storage-js'; import { useQuery as useReactQuery, UseQueryResult as UseReactQueryResult, @@ -29,7 +29,7 @@ function useFileUrl( UseReactQueryOptions, 'queryKey' | 'queryFn' > & - URLFetcherConfig + URLFetcherConfig, ): UseReactQueryResult { return useReactQuery({ queryKey: encode([fileApi, path]), diff --git a/packages/storage-swr/__tests__/lib/key.spec.ts b/packages/storage-swr/__tests__/lib/key.spec.ts index 30422a2e..a0c2e6ae 100644 --- a/packages/storage-swr/__tests__/lib/key.spec.ts +++ b/packages/storage-swr/__tests__/lib/key.spec.ts @@ -4,7 +4,7 @@ describe('key', () => { describe('assertStorageKeyInput', () => { it('should throw for invalid key', () => { expect(() => assertStorageKeyInput('some unrelated key')).toThrow( - 'Invalid key' + 'Invalid key', ); }); }); diff --git a/packages/storage-swr/__tests__/mutate/use-remove-directory.spec.tsx b/packages/storage-swr/__tests__/mutate/use-remove-directory.spec.tsx index 7da0ae72..33407370 100644 --- a/packages/storage-swr/__tests__/mutate/use-remove-directory.spec.tsx +++ b/packages/storage-swr/__tests__/mutate/use-remove-directory.spec.tsx @@ -1,5 +1,5 @@ -import { fetchDirectory } from '@supabase-cache-helpers/storage-core'; import { createClient, SupabaseClient } from '@supabase/supabase-js'; +import { fetchDirectory } from '@supabase-cache-helpers/storage-core'; import { fireEvent, screen } from '@testing-library/react'; import { useDirectory, useRemoveDirectory } from '../../src'; @@ -17,7 +17,7 @@ describe('useRemoveDirectory', () => { dirName = `${TEST_PREFIX}-${Math.floor(Math.random() * 100)}`; client = createClient( process.env.SUPABASE_URL as string, - process.env.SUPABASE_ANON_KEY as string + process.env.SUPABASE_ANON_KEY as string, ); await Promise.all([ @@ -37,7 +37,7 @@ describe('useRemoveDirectory', () => { revalidateOnFocus: false, }); const { trigger: remove, isMutating } = useRemoveDirectory( - client.storage.from('private_contact_files') + client.storage.from('private_contact_files'), ); return ( <> @@ -51,7 +51,7 @@ describe('useRemoveDirectory', () => { fireEvent.click(screen.getByTestId('remove')); await screen.findByText('isMutating: false', {}, { timeout: 10000 }); await expect( - fetchDirectory(client.storage.from('private_contact_files'), dirName) + fetchDirectory(client.storage.from('private_contact_files'), dirName), ).resolves.toEqual([]); }); }); diff --git a/packages/storage-swr/__tests__/mutate/use-remove-files.spec.tsx b/packages/storage-swr/__tests__/mutate/use-remove-files.spec.tsx index 50b7aa3d..95af413a 100644 --- a/packages/storage-swr/__tests__/mutate/use-remove-files.spec.tsx +++ b/packages/storage-swr/__tests__/mutate/use-remove-files.spec.tsx @@ -1,5 +1,5 @@ -import { fetchDirectory } from '@supabase-cache-helpers/storage-core'; import { createClient, SupabaseClient } from '@supabase/supabase-js'; +import { fetchDirectory } from '@supabase-cache-helpers/storage-core'; import { fireEvent, screen } from '@testing-library/react'; import { useDirectory, useRemoveFiles } from '../../src'; @@ -17,7 +17,7 @@ describe('useRemoveFiles', () => { dirName = `${TEST_PREFIX}-${Math.floor(Math.random() * 100)}`; client = createClient( process.env.SUPABASE_URL as string, - process.env.SUPABASE_ANON_KEY as string + process.env.SUPABASE_ANON_KEY as string, ); await Promise.all([ @@ -37,7 +37,7 @@ describe('useRemoveFiles', () => { revalidateOnFocus: false, }); const { trigger: remove, isMutating } = useRemoveFiles( - client.storage.from('private_contact_files') + client.storage.from('private_contact_files'), ); return ( <> @@ -54,7 +54,7 @@ describe('useRemoveFiles', () => { fireEvent.click(screen.getByTestId('remove')); await screen.findByText('isMutating: false', {}, { timeout: 10000 }); await expect( - fetchDirectory(client.storage.from('private_contact_files'), dirName) + fetchDirectory(client.storage.from('private_contact_files'), dirName), ).resolves.toEqual([]); }); }); diff --git a/packages/storage-swr/__tests__/mutate/use-upload.spec.tsx b/packages/storage-swr/__tests__/mutate/use-upload.spec.tsx index 60eed1f7..7c5aaa5e 100644 --- a/packages/storage-swr/__tests__/mutate/use-upload.spec.tsx +++ b/packages/storage-swr/__tests__/mutate/use-upload.spec.tsx @@ -1,5 +1,5 @@ -import { fetchDirectory } from '@supabase-cache-helpers/storage-core'; import { createClient, SupabaseClient } from '@supabase/supabase-js'; +import { fetchDirectory } from '@supabase-cache-helpers/storage-core'; import { fireEvent, screen } from '@testing-library/react'; import { useDirectory, useUpload } from '../../src'; @@ -18,7 +18,7 @@ describe('useUpload', () => { dirName = `${TEST_PREFIX}-${Math.floor(Math.random() * 100)}`; client = createClient( process.env.SUPABASE_URL as string, - process.env.SUPABASE_ANON_KEY as string + process.env.SUPABASE_ANON_KEY as string, ); await Promise.all([ @@ -41,7 +41,7 @@ describe('useUpload', () => { }); const { trigger: upload, isMutating } = useUpload( client.storage.from('private_contact_files'), - {} + {}, ); return ( <> @@ -58,11 +58,11 @@ describe('useUpload', () => { fireEvent.click(screen.getByTestId('upload')); await screen.findByText('isMutating: false', {}, { timeout: 10000 }); await expect( - fetchDirectory(client.storage.from('private_contact_files'), dirName) + fetchDirectory(client.storage.from('private_contact_files'), dirName), ).resolves.toEqual( expect.arrayContaining( - files.map((f) => expect.objectContaining({ name: f.name })) - ) + files.map((f) => expect.objectContaining({ name: f.name })), + ), ); }); }); diff --git a/packages/storage-swr/__tests__/query/use-directory-urls.spec.tsx b/packages/storage-swr/__tests__/query/use-directory-urls.spec.tsx index de363e06..0cd63f8e 100644 --- a/packages/storage-swr/__tests__/query/use-directory-urls.spec.tsx +++ b/packages/storage-swr/__tests__/query/use-directory-urls.spec.tsx @@ -18,7 +18,7 @@ describe('useDirectoryFileUrls', () => { dirName = `${TEST_PREFIX}-${Math.floor(Math.random() * 100)}`; client = createClient( process.env.SUPABASE_URL as string, - process.env.SUPABASE_ANON_KEY as string + process.env.SUPABASE_ANON_KEY as string, ); await Promise.all([ @@ -41,7 +41,7 @@ describe('useDirectoryFileUrls', () => { 'private', { revalidateOnFocus: false, - } + }, ); return ( <> @@ -72,7 +72,7 @@ describe('useDirectoryFileUrls', () => { { revalidateOnFocus: false, use: [mw], - } + }, ); return (
@@ -87,11 +87,11 @@ describe('useDirectoryFileUrls', () => { await Promise.all( privateFiles.map( async (f) => - await screen.findByText(`${f}: exists`, {}, { timeout: 10000 }) - ) + await screen.findByText(`${f}: exists`, {}, { timeout: 10000 }), + ), ); expect( - Array.from(provider.keys()).find((k) => k.startsWith('storage')) + Array.from(provider.keys()).find((k) => k.startsWith('storage')), ).toBeDefined(); expect(mwMock).toHaveBeenCalled(); }); diff --git a/packages/storage-swr/__tests__/query/use-directory.spec.tsx b/packages/storage-swr/__tests__/query/use-directory.spec.tsx index ef9df7a3..ab621278 100644 --- a/packages/storage-swr/__tests__/query/use-directory.spec.tsx +++ b/packages/storage-swr/__tests__/query/use-directory.spec.tsx @@ -18,7 +18,7 @@ describe('useDirectory', () => { dirName = `${TEST_PREFIX}-${Math.floor(Math.random() * 100)}`; client = createClient( process.env.SUPABASE_URL as string, - process.env.SUPABASE_ANON_KEY as string + process.env.SUPABASE_ANON_KEY as string, ); await Promise.all([ @@ -40,7 +40,7 @@ describe('useDirectory', () => { null, { revalidateOnFocus: false, - } + }, ); return ( <> @@ -70,7 +70,7 @@ describe('useDirectory', () => { { revalidateOnFocus: false, use: [mw], - } + }, ); return (
@@ -84,11 +84,11 @@ describe('useDirectory', () => { renderWithConfig(, { provider: () => provider }); await Promise.all( privateFiles.map( - async (f) => await screen.findByText(f, {}, { timeout: 10000 }) - ) + async (f) => await screen.findByText(f, {}, { timeout: 10000 }), + ), ); expect( - Array.from(provider.keys()).find((k) => k.startsWith('storage')) + Array.from(provider.keys()).find((k) => k.startsWith('storage')), ).toBeDefined(); expect(mwMock).toHaveBeenCalled(); }); diff --git a/packages/storage-swr/__tests__/query/use-file-url.spec.tsx b/packages/storage-swr/__tests__/query/use-file-url.spec.tsx index 2e5b0caa..263bdd4b 100644 --- a/packages/storage-swr/__tests__/query/use-file-url.spec.tsx +++ b/packages/storage-swr/__tests__/query/use-file-url.spec.tsx @@ -18,7 +18,7 @@ describe('useFileUrl', () => { dirName = `${TEST_PREFIX}-${Math.floor(Math.random() * 100)}`; client = createClient( process.env.SUPABASE_URL as string, - process.env.SUPABASE_ANON_KEY as string + process.env.SUPABASE_ANON_KEY as string, ); await Promise.all([ @@ -42,7 +42,7 @@ describe('useFileUrl', () => { { ensureExistence: true, revalidateOnFocus: false, - } + }, ); return ( <> @@ -74,7 +74,7 @@ describe('useFileUrl', () => { ensureExistence: true, revalidateOnFocus: false, use: [mw], - } + }, ); return
{`URL: ${url ? 'exists' : url}`}
; } @@ -82,7 +82,7 @@ describe('useFileUrl', () => { renderWithConfig(, { provider: () => provider }); await screen.findByText('URL: exists', {}, { timeout: 10000 }); expect( - Array.from(provider.keys()).find((k) => k.startsWith('storage')) + Array.from(provider.keys()).find((k) => k.startsWith('storage')), ).toBeDefined(); expect(mwMock).toHaveBeenCalled(); }); diff --git a/packages/storage-swr/__tests__/utils.tsx b/packages/storage-swr/__tests__/utils.tsx index a7264c78..319df5b4 100644 --- a/packages/storage-swr/__tests__/utils.tsx +++ b/packages/storage-swr/__tests__/utils.tsx @@ -10,7 +10,7 @@ dotenv.config({ path: resolve(__dirname, '../../../.env.local') }); export const renderWithConfig = ( element: React.ReactElement, - config: Parameters[0]['value'] + config: Parameters[0]['value'], ): ReturnType => { const TestSWRConfig = ({ children }: { children: React.ReactNode }) => ( {children} @@ -26,8 +26,8 @@ export const loadFixtures = async () => { files: await Promise.all( fileNames.map( async (f) => - new File([(await readFile(join(fixturesDir, f))) as BlobPart], f) - ) + new File([(await readFile(join(fixturesDir, f))) as BlobPart], f), + ), ), }; }; @@ -35,7 +35,7 @@ export const loadFixtures = async () => { export const upload = async ( client: SupabaseClient, bucketName: string, - dirName: string + dirName: string, ): Promise => { const fixturesDir = resolve(__dirname, '__fixtures__'); const fileNames = await readdir(fixturesDir); @@ -44,8 +44,8 @@ export const upload = async ( async (f) => await client.storage .from(bucketName) - .upload(`${dirName}/${f}`, await readFile(join(fixturesDir, f))) - ) + .upload(`${dirName}/${f}`, await readFile(join(fixturesDir, f))), + ), ); return fileNames; }; @@ -53,7 +53,7 @@ export const upload = async ( export const cleanup = async ( client: SupabaseClient, bucketName: string, - dirName: string + dirName: string, ) => { const { data } = await client.storage.from(bucketName).list(dirName); await client.storage diff --git a/packages/storage-swr/package.json b/packages/storage-swr/package.json index 00ccd282..7d2fc8fc 100644 --- a/packages/storage-swr/package.json +++ b/packages/storage-swr/package.json @@ -62,7 +62,7 @@ "jest-environment-jsdom": "29.7.0", "@types/jest": "29.5.0", "dotenv": "16.3.1", - "eslint": "8.40.0", + "eslint": "8.52.0", "@supabase-cache-helpers/eslint-config-custom": "workspace:*", "jest": "29.7.0", "@supabase-cache-helpers/jest-presets": "workspace:*", diff --git a/packages/storage-swr/src/mutate/use-remove-directory.ts b/packages/storage-swr/src/mutate/use-remove-directory.ts index d8234193..99089428 100644 --- a/packages/storage-swr/src/mutate/use-remove-directory.ts +++ b/packages/storage-swr/src/mutate/use-remove-directory.ts @@ -1,8 +1,8 @@ +import { FileObject, StorageError } from '@supabase/storage-js'; import { createRemoveDirectoryFetcher, mutatePaths, } from '@supabase-cache-helpers/storage-core'; -import { FileObject, StorageError } from '@supabase/storage-js'; import { useCallback } from 'react'; import { Key, useSWRConfig } from 'swr'; import useSWRMutation, { @@ -10,8 +10,8 @@ import useSWRMutation, { SWRMutationConfiguration, } from 'swr/mutation'; -import { decode, getBucketId, StorageFileApi } from '../lib'; import { useRandomKey } from './use-random-key'; +import { decode, getBucketId, StorageFileApi } from '../lib'; /** * A hook that provides a mutation function to remove a directory and all its contents. @@ -21,7 +21,7 @@ import { useRandomKey } from './use-random-key'; */ function useRemoveDirectory( fileApi: StorageFileApi, - config?: SWRMutationConfiguration + config?: SWRMutationConfiguration, ): SWRMutationResponse { const key = useRandomKey(); const { cache, mutate } = useSWRConfig(); @@ -37,7 +37,7 @@ function useRemoveDirectory( }); return result; }, - config + config, ); } diff --git a/packages/storage-swr/src/mutate/use-remove-files.ts b/packages/storage-swr/src/mutate/use-remove-files.ts index 8473a13d..006447a9 100644 --- a/packages/storage-swr/src/mutate/use-remove-files.ts +++ b/packages/storage-swr/src/mutate/use-remove-files.ts @@ -1,8 +1,8 @@ +import { FileObject, StorageError } from '@supabase/storage-js'; import { createRemoveFilesFetcher, mutatePaths, } from '@supabase-cache-helpers/storage-core'; -import { FileObject, StorageError } from '@supabase/storage-js'; import { useCallback } from 'react'; import { Key, useSWRConfig } from 'swr'; import useSWRMutation, { @@ -10,8 +10,8 @@ import useSWRMutation, { SWRMutationConfiguration, } from 'swr/mutation'; -import { decode, getBucketId, StorageFileApi } from '../lib'; import { useRandomKey } from './use-random-key'; +import { decode, getBucketId, StorageFileApi } from '../lib'; /** * Hook for removing files from storage using SWR mutation @@ -26,7 +26,7 @@ function useRemoveFiles( StorageError, string, string[] - > + >, ): SWRMutationResponse { const key = useRandomKey(); const { cache, mutate } = useSWRConfig(); @@ -42,7 +42,7 @@ function useRemoveFiles( }); return res; }, - config + config, ); } diff --git a/packages/storage-swr/src/mutate/use-upload.ts b/packages/storage-swr/src/mutate/use-upload.ts index 98e60552..3733f75c 100644 --- a/packages/storage-swr/src/mutate/use-upload.ts +++ b/packages/storage-swr/src/mutate/use-upload.ts @@ -1,3 +1,4 @@ +import { StorageError } from '@supabase/storage-js'; import { FileInput, createUploadFetcher, @@ -5,7 +6,6 @@ import { UploadFileResponse, mutatePaths, } from '@supabase-cache-helpers/storage-core'; -import { StorageError } from '@supabase/storage-js'; import { useCallback } from 'react'; import { useSWRConfig } from 'swr'; import useSWRMutation, { @@ -13,8 +13,8 @@ import useSWRMutation, { SWRMutationConfiguration, } from 'swr/mutation'; -import { decode, getBucketId, StorageFileApi, truthy } from '../lib'; import { useRandomKey } from './use-random-key'; +import { decode, getBucketId, StorageFileApi, truthy } from '../lib'; export type { UploadFetcherConfig, UploadFileResponse, FileInput }; @@ -43,7 +43,7 @@ function useUpload( StorageError, string, UseUploadInput - > + >, ): SWRMutationResponse< UploadFileResponse[], StorageError, @@ -72,11 +72,11 @@ function useUpload( cacheKeys: Array.from(cache.keys()), decode, mutate, - } + }, ); return result; }, - config + config, ); } diff --git a/packages/storage-swr/src/query/use-directory-urls.ts b/packages/storage-swr/src/query/use-directory-urls.ts index a7cb84ba..e656455f 100644 --- a/packages/storage-swr/src/query/use-directory-urls.ts +++ b/packages/storage-swr/src/query/use-directory-urls.ts @@ -1,9 +1,9 @@ +import { FileObject, StorageError } from '@supabase/storage-js'; import { createDirectoryUrlsFetcher, StoragePrivacy, URLFetcherConfig, } from '@supabase-cache-helpers/storage-core'; -import { FileObject, StorageError } from '@supabase/storage-js'; import useSWR, { SWRConfiguration, SWRResponse } from 'swr'; import { StorageKeyInput, middleware, StorageFileApi } from '../lib'; @@ -26,7 +26,7 @@ function useDirectoryFileUrls( (FileObject & { url: string })[] | undefined, StorageError > & - Pick + Pick, ): SWRResponse<(FileObject & { url: string })[] | undefined, StorageError> { return useSWR<(FileObject & { url: string })[] | undefined, StorageError>( path ? [fileApi, path] : null, @@ -35,7 +35,7 @@ function useDirectoryFileUrls( { ...config, use: [...(config?.use ?? []), middleware], - } + }, ); } diff --git a/packages/storage-swr/src/query/use-directory.ts b/packages/storage-swr/src/query/use-directory.ts index aa062eee..af1066a3 100644 --- a/packages/storage-swr/src/query/use-directory.ts +++ b/packages/storage-swr/src/query/use-directory.ts @@ -1,5 +1,5 @@ -import { fetchDirectory } from '@supabase-cache-helpers/storage-core'; import { FileObject, StorageError } from '@supabase/storage-js'; +import { fetchDirectory } from '@supabase-cache-helpers/storage-core'; import useSWR, { SWRConfiguration, SWRResponse } from 'swr'; import { middleware, StorageKeyInput, StorageFileApi } from '../lib'; @@ -15,7 +15,7 @@ import { middleware, StorageKeyInput, StorageFileApi } from '../lib'; function useDirectory( fileApi: StorageFileApi, path: string | null, - config?: SWRConfiguration + config?: SWRConfiguration, ): SWRResponse { return useSWR( path ? [fileApi, path] : null, @@ -23,7 +23,7 @@ function useDirectory( { ...config, use: [...(config?.use ?? []), middleware], - } + }, ); } diff --git a/packages/storage-swr/src/query/use-file-url.ts b/packages/storage-swr/src/query/use-file-url.ts index 2a716f31..e4ccb5d0 100644 --- a/packages/storage-swr/src/query/use-file-url.ts +++ b/packages/storage-swr/src/query/use-file-url.ts @@ -1,9 +1,9 @@ +import { StorageError } from '@supabase/storage-js'; import { StoragePrivacy, createUrlFetcher, URLFetcherConfig, } from '@supabase-cache-helpers/storage-core'; -import { StorageError } from '@supabase/storage-js'; import useSWR, { SWRConfiguration, SWRResponse } from 'swr'; import { StorageKeyInput, middleware, StorageFileApi } from '../lib'; @@ -21,7 +21,8 @@ function useFileUrl( fileApi: StorageFileApi, path: string | null, mode: StoragePrivacy, - config?: SWRConfiguration & URLFetcherConfig + config?: SWRConfiguration & + URLFetcherConfig, ): SWRResponse { return useSWR( path ? [fileApi, path] : null, @@ -30,7 +31,7 @@ function useFileUrl( { ...config, use: [...(config?.use ?? []), middleware], - } + }, ); } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4639b0dd..ea0ac15e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,13 +5,13 @@ importers: .: specifiers: '@changesets/cli': 2.26.0 - eslint: 8.40.0 - prettier: 2.8.8 + eslint: 8.52.0 + prettier: 3.0.3 turbo: latest devDependencies: '@changesets/cli': 2.26.0 - eslint: 8.40.0 - prettier: 2.8.8 + eslint: 8.52.0 + prettier: 3.0.3 turbo: 1.10.16 docs: @@ -21,23 +21,23 @@ importers: '@types/react-dom': ^18.0.7 '@vercel/analytics': ^1.0.0 autoprefixer: ^10.4.13 - eslint: 8.40.0 - eslint-config-next: 13.5.0 + eslint: 8.52.0 + eslint-config-next: 13.5.6 next: ^13.1.6 nextra: ^2.2.19 nextra-theme-docs: ^2.2.19 postcss: ^8.4.14 react: 18.2.0 react-dom: 18.2.0 - tailwindcss: ^3.1.7 + tailwindcss: 3.3.3 typescript: 5.2.2 dependencies: '@types/node': 18.15.11 '@types/react': 18.2.0 '@types/react-dom': 18.0.11 '@vercel/analytics': 1.0.0_react@18.2.0 - eslint: 8.40.0 - eslint-config-next: 13.5.0_dvo4h2k5fbi5yajawmfc3ogwny + eslint: 8.52.0 + eslint-config-next: 13.5.6_i3vkbg2fztj7jno7sh3heeojya next: 13.2.3_biqbaboplfbrettd7655fr4n2y nextra: 2.2.19_nvzgbose6yf6w7ijjprgspqefi nextra-theme-docs: 2.2.19_v24abnaciir5bgiyiwoymk6zhm @@ -47,12 +47,12 @@ importers: devDependencies: autoprefixer: 10.4.13_postcss@8.4.21 postcss: 8.4.21 - tailwindcss: 3.2.7_postcss@8.4.21 + tailwindcss: 3.3.3 examples/react-query: specifiers: '@hookform/resolvers': ^2.9.11 - '@ianvs/prettier-plugin-sort-imports': ^3.7.1 + '@ianvs/prettier-plugin-sort-imports': 4.1.1 '@next/font': ^13.1.6 '@radix-ui/react-accessible-icon': ^1.0.1 '@radix-ui/react-accordion': ^1.1.0 @@ -97,22 +97,22 @@ importers: clsx: ^1.2.1 cmdk: ^0.1.21 dotenv: 16.0.1 - eslint: ^8.31.0 - eslint-config-next: 13.0.0 - eslint-config-prettier: ^8.3.0 - eslint-plugin-react: ^7.31.11 - eslint-plugin-tailwindcss: ^3.8.0 + eslint: 8.52.0 + eslint-config-next: 13.5.6 + eslint-config-prettier: 9.0.0 + eslint-plugin-react: 7.33.2 + eslint-plugin-tailwindcss: 3.13.0 lucide-react: 0.105.0-alpha.4 next: ^13.1.6 next-themes: ^0.2.1 postcss: ^8.4.14 - prettier: 2.8.8 + prettier: 3.0.3 react: ^18.2.0 react-dom: ^18.2.0 react-hook-form: ^7.43.5 sharp: ^0.31.3 tailwind-merge: ^1.8.0 - tailwindcss: ^3.1.7 + tailwindcss: 3.3.3 tailwindcss-animate: ^1.0.5 typescript: 5.2.2 uuid: ^9.0.0 @@ -158,38 +158,38 @@ importers: clsx: 1.2.1 cmdk: 0.1.22_cis5wmpl6sllca25ejrqakjpau lucide-react: 0.105.0-alpha.4_react@18.2.0 - next: 13.2.3_twoewwu6sg7cdf3ao6njtbftne + next: 13.2.3_toszgfznx75tcganlj4ru4g5oe next-themes: 0.2.1_nvzgbose6yf6w7ijjprgspqefi react: 18.2.0 react-dom: 18.2.0_react@18.2.0 react-hook-form: 7.43.5_react@18.2.0 sharp: 0.31.3 tailwind-merge: 1.10.0 - tailwindcss-animate: 1.0.5_tailwindcss@3.2.7 + tailwindcss-animate: 1.0.5_tailwindcss@3.3.3 uuid: 9.0.0 zod: 3.21.4 devDependencies: - '@ianvs/prettier-plugin-sort-imports': 3.7.1_prettier@2.8.8 + '@ianvs/prettier-plugin-sort-imports': 4.1.1_prettier@3.0.3 '@types/node': 17.0.45 '@types/react': 18.2.0 '@types/react-dom': 18.0.11 '@types/uuid': 9.0.2 autoprefixer: 10.4.13_postcss@8.4.21 dotenv: 16.0.1 - eslint: 8.40.0 - eslint-config-next: 13.0.0_dvo4h2k5fbi5yajawmfc3ogwny - eslint-config-prettier: 8.5.0_eslint@8.40.0 - eslint-plugin-react: 7.32.2_eslint@8.40.0 - eslint-plugin-tailwindcss: 3.10.1_tailwindcss@3.2.7 + eslint: 8.52.0 + eslint-config-next: 13.5.6_i3vkbg2fztj7jno7sh3heeojya + eslint-config-prettier: 9.0.0_eslint@8.52.0 + eslint-plugin-react: 7.33.2_eslint@8.52.0 + eslint-plugin-tailwindcss: 3.13.0_tailwindcss@3.3.3 postcss: 8.4.21 - prettier: 2.8.8 - tailwindcss: 3.2.7_postcss@8.4.21 + prettier: 3.0.3 + tailwindcss: 3.3.3 typescript: 5.2.2 examples/swr: specifiers: '@hookform/resolvers': ^2.9.11 - '@ianvs/prettier-plugin-sort-imports': ^3.7.1 + '@ianvs/prettier-plugin-sort-imports': 4.1.1 '@next/font': ^13.1.6 '@radix-ui/react-accessible-icon': ^1.0.1 '@radix-ui/react-accordion': ^1.1.0 @@ -234,23 +234,23 @@ importers: clsx: ^1.2.1 cmdk: ^0.1.21 dotenv: 16.0.1 - eslint: ^8.31.0 - eslint-config-next: 13.0.0 - eslint-config-prettier: ^8.3.0 - eslint-plugin-react: ^7.31.11 - eslint-plugin-tailwindcss: ^3.8.0 + eslint: 8.52.0 + eslint-config-next: 13.5.6 + eslint-config-prettier: 9.0.0 + eslint-plugin-react: 7.33.2 + eslint-plugin-tailwindcss: 3.13.0 lucide-react: 0.105.0-alpha.4 next: ^13.1.6 next-themes: ^0.2.1 postcss: ^8.4.14 - prettier: 2.8.8 + prettier: 3.0.3 react: ^18.2.0 react-dom: ^18.2.0 react-hook-form: ^7.43.5 sharp: ^0.31.3 swr: ^2.1.5 tailwind-merge: ^1.8.0 - tailwindcss: ^3.1.7 + tailwindcss: 3.3.3 tailwindcss-animate: ^1.0.5 typescript: ^5.2.2 uuid: ^9.0.0 @@ -296,7 +296,7 @@ importers: clsx: 1.2.1 cmdk: 0.1.22_zula6vjvt3wdocc4mwcxqa6nzi lucide-react: 0.105.0-alpha.4_react@18.2.0 - next: 13.2.3_twoewwu6sg7cdf3ao6njtbftne + next: 13.2.3_toszgfznx75tcganlj4ru4g5oe next-themes: 0.2.1_nvzgbose6yf6w7ijjprgspqefi react: 18.2.0 react-dom: 18.2.0_react@18.2.0 @@ -304,37 +304,37 @@ importers: sharp: 0.31.3 swr: 2.1.5_react@18.2.0 tailwind-merge: 1.10.0 - tailwindcss-animate: 1.0.5_tailwindcss@3.2.7 + tailwindcss-animate: 1.0.5_tailwindcss@3.3.3 uuid: 9.0.0 zod: 3.21.4 devDependencies: - '@ianvs/prettier-plugin-sort-imports': 3.7.1_prettier@2.8.8 + '@ianvs/prettier-plugin-sort-imports': 4.1.1_prettier@3.0.3 '@types/node': 17.0.45 '@types/react': 18.0.28 '@types/react-dom': 18.0.11 '@types/uuid': 9.0.2 autoprefixer: 10.4.13_postcss@8.4.21 dotenv: 16.0.1 - eslint: 8.35.0 - eslint-config-next: 13.0.0_3rifh24lelkramsxq7zeqs7u7e - eslint-config-prettier: 8.5.0_eslint@8.35.0 - eslint-plugin-react: 7.32.2_eslint@8.35.0 - eslint-plugin-tailwindcss: 3.10.1_tailwindcss@3.2.7 + eslint: 8.52.0 + eslint-config-next: 13.5.6_i3vkbg2fztj7jno7sh3heeojya + eslint-config-prettier: 9.0.0_eslint@8.52.0 + eslint-plugin-react: 7.33.2_eslint@8.52.0 + eslint-plugin-tailwindcss: 3.13.0_tailwindcss@3.3.3 postcss: 8.4.21 - prettier: 2.8.8 - tailwindcss: 3.2.7_postcss@8.4.21 + prettier: 3.0.3 + tailwindcss: 3.3.3 typescript: 5.2.2 packages/eslint-config-custom: specifiers: - eslint: ^8.0.0 - eslint-config-turbo: latest - eslint-config-universe: 11.3.0 + eslint: 8.52.0 + eslint-config-turbo: 1.10.16 + eslint-config-universe: 12.0.0 typescript: 5.2.2 dependencies: - eslint: 8.23.0 - eslint-config-turbo: 1.10.16_eslint@8.23.0 - eslint-config-universe: 11.3.0_br6ialufl3zilqpf2tx37wdhce + eslint: 8.52.0 + eslint-config-turbo: 1.10.16_eslint@8.52.0 + eslint-config-universe: 12.0.0_miaapnor4fnqkdioyxfabghj6q devDependencies: typescript: 5.2.2 @@ -342,7 +342,7 @@ importers: specifiers: ts-jest: 29.1.0 dependencies: - ts-jest: 29.1.0_u7qq36h45i7cku4q54vtugnyvm + ts-jest: 29.1.0_6kltjrh7rxzlk7nrl5xwvwvwwy packages/postgrest-core: specifiers: @@ -356,7 +356,7 @@ importers: '@types/jest': 29.5.0 '@types/lodash': 4.14.184 dotenv: 16.3.1 - eslint: 8.40.0 + eslint: 8.52.0 fast-equals: 5.0.1 flat: 5.0.2 jest: 29.7.0 @@ -381,9 +381,9 @@ importers: '@types/jest': 29.5.0 '@types/lodash': 4.14.184 dotenv: 16.3.1 - eslint: 8.40.0 + eslint: 8.52.0 jest: 29.7.0 - ts-jest: 29.1.0_picekqf7nwhi4u7lel7if5xk4m + ts-jest: 29.1.0_n6fadwnxks6spzgg7rbfqefyku tsup: 7.2.0_typescript@5.2.2 typescript: 5.2.2 @@ -402,7 +402,7 @@ importers: '@types/jest': 29.5.0 '@types/react': 18.2.0 dotenv: 16.3.1 - eslint: 8.40.0 + eslint: 8.52.0 jest: 29.7.0 jest-environment-jsdom: 29.7.0 react: 18.2.0 @@ -425,12 +425,12 @@ importers: '@types/jest': 29.5.0 '@types/react': 18.2.0 dotenv: 16.3.1 - eslint: 8.40.0 + eslint: 8.52.0 jest: 29.7.0 jest-environment-jsdom: 29.7.0 react: 18.2.0 react-dom: 18.2.0_react@18.2.0 - ts-jest: 29.1.0_picekqf7nwhi4u7lel7if5xk4m + ts-jest: 29.1.0_n6fadwnxks6spzgg7rbfqefyku tsup: 7.2.0_typescript@5.2.2 typescript: 5.2.2 @@ -448,7 +448,7 @@ importers: '@types/jest': 29.5.0 '@types/react': 18.2.0 dotenv: 16.3.1 - eslint: 8.40.0 + eslint: 8.52.0 jest: 29.7.0 jest-environment-jsdom: 29.7.0 react: 18.2.0 @@ -472,20 +472,20 @@ importers: '@types/jest': 29.5.0 '@types/react': 18.2.0 dotenv: 16.3.1 - eslint: 8.40.0 + eslint: 8.52.0 jest: 29.7.0 jest-environment-jsdom: 29.7.0 react: 18.2.0 react-dom: 18.2.0_react@18.2.0 - ts-jest: 29.1.0_picekqf7nwhi4u7lel7if5xk4m + ts-jest: 29.1.0_n6fadwnxks6spzgg7rbfqefyku tsup: 7.2.0_typescript@5.2.2 typescript: 5.2.2 packages/prettier-config: specifiers: - prettier: 2.8.8 + prettier: 3.0.3 devDependencies: - prettier: 2.8.8 + prettier: 3.0.3 packages/storage-core: specifiers: @@ -497,7 +497,7 @@ importers: '@supabase/supabase-js': 2.38.2 '@types/jest': 29.5.0 dotenv: 16.3.1 - eslint: 8.40.0 + eslint: 8.52.0 jest: 29.7.0 ts-jest: 29.1.0 tsup: 7.2.0 @@ -511,9 +511,9 @@ importers: '@supabase/supabase-js': 2.38.2 '@types/jest': 29.5.0 dotenv: 16.3.1 - eslint: 8.40.0 + eslint: 8.52.0 jest: 29.7.0 - ts-jest: 29.1.0_picekqf7nwhi4u7lel7if5xk4m + ts-jest: 29.1.0_n6fadwnxks6spzgg7rbfqefyku tsup: 7.2.0_typescript@5.2.2 typescript: 5.2.2 @@ -532,7 +532,7 @@ importers: '@types/jest': 29.5.0 '@types/react': 18.2.0 dotenv: 16.3.1 - eslint: 8.40.0 + eslint: 8.52.0 jest: 29.7.0 jest-environment-jsdom: 29.7.0 react: 18.2.0 @@ -555,12 +555,12 @@ importers: '@types/jest': 29.5.0 '@types/react': 18.2.0 dotenv: 16.3.1 - eslint: 8.40.0 + eslint: 8.52.0 jest: 29.7.0 jest-environment-jsdom: 29.7.0 react: 18.2.0 react-dom: 18.2.0_react@18.2.0 - ts-jest: 29.1.0_picekqf7nwhi4u7lel7if5xk4m + ts-jest: 29.1.0_n6fadwnxks6spzgg7rbfqefyku tsup: 7.2.0_typescript@5.2.2 typescript: 5.2.2 @@ -578,7 +578,7 @@ importers: '@types/jest': 29.5.0 '@types/react': 18.2.0 dotenv: 16.3.1 - eslint: 8.40.0 + eslint: 8.52.0 jest: 29.7.0 jest-environment-jsdom: 29.7.0 react: 18.2.0 @@ -602,12 +602,12 @@ importers: '@types/jest': 29.5.0 '@types/react': 18.2.0 dotenv: 16.3.1 - eslint: 8.40.0 + eslint: 8.52.0 jest: 29.7.0 jest-environment-jsdom: 29.7.0 react: 18.2.0 react-dom: 18.2.0_react@18.2.0 - ts-jest: 29.1.0_picekqf7nwhi4u7lel7if5xk4m + ts-jest: 29.1.0_n6fadwnxks6spzgg7rbfqefyku tsup: 7.2.0_typescript@5.2.2 typescript: 5.2.2 @@ -624,6 +624,10 @@ packages: resolution: {integrity: sha512-+u76oB43nOHrF4DDWRLWDCtci7f3QJoEBigemIdIeTi1ODqjx6Tad9NCVnPRwewWlKkVab5PlK8DCtPTyX7S8g==} dev: true + /@alloc/quick-lru/5.2.0: + resolution: {integrity: sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==} + engines: {node: '>=10'} + /@ampproject/remapping/2.2.0: resolution: {integrity: sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==} engines: {node: '>=6.0.0'} @@ -644,25 +648,25 @@ packages: '@babel/highlight': 7.22.20 chalk: 2.4.2 - /@babel/compat-data/7.18.8: - resolution: {integrity: sha512-HSmX4WZPPK3FUxYp7g2T6EyO8j96HlZJlxmKPSh6KAcqwyDrfx7hKjXpAW/0FhFfTJsR0Yt4lAjLI2coMptIHQ==} + /@babel/compat-data/7.23.2: + resolution: {integrity: sha512-0S9TQMmDHlqAZ2ITT95irXKfxN9bncq8ZCoJhun3nHL/lLUxd2NKBJYoNGWH7S0hz6fRQwWlAWn/ILM0C70KZQ==} engines: {node: '>=6.9.0'} - /@babel/core/7.18.10: - resolution: {integrity: sha512-JQM6k6ENcBFKVtWvLavlvi/mPcpYZ3+R+2EySDEMSMbp7Mn4FexlbbJVrx2R7Ijhr01T8gyqrOaABWIOgxeUyw==} + /@babel/core/7.23.2: + resolution: {integrity: sha512-n7s51eWdaWZ3vGT2tD4T7J6eJs3QoBXydv7vkUM06Bf1cbVD2Kc2UrkzhiQwobfV7NwOnQXYL7UBJ5VPU+RGoQ==} engines: {node: '>=6.9.0'} dependencies: '@ampproject/remapping': 2.2.0 - '@babel/code-frame': 7.18.6 - '@babel/generator': 7.18.12 - '@babel/helper-compilation-targets': 7.18.9_@babel+core@7.18.10 - '@babel/helper-module-transforms': 7.18.9 - '@babel/helpers': 7.18.9 - '@babel/parser': 7.18.11 - '@babel/template': 7.18.10 - '@babel/traverse': 7.18.11 - '@babel/types': 7.18.10 - convert-source-map: 1.8.0 + '@babel/code-frame': 7.22.13 + '@babel/generator': 7.23.0 + '@babel/helper-compilation-targets': 7.22.15 + '@babel/helper-module-transforms': 7.23.0_@babel+core@7.23.2 + '@babel/helpers': 7.23.2 + '@babel/parser': 7.23.0 + '@babel/template': 7.22.15 + '@babel/traverse': 7.23.2 + '@babel/types': 7.23.0 + convert-source-map: 2.0.0 debug: 4.3.4 gensync: 1.0.0-beta.2 json5: 2.2.3 @@ -670,82 +674,79 @@ packages: transitivePeerDependencies: - supports-color - /@babel/generator/7.18.12: - resolution: {integrity: sha512-dfQ8ebCN98SvyL7IxNMCUtZQSq5R7kxgN+r8qYTGDmmSion1hX2C0zq2yo1bsCDhXixokv1SAWTZUMYbO/V5zg==} + /@babel/generator/7.23.0: + resolution: {integrity: sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.18.10 + '@babel/types': 7.23.0 '@jridgewell/gen-mapping': 0.3.2 + '@jridgewell/trace-mapping': 0.3.18 jsesc: 2.5.2 - /@babel/helper-compilation-targets/7.18.9_@babel+core@7.18.10: - resolution: {integrity: sha512-tzLCyVmqUiFlcFoAPLA/gL9TeYrF61VLNtb+hvkuVaB5SUjW7jcfrglBIX1vUIoT7CLP3bBlIMeyEsIl2eFQNg==} + /@babel/helper-compilation-targets/7.22.15: + resolution: {integrity: sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw==} engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 dependencies: - '@babel/compat-data': 7.18.8 - '@babel/core': 7.18.10 - '@babel/helper-validator-option': 7.18.6 - browserslist: 4.21.5 + '@babel/compat-data': 7.23.2 + '@babel/helper-validator-option': 7.22.15 + browserslist: 4.22.1 + lru-cache: 5.1.1 semver: 6.3.1 - /@babel/helper-environment-visitor/7.18.9: - resolution: {integrity: sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==} + /@babel/helper-environment-visitor/7.22.20: + resolution: {integrity: sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==} engines: {node: '>=6.9.0'} - /@babel/helper-function-name/7.18.9: - resolution: {integrity: sha512-fJgWlZt7nxGksJS9a0XdSaI4XvpExnNIgRP+rVefWh5U7BL8pPuir6SJUmFKRfjWQ51OtWSzwOxhaH/EBWWc0A==} + /@babel/helper-function-name/7.23.0: + resolution: {integrity: sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/template': 7.18.10 - '@babel/types': 7.18.10 + '@babel/template': 7.22.15 + '@babel/types': 7.23.0 - /@babel/helper-hoist-variables/7.18.6: - resolution: {integrity: sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==} + /@babel/helper-hoist-variables/7.22.5: + resolution: {integrity: sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.18.10 + '@babel/types': 7.23.0 - /@babel/helper-module-imports/7.18.6: - resolution: {integrity: sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==} + /@babel/helper-module-imports/7.22.15: + resolution: {integrity: sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.18.10 + '@babel/types': 7.23.0 - /@babel/helper-module-transforms/7.18.9: - resolution: {integrity: sha512-KYNqY0ICwfv19b31XzvmI/mfcylOzbLtowkw+mfvGPAQ3kfCnMLYbED3YecL5tPd8nAYFQFAd6JHp2LxZk/J1g==} + /@babel/helper-module-transforms/7.23.0_@babel+core@7.23.2: + resolution: {integrity: sha512-WhDWw1tdrlT0gMgUJSlX0IQvoO1eN279zrAUbVB+KpV2c3Tylz8+GnKOLllCS6Z/iZQEyVYxhZVUdPTqs2YYPw==} engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 dependencies: - '@babel/helper-environment-visitor': 7.18.9 - '@babel/helper-module-imports': 7.18.6 - '@babel/helper-simple-access': 7.18.6 - '@babel/helper-split-export-declaration': 7.18.6 - '@babel/helper-validator-identifier': 7.18.6 - '@babel/template': 7.18.10 - '@babel/traverse': 7.18.11 - '@babel/types': 7.18.10 - transitivePeerDependencies: - - supports-color + '@babel/core': 7.23.2 + '@babel/helper-environment-visitor': 7.22.20 + '@babel/helper-module-imports': 7.22.15 + '@babel/helper-simple-access': 7.22.5 + '@babel/helper-split-export-declaration': 7.22.6 + '@babel/helper-validator-identifier': 7.22.20 /@babel/helper-plugin-utils/7.18.9: resolution: {integrity: sha512-aBXPT3bmtLryXaoJLyYPXPlSD4p1ld9aYeR+sJNOZjJJGiOpb+fKfh3NkcCu7J54nUJwCERPBExCCpyCOHnu/w==} engines: {node: '>=6.9.0'} - /@babel/helper-simple-access/7.18.6: - resolution: {integrity: sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g==} + /@babel/helper-simple-access/7.22.5: + resolution: {integrity: sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.18.10 + '@babel/types': 7.23.0 - /@babel/helper-split-export-declaration/7.18.6: - resolution: {integrity: sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==} + /@babel/helper-split-export-declaration/7.22.6: + resolution: {integrity: sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.18.10 + '@babel/types': 7.23.0 - /@babel/helper-string-parser/7.18.10: - resolution: {integrity: sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw==} + /@babel/helper-string-parser/7.22.5: + resolution: {integrity: sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==} engines: {node: '>=6.9.0'} /@babel/helper-validator-identifier/7.18.6: @@ -756,17 +757,17 @@ packages: resolution: {integrity: sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==} engines: {node: '>=6.9.0'} - /@babel/helper-validator-option/7.18.6: - resolution: {integrity: sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==} + /@babel/helper-validator-option/7.22.15: + resolution: {integrity: sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==} engines: {node: '>=6.9.0'} - /@babel/helpers/7.18.9: - resolution: {integrity: sha512-Jf5a+rbrLoR4eNdUmnFu8cN5eNJT6qdTdOg5IHIzq87WwyRw9PwguLFOWYgktN/60IP4fgDUawJvs7PjQIzELQ==} + /@babel/helpers/7.23.2: + resolution: {integrity: sha512-lzchcp8SjTSVe/fPmLwtWVBFC7+Tbn8LGHDVfDp9JGxpAY5opSaEFgt8UQvrnECWOTdji2mOWMz1rOhkHscmGQ==} engines: {node: '>=6.9.0'} dependencies: - '@babel/template': 7.18.10 - '@babel/traverse': 7.18.11 - '@babel/types': 7.18.10 + '@babel/template': 7.22.15 + '@babel/traverse': 7.23.2 + '@babel/types': 7.23.0 transitivePeerDependencies: - supports-color @@ -786,126 +787,126 @@ packages: chalk: 2.4.2 js-tokens: 4.0.0 - /@babel/parser/7.18.11: - resolution: {integrity: sha512-9JKn5vN+hDt0Hdqn1PiJ2guflwP+B6Ga8qbDuoF0PzzVhrzsKIJo8yGqVk6CmMHiMei9w1C1Bp9IMJSIK+HPIQ==} + /@babel/parser/7.23.0: + resolution: {integrity: sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==} engines: {node: '>=6.0.0'} hasBin: true dependencies: - '@babel/types': 7.18.10 + '@babel/types': 7.23.0 - /@babel/plugin-syntax-async-generators/7.8.4_@babel+core@7.18.10: + /@babel/plugin-syntax-async-generators/7.8.4_@babel+core@7.23.2: resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.23.2 '@babel/helper-plugin-utils': 7.18.9 - /@babel/plugin-syntax-bigint/7.8.3_@babel+core@7.18.10: + /@babel/plugin-syntax-bigint/7.8.3_@babel+core@7.23.2: resolution: {integrity: sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.23.2 '@babel/helper-plugin-utils': 7.18.9 - /@babel/plugin-syntax-class-properties/7.12.13_@babel+core@7.18.10: + /@babel/plugin-syntax-class-properties/7.12.13_@babel+core@7.23.2: resolution: {integrity: sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.23.2 '@babel/helper-plugin-utils': 7.18.9 - /@babel/plugin-syntax-import-meta/7.10.4_@babel+core@7.18.10: + /@babel/plugin-syntax-import-meta/7.10.4_@babel+core@7.23.2: resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.23.2 '@babel/helper-plugin-utils': 7.18.9 - /@babel/plugin-syntax-json-strings/7.8.3_@babel+core@7.18.10: + /@babel/plugin-syntax-json-strings/7.8.3_@babel+core@7.23.2: resolution: {integrity: sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.23.2 '@babel/helper-plugin-utils': 7.18.9 - /@babel/plugin-syntax-jsx/7.18.6_@babel+core@7.18.10: + /@babel/plugin-syntax-jsx/7.18.6_@babel+core@7.23.2: resolution: {integrity: sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.23.2 '@babel/helper-plugin-utils': 7.18.9 - /@babel/plugin-syntax-logical-assignment-operators/7.10.4_@babel+core@7.18.10: + /@babel/plugin-syntax-logical-assignment-operators/7.10.4_@babel+core@7.23.2: resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.23.2 '@babel/helper-plugin-utils': 7.18.9 - /@babel/plugin-syntax-nullish-coalescing-operator/7.8.3_@babel+core@7.18.10: + /@babel/plugin-syntax-nullish-coalescing-operator/7.8.3_@babel+core@7.23.2: resolution: {integrity: sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.23.2 '@babel/helper-plugin-utils': 7.18.9 - /@babel/plugin-syntax-numeric-separator/7.10.4_@babel+core@7.18.10: + /@babel/plugin-syntax-numeric-separator/7.10.4_@babel+core@7.23.2: resolution: {integrity: sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.23.2 '@babel/helper-plugin-utils': 7.18.9 - /@babel/plugin-syntax-object-rest-spread/7.8.3_@babel+core@7.18.10: + /@babel/plugin-syntax-object-rest-spread/7.8.3_@babel+core@7.23.2: resolution: {integrity: sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.23.2 '@babel/helper-plugin-utils': 7.18.9 - /@babel/plugin-syntax-optional-catch-binding/7.8.3_@babel+core@7.18.10: + /@babel/plugin-syntax-optional-catch-binding/7.8.3_@babel+core@7.23.2: resolution: {integrity: sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.23.2 '@babel/helper-plugin-utils': 7.18.9 - /@babel/plugin-syntax-optional-chaining/7.8.3_@babel+core@7.18.10: + /@babel/plugin-syntax-optional-chaining/7.8.3_@babel+core@7.23.2: resolution: {integrity: sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.23.2 '@babel/helper-plugin-utils': 7.18.9 - /@babel/plugin-syntax-top-level-await/7.14.5_@babel+core@7.18.10: + /@babel/plugin-syntax-top-level-await/7.14.5_@babel+core@7.23.2: resolution: {integrity: sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.23.2 '@babel/helper-plugin-utils': 7.18.9 - /@babel/plugin-syntax-typescript/7.18.6_@babel+core@7.18.10: + /@babel/plugin-syntax-typescript/7.18.6_@babel+core@7.23.2: resolution: {integrity: sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.23.2 '@babel/helper-plugin-utils': 7.18.9 /@babel/runtime-corejs3/7.18.9: @@ -934,39 +935,38 @@ packages: engines: {node: '>=6.9.0'} dependencies: regenerator-runtime: 0.14.0 - dev: true - /@babel/template/7.18.10: - resolution: {integrity: sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==} + /@babel/template/7.22.15: + resolution: {integrity: sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==} engines: {node: '>=6.9.0'} dependencies: - '@babel/code-frame': 7.18.6 - '@babel/parser': 7.18.11 - '@babel/types': 7.18.10 + '@babel/code-frame': 7.22.13 + '@babel/parser': 7.23.0 + '@babel/types': 7.23.0 - /@babel/traverse/7.18.11: - resolution: {integrity: sha512-TG9PiM2R/cWCAy6BPJKeHzNbu4lPzOSZpeMfeNErskGpTJx6trEvFaVCbDvpcxwy49BKWmEPwiW8mrysNiDvIQ==} + /@babel/traverse/7.23.2: + resolution: {integrity: sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/code-frame': 7.18.6 - '@babel/generator': 7.18.12 - '@babel/helper-environment-visitor': 7.18.9 - '@babel/helper-function-name': 7.18.9 - '@babel/helper-hoist-variables': 7.18.6 - '@babel/helper-split-export-declaration': 7.18.6 - '@babel/parser': 7.18.11 - '@babel/types': 7.18.10 + '@babel/code-frame': 7.22.13 + '@babel/generator': 7.23.0 + '@babel/helper-environment-visitor': 7.22.20 + '@babel/helper-function-name': 7.23.0 + '@babel/helper-hoist-variables': 7.22.5 + '@babel/helper-split-export-declaration': 7.22.6 + '@babel/parser': 7.23.0 + '@babel/types': 7.23.0 debug: 4.3.4 globals: 11.12.0 transitivePeerDependencies: - supports-color - /@babel/types/7.18.10: - resolution: {integrity: sha512-MJvnbEiiNkpjo+LknnmRrqbY1GPUUggjv+wQVjetM/AONoupqRALB7I6jGqNUAZsKcRIEu2J6FRFvsczljjsaQ==} + /@babel/types/7.23.0: + resolution: {integrity: sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-string-parser': 7.18.10 - '@babel/helper-validator-identifier': 7.18.6 + '@babel/helper-string-parser': 7.22.5 + '@babel/helper-validator-identifier': 7.22.20 to-fast-properties: 2.0.0 /@bcoe/v8-coverage/0.2.3: @@ -1354,68 +1354,19 @@ packages: dev: true optional: true - /@eslint-community/eslint-utils/4.3.0_eslint@8.23.0: - resolution: {integrity: sha512-v3oplH6FYCULtFuCeqyuTd9D2WKO937Dxdq+GmHOLL72TTRriLxz2VLlNfkZRsvj6PKnOPAtuT6dwrs/pA5DvA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - dependencies: - eslint: 8.23.0 - eslint-visitor-keys: 3.4.1 - dev: false - - /@eslint-community/eslint-utils/4.4.0_eslint@8.40.0: + /@eslint-community/eslint-utils/4.4.0_eslint@8.52.0: resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 dependencies: - eslint: 8.40.0 + eslint: 8.52.0 eslint-visitor-keys: 3.4.3 - /@eslint-community/regexpp/4.4.0: - resolution: {integrity: sha512-A9983Q0LnDGdLPjxyXQ00sbV+K+O+ko2Dr+CZigbHWtX9pNfxlaBkMR8X1CztI73zuEyEBXTVjx7CE+/VSwDiQ==} - engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - dev: false - /@eslint-community/regexpp/4.9.1: resolution: {integrity: sha512-Y27x+MBLjXa+0JWDhykM3+JE+il3kHKAEqabfEWq3SDhZjLYb6/BHL/JKFnH3fe207JaXkyDo685Oc2Glt6ifA==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - /@eslint/eslintrc/1.3.1: - resolution: {integrity: sha512-OhSY22oQQdw3zgPOOwdoj01l/Dzl1Z+xyUP33tkSN+aqyEhymJCcPHyXt+ylW8FSe0TfRC2VG+ROQOapD0aZSQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - ajv: 6.12.6 - debug: 4.3.4 - espree: 9.5.2 - globals: 13.19.0 - ignore: 5.2.0 - import-fresh: 3.3.0 - js-yaml: 4.1.0 - minimatch: 3.1.2 - strip-json-comments: 3.1.1 - transitivePeerDependencies: - - supports-color - dev: false - - /@eslint/eslintrc/2.0.0: - resolution: {integrity: sha512-fluIaaV+GyV24CCu/ggiHdV+j4RNh85yQnAYS/G2mZODZgGmmlrgCydjUcV3YvxCm9x8nMAfThsqTni4KiXT4A==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - ajv: 6.12.6 - debug: 4.3.4 - espree: 9.5.2 - globals: 13.19.0 - ignore: 5.2.0 - import-fresh: 3.3.0 - js-yaml: 4.1.0 - minimatch: 3.1.2 - strip-json-comments: 3.1.1 - transitivePeerDependencies: - - supports-color - dev: true - /@eslint/eslintrc/2.1.2: resolution: {integrity: sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -1432,13 +1383,8 @@ packages: transitivePeerDependencies: - supports-color - /@eslint/js/8.35.0: - resolution: {integrity: sha512-JXdzbRiWclLVoD8sNUjR443VVlYqiYmDVT6rGUEIEHU5YJW0gaVZwV2xgM7D4arkvASqD0IlLUVjHiFuxaftRw==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dev: true - - /@eslint/js/8.40.0: - resolution: {integrity: sha512-ElyB54bJIhXQYVKjDSvCkPO1iU1tSAeVQJbllWJq1XQSmmA4dgFk8CbiBGpiOPxleE48vDogxCtmMYku4HSVLA==} + /@eslint/js/8.52.0: + resolution: {integrity: sha512-mjZVbpaeMZludF2fsWLD0Z9gCref1Tk4i9+wddjRvpUNqqcndPkBD09N/Mapey0b3jaXbLm2kICwFv2E64QinA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} /@floating-ui/core/0.7.3: @@ -1499,67 +1445,39 @@ packages: react-hook-form: 7.43.5_react@18.2.0 dev: false - /@humanwhocodes/config-array/0.10.4: - resolution: {integrity: sha512-mXAIHxZT3Vcpg83opl1wGlVZ9xydbfZO3r5YfRSH6Gpp2J/PfdBP0wbDa2sO6/qRbcalpoevVyW6A/fI6LfeMw==} - engines: {node: '>=10.10.0'} - dependencies: - '@humanwhocodes/object-schema': 1.2.1 - debug: 4.3.4 - minimatch: 3.1.2 - transitivePeerDependencies: - - supports-color - dev: false - - /@humanwhocodes/config-array/0.11.11: - resolution: {integrity: sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA==} - engines: {node: '>=10.10.0'} - dependencies: - '@humanwhocodes/object-schema': 1.2.1 - debug: 4.3.4 - minimatch: 3.1.2 - transitivePeerDependencies: - - supports-color - - /@humanwhocodes/config-array/0.11.8: - resolution: {integrity: sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==} + /@humanwhocodes/config-array/0.11.13: + resolution: {integrity: sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==} engines: {node: '>=10.10.0'} dependencies: - '@humanwhocodes/object-schema': 1.2.1 + '@humanwhocodes/object-schema': 2.0.1 debug: 4.3.4 minimatch: 3.1.2 transitivePeerDependencies: - supports-color - dev: true - - /@humanwhocodes/gitignore-to-minimatch/1.0.2: - resolution: {integrity: sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==} - dev: false /@humanwhocodes/module-importer/1.0.1: resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} - /@humanwhocodes/object-schema/1.2.1: - resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==} + /@humanwhocodes/object-schema/2.0.1: + resolution: {integrity: sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==} - /@ianvs/prettier-plugin-sort-imports/3.7.1_prettier@2.8.8: - resolution: {integrity: sha512-XDnBUUruJY9KgNd7T2ZHnVPWo5B9NzVDCLEMm7HjXTA3rTtMg5Q46gYRjLvampDXSmN8+icu54aRE3IIT8U+1w==} + /@ianvs/prettier-plugin-sort-imports/4.1.1_prettier@3.0.3: + resolution: {integrity: sha512-kJhXq63ngpTQ2dxgf5GasbPJWsJA3LgoOdd7WGhpUSzLgLgI4IsIzYkbJf9kmpOHe7Vdm/o3PcRA3jmizXUuAQ==} peerDependencies: '@vue/compiler-sfc': '>=3.0.0' - prettier: 2.x + prettier: 2 || 3 peerDependenciesMeta: '@vue/compiler-sfc': optional: true dependencies: - '@babel/core': 7.18.10 - '@babel/generator': 7.18.12 - '@babel/parser': 7.18.11 - '@babel/traverse': 7.18.11 - '@babel/types': 7.18.10 - javascript-natural-sort: 0.7.1 - lodash.clone: 4.5.0 - lodash.isequal: 4.5.0 - prettier: 2.8.8 + '@babel/core': 7.23.2 + '@babel/generator': 7.23.0 + '@babel/parser': 7.23.0 + '@babel/traverse': 7.23.2 + '@babel/types': 7.23.0 + prettier: 3.0.3 + semver: 7.5.4 transitivePeerDependencies: - supports-color dev: true @@ -1769,7 +1687,7 @@ packages: resolution: {integrity: sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.23.2 '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.18 babel-plugin-istanbul: 6.1.1 @@ -2027,17 +1945,10 @@ packages: resolution: {integrity: sha512-FN50r/E+b8wuqyRjmGaqvqNDuWBWYWQiigfZ50KnSFH0f+AMQQyaZl+Zm2+CIpKk0fL9QxhLxOpTVA3xFHgFow==} dev: false - /@next/eslint-plugin-next/13.0.0: - resolution: {integrity: sha512-z+gnX4Zizatqatc6f4CQrcC9oN8Us3Vrq/OLyc98h7K/eWctrnV91zFZodmJHUjx0cITY8uYM7LXD7IdYkg3kg==} - dependencies: - glob: 7.1.7 - dev: true - - /@next/eslint-plugin-next/13.5.0: - resolution: {integrity: sha512-ltYrYbBJ/akNOSX8VpdAyo5KfmsvlSWXqJRIOSrjBtlncgJtU+w2+pvEh5JpMcBYWhYXWJ9RmMK8iKocc5dSlg==} + /@next/eslint-plugin-next/13.5.6: + resolution: {integrity: sha512-ng7pU/DDsxPgT6ZPvuprxrkeew3XaRf4LAT4FabaEO/hAbvVx4P7wqnqdbTdDn1kgTvsI4tpIgT4Awn/m0bGbg==} dependencies: glob: 7.1.7 - dev: false /@next/font/13.2.3: resolution: {integrity: sha512-7EHzk0f7FVYICLUZTpyPk93IfcTUao++Xt1Sgb+Zk5dVOCYHabqLtlF5ywSoXIqyFlo0qlshEBxsrzHAGTWkDw==} @@ -2188,7 +2099,6 @@ packages: picocolors: 1.0.0 tiny-glob: 0.2.9 tslib: 2.5.0 - dev: false /@popperjs/core/2.11.6: resolution: {integrity: sha512-50/17A98tWUfQ176raKiOGXuYpLyyVMkxxG6oylzL3BPOlA6ADGdK7EYunSa4I064xerltq9TGXs8HmOk5E+vw==} @@ -3445,13 +3355,8 @@ packages: '@babel/runtime': 7.21.0 dev: false - /@rushstack/eslint-patch/1.2.0: - resolution: {integrity: sha512-sXo/qW2/pAcmT43VoRKOJbDOfV3cYpq3szSVfIThQXNt+E4DfKj361vaAt3c88U5tPUxzEswam7GW48PJqtKAg==} - dev: true - /@rushstack/eslint-patch/1.4.0: resolution: {integrity: sha512-cEjvTPU32OM9lUFegJagO0mRnIn+rbqrG89vV8/xLnLFX0DoR0r1oy5IlTga71Q7uT3Qus7qm7wgeiMT/+Irlg==} - dev: false /@sinclair/typebox/0.25.24: resolution: {integrity: sha512-XJfwUVUKDHF5ugKwIcxEgc9k8b7HbznCp6eUfWgu710hMPNIO4aw4/zB5RogDQz8nd6gyCDpU9O/m6qYEWY6yQ==} @@ -3630,8 +3535,8 @@ packages: /@types/babel__core/7.1.19: resolution: {integrity: sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw==} dependencies: - '@babel/parser': 7.18.11 - '@babel/types': 7.18.10 + '@babel/parser': 7.23.0 + '@babel/types': 7.23.0 '@types/babel__generator': 7.6.4 '@types/babel__template': 7.4.1 '@types/babel__traverse': 7.18.0 @@ -3639,18 +3544,18 @@ packages: /@types/babel__generator/7.6.4: resolution: {integrity: sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==} dependencies: - '@babel/types': 7.18.10 + '@babel/types': 7.23.0 /@types/babel__template/7.4.1: resolution: {integrity: sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==} dependencies: - '@babel/parser': 7.18.11 - '@babel/types': 7.18.10 + '@babel/parser': 7.23.0 + '@babel/types': 7.23.0 /@types/babel__traverse/7.18.0: resolution: {integrity: sha512-v4Vwdko+pgymgS+A2UIaJru93zQd85vIGWObM5ekZNdXCKtDYqATlEYnWgfo86Q6I1Lh0oXnksDnMU1cwmlPDw==} dependencies: - '@babel/types': 7.18.10 + '@babel/types': 7.23.0 /@types/debug/4.1.7: resolution: {integrity: sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg==} @@ -3721,8 +3626,8 @@ packages: parse5: 7.1.2 dev: true - /@types/json-schema/7.0.11: - resolution: {integrity: sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==} + /@types/json-schema/7.0.14: + resolution: {integrity: sha512-U3PUjAudAdJBeC2pgN8uTIKgxrb4nlDF3SF0++EldXQvQBGkpFZMSnwQiIoDU77tv45VgNkl/L4ouD+rEomujw==} dev: false /@types/json5/0.0.29: @@ -3801,8 +3706,8 @@ packages: resolution: {integrity: sha512-5o/e00/5/rWZlD4dClsj0xf21J0VFFjfZBUp75Imm1Y2V0gm72kmbDNHs1fyZLPlbF90LaPBrPGzbRBJdKhjyQ==} dev: true - /@types/semver/7.3.13: - resolution: {integrity: sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==} + /@types/semver/7.5.4: + resolution: {integrity: sha512-MMzuxN3GdFwskAnb6fz0orFvhfqi752yjaXylr0Rp4oDg5H0Zn1IuyRhDVvYOwAXoJirx2xuS16I3WjxnAIHiQ==} dev: false /@types/stack-utils/2.0.1: @@ -3839,55 +3744,36 @@ packages: dependencies: '@types/yargs-parser': 21.0.0 - /@typescript-eslint/eslint-plugin/5.56.0_hk4mrh24sggdgtzgjzi3ljjtbi: - resolution: {integrity: sha512-ZNW37Ccl3oMZkzxrYDUX4o7cnuPgU+YrcaYXzsRtLB16I1FR5SHMqga3zGsaSliZADCWo2v8qHWqAYIj8nWCCg==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@typescript-eslint/eslint-plugin/6.8.0_xmlw7ciba4dhvvbsnhnqmsoya4: + resolution: {integrity: sha512-GosF4238Tkes2SHPQ1i8f6rMtG6zlKwMEB0abqSJ3Npvos+doIlc/ATG+vX1G9coDF3Ex78zM3heXHLyWEwLUw==} + engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: - '@typescript-eslint/parser': ^5.0.0 - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + '@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha + eslint: ^7.0.0 || ^8.0.0 typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - '@eslint-community/regexpp': 4.4.0 - '@typescript-eslint/parser': 5.56.0_ke5tomdohv4ati5ckqc7wiiq5u - '@typescript-eslint/scope-manager': 5.56.0 - '@typescript-eslint/type-utils': 5.56.0_ke5tomdohv4ati5ckqc7wiiq5u - '@typescript-eslint/utils': 5.56.0_ke5tomdohv4ati5ckqc7wiiq5u + '@eslint-community/regexpp': 4.9.1 + '@typescript-eslint/parser': 6.8.0_i3vkbg2fztj7jno7sh3heeojya + '@typescript-eslint/scope-manager': 6.8.0 + '@typescript-eslint/type-utils': 6.8.0_i3vkbg2fztj7jno7sh3heeojya + '@typescript-eslint/utils': 6.8.0_i3vkbg2fztj7jno7sh3heeojya + '@typescript-eslint/visitor-keys': 6.8.0 debug: 4.3.4 - eslint: 8.23.0 - grapheme-splitter: 1.0.4 - ignore: 5.2.0 - natural-compare-lite: 1.4.0 - semver: 7.3.8 - tsutils: 3.21.0_typescript@5.2.2 + eslint: 8.52.0 + graphemer: 1.4.0 + ignore: 5.2.4 + natural-compare: 1.4.0 + semver: 7.5.4 + ts-api-utils: 1.0.3_typescript@5.2.2 typescript: 5.2.2 transitivePeerDependencies: - supports-color dev: false - /@typescript-eslint/parser/5.56.0_3rifh24lelkramsxq7zeqs7u7e: - resolution: {integrity: sha512-sn1OZmBxUsgxMmR8a8U5QM/Wl+tyqlH//jTqCg8daTAmhAk26L2PFhcqPLlYBhYUJMZJK276qLXlHN3a83o2cg==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/scope-manager': 5.56.0 - '@typescript-eslint/types': 5.56.0 - '@typescript-eslint/typescript-estree': 5.56.0_typescript@5.2.2 - debug: 4.3.4 - eslint: 8.35.0 - typescript: 5.2.2 - transitivePeerDependencies: - - supports-color - dev: true - - /@typescript-eslint/parser/5.56.0_dvo4h2k5fbi5yajawmfc3ogwny: + /@typescript-eslint/parser/5.56.0_i3vkbg2fztj7jno7sh3heeojya: resolution: {integrity: sha512-sn1OZmBxUsgxMmR8a8U5QM/Wl+tyqlH//jTqCg8daTAmhAk26L2PFhcqPLlYBhYUJMZJK276qLXlHN3a83o2cg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -3901,26 +3787,27 @@ packages: '@typescript-eslint/types': 5.56.0 '@typescript-eslint/typescript-estree': 5.56.0_typescript@5.2.2 debug: 4.3.4 - eslint: 8.40.0 + eslint: 8.52.0 typescript: 5.2.2 transitivePeerDependencies: - supports-color - /@typescript-eslint/parser/5.56.0_ke5tomdohv4ati5ckqc7wiiq5u: - resolution: {integrity: sha512-sn1OZmBxUsgxMmR8a8U5QM/Wl+tyqlH//jTqCg8daTAmhAk26L2PFhcqPLlYBhYUJMZJK276qLXlHN3a83o2cg==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@typescript-eslint/parser/6.8.0_i3vkbg2fztj7jno7sh3heeojya: + resolution: {integrity: sha512-5tNs6Bw0j6BdWuP8Fx+VH4G9fEPDxnVI7yH1IAPkQH5RUtvKwRoqdecAPdQXv4rSOADAaz1LFBZvZG7VbXivSg==} + engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + eslint: ^7.0.0 || ^8.0.0 typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 5.56.0 - '@typescript-eslint/types': 5.56.0 - '@typescript-eslint/typescript-estree': 5.56.0_typescript@5.2.2 + '@typescript-eslint/scope-manager': 6.8.0 + '@typescript-eslint/types': 6.8.0 + '@typescript-eslint/typescript-estree': 6.8.0_typescript@5.2.2 + '@typescript-eslint/visitor-keys': 6.8.0 debug: 4.3.4 - eslint: 8.23.0 + eslint: 8.52.0 typescript: 5.2.2 transitivePeerDependencies: - supports-color @@ -3933,21 +3820,29 @@ packages: '@typescript-eslint/types': 5.56.0 '@typescript-eslint/visitor-keys': 5.56.0 - /@typescript-eslint/type-utils/5.56.0_ke5tomdohv4ati5ckqc7wiiq5u: - resolution: {integrity: sha512-8WxgOgJjWRy6m4xg9KoSHPzBNZeQbGlQOH7l2QEhQID/+YseaFxg5J/DLwWSsi9Axj4e/cCiKx7PVzOq38tY4A==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@typescript-eslint/scope-manager/6.8.0: + resolution: {integrity: sha512-xe0HNBVwCph7rak+ZHcFD6A+q50SMsFwcmfdjs9Kz4qDh5hWhaPhFjRs/SODEhroBI5Ruyvyz9LfwUJ624O40g==} + engines: {node: ^16.0.0 || >=18.0.0} + dependencies: + '@typescript-eslint/types': 6.8.0 + '@typescript-eslint/visitor-keys': 6.8.0 + dev: false + + /@typescript-eslint/type-utils/6.8.0_i3vkbg2fztj7jno7sh3heeojya: + resolution: {integrity: sha512-RYOJdlkTJIXW7GSldUIHqc/Hkto8E+fZN96dMIFhuTJcQwdRoGN2rEWA8U6oXbLo0qufH7NPElUb+MceHtz54g==} + engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: - eslint: '*' + eslint: ^7.0.0 || ^8.0.0 typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 5.56.0_typescript@5.2.2 - '@typescript-eslint/utils': 5.56.0_ke5tomdohv4ati5ckqc7wiiq5u + '@typescript-eslint/typescript-estree': 6.8.0_typescript@5.2.2 + '@typescript-eslint/utils': 6.8.0_i3vkbg2fztj7jno7sh3heeojya debug: 4.3.4 - eslint: 8.23.0 - tsutils: 3.21.0_typescript@5.2.2 + eslint: 8.52.0 + ts-api-utils: 1.0.3_typescript@5.2.2 typescript: 5.2.2 transitivePeerDependencies: - supports-color @@ -3957,6 +3852,11 @@ packages: resolution: {integrity: sha512-JyAzbTJcIyhuUhogmiu+t79AkdnqgPUEsxMTMc/dCZczGMJQh1MK2wgrju++yMN6AWroVAy2jxyPcPr3SWCq5w==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@typescript-eslint/types/6.8.0: + resolution: {integrity: sha512-p5qOxSum7W3k+llc7owEStXlGmSl8FcGvhYt8Vjy7FqEnmkCVlM3P57XQEGj58oqaBWDQXbJDZxwUWMS/EAPNQ==} + engines: {node: ^16.0.0 || >=18.0.0} + dev: false + /@typescript-eslint/typescript-estree/5.56.0_typescript@5.2.2: resolution: {integrity: sha512-41CH/GncsLXOJi0jb74SnC7jVPWeVJ0pxQj8bOjH1h2O26jXN3YHKDT1ejkVz5YeTEQPeLCCRY0U2r68tfNOcg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -3971,26 +3871,46 @@ packages: debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 - semver: 7.3.8 + semver: 7.5.4 tsutils: 3.21.0_typescript@5.2.2 typescript: 5.2.2 transitivePeerDependencies: - supports-color - /@typescript-eslint/utils/5.56.0_ke5tomdohv4ati5ckqc7wiiq5u: - resolution: {integrity: sha512-XhZDVdLnUJNtbzaJeDSCIYaM+Tgr59gZGbFuELgF7m0IY03PlciidS7UQNKLE0+WpUTn1GlycEr6Ivb/afjbhA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@typescript-eslint/typescript-estree/6.8.0_typescript@5.2.2: + resolution: {integrity: sha512-ISgV0lQ8XgW+mvv5My/+iTUdRmGspducmQcDw5JxznasXNnZn3SKNrTRuMsEXv+V/O+Lw9AGcQCfVaOPCAk/Zg==} + engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true dependencies: - '@eslint-community/eslint-utils': 4.3.0_eslint@8.23.0 - '@types/json-schema': 7.0.11 - '@types/semver': 7.3.13 - '@typescript-eslint/scope-manager': 5.56.0 - '@typescript-eslint/types': 5.56.0 - '@typescript-eslint/typescript-estree': 5.56.0_typescript@5.2.2 - eslint: 8.23.0 - eslint-scope: 5.1.1 + '@typescript-eslint/types': 6.8.0 + '@typescript-eslint/visitor-keys': 6.8.0 + debug: 4.3.4 + globby: 11.1.0 + is-glob: 4.0.3 + semver: 7.5.4 + ts-api-utils: 1.0.3_typescript@5.2.2 + typescript: 5.2.2 + transitivePeerDependencies: + - supports-color + dev: false + + /@typescript-eslint/utils/6.8.0_i3vkbg2fztj7jno7sh3heeojya: + resolution: {integrity: sha512-dKs1itdE2qFG4jr0dlYLQVppqTE+Itt7GmIf/vX6CSvsW+3ov8PbWauVKyyfNngokhIO9sKZeRGCUo1+N7U98Q==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + dependencies: + '@eslint-community/eslint-utils': 4.4.0_eslint@8.52.0 + '@types/json-schema': 7.0.14 + '@types/semver': 7.5.4 + '@typescript-eslint/scope-manager': 6.8.0 + '@typescript-eslint/types': 6.8.0 + '@typescript-eslint/typescript-estree': 6.8.0_typescript@5.2.2 + eslint: 8.52.0 semver: 7.5.4 transitivePeerDependencies: - supports-color @@ -4002,7 +3922,18 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: '@typescript-eslint/types': 5.56.0 - eslint-visitor-keys: 3.4.1 + eslint-visitor-keys: 3.4.3 + + /@typescript-eslint/visitor-keys/6.8.0: + resolution: {integrity: sha512-oqAnbA7c+pgOhW2OhGvxm0t1BULX5peQI/rLsNDpGM78EebV3C9IGbX5HNZabuZ6UQrYveCLjKo8Iy/lLlBkkg==} + engines: {node: ^16.0.0 || >=18.0.0} + dependencies: + '@typescript-eslint/types': 6.8.0 + eslint-visitor-keys: 3.4.3 + dev: false + + /@ungap/structured-clone/1.2.0: + resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} /@vercel/analytics/0.1.11_react@18.2.0: resolution: {integrity: sha512-mj5CPR02y0BRs1tN3oZcBNAX9a8NxsIUl9vElDPcqxnMfP0RbRc9fI9Ud7+QDg/1Izvt5uMumsr+6YsmVHcyuw==} @@ -4044,28 +3975,13 @@ packages: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: acorn: 8.8.1 - - /acorn-node/1.8.2: - resolution: {integrity: sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A==} - dependencies: - acorn: 7.4.1 - acorn-walk: 7.2.0 - xtend: 4.0.2 - - /acorn-walk/7.2.0: - resolution: {integrity: sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==} - engines: {node: '>=0.4.0'} + dev: false /acorn-walk/8.2.0: resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==} engines: {node: '>=0.4.0'} dev: true - /acorn/7.4.1: - resolution: {integrity: sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==} - engines: {node: '>=0.4.0'} - hasBin: true - /acorn/8.10.0: resolution: {integrity: sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==} engines: {node: '>=0.4.0'} @@ -4130,7 +4046,6 @@ packages: /any-promise/1.3.0: resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==} - dev: true /anymatch/3.1.2: resolution: {integrity: sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==} @@ -4199,16 +4114,6 @@ packages: es-abstract: 1.22.2 es-shim-unscopables: 1.0.0 get-intrinsic: 1.2.1 - dev: false - - /array.prototype.flat/1.3.0: - resolution: {integrity: sha512-12IUEkHsAhA4DY5s0FPgNXIdc8VRSqD9Zp78a5au9abH/SOBrsp082JOWFNTjkMozh8mqcdiKuaLGhPeYztxSw==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.1 - es-abstract: 1.22.2 - es-shim-unscopables: 1.0.0 /array.prototype.flat/1.3.2: resolution: {integrity: sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==} @@ -4266,7 +4171,6 @@ packages: resolution: {integrity: sha512-wwHYEIS0Q80f5mosx3L/dfG5t5rjEa9Ft51GTaNt862EnpyGHpgz2RkZvLPp1oF5TnAiTohkEKVEu8pQPJI7Vg==} dependencies: has-symbols: 1.0.3 - dev: false /asynckit/0.4.0: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} @@ -4301,17 +4205,17 @@ packages: dependencies: deep-equal: 2.2.0 - /babel-jest/29.7.0_@babel+core@7.18.10: + /babel-jest/29.7.0_@babel+core@7.23.2: resolution: {integrity: sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: '@babel/core': ^7.8.0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.23.2 '@jest/transform': 29.7.0 '@types/babel__core': 7.1.19 babel-plugin-istanbul: 6.1.1 - babel-preset-jest: 29.6.3_@babel+core@7.18.10 + babel-preset-jest: 29.6.3_@babel+core@7.23.2 chalk: 4.1.2 graceful-fs: 4.2.10 slash: 3.0.0 @@ -4334,39 +4238,39 @@ packages: resolution: {integrity: sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@babel/template': 7.18.10 - '@babel/types': 7.18.10 + '@babel/template': 7.22.15 + '@babel/types': 7.23.0 '@types/babel__core': 7.1.19 '@types/babel__traverse': 7.18.0 - /babel-preset-current-node-syntax/1.0.1_@babel+core@7.18.10: + /babel-preset-current-node-syntax/1.0.1_@babel+core@7.23.2: resolution: {integrity: sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.18.10 - '@babel/plugin-syntax-async-generators': 7.8.4_@babel+core@7.18.10 - '@babel/plugin-syntax-bigint': 7.8.3_@babel+core@7.18.10 - '@babel/plugin-syntax-class-properties': 7.12.13_@babel+core@7.18.10 - '@babel/plugin-syntax-import-meta': 7.10.4_@babel+core@7.18.10 - '@babel/plugin-syntax-json-strings': 7.8.3_@babel+core@7.18.10 - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4_@babel+core@7.18.10 - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3_@babel+core@7.18.10 - '@babel/plugin-syntax-numeric-separator': 7.10.4_@babel+core@7.18.10 - '@babel/plugin-syntax-object-rest-spread': 7.8.3_@babel+core@7.18.10 - '@babel/plugin-syntax-optional-catch-binding': 7.8.3_@babel+core@7.18.10 - '@babel/plugin-syntax-optional-chaining': 7.8.3_@babel+core@7.18.10 - '@babel/plugin-syntax-top-level-await': 7.14.5_@babel+core@7.18.10 - - /babel-preset-jest/29.6.3_@babel+core@7.18.10: + '@babel/core': 7.23.2 + '@babel/plugin-syntax-async-generators': 7.8.4_@babel+core@7.23.2 + '@babel/plugin-syntax-bigint': 7.8.3_@babel+core@7.23.2 + '@babel/plugin-syntax-class-properties': 7.12.13_@babel+core@7.23.2 + '@babel/plugin-syntax-import-meta': 7.10.4_@babel+core@7.23.2 + '@babel/plugin-syntax-json-strings': 7.8.3_@babel+core@7.23.2 + '@babel/plugin-syntax-logical-assignment-operators': 7.10.4_@babel+core@7.23.2 + '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3_@babel+core@7.23.2 + '@babel/plugin-syntax-numeric-separator': 7.10.4_@babel+core@7.23.2 + '@babel/plugin-syntax-object-rest-spread': 7.8.3_@babel+core@7.23.2 + '@babel/plugin-syntax-optional-catch-binding': 7.8.3_@babel+core@7.23.2 + '@babel/plugin-syntax-optional-chaining': 7.8.3_@babel+core@7.23.2 + '@babel/plugin-syntax-top-level-await': 7.14.5_@babel+core@7.23.2 + + /babel-preset-jest/29.6.3_@babel+core@7.23.2: resolution: {integrity: sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.23.2 babel-plugin-jest-hoist: 29.6.3 - babel-preset-current-node-syntax: 1.0.1_@babel+core@7.18.10 + babel-preset-current-node-syntax: 1.0.1_@babel+core@7.23.2 /bail/2.0.2: resolution: {integrity: sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==} @@ -4425,6 +4329,17 @@ packages: electron-to-chromium: 1.4.325 node-releases: 2.0.10 update-browserslist-db: 1.0.10_browserslist@4.21.5 + dev: true + + /browserslist/4.22.1: + resolution: {integrity: sha512-FEVc202+2iuClEhZhrWy6ZiAcRLvNMyYcxZ8raemul1DYVOVdFsbqckWLdsixQZCpJlwe77Z3UTalE7jsjnKfQ==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + dependencies: + caniuse-lite: 1.0.30001551 + electron-to-chromium: 1.4.563 + node-releases: 2.0.13 + update-browserslist-db: 1.0.13_browserslist@4.22.1 /bs-logger/0.2.6: resolution: {integrity: sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==} @@ -4503,6 +4418,9 @@ packages: /caniuse-lite/1.0.30001464: resolution: {integrity: sha512-oww27MtUmusatpRpCGSOneQk2/l5czXANDSFvsc7VuOQ86s3ANhZetpwXNf1zY/zdfP63Xvjz325DAdAoES13g==} + /caniuse-lite/1.0.30001551: + resolution: {integrity: sha512-vtBAez47BoGMMzlbYhfXrMV1kvRF2WP/lqiMuDu1Sb4EE4LKEgjopFDSRtZfdVnslNRpOqV/woE+Xgrwj6VQlg==} + /ccount/2.0.1: resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} dev: false @@ -4726,7 +4644,6 @@ packages: /commander/4.1.1: resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} engines: {node: '>= 6'} - dev: true /commander/8.3.0: resolution: {integrity: sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==} @@ -4972,7 +4889,6 @@ packages: /define-lazy-prop/2.0.0: resolution: {integrity: sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==} engines: {node: '>=8'} - dev: false /define-properties/1.2.1: resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} @@ -4982,9 +4898,6 @@ packages: has-property-descriptors: 1.0.0 object-keys: 1.1.1 - /defined/1.0.1: - resolution: {integrity: sha512-hsBd2qSVCRE+5PmNdHt1uzyrFu5d3RwmFDKzyNZMFq/EwDNJF7Ee5+D5oEKF0hU6LhtoUF1macFvOe4AskQC1Q==} - /delayed-stream/1.0.0: resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} engines: {node: '>=0.4.0'} @@ -5013,15 +4926,6 @@ packages: resolution: {integrity: sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==} dev: false - /detective/5.2.1: - resolution: {integrity: sha512-v9XE1zRnz1wRtgurGu0Bs8uHKFSTdteYZNbIPFVhUZ39L/S79ppMpdmVOZAnoz1jfEFodc48n6MX483Xo3t1yw==} - engines: {node: '>=0.8.0'} - hasBin: true - dependencies: - acorn-node: 1.8.2 - defined: 1.0.1 - minimist: 1.2.6 - /didyoumean/1.2.2: resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==} @@ -5088,6 +4992,10 @@ packages: /electron-to-chromium/1.4.325: resolution: {integrity: sha512-K1C03NT4I7BuzsRdCU5RWkgZxtswnKDYM6/eMhkEXqKu4e5T+ck610x3FPzu1y7HVFSiQKZqP16gnJzPpji1TQ==} + dev: true + + /electron-to-chromium/1.4.563: + resolution: {integrity: sha512-dg5gj5qOgfZNkPNeyKBZQAQitIQ/xwfIDmEQJHCbXaD9ebTZxwJXUsDYcBlAvZGZLi+/354l35J1wkmP6CqYaw==} /emittery/0.13.1: resolution: {integrity: sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==} @@ -5109,9 +5017,8 @@ packages: resolution: {integrity: sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ==} engines: {node: '>=10.13.0'} dependencies: - graceful-fs: 4.2.10 + graceful-fs: 4.2.11 tapable: 2.2.1 - dev: false /enquirer/2.4.1: resolution: {integrity: sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==} @@ -5196,7 +5103,7 @@ packages: define-properties: 1.2.1 es-abstract: 1.22.2 es-set-tostringtag: 2.0.1 - function-bind: 1.1.1 + function-bind: 1.1.2 get-intrinsic: 1.2.1 globalthis: 1.0.3 has-property-descriptors: 1.0.0 @@ -5205,7 +5112,6 @@ packages: internal-slot: 1.0.5 iterator.prototype: 1.1.2 safe-array-concat: 1.0.1 - dev: false /es-set-tostringtag/2.0.1: resolution: {integrity: sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==} @@ -5314,58 +5220,8 @@ packages: source-map: 0.6.1 dev: true - /eslint-config-next/13.0.0_3rifh24lelkramsxq7zeqs7u7e: - resolution: {integrity: sha512-y2nqWS2tycWySdVhb+rhp6CuDmDazGySqkzzQZf3UTyfHyC7og1m5m/AtMFwCo5mtvDqvw1BENin52kV9733lg==} - peerDependencies: - eslint: ^7.23.0 || ^8.0.0 - typescript: '>=3.3.1' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@next/eslint-plugin-next': 13.0.0 - '@rushstack/eslint-patch': 1.2.0 - '@typescript-eslint/parser': 5.56.0_3rifh24lelkramsxq7zeqs7u7e - eslint: 8.35.0 - eslint-import-resolver-node: 0.3.6 - eslint-import-resolver-typescript: 2.7.1_t7ev3uflic5sb7aktwkyuiuumi - eslint-plugin-import: 2.26.0_eslint@8.35.0 - eslint-plugin-jsx-a11y: 6.7.1_eslint@8.35.0 - eslint-plugin-react: 7.32.2_eslint@8.35.0 - eslint-plugin-react-hooks: 4.6.0_eslint@8.35.0 - typescript: 5.2.2 - transitivePeerDependencies: - - eslint-import-resolver-webpack - - supports-color - dev: true - - /eslint-config-next/13.0.0_dvo4h2k5fbi5yajawmfc3ogwny: - resolution: {integrity: sha512-y2nqWS2tycWySdVhb+rhp6CuDmDazGySqkzzQZf3UTyfHyC7og1m5m/AtMFwCo5mtvDqvw1BENin52kV9733lg==} - peerDependencies: - eslint: ^7.23.0 || ^8.0.0 - typescript: '>=3.3.1' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@next/eslint-plugin-next': 13.0.0 - '@rushstack/eslint-patch': 1.2.0 - '@typescript-eslint/parser': 5.56.0_dvo4h2k5fbi5yajawmfc3ogwny - eslint: 8.40.0 - eslint-import-resolver-node: 0.3.6 - eslint-import-resolver-typescript: 2.7.1_lw64bwrfdlvteab5a4bczvvhwa - eslint-plugin-import: 2.26.0_eslint@8.40.0 - eslint-plugin-jsx-a11y: 6.7.1_eslint@8.40.0 - eslint-plugin-react: 7.32.2_eslint@8.40.0 - eslint-plugin-react-hooks: 4.6.0_eslint@8.40.0 - typescript: 5.2.2 - transitivePeerDependencies: - - eslint-import-resolver-webpack - - supports-color - dev: true - - /eslint-config-next/13.5.0_dvo4h2k5fbi5yajawmfc3ogwny: - resolution: {integrity: sha512-xBo2ejtVObS7okFpD55GiBdAEu1LjJgoKn67Bs8n9+SAQJOlpeHL1OlKENHv12NXVTe4/VeiqlrjUvZJHr3PbQ==} + /eslint-config-next/13.5.6_i3vkbg2fztj7jno7sh3heeojya: + resolution: {integrity: sha512-o8pQsUHTo9aHqJ2YiZDym5gQAMRf7O2HndHo/JZeY7TDD+W4hk6Ma8Vw54RHiBeb7OWWO5dPirQB+Is/aVQ7Kg==} peerDependencies: eslint: ^7.23.0 || ^8.0.0 typescript: '>=3.3.1' @@ -5373,152 +5229,99 @@ packages: typescript: optional: true dependencies: - '@next/eslint-plugin-next': 13.5.0 + '@next/eslint-plugin-next': 13.5.6 '@rushstack/eslint-patch': 1.4.0 - '@typescript-eslint/parser': 5.56.0_dvo4h2k5fbi5yajawmfc3ogwny - eslint: 8.40.0 - eslint-import-resolver-node: 0.3.6 - eslint-import-resolver-typescript: 3.5.5_42rax3miqmdaysywkkadlxyewy - eslint-plugin-import: 2.28.1_eslint@8.40.0 - eslint-plugin-jsx-a11y: 6.7.1_eslint@8.40.0 - eslint-plugin-react: 7.33.2_eslint@8.40.0 - eslint-plugin-react-hooks: 4.6.0_eslint@8.40.0 + '@typescript-eslint/parser': 5.56.0_i3vkbg2fztj7jno7sh3heeojya + eslint: 8.52.0 + eslint-import-resolver-node: 0.3.9 + eslint-import-resolver-typescript: 3.5.5_wkkcnr2ttog6f4wljtzpklxtum + eslint-plugin-import: 2.28.1_eslint@8.52.0 + eslint-plugin-jsx-a11y: 6.7.1_eslint@8.52.0 + eslint-plugin-react: 7.33.2_eslint@8.52.0 + eslint-plugin-react-hooks: 4.6.0_eslint@8.52.0 typescript: 5.2.2 transitivePeerDependencies: - eslint-import-resolver-webpack - supports-color - dev: false - /eslint-config-prettier/8.5.0_eslint@8.23.0: - resolution: {integrity: sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==} + /eslint-config-prettier/8.10.0_eslint@8.52.0: + resolution: {integrity: sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==} hasBin: true peerDependencies: eslint: '>=7.0.0' dependencies: - eslint: 8.23.0 + eslint: 8.52.0 dev: false - /eslint-config-prettier/8.5.0_eslint@8.35.0: - resolution: {integrity: sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==} - hasBin: true - peerDependencies: - eslint: '>=7.0.0' - dependencies: - eslint: 8.35.0 - dev: true - - /eslint-config-prettier/8.5.0_eslint@8.40.0: - resolution: {integrity: sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==} + /eslint-config-prettier/9.0.0_eslint@8.52.0: + resolution: {integrity: sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw==} hasBin: true peerDependencies: eslint: '>=7.0.0' dependencies: - eslint: 8.40.0 + eslint: 8.52.0 dev: true - /eslint-config-turbo/1.10.16_eslint@8.23.0: + /eslint-config-turbo/1.10.16_eslint@8.52.0: resolution: {integrity: sha512-O3NQI72bQHV7FvSC6lWj66EGx8drJJjuT1kuInn6nbMLOHdMBhSUX/8uhTAlHRQdlxZk2j9HtgFCIzSc93w42g==} peerDependencies: eslint: '>6.6.0' dependencies: - eslint: 8.23.0 - eslint-plugin-turbo: 1.10.16_eslint@8.23.0 + eslint: 8.52.0 + eslint-plugin-turbo: 1.10.16_eslint@8.52.0 dev: false - /eslint-config-universe/11.3.0_br6ialufl3zilqpf2tx37wdhce: - resolution: {integrity: sha512-CL6v7IxV+OJn0q1vqtFVtX+sNUdY7MiIy3/XD0dy96D7RsDvYBWWqs4S1AIB4AdVgraNnv829q1+asluAePSSw==} + /eslint-config-universe/12.0.0_miaapnor4fnqkdioyxfabghj6q: + resolution: {integrity: sha512-78UxGByheyDNL1RhszWYeDzWiBaUtLnFSeI20pJI89IXa9OAEZQHzG/iBFpMeaCs7Hqyg0wYJcuCbCx535wB7A==} peerDependencies: eslint: '>=8.10' - prettier: '>=2.4' + prettier: '>=3' peerDependenciesMeta: prettier: optional: true dependencies: - '@typescript-eslint/eslint-plugin': 5.56.0_hk4mrh24sggdgtzgjzi3ljjtbi - '@typescript-eslint/parser': 5.56.0_ke5tomdohv4ati5ckqc7wiiq5u - eslint: 8.23.0 - eslint-config-prettier: 8.5.0_eslint@8.23.0 - eslint-plugin-import: 2.26.0_vzaq2onbymqs4v6bhjer6bx4ee - eslint-plugin-node: 11.1.0_eslint@8.23.0 - eslint-plugin-prettier: 4.2.1_unpovoj4ktqefrgwo2fomubq4m - eslint-plugin-react: 7.32.2_eslint@8.23.0 - eslint-plugin-react-hooks: 4.6.0_eslint@8.23.0 - prettier: 2.8.8 + '@typescript-eslint/eslint-plugin': 6.8.0_xmlw7ciba4dhvvbsnhnqmsoya4 + '@typescript-eslint/parser': 6.8.0_i3vkbg2fztj7jno7sh3heeojya + eslint: 8.52.0 + eslint-config-prettier: 8.10.0_eslint@8.52.0 + eslint-plugin-import: 2.28.1_pklsczl6bgctlw4ojblzy73j44 + eslint-plugin-node: 11.1.0_eslint@8.52.0 + eslint-plugin-prettier: 5.0.1_eoxouyywhy27jk6xpd7kdtefzq + eslint-plugin-react: 7.33.2_eslint@8.52.0 + eslint-plugin-react-hooks: 4.6.0_eslint@8.52.0 + prettier: 3.0.3 transitivePeerDependencies: + - '@types/eslint' - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - typescript dev: false - /eslint-import-resolver-node/0.3.6: - resolution: {integrity: sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw==} - dependencies: - debug: 3.2.7 - resolve: 1.22.1 - transitivePeerDependencies: - - supports-color - /eslint-import-resolver-node/0.3.9: resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} dependencies: debug: 3.2.7 is-core-module: 2.13.0 - resolve: 1.22.6 + resolve: 1.22.8 transitivePeerDependencies: - supports-color - /eslint-import-resolver-typescript/2.7.1_lw64bwrfdlvteab5a4bczvvhwa: - resolution: {integrity: sha512-00UbgGwV8bSgUv34igBDbTOtKhqoRMy9bFjNehT40bXg6585PNIct8HhXZ0SybqB9rWtXj9crcku8ndDn/gIqQ==} - engines: {node: '>=4'} + /eslint-import-resolver-typescript/3.5.5_wkkcnr2ttog6f4wljtzpklxtum: + resolution: {integrity: sha512-TdJqPHs2lW5J9Zpe17DZNQuDnox4xo2o+0tE7Pggain9Rbc19ik8kFtXdxZ250FVx2kF4vlt2RSf4qlUpG7bhw==} + engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: eslint: '*' eslint-plugin-import: '*' dependencies: debug: 4.3.4 - eslint: 8.40.0 - eslint-plugin-import: 2.26.0_eslint@8.40.0 - glob: 7.2.3 - is-glob: 4.0.3 - resolve: 1.22.1 - tsconfig-paths: 3.14.1 - transitivePeerDependencies: - - supports-color - dev: true - - /eslint-import-resolver-typescript/2.7.1_t7ev3uflic5sb7aktwkyuiuumi: - resolution: {integrity: sha512-00UbgGwV8bSgUv34igBDbTOtKhqoRMy9bFjNehT40bXg6585PNIct8HhXZ0SybqB9rWtXj9crcku8ndDn/gIqQ==} - engines: {node: '>=4'} - peerDependencies: - eslint: '*' - eslint-plugin-import: '*' - dependencies: - debug: 4.3.4 - eslint: 8.35.0 - eslint-plugin-import: 2.26.0_eslint@8.35.0 - glob: 7.2.3 - is-glob: 4.0.3 - resolve: 1.22.1 - tsconfig-paths: 3.14.1 - transitivePeerDependencies: - - supports-color - dev: true - - /eslint-import-resolver-typescript/3.5.5_42rax3miqmdaysywkkadlxyewy: - resolution: {integrity: sha512-TdJqPHs2lW5J9Zpe17DZNQuDnox4xo2o+0tE7Pggain9Rbc19ik8kFtXdxZ250FVx2kF4vlt2RSf4qlUpG7bhw==} - engines: {node: ^14.18.0 || >=16.0.0} - peerDependencies: - eslint: '*' - eslint-plugin-import: '*' - dependencies: - debug: 4.3.4 - enhanced-resolve: 5.12.0 - eslint: 8.40.0 - eslint-module-utils: 2.7.4_x6xaamq77syvisp74yxvnyojni - eslint-plugin-import: 2.28.1_eslint@8.40.0 - get-tsconfig: 4.5.0 - globby: 13.1.4 - is-core-module: 2.12.0 + enhanced-resolve: 5.12.0 + eslint: 8.52.0 + eslint-module-utils: 2.8.0_wjegpa4w4krr2xg3hawkquxbmy + eslint-plugin-import: 2.28.1_eslint@8.52.0 + get-tsconfig: 4.5.0 + globby: 13.1.4 + is-core-module: 2.13.0 is-glob: 4.0.3 synckit: 0.8.5 transitivePeerDependencies: @@ -5526,38 +5329,9 @@ packages: - eslint-import-resolver-node - eslint-import-resolver-webpack - supports-color - dev: false - /eslint-module-utils/2.7.4_axixtrt67wbluzjdlf2pevgkvm: - resolution: {integrity: sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==} - engines: {node: '>=4'} - peerDependencies: - '@typescript-eslint/parser': '*' - eslint: '*' - eslint-import-resolver-node: '*' - eslint-import-resolver-typescript: '*' - eslint-import-resolver-webpack: '*' - peerDependenciesMeta: - '@typescript-eslint/parser': - optional: true - eslint: - optional: true - eslint-import-resolver-node: - optional: true - eslint-import-resolver-typescript: - optional: true - eslint-import-resolver-webpack: - optional: true - dependencies: - debug: 3.2.7 - eslint: 8.35.0 - eslint-import-resolver-node: 0.3.9 - transitivePeerDependencies: - - supports-color - dev: true - - /eslint-module-utils/2.7.4_i5smx6y4rayb46noyx2z2hc6du: - resolution: {integrity: sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==} + /eslint-module-utils/2.8.0_27mg73zv5nppvbicv5khpqjjzu: + resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} engines: {node: '>=4'} peerDependencies: '@typescript-eslint/parser': '*' @@ -5577,45 +5351,16 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: + '@typescript-eslint/parser': 6.8.0_i3vkbg2fztj7jno7sh3heeojya debug: 3.2.7 - eslint: 8.40.0 + eslint: 8.52.0 eslint-import-resolver-node: 0.3.9 transitivePeerDependencies: - supports-color - dev: true - - /eslint-module-utils/2.7.4_x6xaamq77syvisp74yxvnyojni: - resolution: {integrity: sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==} - engines: {node: '>=4'} - peerDependencies: - '@typescript-eslint/parser': '*' - eslint: '*' - eslint-import-resolver-node: '*' - eslint-import-resolver-typescript: '*' - eslint-import-resolver-webpack: '*' - peerDependenciesMeta: - '@typescript-eslint/parser': - optional: true - eslint: - optional: true - eslint-import-resolver-node: - optional: true - eslint-import-resolver-typescript: - optional: true - eslint-import-resolver-webpack: - optional: true - dependencies: - '@typescript-eslint/parser': 5.56.0_dvo4h2k5fbi5yajawmfc3ogwny - debug: 3.2.7 - eslint: 8.40.0 - eslint-import-resolver-node: 0.3.6 - eslint-import-resolver-typescript: 3.5.5_42rax3miqmdaysywkkadlxyewy - transitivePeerDependencies: - - supports-color dev: false - /eslint-module-utils/2.7.4_xijhtyba6ivb7zuiecatragbr4: - resolution: {integrity: sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==} + /eslint-module-utils/2.8.0_fgqvfaljbglv556mpdytktk7wq: + resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} engines: {node: '>=4'} peerDependencies: '@typescript-eslint/parser': '*' @@ -5635,15 +5380,13 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.56.0_ke5tomdohv4ati5ckqc7wiiq5u debug: 3.2.7 - eslint: 8.23.0 + eslint: 8.52.0 eslint-import-resolver-node: 0.3.9 transitivePeerDependencies: - supports-color - dev: false - /eslint-module-utils/2.8.0_i5smx6y4rayb46noyx2z2hc6du: + /eslint-module-utils/2.8.0_wjegpa4w4krr2xg3hawkquxbmy: resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} engines: {node: '>=4'} peerDependencies: @@ -5664,86 +5407,27 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: + '@typescript-eslint/parser': 5.56.0_i3vkbg2fztj7jno7sh3heeojya debug: 3.2.7 - eslint: 8.40.0 + eslint: 8.52.0 eslint-import-resolver-node: 0.3.9 + eslint-import-resolver-typescript: 3.5.5_wkkcnr2ttog6f4wljtzpklxtum transitivePeerDependencies: - supports-color - dev: false - /eslint-plugin-es/3.0.1_eslint@8.23.0: + /eslint-plugin-es/3.0.1_eslint@8.52.0: resolution: {integrity: sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==} engines: {node: '>=8.10.0'} peerDependencies: eslint: '>=4.19.1' dependencies: - eslint: 8.23.0 + eslint: 8.52.0 eslint-utils: 2.1.0 regexpp: 3.2.0 dev: false - /eslint-plugin-import/2.26.0_eslint@8.35.0: - resolution: {integrity: sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==} - engines: {node: '>=4'} - peerDependencies: - '@typescript-eslint/parser': '*' - eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 - peerDependenciesMeta: - '@typescript-eslint/parser': - optional: true - dependencies: - array-includes: 3.1.6 - array.prototype.flat: 1.3.0 - debug: 2.6.9 - doctrine: 2.1.0 - eslint: 8.35.0 - eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.7.4_axixtrt67wbluzjdlf2pevgkvm - has: 1.0.3 - is-core-module: 2.12.0 - is-glob: 4.0.3 - minimatch: 3.1.2 - object.values: 1.1.6 - resolve: 1.22.1 - tsconfig-paths: 3.14.1 - transitivePeerDependencies: - - eslint-import-resolver-typescript - - eslint-import-resolver-webpack - - supports-color - dev: true - - /eslint-plugin-import/2.26.0_eslint@8.40.0: - resolution: {integrity: sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==} - engines: {node: '>=4'} - peerDependencies: - '@typescript-eslint/parser': '*' - eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 - peerDependenciesMeta: - '@typescript-eslint/parser': - optional: true - dependencies: - array-includes: 3.1.6 - array.prototype.flat: 1.3.0 - debug: 2.6.9 - doctrine: 2.1.0 - eslint: 8.40.0 - eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.7.4_i5smx6y4rayb46noyx2z2hc6du - has: 1.0.3 - is-core-module: 2.12.0 - is-glob: 4.0.3 - minimatch: 3.1.2 - object.values: 1.1.6 - resolve: 1.22.1 - tsconfig-paths: 3.14.1 - transitivePeerDependencies: - - eslint-import-resolver-typescript - - eslint-import-resolver-webpack - - supports-color - dev: true - - /eslint-plugin-import/2.26.0_vzaq2onbymqs4v6bhjer6bx4ee: - resolution: {integrity: sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==} + /eslint-plugin-import/2.28.1_eslint@8.52.0: + resolution: {integrity: sha512-9I9hFlITvOV55alzoKBI+K9q74kv0iKMeY6av5+umsNwayt59fz692daGyjR+oStBQgx6nwR9rXldDev3Clw+A==} engines: {node: '>=4'} peerDependencies: '@typescript-eslint/parser': '*' @@ -5752,28 +5436,30 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.56.0_ke5tomdohv4ati5ckqc7wiiq5u array-includes: 3.1.6 - array.prototype.flat: 1.3.0 - debug: 2.6.9 + array.prototype.findlastindex: 1.2.3 + array.prototype.flat: 1.3.2 + array.prototype.flatmap: 1.3.1 + debug: 3.2.7 doctrine: 2.1.0 - eslint: 8.23.0 + eslint: 8.52.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.7.4_xijhtyba6ivb7zuiecatragbr4 - has: 1.0.3 - is-core-module: 2.12.0 + eslint-module-utils: 2.8.0_fgqvfaljbglv556mpdytktk7wq + has: 1.0.4 + is-core-module: 2.13.0 is-glob: 4.0.3 minimatch: 3.1.2 + object.fromentries: 2.0.6 + object.groupby: 1.0.1 object.values: 1.1.6 - resolve: 1.22.1 - tsconfig-paths: 3.14.1 + semver: 6.3.1 + tsconfig-paths: 3.14.2 transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - dev: false - /eslint-plugin-import/2.28.1_eslint@8.40.0: + /eslint-plugin-import/2.28.1_pklsczl6bgctlw4ojblzy73j44: resolution: {integrity: sha512-9I9hFlITvOV55alzoKBI+K9q74kv0iKMeY6av5+umsNwayt59fz692daGyjR+oStBQgx6nwR9rXldDev3Clw+A==} engines: {node: '>=4'} peerDependencies: @@ -5783,16 +5469,17 @@ packages: '@typescript-eslint/parser': optional: true dependencies: + '@typescript-eslint/parser': 6.8.0_i3vkbg2fztj7jno7sh3heeojya array-includes: 3.1.6 array.prototype.findlastindex: 1.2.3 array.prototype.flat: 1.3.2 array.prototype.flatmap: 1.3.1 debug: 3.2.7 doctrine: 2.1.0 - eslint: 8.40.0 + eslint: 8.52.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.0_i5smx6y4rayb46noyx2z2hc6du - has: 1.0.3 + eslint-module-utils: 2.8.0_27mg73zv5nppvbicv5khpqjjzu + has: 1.0.4 is-core-module: 2.13.0 is-glob: 4.0.3 minimatch: 3.1.2 @@ -5807,38 +5494,13 @@ packages: - supports-color dev: false - /eslint-plugin-jsx-a11y/6.7.1_eslint@8.35.0: - resolution: {integrity: sha512-63Bog4iIethyo8smBklORknVjB0T2dwB8Mr/hIC+fBS0uyHdYYpzM/Ed+YC8VxTjlXHEWFOdmgwcDn1U2L9VCA==} - engines: {node: '>=4.0'} - peerDependencies: - eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 - dependencies: - '@babel/runtime': 7.21.0 - aria-query: 5.1.3 - array-includes: 3.1.6 - array.prototype.flatmap: 1.3.1 - ast-types-flow: 0.0.7 - axe-core: 4.6.3 - axobject-query: 3.1.1 - damerau-levenshtein: 1.0.8 - emoji-regex: 9.2.2 - eslint: 8.35.0 - has: 1.0.3 - jsx-ast-utils: 3.3.3 - language-tags: 1.0.5 - minimatch: 3.1.2 - object.entries: 1.1.6 - object.fromentries: 2.0.6 - semver: 6.3.1 - dev: true - - /eslint-plugin-jsx-a11y/6.7.1_eslint@8.40.0: + /eslint-plugin-jsx-a11y/6.7.1_eslint@8.52.0: resolution: {integrity: sha512-63Bog4iIethyo8smBklORknVjB0T2dwB8Mr/hIC+fBS0uyHdYYpzM/Ed+YC8VxTjlXHEWFOdmgwcDn1U2L9VCA==} engines: {node: '>=4.0'} peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 dependencies: - '@babel/runtime': 7.21.0 + '@babel/runtime': 7.23.2 aria-query: 5.1.3 array-includes: 3.1.6 array.prototype.flatmap: 1.3.1 @@ -5847,8 +5509,8 @@ packages: axobject-query: 3.1.1 damerau-levenshtein: 1.0.8 emoji-regex: 9.2.2 - eslint: 8.40.0 - has: 1.0.3 + eslint: 8.52.0 + has: 1.0.4 jsx-ast-utils: 3.3.3 language-tags: 1.0.5 minimatch: 3.1.2 @@ -5856,137 +5518,51 @@ packages: object.fromentries: 2.0.6 semver: 6.3.1 - /eslint-plugin-node/11.1.0_eslint@8.23.0: + /eslint-plugin-node/11.1.0_eslint@8.52.0: resolution: {integrity: sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==} engines: {node: '>=8.10.0'} peerDependencies: eslint: '>=5.16.0' dependencies: - eslint: 8.23.0 - eslint-plugin-es: 3.0.1_eslint@8.23.0 + eslint: 8.52.0 + eslint-plugin-es: 3.0.1_eslint@8.52.0 eslint-utils: 2.1.0 - ignore: 5.2.0 + ignore: 5.2.4 minimatch: 3.1.2 - resolve: 1.22.1 - semver: 6.3.0 + resolve: 1.22.8 + semver: 6.3.1 dev: false - /eslint-plugin-prettier/4.2.1_unpovoj4ktqefrgwo2fomubq4m: - resolution: {integrity: sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==} - engines: {node: '>=12.0.0'} + /eslint-plugin-prettier/5.0.1_eoxouyywhy27jk6xpd7kdtefzq: + resolution: {integrity: sha512-m3u5RnR56asrwV/lDC4GHorlW75DsFfmUcjfCYylTUs85dBRnB7VM6xG8eCMJdeDRnppzmxZVf1GEPJvl1JmNg==} + engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: - eslint: '>=7.28.0' + '@types/eslint': '>=8.0.0' + eslint: '>=8.0.0' eslint-config-prettier: '*' - prettier: '>=2.0.0' + prettier: '>=3.0.0' peerDependenciesMeta: + '@types/eslint': + optional: true eslint-config-prettier: optional: true dependencies: - eslint: 8.23.0 - eslint-config-prettier: 8.5.0_eslint@8.23.0 - prettier: 2.8.8 + eslint: 8.52.0 + eslint-config-prettier: 8.10.0_eslint@8.52.0 + prettier: 3.0.3 prettier-linter-helpers: 1.0.0 + synckit: 0.8.5 dev: false - /eslint-plugin-react-hooks/4.6.0_eslint@8.23.0: - resolution: {integrity: sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==} - engines: {node: '>=10'} - peerDependencies: - eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 - dependencies: - eslint: 8.23.0 - dev: false - - /eslint-plugin-react-hooks/4.6.0_eslint@8.35.0: + /eslint-plugin-react-hooks/4.6.0_eslint@8.52.0: resolution: {integrity: sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==} engines: {node: '>=10'} peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 dependencies: - eslint: 8.35.0 - dev: true - - /eslint-plugin-react-hooks/4.6.0_eslint@8.40.0: - resolution: {integrity: sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==} - engines: {node: '>=10'} - peerDependencies: - eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 - dependencies: - eslint: 8.40.0 - - /eslint-plugin-react/7.32.2_eslint@8.23.0: - resolution: {integrity: sha512-t2fBMa+XzonrrNkyVirzKlvn5RXzzPwRHtMvLAtVZrt8oxgnTQaYbU6SXTOO1mwQgp1y5+toMSKInnzGr0Knqg==} - engines: {node: '>=4'} - peerDependencies: - eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 - dependencies: - array-includes: 3.1.6 - array.prototype.flatmap: 1.3.1 - array.prototype.tosorted: 1.1.1 - doctrine: 2.1.0 - eslint: 8.23.0 - estraverse: 5.3.0 - jsx-ast-utils: 3.3.3 - minimatch: 3.1.2 - object.entries: 1.1.6 - object.fromentries: 2.0.6 - object.hasown: 1.1.2 - object.values: 1.1.6 - prop-types: 15.8.1 - resolve: 2.0.0-next.4 - semver: 6.3.0 - string.prototype.matchall: 4.0.8 - dev: false - - /eslint-plugin-react/7.32.2_eslint@8.35.0: - resolution: {integrity: sha512-t2fBMa+XzonrrNkyVirzKlvn5RXzzPwRHtMvLAtVZrt8oxgnTQaYbU6SXTOO1mwQgp1y5+toMSKInnzGr0Knqg==} - engines: {node: '>=4'} - peerDependencies: - eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 - dependencies: - array-includes: 3.1.6 - array.prototype.flatmap: 1.3.1 - array.prototype.tosorted: 1.1.1 - doctrine: 2.1.0 - eslint: 8.35.0 - estraverse: 5.3.0 - jsx-ast-utils: 3.3.3 - minimatch: 3.1.2 - object.entries: 1.1.6 - object.fromentries: 2.0.6 - object.hasown: 1.1.2 - object.values: 1.1.6 - prop-types: 15.8.1 - resolve: 2.0.0-next.4 - semver: 6.3.0 - string.prototype.matchall: 4.0.8 - dev: true - - /eslint-plugin-react/7.32.2_eslint@8.40.0: - resolution: {integrity: sha512-t2fBMa+XzonrrNkyVirzKlvn5RXzzPwRHtMvLAtVZrt8oxgnTQaYbU6SXTOO1mwQgp1y5+toMSKInnzGr0Knqg==} - engines: {node: '>=4'} - peerDependencies: - eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 - dependencies: - array-includes: 3.1.6 - array.prototype.flatmap: 1.3.1 - array.prototype.tosorted: 1.1.1 - doctrine: 2.1.0 - eslint: 8.40.0 - estraverse: 5.3.0 - jsx-ast-utils: 3.3.3 - minimatch: 3.1.2 - object.entries: 1.1.6 - object.fromentries: 2.0.6 - object.hasown: 1.1.2 - object.values: 1.1.6 - prop-types: 15.8.1 - resolve: 2.0.0-next.4 - semver: 6.3.0 - string.prototype.matchall: 4.0.8 - dev: true + eslint: 8.52.0 - /eslint-plugin-react/7.33.2_eslint@8.40.0: + /eslint-plugin-react/7.33.2_eslint@8.52.0: resolution: {integrity: sha512-73QQMKALArI8/7xGLNI/3LylrEYrlKZSb5C9+q3OtOewTnMQi5cT+aE9E41sLCmli3I9PGGmD1yiZydyo4FEPw==} engines: {node: '>=4'} peerDependencies: @@ -5997,7 +5573,7 @@ packages: array.prototype.tosorted: 1.1.1 doctrine: 2.1.0 es-iterator-helpers: 1.0.15 - eslint: 8.40.0 + eslint: 8.52.0 estraverse: 5.3.0 jsx-ast-utils: 3.3.3 minimatch: 3.1.2 @@ -6009,207 +5585,63 @@ packages: resolve: 2.0.0-next.4 semver: 6.3.1 string.prototype.matchall: 4.0.8 - dev: false - /eslint-plugin-tailwindcss/3.10.1_tailwindcss@3.2.7: - resolution: {integrity: sha512-NLPZ6b6nd/8CgGNMQ6NDiPUfBLQpSGu/u9RyX3MCZOwzNs2dFt1OamNAiRuo3Ixh7Gv4t5UcAcdNt8z74UDJkA==} + /eslint-plugin-tailwindcss/3.13.0_tailwindcss@3.3.3: + resolution: {integrity: sha512-Fcep4KDRLWaK3KmkQbdyKHG0P4GdXFmXdDaweTIPcgOP60OOuWFbh1++dufRT28Q4zpKTKaHwTsXPJ4O/EjU2Q==} engines: {node: '>=12.13.0'} peerDependencies: - tailwindcss: ^3.2.2 + tailwindcss: ^3.3.2 dependencies: - fast-glob: 3.2.12 + fast-glob: 3.3.1 postcss: 8.4.21 - tailwindcss: 3.2.7_postcss@8.4.21 + tailwindcss: 3.3.3 dev: true - /eslint-plugin-turbo/1.10.16_eslint@8.23.0: + /eslint-plugin-turbo/1.10.16_eslint@8.52.0: resolution: {integrity: sha512-ZjrR88MTN64PNGufSEcM0tf+V1xFYVbeiMeuIqr0aiABGomxFLo4DBkQ7WI4WzkZtWQSIA2sP+yxqSboEfL9MQ==} peerDependencies: eslint: '>6.6.0' dependencies: dotenv: 16.0.3 - eslint: 8.23.0 + eslint: 8.52.0 dev: false - /eslint-scope/5.1.1: - resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} - engines: {node: '>=8.0.0'} - dependencies: - esrecurse: 4.3.0 - estraverse: 4.3.0 - dev: false - - /eslint-scope/7.1.1: - resolution: {integrity: sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - esrecurse: 4.3.0 - estraverse: 5.3.0 - /eslint-scope/7.2.2: - resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - esrecurse: 4.3.0 - estraverse: 5.3.0 - - /eslint-utils/2.1.0: - resolution: {integrity: sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==} - engines: {node: '>=6'} - dependencies: - eslint-visitor-keys: 1.3.0 - dev: false - - /eslint-utils/3.0.0_eslint@8.23.0: - resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} - engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} - peerDependencies: - eslint: '>=5' - dependencies: - eslint: 8.23.0 - eslint-visitor-keys: 2.1.0 - dev: false - - /eslint-utils/3.0.0_eslint@8.35.0: - resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} - engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} - peerDependencies: - eslint: '>=5' - dependencies: - eslint: 8.35.0 - eslint-visitor-keys: 2.1.0 - dev: true - - /eslint-visitor-keys/1.3.0: - resolution: {integrity: sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==} - engines: {node: '>=4'} - dev: false - - /eslint-visitor-keys/2.1.0: - resolution: {integrity: sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==} - engines: {node: '>=10'} - - /eslint-visitor-keys/3.3.0: - resolution: {integrity: sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - - /eslint-visitor-keys/3.4.1: - resolution: {integrity: sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.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.23.0: - resolution: {integrity: sha512-pBG/XOn0MsJcKcTRLr27S5HpzQo4kLr+HjLQIyK4EiCsijDl/TB+h5uEuJU6bQ8Edvwz1XWOjpaP2qgnXGpTcA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - hasBin: true - dependencies: - '@eslint/eslintrc': 1.3.1 - '@humanwhocodes/config-array': 0.10.4 - '@humanwhocodes/gitignore-to-minimatch': 1.0.2 - '@humanwhocodes/module-importer': 1.0.1 - ajv: 6.12.6 - chalk: 4.1.2 - cross-spawn: 7.0.3 - debug: 4.3.4 - doctrine: 3.0.0 - escape-string-regexp: 4.0.0 - eslint-scope: 7.1.1 - eslint-utils: 3.0.0_eslint@8.23.0 - eslint-visitor-keys: 3.3.0 - espree: 9.4.0 - esquery: 1.4.0 - esutils: 2.0.3 - fast-deep-equal: 3.1.3 - file-entry-cache: 6.0.1 - find-up: 5.0.0 - functional-red-black-tree: 1.0.1 - glob-parent: 6.0.2 - globals: 13.17.0 - globby: 11.1.0 - grapheme-splitter: 1.0.4 - ignore: 5.2.0 - import-fresh: 3.3.0 - imurmurhash: 0.1.4 - is-glob: 4.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.1 - regexpp: 3.2.0 - strip-ansi: 6.0.1 - strip-json-comments: 3.1.1 - text-table: 0.2.0 - transitivePeerDependencies: - - supports-color + resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + esrecurse: 4.3.0 + estraverse: 5.3.0 + + /eslint-utils/2.1.0: + resolution: {integrity: sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==} + engines: {node: '>=6'} + dependencies: + eslint-visitor-keys: 1.3.0 + dev: false + + /eslint-visitor-keys/1.3.0: + resolution: {integrity: sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==} + engines: {node: '>=4'} dev: false - /eslint/8.35.0: - resolution: {integrity: sha512-BxAf1fVL7w+JLRQhWl2pzGeSiGqbWumV4WNvc9Rhp6tiCtm4oHnyPBSEtMGZwrQgudFQ+otqzWoPB7x+hxoWsw==} + /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} - hasBin: true - dependencies: - '@eslint/eslintrc': 2.0.0 - '@eslint/js': 8.35.0 - '@humanwhocodes/config-array': 0.11.8 - '@humanwhocodes/module-importer': 1.0.1 - '@nodelib/fs.walk': 1.2.8 - ajv: 6.12.6 - chalk: 4.1.2 - cross-spawn: 7.0.3 - debug: 4.3.4 - doctrine: 3.0.0 - escape-string-regexp: 4.0.0 - eslint-scope: 7.1.1 - eslint-utils: 3.0.0_eslint@8.35.0 - eslint-visitor-keys: 3.3.0 - espree: 9.4.0 - esquery: 1.5.0 - esutils: 2.0.3 - fast-deep-equal: 3.1.3 - file-entry-cache: 6.0.1 - find-up: 5.0.0 - glob-parent: 6.0.2 - globals: 13.19.0 - grapheme-splitter: 1.0.4 - ignore: 5.2.0 - import-fresh: 3.3.0 - imurmurhash: 0.1.4 - is-glob: 4.0.3 - is-path-inside: 3.0.3 - js-sdsl: 4.1.4 - 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.1 - regexpp: 3.2.0 - strip-ansi: 6.0.1 - strip-json-comments: 3.1.1 - text-table: 0.2.0 - transitivePeerDependencies: - - supports-color - dev: true - /eslint/8.40.0: - resolution: {integrity: sha512-bvR+TsP9EHL3TqNtj9sCNJVAFK3fBN8Q7g5waghxyRsPLIMwL73XSKnZFK0hk/O2ANC+iAoq6PWMQ+IfBAJIiQ==} + /eslint/8.52.0: + resolution: {integrity: sha512-zh/JHnaixqHZsolRB/w9/02akBk9EPrOs9JwcTP2ek7yL5bVvXuRariiaAjjoJ5DvuwQ1WAE/HsMz+w17YgBCg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: - '@eslint-community/eslint-utils': 4.4.0_eslint@8.40.0 + '@eslint-community/eslint-utils': 4.4.0_eslint@8.52.0 '@eslint-community/regexpp': 4.9.1 '@eslint/eslintrc': 2.1.2 - '@eslint/js': 8.40.0 - '@humanwhocodes/config-array': 0.11.11 + '@eslint/js': 8.52.0 + '@humanwhocodes/config-array': 0.11.13 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 + '@ungap/structured-clone': 1.2.0 ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 @@ -6226,13 +5658,11 @@ packages: find-up: 5.0.0 glob-parent: 6.0.2 globals: 13.23.0 - grapheme-splitter: 1.0.4 + graphemer: 1.4.0 ignore: 5.2.4 - import-fresh: 3.3.0 imurmurhash: 0.1.4 is-glob: 4.0.3 is-path-inside: 3.0.3 - js-sdsl: 4.4.2 js-yaml: 4.1.0 json-stable-stringify-without-jsonify: 1.0.1 levn: 0.4.1 @@ -6241,27 +5671,10 @@ packages: natural-compare: 1.4.0 optionator: 0.9.3 strip-ansi: 6.0.1 - strip-json-comments: 3.1.1 text-table: 0.2.0 transitivePeerDependencies: - supports-color - /espree/9.4.0: - resolution: {integrity: sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - acorn: 8.8.1 - acorn-jsx: 5.3.2_acorn@8.8.1 - eslint-visitor-keys: 3.4.1 - - /espree/9.5.2: - resolution: {integrity: sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - acorn: 8.8.1 - acorn-jsx: 5.3.2_acorn@8.8.1 - eslint-visitor-keys: 3.4.1 - /espree/9.6.1: resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -6275,13 +5688,6 @@ packages: engines: {node: '>=4'} hasBin: true - /esquery/1.4.0: - resolution: {integrity: sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==} - engines: {node: '>=0.10'} - dependencies: - estraverse: 5.3.0 - dev: false - /esquery/1.5.0: resolution: {integrity: sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==} engines: {node: '>=0.10'} @@ -6294,11 +5700,6 @@ packages: dependencies: estraverse: 5.3.0 - /estraverse/4.3.0: - resolution: {integrity: sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==} - engines: {node: '>=4.0'} - dev: false - /estraverse/5.3.0: resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} engines: {node: '>=4.0'} @@ -6452,16 +5853,6 @@ packages: engines: {node: '>=6.0.0'} dev: false - /fast-glob/3.2.12: - resolution: {integrity: sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==} - engines: {node: '>=8.6.0'} - dependencies: - '@nodelib/fs.stat': 2.0.5 - '@nodelib/fs.walk': 1.2.8 - glob-parent: 5.1.2 - merge2: 1.4.1 - micromatch: 4.0.5 - /fast-glob/3.3.1: resolution: {integrity: sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==} engines: {node: '>=8.6.0'} @@ -6595,9 +5986,6 @@ packages: requiresBuild: true optional: true - /function-bind/1.1.1: - resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} - /function-bind/1.1.2: resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} @@ -6610,10 +5998,6 @@ packages: es-abstract: 1.22.2 functions-have-names: 1.2.3 - /functional-red-black-tree/1.0.1: - resolution: {integrity: sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==} - dev: false - /functions-have-names/1.2.3: resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} @@ -6660,7 +6044,6 @@ packages: /get-tsconfig/4.5.0: resolution: {integrity: sha512-MjhiaIWCJ1sAU4pIQ5i5OfOuHHxVo1oYeNsWTON7jxYkod8pHocXeh+SSbmu5OZZZK73B6cbJ2XADzXehLyovQ==} - dev: false /git-up/7.0.0: resolution: {integrity: sha512-ONdIrbBCFusq1Oy0sC71F5azx8bVkvtZtMJAsv+a6lz5YAmbNnLD6HAB4gptHZVLPR8S2/kVN6Gab7lryq5+lQ==} @@ -6704,7 +6087,6 @@ packages: minimatch: 3.1.2 once: 1.4.0 path-is-absolute: 1.0.1 - dev: true /glob/7.1.7: resolution: {integrity: sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==} @@ -6730,19 +6112,6 @@ packages: resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} engines: {node: '>=4'} - /globals/13.17.0: - resolution: {integrity: sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==} - engines: {node: '>=8'} - dependencies: - type-fest: 0.20.2 - dev: false - - /globals/13.19.0: - resolution: {integrity: sha512-dkQ957uSRWHw7CFXLUtUHQI3g3aWApYhfNR2O6jn/907riyTYKVBmxYVROkBcY614FSSeSJh7Xm7SrUWCxvJMQ==} - engines: {node: '>=8'} - dependencies: - type-fest: 0.20.2 - /globals/13.23.0: resolution: {integrity: sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==} engines: {node: '>=8'} @@ -6757,7 +6126,6 @@ packages: /globalyzer/0.1.0: resolution: {integrity: sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q==} - dev: false /globby/11.1.0: resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} @@ -6775,15 +6143,13 @@ packages: engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dependencies: dir-glob: 3.0.1 - fast-glob: 3.2.12 - ignore: 5.2.0 + fast-glob: 3.3.1 + ignore: 5.2.4 merge2: 1.4.1 slash: 4.0.0 - dev: false /globrex/0.1.2: resolution: {integrity: sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==} - dev: false /gopd/1.0.1: resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} @@ -6795,10 +6161,13 @@ packages: /graceful-fs/4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} - dev: true /grapheme-splitter/1.0.4: resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==} + dev: true + + /graphemer/1.4.0: + resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} /gray-matter/4.0.3: resolution: {integrity: sha512-5v6yZd4JK3eMI3FqqCouswVqwugaA9r4dNZB1wwcmrD02QkV5H0y7XBQW8QwQqEaZY1pM9aqORSORhJRdNK44Q==} @@ -6850,12 +6219,6 @@ packages: dependencies: has-symbols: 1.0.3 - /has/1.0.3: - resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} - engines: {node: '>= 0.4.0'} - dependencies: - function-bind: 1.1.1 - /has/1.0.4: resolution: {integrity: sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==} engines: {node: '>= 0.4.0'} @@ -7000,10 +6363,6 @@ packages: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} dev: false - /ignore/5.2.0: - resolution: {integrity: sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==} - engines: {node: '>= 4'} - /ignore/5.2.4: resolution: {integrity: sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==} engines: {node: '>= 4'} @@ -7104,7 +6463,6 @@ packages: engines: {node: '>= 0.4'} dependencies: has-tostringtag: 1.0.0 - dev: false /is-bigint/1.0.4: resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} @@ -7140,11 +6498,6 @@ packages: ci-info: 3.9.0 dev: true - /is-core-module/2.12.0: - resolution: {integrity: sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ==} - dependencies: - has: 1.0.3 - /is-core-module/2.13.0: resolution: {integrity: sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==} dependencies: @@ -7164,7 +6517,6 @@ packages: resolution: {integrity: sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==} engines: {node: '>=8'} hasBin: true - dev: false /is-extendable/0.1.1: resolution: {integrity: sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==} @@ -7179,7 +6531,6 @@ packages: resolution: {integrity: sha512-0by5vtUJs8iFQb5TYUHHPudOR+qXYIMKtiUzvLIZITZUjknFmziyBJuLhVRc+Ds0dREFlskDNJKYIdIzu/9pfw==} dependencies: call-bind: 1.0.2 - dev: false /is-fullwidth-code-point/3.0.0: resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} @@ -7194,7 +6545,6 @@ packages: engines: {node: '>= 0.4'} dependencies: has-tostringtag: 1.0.0 - dev: false /is-glob/4.0.3: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} @@ -7344,7 +6694,6 @@ packages: engines: {node: '>=8'} dependencies: is-docker: 2.2.1 - dev: false /isarray/2.0.5: resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} @@ -7360,8 +6709,8 @@ packages: resolution: {integrity: sha512-6Lthe1hqXHBNsqvgDzGO6l03XNeu3CrG4RqQ1KM9+l5+jNGpEJfIELx1NS3SEHmJQA8np/u+E4EPRKRiu6m19A==} engines: {node: '>=8'} dependencies: - '@babel/core': 7.18.10 - '@babel/parser': 7.18.11 + '@babel/core': 7.23.2 + '@babel/parser': 7.23.0 '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.0 semver: 6.3.1 @@ -7372,8 +6721,8 @@ packages: resolution: {integrity: sha512-x58orMzEVfzPUKqlbLd1hXCnySCxKdDKa6Rjg97CwuLLRI4g3FHTdnExu1OqffVFay6zeMW+T6/DowFLndWnIw==} engines: {node: '>=10'} dependencies: - '@babel/core': 7.18.10 - '@babel/parser': 7.18.11 + '@babel/core': 7.23.2 + '@babel/parser': 7.23.0 '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.0 semver: 7.5.4 @@ -7413,11 +6762,6 @@ packages: has-symbols: 1.0.3 reflect.getprototypeof: 1.0.4 set-function-name: 2.0.1 - dev: false - - /javascript-natural-sort/0.7.1: - resolution: {integrity: sha512-nO6jcEfZWQXDhOiBtG2KvKyEptz7RVbpGP4vTD2hLBdmNQSsCiicO2Ioinv6UI4y9ukqnBpy+XZ9H6uLNgJTlw==} - dev: true /jest-changed-files/29.7.0: resolution: {integrity: sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==} @@ -7494,10 +6838,10 @@ packages: ts-node: optional: true dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.23.2 '@jest/test-sequencer': 29.7.0 '@jest/types': 29.6.3 - babel-jest: 29.7.0_@babel+core@7.18.10 + babel-jest: 29.7.0_@babel+core@7.23.2 chalk: 4.1.2 ci-info: 3.3.2 deepmerge: 4.2.2 @@ -7532,11 +6876,11 @@ packages: ts-node: optional: true dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.23.2 '@jest/test-sequencer': 29.7.0 '@jest/types': 29.6.3 '@types/node': 18.15.11 - babel-jest: 29.7.0_@babel+core@7.18.10 + babel-jest: 29.7.0_@babel+core@7.23.2 chalk: 4.1.2 ci-info: 3.3.2 deepmerge: 4.2.2 @@ -7817,15 +7161,15 @@ packages: resolution: {integrity: sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@babel/core': 7.18.10 - '@babel/generator': 7.18.12 - '@babel/plugin-syntax-jsx': 7.18.6_@babel+core@7.18.10 - '@babel/plugin-syntax-typescript': 7.18.6_@babel+core@7.18.10 - '@babel/types': 7.18.10 + '@babel/core': 7.23.2 + '@babel/generator': 7.23.0 + '@babel/plugin-syntax-jsx': 7.18.6_@babel+core@7.23.2 + '@babel/plugin-syntax-typescript': 7.18.6_@babel+core@7.23.2 + '@babel/types': 7.23.0 '@jest/expect-utils': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - babel-preset-current-node-syntax: 1.0.1_@babel+core@7.18.10 + babel-preset-current-node-syntax: 1.0.1_@babel+core@7.23.2 chalk: 4.1.2 expect: 29.7.0 graceful-fs: 4.2.10 @@ -7927,18 +7271,15 @@ packages: - supports-color - ts-node + /jiti/1.20.0: + resolution: {integrity: sha512-3TV69ZbrvV6U5DfQimop50jE9Dl6J8O1ja1dvBbMba/sZ3YBEQqJ2VZRoQPVnhlzjNtU1vaXRZVrVjU4qtm8yA==} + hasBin: true + /joycon/3.1.1: resolution: {integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==} engines: {node: '>=10'} dev: true - /js-sdsl/4.1.4: - resolution: {integrity: sha512-Y2/yD55y5jteOAmY50JbUZYwk3CP3wnLPEZnlR1w9oKhITrBEtAxwuWKebFf8hMrPMgbYwFoWK/lH2sBkErELw==} - dev: true - - /js-sdsl/4.4.2: - resolution: {integrity: sha512-dwXFwByc/ajSV6m5bcKAPwe4yDDF6D614pxmIi5odytzxRlwqF6nwoiCek80Ixc7Cvma5awClxrzFtxCQvcM8w==} - /js-tokens/4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -8013,18 +7354,11 @@ packages: /json-stable-stringify-without-jsonify/1.0.1: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} - /json5/1.0.1: - resolution: {integrity: sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==} - hasBin: true - dependencies: - minimist: 1.2.6 - /json5/1.0.2: resolution: {integrity: sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==} hasBin: true dependencies: minimist: 1.2.6 - dev: false /json5/2.2.3: resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} @@ -8116,6 +7450,11 @@ packages: /lilconfig/2.0.6: resolution: {integrity: sha512-9JROoBW7pobfsx+Sq2JsASvCo6Pfo6WWoUW79HuB1BCoBXD4PLWJPqDF6fNj67pqBYTbAHkE57M1kS/+L1neOg==} engines: {node: '>=10'} + dev: true + + /lilconfig/2.1.0: + resolution: {integrity: sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==} + engines: {node: '>=10'} /lines-and-columns/1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} @@ -8147,18 +7486,10 @@ packages: dependencies: p-locate: 5.0.0 - /lodash.clone/4.5.0: - resolution: {integrity: sha512-GhrVeweiTD6uTmmn5hV/lzgCQhccwReIVRLHp7LT4SopOjqEZ5BbX8b5WWEtAKasjmy8hR7ZPwsYlxRCku5odg==} - dev: true - /lodash.get/4.4.2: resolution: {integrity: sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==} dev: false - /lodash.isequal/4.5.0: - resolution: {integrity: sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==} - dev: true - /lodash.memoize/4.1.2: resolution: {integrity: sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==} @@ -8193,6 +7524,11 @@ packages: pseudomap: 1.0.2 yallist: 2.1.2 + /lru-cache/5.1.1: + resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} + dependencies: + yallist: 3.1.1 + /lru-cache/6.0.0: resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} engines: {node: '>=10'} @@ -8900,21 +8236,21 @@ packages: any-promise: 1.3.0 object-assign: 4.1.1 thenify-all: 1.6.0 - dev: true /nanoid/3.3.4: resolution: {integrity: sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true + /nanoid/3.3.6: + resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + /napi-build-utils/1.0.2: resolution: {integrity: sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==} dev: false - /natural-compare-lite/1.4.0: - resolution: {integrity: sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==} - dev: false - /natural-compare/1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} @@ -8954,7 +8290,7 @@ packages: react: '*' react-dom: '*' dependencies: - next: 13.2.3_twoewwu6sg7cdf3ao6njtbftne + next: 13.2.3_toszgfznx75tcganlj4ru4g5oe react: 18.2.0 react-dom: 18.2.0_react@18.2.0 dev: false @@ -9009,7 +8345,7 @@ packages: - babel-plugin-macros dev: false - /next/13.2.3_twoewwu6sg7cdf3ao6njtbftne: + /next/13.2.3_toszgfznx75tcganlj4ru4g5oe: resolution: {integrity: sha512-nKFJC6upCPN7DWRx4+0S/1PIOT7vNlCT157w9AzbXEgKy6zkiPKEt5YyRUsRZkmpEqBVrGgOqNfwecTociyg+w==} engines: {node: '>=14.6.0'} hasBin: true @@ -9036,7 +8372,7 @@ packages: postcss: 8.4.14 react: 18.2.0 react-dom: 18.2.0_react@18.2.0 - styled-jsx: 5.1.1_byq7oc57qftat37gkdlgphtura + styled-jsx: 5.1.1_3ty4uhgchcxcux4so2j72i2qn4 optionalDependencies: '@next/swc-android-arm-eabi': 13.2.3 '@next/swc-android-arm64': 13.2.3 @@ -9136,6 +8472,10 @@ packages: /node-releases/2.0.10: resolution: {integrity: sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==} + dev: true + + /node-releases/2.0.13: + resolution: {integrity: sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==} /normalize-package-data/2.5.0: resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} @@ -9226,7 +8566,6 @@ packages: define-properties: 1.2.1 es-abstract: 1.22.2 get-intrinsic: 1.2.1 - dev: false /object.hasown/1.1.2: resolution: {integrity: sha512-B5UIT3J1W+WuWIU55h0mjlwaqxiE5vYENJXIXZ4VFe05pNYrkKuK0U/6aFcb0pKywYJh7IhfoqUfKVmrJJHZHw==} @@ -9260,7 +8599,6 @@ packages: define-lazy-prop: 2.0.0 is-docker: 2.2.1 is-wsl: 2.2.0 - dev: false /optionator/0.8.3: resolution: {integrity: sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==} @@ -9274,17 +8612,6 @@ packages: word-wrap: 1.2.3 dev: true - /optionator/0.9.1: - resolution: {integrity: sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==} - engines: {node: '>= 0.8.0'} - dependencies: - deep-is: 0.1.4 - fast-levenshtein: 2.0.6 - levn: 0.4.1 - prelude-ls: 1.2.1 - type-check: 0.4.0 - word-wrap: 1.2.3 - /optionator/0.9.3: resolution: {integrity: sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==} engines: {node: '>= 0.8.0'} @@ -9462,29 +8789,29 @@ packages: dependencies: find-up: 4.1.0 - /postcss-import/14.1.0_postcss@8.4.21: - resolution: {integrity: sha512-flwI+Vgm4SElObFVPpTIT7SU7R3qk2L7PyduMcokiaVKuWv9d/U+Gm/QAd8NDLuykTWTkcrjOeD2Pp1rMeBTGw==} - engines: {node: '>=10.0.0'} + /postcss-import/15.1.0_postcss@8.4.31: + resolution: {integrity: sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==} + engines: {node: '>=14.0.0'} peerDependencies: postcss: ^8.0.0 dependencies: - postcss: 8.4.21 + postcss: 8.4.31 postcss-value-parser: 4.2.0 read-cache: 1.0.0 - resolve: 1.22.6 + resolve: 1.22.8 - /postcss-js/4.0.1_postcss@8.4.21: + /postcss-js/4.0.1_postcss@8.4.31: resolution: {integrity: sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==} engines: {node: ^12 || ^14 || >= 16} peerDependencies: postcss: ^8.4.21 dependencies: camelcase-css: 2.0.1 - postcss: 8.4.21 + postcss: 8.4.31 - /postcss-load-config/3.1.4_postcss@8.4.21: - resolution: {integrity: sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==} - engines: {node: '>= 10'} + /postcss-load-config/4.0.1: + resolution: {integrity: sha512-vEJIc8RdiBRu3oRAI0ymerOn+7rPuMvRXslTvZUKZonDHFIczxztIyJ1urxM1x9JXEikvpWWTUUqal5j/8QgvA==} + engines: {node: '>= 14'} peerDependencies: postcss: '>=8.0.9' ts-node: '>=9.0.0' @@ -9495,10 +8822,10 @@ packages: optional: true dependencies: lilconfig: 2.0.6 - postcss: 8.4.21 - yaml: 1.10.2 + yaml: 2.3.1 + dev: true - /postcss-load-config/4.0.1: + /postcss-load-config/4.0.1_postcss@8.4.31: resolution: {integrity: sha512-vEJIc8RdiBRu3oRAI0ymerOn+7rPuMvRXslTvZUKZonDHFIczxztIyJ1urxM1x9JXEikvpWWTUUqal5j/8QgvA==} engines: {node: '>= 14'} peerDependencies: @@ -9510,17 +8837,17 @@ packages: ts-node: optional: true dependencies: - lilconfig: 2.0.6 + lilconfig: 2.1.0 + postcss: 8.4.31 yaml: 2.3.1 - dev: true - /postcss-nested/6.0.0_postcss@8.4.21: - resolution: {integrity: sha512-0DkamqrPcmkBDsLn+vQDIrtkSbNkv5AD/M322ySo9kqFkCIYklym2xEmWkwo+Y3/qZo34tzEPNUw4y7yMCdv5w==} + /postcss-nested/6.0.1_postcss@8.4.31: + resolution: {integrity: sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==} engines: {node: '>=12.0'} peerDependencies: postcss: ^8.2.14 dependencies: - postcss: 8.4.21 + postcss: 8.4.31 postcss-selector-parser: 6.0.11 /postcss-selector-parser/6.0.11: @@ -9549,6 +8876,15 @@ packages: nanoid: 3.3.4 picocolors: 1.0.0 source-map-js: 1.0.2 + dev: true + + /postcss/8.4.31: + resolution: {integrity: sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==} + engines: {node: ^10 || ^12 || >=14} + dependencies: + nanoid: 3.3.6 + picocolors: 1.0.0 + source-map-js: 1.0.2 /prebuild-install/7.1.1: resolution: {integrity: sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw==} @@ -9599,6 +8935,12 @@ packages: resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} engines: {node: '>=10.13.0'} hasBin: true + dev: true + + /prettier/3.0.3: + resolution: {integrity: sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==} + engines: {node: '>=14'} + hasBin: true /pretty-format/27.5.1: resolution: {integrity: sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==} @@ -9686,10 +9028,6 @@ packages: engines: {node: '>=8'} dev: true - /quick-lru/5.1.1: - resolution: {integrity: sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==} - engines: {node: '>=10'} - /rc/1.2.8: resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} hasBin: true @@ -9947,14 +9285,12 @@ packages: get-intrinsic: 1.2.1 globalthis: 1.0.3 which-builtin-type: 1.1.3 - dev: false /regenerator-runtime/0.13.11: resolution: {integrity: sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==} /regenerator-runtime/0.14.0: resolution: {integrity: sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==} - dev: true /regexp.prototype.flags/1.5.1: resolution: {integrity: sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==} @@ -9967,6 +9303,7 @@ packages: /regexpp/3.2.0: resolution: {integrity: sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==} engines: {node: '>=8'} + dev: false /rehype-katex/6.0.2: resolution: {integrity: sha512-C4gDAlS1+l0hJqctyiU64f9CvT00S03qV1T6HiMzbSuLBgWUtcqydWHY9OpKrm0SpkK16FNd62CDKyWLwV2ppg==} @@ -10092,14 +9429,6 @@ packages: resolution: {integrity: sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==} engines: {node: '>=10'} - /resolve/1.22.1: - resolution: {integrity: sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==} - hasBin: true - dependencies: - is-core-module: 2.13.0 - path-parse: 1.0.7 - supports-preserve-symlinks-flag: 1.0.0 - /resolve/1.22.6: resolution: {integrity: sha512-njhxM7mV12JfufShqGy3Rz8j11RPdLy4xi15UurGJeoHLfJpVXKdh3ueuOqbYUcDZnffr6X739JBo5LzyahEsw==} hasBin: true @@ -10115,7 +9444,6 @@ packages: is-core-module: 2.13.0 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 - dev: true /resolve/2.0.0-next.4: resolution: {integrity: sha512-iMDbmAWtfU+MHpxt/I5iWI7cY6YVEZUQ3MBgPQ++XD1PELuJHIl82xBmObyP2KyQmkNB2dsqF7seoQQiAn5yDQ==} @@ -10213,10 +9541,6 @@ packages: hasBin: true dev: true - /semver/6.3.0: - resolution: {integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==} - hasBin: true - /semver/6.3.1: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true @@ -10329,7 +9653,6 @@ packages: /slash/4.0.0: resolution: {integrity: sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==} engines: {node: '>=12'} - dev: false /smartwrap/2.0.2: resolution: {integrity: sha512-vCsKNQxb7PnCNd2wY1WClWifAc2lwqsG8OaswpJkVJsvMGcnEntdTCDajZCkk93Ay1U3t/9puJmb525Rg5MZBA==} @@ -10543,7 +9866,7 @@ packages: inline-style-parser: 0.1.1 dev: false - /styled-jsx/5.1.1_byq7oc57qftat37gkdlgphtura: + /styled-jsx/5.1.1_3ty4uhgchcxcux4so2j72i2qn4: resolution: {integrity: sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw==} engines: {node: '>= 12.0.0'} peerDependencies: @@ -10556,7 +9879,7 @@ packages: babel-plugin-macros: optional: true dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.23.2 client-only: 0.0.1 react: 18.2.0 dev: false @@ -10591,6 +9914,19 @@ packages: ts-interface-checker: 0.1.13 dev: true + /sucrase/3.34.0: + resolution: {integrity: sha512-70/LQEZ07TEcxiU2dz51FKaE6hCTWC6vr7FOk3Gr0U60C3shtAN+H+BFr9XlYe5xqf3RA8nrc+VIwzCfnxuXJw==} + engines: {node: '>=8'} + hasBin: true + dependencies: + '@jridgewell/gen-mapping': 0.3.2 + commander: 4.1.1 + glob: 7.1.6 + lines-and-columns: 1.2.4 + mz: 2.7.0 + pirates: 4.0.5 + ts-interface-checker: 0.1.13 + /supports-color/4.5.0: resolution: {integrity: sha512-ycQR/UbvI9xIlEdQT1TQqwoXtEldExbCEAJgRo5YXlmSKjv6ThHnP9/vwGa1gr19Gfw+LkFd7KqYMhzrRC5JYw==} engines: {node: '>=4'} @@ -10648,57 +9984,52 @@ packages: dependencies: '@pkgr/utils': 2.3.1 tslib: 2.5.0 - dev: false /tailwind-merge/1.10.0: resolution: {integrity: sha512-WFnDXSS4kFTZwjKg5/oZSGzBRU/l+qcbv5NVTzLUQvJ9yovDAP05h0F2+ZFW0Lw9EcgRoc2AfURUdZvnEFrXKg==} dev: false - /tailwindcss-animate/1.0.5_tailwindcss@3.2.7: + /tailwindcss-animate/1.0.5_tailwindcss@3.3.3: resolution: {integrity: sha512-UU3qrOJ4lFQABY+MVADmBm+0KW3xZyhMdRvejwtXqYOL7YjHYxmuREFAZdmVG5LPe5E9CAst846SLC4j5I3dcw==} peerDependencies: tailwindcss: '>=3.0.0 || insiders' dependencies: - tailwindcss: 3.2.7_postcss@8.4.21 + tailwindcss: 3.3.3 dev: false - /tailwindcss/3.2.7_postcss@8.4.21: - resolution: {integrity: sha512-B6DLqJzc21x7wntlH/GsZwEXTBttVSl1FtCzC8WP4oBc/NKef7kaax5jeihkkCEWc831/5NDJ9gRNDK6NEioQQ==} - engines: {node: '>=12.13.0'} + /tailwindcss/3.3.3: + resolution: {integrity: sha512-A0KgSkef7eE4Mf+nKJ83i75TMyq8HqY3qmFIJSWy8bNt0v1lG7jUcpGpoTFxAwYcWOphcTBLPPJg+bDfhDf52w==} + engines: {node: '>=14.0.0'} hasBin: true - peerDependencies: - postcss: ^8.0.9 dependencies: + '@alloc/quick-lru': 5.2.0 arg: 5.0.2 chokidar: 3.5.3 - color-name: 1.1.4 - detective: 5.2.1 didyoumean: 1.2.2 dlv: 1.1.3 - fast-glob: 3.2.12 + fast-glob: 3.3.1 glob-parent: 6.0.2 is-glob: 4.0.3 - lilconfig: 2.0.6 + jiti: 1.20.0 + lilconfig: 2.1.0 micromatch: 4.0.5 normalize-path: 3.0.0 object-hash: 3.0.0 picocolors: 1.0.0 - postcss: 8.4.21 - postcss-import: 14.1.0_postcss@8.4.21 - postcss-js: 4.0.1_postcss@8.4.21 - postcss-load-config: 3.1.4_postcss@8.4.21 - postcss-nested: 6.0.0_postcss@8.4.21 + postcss: 8.4.31 + postcss-import: 15.1.0_postcss@8.4.31 + postcss-js: 4.0.1_postcss@8.4.31 + postcss-load-config: 4.0.1_postcss@8.4.31 + postcss-nested: 6.0.1_postcss@8.4.31 postcss-selector-parser: 6.0.11 - postcss-value-parser: 4.2.0 - quick-lru: 5.1.1 - resolve: 1.22.1 + resolve: 1.22.8 + sucrase: 3.34.0 transitivePeerDependencies: - ts-node /tapable/2.2.1: resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==} engines: {node: '>=6'} - dev: false /tar-fs/2.1.1: resolution: {integrity: sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==} @@ -10741,20 +10072,17 @@ packages: engines: {node: '>=0.8'} dependencies: thenify: 3.3.1 - dev: true /thenify/3.3.1: resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} dependencies: any-promise: 1.3.0 - dev: true /tiny-glob/0.2.9: resolution: {integrity: sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==} dependencies: globalyzer: 0.1.0 globrex: 0.1.2 - dev: false /title/3.5.3: resolution: {integrity: sha512-20JyowYglSEeCvZv3EZ0nZ046vLarO37prvV0mbtQV7C8DJPGgN967r8SJkqd3XK3K3lD3/Iyfp3avjfil8Q2Q==} @@ -10835,11 +10163,19 @@ packages: resolution: {integrity: sha512-AqTiAOLcj85xS7vQ8QkAV41hPDIJ71XJB4RCUrzo/1GM2CQwhkJGaf9Hgr7BOugMRpgGUrqRg/DrBDl4H40+8g==} dev: false + /ts-api-utils/1.0.3_typescript@5.2.2: + resolution: {integrity: sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==} + engines: {node: '>=16.13.0'} + peerDependencies: + typescript: '>=4.2.0' + dependencies: + typescript: 5.2.2 + dev: false + /ts-interface-checker/0.1.13: resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} - dev: true - /ts-jest/29.1.0_picekqf7nwhi4u7lel7if5xk4m: + /ts-jest/29.1.0_6kltjrh7rxzlk7nrl5xwvwvwwy: resolution: {integrity: sha512-ZhNr7Z4PcYa+JjMl62ir+zPiNJfXJN6E8hSLnaUKhOgqcn8vb3e537cpkd0FuAfRK3sR1LSqM1MOhliXNgOFPA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -10860,9 +10196,8 @@ packages: esbuild: optional: true dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.23.2 bs-logger: 0.2.6 - esbuild: 0.18.11 fast-json-stable-stringify: 2.1.0 jest: 29.7.0 jest-util: 29.5.0 @@ -10872,9 +10207,9 @@ packages: semver: 7.3.8 typescript: 5.2.2 yargs-parser: 21.1.1 - dev: true + dev: false - /ts-jest/29.1.0_u7qq36h45i7cku4q54vtugnyvm: + /ts-jest/29.1.0_n6fadwnxks6spzgg7rbfqefyku: resolution: {integrity: sha512-ZhNr7Z4PcYa+JjMl62ir+zPiNJfXJN6E8hSLnaUKhOgqcn8vb3e537cpkd0FuAfRK3sR1LSqM1MOhliXNgOFPA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -10895,8 +10230,9 @@ packages: esbuild: optional: true dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.23.2 bs-logger: 0.2.6 + esbuild: 0.18.11 fast-json-stable-stringify: 2.1.0 jest: 29.7.0 jest-util: 29.5.0 @@ -10906,15 +10242,7 @@ packages: semver: 7.3.8 typescript: 5.2.2 yargs-parser: 21.1.1 - dev: false - - /tsconfig-paths/3.14.1: - resolution: {integrity: sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ==} - dependencies: - '@types/json5': 0.0.29 - json5: 1.0.1 - minimist: 1.2.6 - strip-bom: 3.0.0 + dev: true /tsconfig-paths/3.14.2: resolution: {integrity: sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==} @@ -10923,14 +10251,12 @@ packages: json5: 1.0.2 minimist: 1.2.6 strip-bom: 3.0.0 - dev: false /tslib/1.14.1: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} /tslib/2.5.0: resolution: {integrity: sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==} - dev: false /tsup/7.2.0_typescript@5.2.2: resolution: {integrity: sha512-vDHlczXbgUvY3rWvqFEbSqmC1L7woozbzngMqTtL2PGBODTtWlRwGDDawhvWzr5c1QjKe4OAKqJGfE1xeXUvtQ==} @@ -11271,6 +10597,17 @@ packages: browserslist: 4.21.5 escalade: 3.1.1 picocolors: 1.0.0 + dev: true + + /update-browserslist-db/1.0.13_browserslist@4.22.1: + resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==} + hasBin: true + peerDependencies: + browserslist: '>= 4.21.0' + dependencies: + browserslist: 4.22.1 + escalade: 3.1.1 + picocolors: 1.0.0 /uri-js/4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} @@ -11566,7 +10903,6 @@ packages: which-boxed-primitive: 1.0.2 which-collection: 1.0.1 which-typed-array: 1.1.11 - dev: false /which-collection/1.0.1: resolution: {integrity: sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==} @@ -11614,6 +10950,7 @@ packages: /word-wrap/1.2.3: resolution: {integrity: sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==} engines: {node: '>=0.10.0'} + dev: true /wrap-ansi/6.2.0: resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} @@ -11670,10 +11007,6 @@ packages: '@babel/runtime-corejs3': 7.18.9 dev: false - /xtend/4.0.2: - resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} - engines: {node: '>=0.4'} - /y18n/4.0.3: resolution: {integrity: sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==} dev: true @@ -11689,17 +11022,15 @@ packages: /yallist/2.1.2: resolution: {integrity: sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==} + /yallist/3.1.1: + resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} + /yallist/4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} - /yaml/1.10.2: - resolution: {integrity: sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==} - engines: {node: '>= 6'} - /yaml/2.3.1: resolution: {integrity: sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ==} engines: {node: '>= 14'} - dev: true /yargs-parser/18.1.3: resolution: {integrity: sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==}