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

Session persistence optimization #6

Merged
merged 7 commits into from
Feb 13, 2025

Conversation

fquffio
Copy link
Contributor

@fquffio fquffio commented Feb 13, 2025

This PR improves session persistence by avoiding persisting a session that had no changes. Additionally, test coverage has increased significantly, and the in-memory cache has been refactored to use @heyputer/kv.js instead of a custom home-made implementation.

Copy link

changeset-bot bot commented Feb 13, 2025

🦋 Changeset detected

Latest commit: adab7ff

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@chialab/sveltekit-utils Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 81.17647% with 32 lines in your changes missing coverage. Please review.

Project coverage is 74.57%. Comparing base (73a1152) to head (adab7ff).

Files with missing lines Patch % Lines
src/lib/server/hooks/session.ts 0.00% 13 Missing ⚠️
src/lib/server/cache/redis.ts 16.66% 10 Missing ⚠️
src/lib/server/session.ts 94.68% 5 Missing ⚠️
src/lib/server/cache/in-memory.ts 88.46% 3 Missing ⚠️
src/lib/utils/index.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             next       #6       +/-   ##
===========================================
+ Coverage   36.69%   74.57%   +37.87%     
===========================================
  Files          19       20        +1     
  Lines         714      704       -10     
  Branches       91      161       +70     
===========================================
+ Hits          262      525      +263     
+ Misses        444      177      -267     
+ Partials        8        2        -6     

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

@fquffio fquffio marked this pull request as ready for review February 13, 2025 17:22
@fquffio fquffio merged commit 98cf65e into next Feb 13, 2025
4 checks passed
@fquffio fquffio deleted the refactor/session-persistence-optimization branch February 13, 2025 17:23
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.

2 participants