Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(token): cache Fetch tokens by default #30

Merged
merged 1 commit into from
Dec 22, 2024

Conversation

jaredallard
Copy link
Owner

Opts to cache tokens returned by Fetch by default. Adds a new
Options type that can be passed to Fetch to configure (disable) this
behaviour. As part of this, the allowUnauthenticated function option
has been moved to that struct. While the original bool is kept to
prevent breaking changes, it will be removed before v1 so callers should
update their calls ASAP.

Opts to cache tokens returned by `Fetch` by default. Adds a new
`Options` type that can be passed to `Fetch` to configure (disable) this
behaviour. As part of this, the `allowUnauthenticated` function option
has been moved to that struct. While the original bool is kept to
prevent breaking changes, it will be removed before v1 so callers should
update their calls ASAP.
Copy link

codecov bot commented Dec 22, 2024

Codecov Report

Attention: Patch coverage is 65.90909% with 15 lines in your changes missing coverage. Please review.

Project coverage is 55.81%. Comparing base (8316650) to head (5ff0c14).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
token/token.go 66.66% 7 Missing and 2 partials ⚠️
token/internal/shared/shared.go 0.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #30      +/-   ##
==========================================
+ Coverage   54.98%   55.81%   +0.83%     
==========================================
  Files          17       18       +1     
  Lines         682      722      +40     
==========================================
+ Hits          375      403      +28     
- Misses        252      262      +10     
- Partials       55       57       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jaredallard
Copy link
Owner Author

DDR says "looks fine" 🥹

@jaredallard jaredallard merged commit 884a856 into main Dec 22, 2024
4 checks passed
@jaredallard jaredallard deleted the jaredallard/feat/token-fetch-cache branch December 22, 2024 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant