From 52024dbd58ec2577030275b53fdaf36fc9bec7f6 Mon Sep 17 00:00:00 2001 From: Bobbie Soedirgo Date: Fri, 26 May 2023 16:52:11 +0800 Subject: [PATCH 1/4] chore: remove gitkeep file Not necessary since the dir has other files in it --- docs/v1/.gitkeep | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 docs/v1/.gitkeep diff --git a/docs/v1/.gitkeep b/docs/v1/.gitkeep deleted file mode 100644 index e69de29b..00000000 From 2ddd9fccaf6ffdb4a2d16cc07951fa4b3edd1048 Mon Sep 17 00:00:00 2001 From: Bobbie Soedirgo Date: Fri, 26 May 2023 16:52:40 +0800 Subject: [PATCH 2/4] chore: update docstrings --- src/SupabaseClient.ts | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/src/SupabaseClient.ts b/src/SupabaseClient.ts index 768e4b3a..efee918f 100644 --- a/src/SupabaseClient.ts +++ b/src/SupabaseClient.ts @@ -149,11 +149,6 @@ export default class SupabaseClient< return new SupabaseStorageClient(this.storageUrl, this.headers, this.fetch) } - /** - * Perform a table operation. - * - * @param table The table name to operate on. - */ from< TableName extends string & keyof Schema['Tables'], Table extends Schema['Tables'][TableName] @@ -162,6 +157,11 @@ export default class SupabaseClient< relation: ViewName ): PostgrestQueryBuilder from(relation: string): PostgrestQueryBuilder + /** + * Perform a query on a table or a view. + * + * @param relation - The table or view name to query + */ from(relation: string): PostgrestQueryBuilder { return this.rest.from(relation) } @@ -169,11 +169,23 @@ export default class SupabaseClient< /** * Perform a function call. * - * @param fn The function name to call. - * @param args The parameters to pass to the function call. - * @param options.head When set to true, no data will be returned. - * @param options.count Count algorithm to use to count rows in a table. + * @param fn - The function name to call + * @param args - The arguments to pass to the function call + * @param options - Named parameters + * @param options.head - When set to `true`, `data` will not be returned. + * Useful if you only need the count. + * @param options.count - Count algorithm to use to count rows returned by the + * function. Only applicable for [set-returning + * functions](https://www.postgresql.org/docs/current/functions-srf.html). + * + * `"exact"`: Exact but slow count algorithm. Performs a `COUNT(*)` under the + * hood. + * + * `"planned"`: Approximated but fast count algorithm. Uses the Postgres + * statistics under the hood. * + * `"estimated"`: Uses exact count for low numbers and planned count for high + * numbers. */ rpc< FunctionName extends string & keyof Schema['Functions'], From e7a0515afa867c8166967c7dd0c765d60d856801 Mon Sep 17 00:00:00 2001 From: Bobbie Soedirgo Date: Fri, 26 May 2023 16:53:03 +0800 Subject: [PATCH 3/4] chore: don't delete docs/v1 on clean --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 52383080..eb01556a 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "sideEffects": false, "repository": "supabase/supabase-js", "scripts": { - "clean": "rimraf dist docs", + "clean": "rimraf dist docs/v2", "format": "prettier --write \"{src,test}/**/*.ts\"", "build": "run-s clean format build:*", "build:main": "tsc -p tsconfig.json", From 3c552377ff1687a70b7d217d46396a4625e7c32b Mon Sep 17 00:00:00 2001 From: Bobbie Soedirgo Date: Fri, 26 May 2023 16:58:16 +0800 Subject: [PATCH 4/4] feat(deps): bump postgrest-js to 1.7.0 --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index d737e387..534c5000 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@supabase/functions-js": "^2.1.0", "@supabase/gotrue-js": "^2.26.0", - "@supabase/postgrest-js": "^1.1.1", + "@supabase/postgrest-js": "^1.7.0", "@supabase/realtime-js": "^2.7.2", "@supabase/storage-js": "^2.5.1", "cross-fetch": "^3.1.5" @@ -1069,9 +1069,9 @@ } }, "node_modules/@supabase/postgrest-js": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/@supabase/postgrest-js/-/postgrest-js-1.6.1.tgz", - "integrity": "sha512-WDBUPOCOwcZonaCwEodwdA8hwWYOiXroDF9vWGxZxKAnuSVE2Ieci/kvhR4EsWvgGST2h90LRowgO+msXe8+fA==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@supabase/postgrest-js/-/postgrest-js-1.7.0.tgz", + "integrity": "sha512-wLADHZ5jm7LljF4GigK0H2vc1wGupBY2hGYfb4fVo0UuyMftmA6tOYy+ZpMH/vPq01CUFwXGwvIke6kyqh/QDg==", "dependencies": { "cross-fetch": "^3.1.5" } diff --git a/package.json b/package.json index eb01556a..476b60e1 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "dependencies": { "@supabase/functions-js": "^2.1.0", "@supabase/gotrue-js": "^2.26.0", - "@supabase/postgrest-js": "^1.1.1", + "@supabase/postgrest-js": "^1.7.0", "@supabase/realtime-js": "^2.7.2", "@supabase/storage-js": "^2.5.1", "cross-fetch": "^3.1.5"