-
-
Notifications
You must be signed in to change notification settings - Fork 173
feat: add standard client headers #685
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Merged
grdsdev
merged 4 commits into
main
from
guilherme/clibs-117-supabase-swift-send-standard-client-headers-on-all-requests
May 3, 2025
Merged
feat: add standard client headers #685
grdsdev
merged 4 commits into
main
from
guilherme/clibs-117-supabase-swift-send-standard-client-headers-on-all-requests
May 3, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pull Request Test Coverage Report for Build 13698748167Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 14795739369Details
💛 - Coveralls |
9c3b783
to
d41a530
Compare
d41a530
to
ceb9742
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces standard client headers to the Supabase client and updates the related test assets. Key changes include:
- Refactoring header initialization in SupabaseClient to use defaultHeaders.
- Adding new client header values for platform and platform version.
- Updating tests to assert the new header structure using inline snapshots.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
Tests/SupabaseTests/SupabaseClientTests.swift | Updated tests to validate the new header values with snapshots. |
Sources/Supabase/SupabaseClient.swift | Refactored header setup to merge default and custom headers. |
Sources/Supabase/Constants.swift | Added a defaultHeaders closure generating standard headers. |
Sources/Helpers/Version.swift | Updated version and platform logic using new Swift patterns. |
Package.swift | Added InlineSnapshotTesting dependency for enhanced snapshot tests. |
Comments suppressed due to low confidence (2)
Sources/Supabase/SupabaseClient.swift:163
- [nitpick] Consider extracting the headers merging logic into a helper function to improve readability and ease future maintenance.
_headers = HTTPFields(defaultHeaders).merging(with: HTTPFields([...]))
Tests/SupabaseTests/SupabaseClientTests.swift:67
- [nitpick] The inline snapshot contains hard-coded header values; be aware that any future changes to header generation logic may require updating this snapshot to avoid false negatives.
assertInlineSnapshot(of: client.headers, as: .customDump) {
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
dshukertjr
approved these changes
May 2, 2025
Closed
2 tasks
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
Bug fix, feature, docs update, ...
What is the current behavior?
Please link any relevant issues here.
What is the new behavior?
Feel free to include screenshots if it includes visual changes.
Additional context
Add any other context or screenshots.