From 45a1a9a3885fd37166352613be2b21620eee314c Mon Sep 17 00:00:00 2001 From: avallete Date: Mon, 28 Oct 2024 13:52:54 +0100 Subject: [PATCH 1/2] fix: types tests for rc.1 --- test/index.test-d.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/index.test-d.ts b/test/index.test-d.ts index 13a8df1d9..4be090fa4 100644 --- a/test/index.test-d.ts +++ b/test/index.test-d.ts @@ -84,7 +84,7 @@ const supabase = createClient(URL, KEY) if (error) { throw new Error(error.message) } - expectType(message.user) + expectType(message.user) } // one-to-many relationship @@ -100,7 +100,9 @@ const supabase = createClient(URL, KEY) { type SelectQueryError = { error: true } & Message const res = await supabase.from('users').select('username, dat') - expectType[]>>(res) + expectType< + PostgrestSingleResponse[]> + >(res) } // one-to-one relationship From b84aec8a78b660b0f06c8b8efad94c08bdbb8766 Mon Sep 17 00:00:00 2001 From: avallete Date: Mon, 28 Oct 2024 13:54:21 +0100 Subject: [PATCH 2/2] fix: test types with rc.3 --- package-lock.json | 9 +++++---- package.json | 2 +- test/index.test-d.ts | 5 +---- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index eaa7e18eb..60bb046ad 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "@supabase/auth-js": "2.65.1", "@supabase/functions-js": "2.4.3", "@supabase/node-fetch": "2.6.15", - "@supabase/postgrest-js": "1.17.0-rc.1", + "@supabase/postgrest-js": "1.17.0-rc.3", "@supabase/realtime-js": "2.10.7", "@supabase/storage-js": "2.7.1" }, @@ -1196,9 +1196,10 @@ } }, "node_modules/@supabase/postgrest-js": { - "version": "1.17.0-rc.1", - "resolved": "https://registry.npmjs.org/@supabase/postgrest-js/-/postgrest-js-1.17.0-rc.1.tgz", - "integrity": "sha512-ssxkV6OrRApXjWYw4IqC5VLwploFPx7exBO4+YD2QoGddMnI9jKIB0r2oMAxFWw8sskQD1tVCLCKVf1g59Su+w==", + "version": "1.17.0-rc.3", + "resolved": "https://registry.npmjs.org/@supabase/postgrest-js/-/postgrest-js-1.17.0-rc.3.tgz", + "integrity": "sha512-EAj7ZfFbK3eAIzRF9UoCDsmTFPEmBXE5j83v4R7GtZm4/yEYTnYLnztwLLt908vxivG0hQYbs05yrrH2AZkTPQ==", + "license": "MIT", "dependencies": { "@supabase/node-fetch": "^2.6.14" } diff --git a/package.json b/package.json index 603417d5d..f22ac5c75 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "@supabase/auth-js": "2.65.1", "@supabase/functions-js": "2.4.3", "@supabase/node-fetch": "2.6.15", - "@supabase/postgrest-js": "1.17.0-rc.1", + "@supabase/postgrest-js": "1.17.0-rc.3", "@supabase/realtime-js": "2.10.7", "@supabase/storage-js": "2.7.1" }, diff --git a/test/index.test-d.ts b/test/index.test-d.ts index 4be090fa4..c70230f7c 100644 --- a/test/index.test-d.ts +++ b/test/index.test-d.ts @@ -98,11 +98,8 @@ const supabase = createClient(URL, KEY) // referencing missing column { - type SelectQueryError = { error: true } & Message const res = await supabase.from('users').select('username, dat') - expectType< - PostgrestSingleResponse[]> - >(res) + expectType>(res) } // one-to-one relationship