diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1a906965..f8227cff 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,11 +2,21 @@ name: CI on: pull_request: + paths-ignore: + - 'docs/**' + - '**/*.md' + - '.prettierrc' + - '**/*ignore' push: branches: - master - next - rc + paths-ignore: + - 'docs/**' + - '**/*.md' + - '.prettierrc' + - '**/*ignore' jobs: test: diff --git a/package-lock.json b/package-lock.json index bead83dd..5eb45888 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "MIT", "dependencies": { "@supabase/functions-js": "^2.1.0", - "@supabase/gotrue-js": "^2.26.0", + "@supabase/gotrue-js": "^2.31.0", "@supabase/postgrest-js": "^1.7.0", "@supabase/realtime-js": "^2.7.3", "@supabase/storage-js": "^2.5.1", @@ -1061,9 +1061,9 @@ } }, "node_modules/@supabase/gotrue-js": { - "version": "2.26.0", - "resolved": "https://registry.npmjs.org/@supabase/gotrue-js/-/gotrue-js-2.26.0.tgz", - "integrity": "sha512-orxz8nwaF5D1nY/9H5xxTfFSCTvYeDLx24UO/Mxsx83xFP0t5RNxQZ0lEHBOhHhXJ4vR/COv79AxoWCOTu/7Rg==", + "version": "2.31.0", + "resolved": "https://registry.npmjs.org/@supabase/gotrue-js/-/gotrue-js-2.31.0.tgz", + "integrity": "sha512-YcwlbbNfedlue/HVIXtYBb4fuOrs29gNOTl6AmyxPp4zryRxzFvslVN9kmLDBRUAVU9fnPJh2bgOR3chRjJX5w==", "dependencies": { "cross-fetch": "^3.1.5" } diff --git a/package.json b/package.json index 75dde4bf..d4bfa8d5 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ }, "dependencies": { "@supabase/functions-js": "^2.1.0", - "@supabase/gotrue-js": "^2.26.0", + "@supabase/gotrue-js": "^2.31.0", "@supabase/postgrest-js": "^1.7.0", "@supabase/realtime-js": "^2.7.3", "@supabase/storage-js": "^2.5.1", diff --git a/src/SupabaseClient.ts b/src/SupabaseClient.ts index 33506f23..0c64cc2b 100644 --- a/src/SupabaseClient.ts +++ b/src/SupabaseClient.ts @@ -62,7 +62,7 @@ export default class SupabaseClient< protected rest: PostgrestClient protected storageKey: string protected fetch?: Fetch - protected changedAccessToken: string | undefined + protected changedAccessToken?: string protected headers: { [key: string]: string @@ -282,15 +282,15 @@ export default class SupabaseClient< private _listenForAuthEvents() { let data = this.auth.onAuthStateChange((event, session) => { - this._handleTokenChanged(event, session?.access_token, 'CLIENT') + this._handleTokenChanged(event, 'CLIENT', session?.access_token) }) return data } private _handleTokenChanged( event: AuthChangeEvent, - token: string | undefined, - source: 'CLIENT' | 'STORAGE' + source: 'CLIENT' | 'STORAGE', + token?: string ) { if ( (event === 'TOKEN_REFRESHED' || event === 'SIGNED_IN') &&