• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / supabase-swift / 32239205546
87%

Build:
DEFAULT BRANCH: main
Ran 19 Aug 2026 09:49AM UTC
Jobs 1
Files 104
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

19 Aug 2026 09:45AM UTC coverage: 77.573% (-1.5%) from 79.053%
32239205546

push

github

web-flow
refactor(functions)!: make FunctionsClient stateless and a struct (#1233)

* refactor(functions)!: make FunctionsClient stateless and a struct

FunctionsClient's only mutable state was a lock-protected Authorization
header mutated via `setAuth(token:)`. Replace it with an
`accessToken: (@Sendable () async throws -> String?)?` closure,
resolved fresh before every request instead of cached on the client.
`SupabaseClient`'s internal `functions.setAuth(...)` call is removed
too: it was already redundant, since `SupabaseClient`'s fetch handler
overwrites `Authorization` on every request with the live session
token.

With no mutable state left, every stored property is now a `let`, so
FunctionsClient becomes a `struct` instead of a `final class`.

* refactor(functions): stop caching FunctionsClient in SupabaseClient.mutableState

FunctionsClient holds no mutable state now, so there is nothing to gain
from memoizing one per SupabaseClient instance. Build and return a
fresh value on every access to SupabaseClient.functions instead.

* fix(functions): stop clobbering per-invocation Authorization overrides

SupabaseClient.functions wired FunctionsClient's `fetch` to
fetchWithAuth, which unconditionally overwrites `Authorization` with
the live access token on every outgoing request. That silently
clobbered a per-invocation header override passed via
FunctionInvokeOptions whenever a session was active, even though
FunctionsClient's own buildRequest already applies that override
correctly.

Give FunctionsClient a transport-only fetch (trace-context injection,
no auth) plus its own `accessToken` closure instead, mirroring the
fetch/accessToken split already used for RealtimeClientV2. The closure
captures `self` weakly (matching this file's no-self-capture
convention for sub-client closures) and swallows a missing-session
error, so anonymous invocations keep working instead of throwing.

* docs(supabase): trim redundant comment on functions property

The `fetchWithA... (continued)

0 of 45 new or added lines in 2 files covered. (0.0%)

112 existing lines in 2 files now uncovered.

8104 of 10447 relevant lines covered (77.57%)

32.57 hits per line

Uncovered Changes

Lines Coverage ∆ File
29
18.29
-78.84% Sources/Functions/FunctionsClient.swift
16
68.23
-6.15% Sources/Supabase/SupabaseClient.swift

Coverage Regressions

Lines Coverage ∆ File
109
18.29
-78.84% Sources/Functions/FunctionsClient.swift
3
68.23
-6.15% Sources/Supabase/SupabaseClient.swift
Jobs
ID Job ID Ran Files Coverage
1 32239205546.1 19 Aug 2026 09:49AM UTC 104
77.57
GitHub Action Run
Source Files on build 32239205546
  • Tree
  • List 104
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #32239205546
  • 88a5efe7 on github
  • Prev Build on main (#32140659476)
  • Next Build on main (#32311328526)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc