supabase-js

An isomorphic Javascript client for Supabase. Query your Supabase database, subscribe to realtime events, upload and download files, browse typescript examples, invoke postgres functions via rpc, invoke supabase edge functions, query pgvector.

MIT License

Downloads
1.9M
Stars
3.2K
Committers
68

Bot releases are hidden (Show)

supabase-js - v1.1.4

Published by kiwicopple almost 4 years ago

1.1.4 (2021-01-06)

Bug Fixes

  • updates gotrue to the latest version (a5dc5d2), closes #113
supabase-js - v1.1.3

Published by kiwicopple almost 4 years ago

1.1.3 (2021-01-03)

Bug Fixes

  • trigger release for postgrest-js and auth user (f625b1c)
supabase-js - v1.1.2

Published by kiwicopple almost 4 years ago

1.1.2 (2020-12-11)

Bug Fixes

  • forces the latest version of gotrue for the auth listener changes (473dc6a)
supabase-js - v1.1.1

Published by kiwicopple almost 4 years ago

1.1.1 (2020-12-10)

Bug Fixes

  • bump gotrue to add types exports (dbf561c)
supabase-js - v1.1.0

Published by kiwicopple almost 4 years ago

1.1.0 (2020-12-10)

Features

  • add type exports for client side use (f2ce337)
supabase-js - v1.0.7

Published by kiwicopple almost 4 years ago

1.0.7 (2020-11-27)

Bug Fixes

  • Bumps gotrue-js so that it works with React Native (f6965a5)
supabase-js - v1.0.6

Published by kiwicopple almost 4 years ago

1.0.6 (2020-11-26)

Bug Fixes

  • updates gotrue to include type definitions (a0faa38)
supabase-js - v1.0.5

Published by kiwicopple almost 4 years ago

1.0.5 (2020-11-17)

Bug Fixes

  • adds an optional storage provider, for use with React Native (cf0d86e)
  • Adds local storage options for Auth. (7f5f5cf)
supabase-js - v1.0.4

Published by kiwicopple almost 4 years ago

1.0.4 (2020-11-16)

Bug Fixes

  • Ordering by data in JSON columns. (893f046)
supabase-js - v1.0.3

Published by kiwicopple almost 4 years ago

1.0.3 (2020-11-12)

Bug Fixes

supabase-js - v1.0.2

Published by kiwicopple almost 4 years ago

1.0.2 (2020-11-03)

Bug Fixes

  • Fixes link in readme for NPM (04f9cd3)
supabase-js - v1.0.1

Published by kiwicopple almost 4 years ago

1.0.1 (2020-11-02)

  • Upgraded the supabase.auth to gotrue-js - supports Oath logins & more
  • We always return errors, not throwing errors.
  • We only generate one socket connection per supabase client.
  • Native typescript
  • Fixes #32 Major DX change: response and error handling
  • Fixes #49 When no supabaseKey is passed in it throws an error
  • Fixes #31 chore: set up semantic releases
  • Fixes #15 supabase.auth.logout() throws "Invalid user" error.
  • Fixes #20 Auth: Change DX of user management
  • Fixes #30 Supabase auth interface missing informiation
  • Fixes https://github.com/supabase/supabase/issues/147 https://github.com/supabase/supabase/issues/147
  • Partial fix for https://github.com/supabase/realtime-js/issues/53 - if there is no token provided. The error needs to be caught at a socket level.

Breaking changes

body is now data

Previously:

const { body } = supabase.from('todos').select('*')

Now:

const { data } = supabase.from('todos').select('*')

Errors are returned not thrown

Previously:

try {
  const { body } = supabase.from('todos').select('*')
} catch (error) {
  console.log(error)
}

Now:

const { data, error } = supabase.from('todos').select('*')
if (error) console.log(error)

ova() and ovr() are now just ov()

Previously:

try {
  const { body } = supabase.from('todos').select('*').ovr('population_range_millions', [150, 250])
} catch (error) {
  console.log(error)
}

Now:

const { data, error } = supabase
  .from('todos')
  .select('*')
  .ov('population_range_millions', [150, 250])
if (error) console.log(error)

offset() is removed

You can now use range() instead of limit() + offset()

ova() and ovr() are now just ov()

Previously:

let countries = await supabase.from('cities').select('name').offset(10).limit(10)

Now:

let countries = await supabase.from('cities').select('name').range(10, 20)

signup() is now signUp() and email / password is passed as an object

Previously:

const {
  body: { user },
} = await supabase.auth.signup('[email protected]', 'password')

Now:

const { user, error } = await supabase.auth.signUp({
  email: '[email protected]',
  password: 'password',
})

login() is now signIn() and email / password is passed as an object

Previously:

const {
  body: { user },
} = await supabase.auth.signup('[email protected]', 'password')

Now:

const { user, error } = await supabase.auth.signIn({
  email: '[email protected]',
  password: 'password',
})

logout() is now signOut()

Previously:

await supabase.auth.logout()

Now:

await supabase.auth.signOut()
supabase-js - v0.36.5

Published by awalias about 4 years ago

Fixes:

  • #22
supabase-js - v0.36.4

Published by awalias about 4 years ago

  • Typescript support
  • UMD support
supabase-js - v0.35.0

Published by awalias about 4 years ago

Improvements

supabase.auth namespace added which includes:

  • supabase.auth.signup(email, password)
  • supabase.auth.login(email, password)
  • supabase.auth.logout()
  • supabase.auth.refreshToken()
  • supabase.auth.user()

Breaking changes

  • will not work with "pre-auth" Supabase backends. If you're seeing Error: {“message”:“Server lacks JWT secret”} you will need to use version v0.34.0 or lower
supabase-js - v0.34.0

Published by dragarcia over 4 years ago

Dependencies

  • Bump up supabase/postgrest-js dependency to 0.16.1.
  • Bump up supabse/realtime-js dependency to 0.9.0.

Others

  • Initial release in the repository supabase/supabase-js
  • Following semantic versioning from now on. Moved release from patch (v0.1.33) to minor (v0.34.0).