Releases: supabase/supabase-js
Releases · supabase/supabase-js
v1.0.7
v1.0.6
v1.0.5
v1.0.4
v1.0.3
v1.0.2
v1.0.1
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 supabase/supabase#147 supabase/supabase#147
- Partial fix for supabase/realtime-js#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()
v0.36.5
v0.36.4
v0.35.0
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 versionv0.34.0
or lower