supabase-js icon indicating copy to clipboard operation
supabase-js copied to clipboard

Version v2.39.2 and above break types

Open sg3510 opened this issue 2 years ago • 6 comments

Likely because of bumping postgrest-js with v2.39.2 but when using strict in tsconfig and any code like this:

const { error } = await supabase
      .from('Messages')
      .update({ deletedAt: moment().toISOString()})

gives me Argument of type '{ deletedAt: string; }' is not assignable to parameter of type 'never'.

I have confirmed I have the latest generated types.

Bug report

-->

  • [x] I confirm this is a bug with Supabase, not with my own application.
  • [X] I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

See above

To Reproduce

Upgrade to v2.39.2 or above

Expected behavior

TS linter shouldn't complain

System information

  • OS: [e.g. macOS, Windows]
  • Browser (if applies) [e.g. chrome, safari]
  • Version of supabase-js: [e.g. 2.39.2]

Additional context

Add any other context about the problem here.

sg3510 avatar Feb 13 '24 17:02 sg3510

Faced this issue in version v2.39.4 but not in v2.39.3.

With git bisect, I tracked down the issue to this commit : https://github.com/supabase/supabase-js/commit/a5a70dbe21a2e0ec6d8ec117caa35c605f69eb41

It seems some types are not infered properly anymore.

pierre-charpentier avatar Feb 13 '24 18:02 pierre-charpentier

Having the same issue

heloineto avatar Feb 13 '24 20:02 heloineto

Faced this issue in version v2.39.4 but not in v2.39.3.

With git bisect, I tracked down the issue to this commit : a5a70db

It seems some types are not infered properly anymore.

Same here - I reverted to 2.39.3 and all good.

Gbuomprisco avatar Feb 14 '24 03:02 Gbuomprisco

Still an issue, any updates?

kstolk avatar Apr 19 '24 17:04 kstolk

still an issue

rnnc avatar Jul 18 '24 17:07 rnnc

still an issue

theshadowagent avatar Aug 15 '24 17:08 theshadowagent